0% found this document useful (0 votes)
166 views28 pages

Creating Excel Spreadsheet With More Than One Page

This document provides code to export Excel data with multiple sheets from SAP. It uses the CL_GUI_FRONTEND_SERVICES class and the clipboard_export method to download different data into an Excel file with more than one sheet. The code includes macros to populate sample data into tables that will then be exported to Excel.

Uploaded by

Abu Fajri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
166 views28 pages

Creating Excel Spreadsheet With More Than One Page

This document provides code to export Excel data with multiple sheets from SAP. It uses the CL_GUI_FRONTEND_SERVICES class and the clipboard_export method to download different data into an Excel file with more than one sheet. The code includes macros to populate sample data into tables that will then be exported to Excel.

Uploaded by

Abu Fajri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 28

Creating Excel with More than one page

Applies to:
This sample code applies to all the versions starting from 4.6
Summary
Normally, we use the Function module WS_!"# to download the data into an e$cel sheet, %ut sometimes we may
re&uire to download the different data in to an e$cel with more than one sheet, in that case we can ma'e use of the
(# concept to achieve this one. )se the "lass cl_gui_frontend_services,*n this class use the method
clipboard_export.
Author+ Sudheer ,unnuthula

Company+ *ntelligroup -sia .vt #td

Created on: /0 1ecem%er /226

Author Bio


Sudheer 3unnuthula, is wor'ing in *ntelligroup -sia
.vt ltd, * have 4.4 years of S-. $perience. * have
strong 'nowledge in S-. Scripts, 51"6s and
7eports, and presently * am a .rogrammer analyst
in *ntelligroup.

able of Contents

-pplies to+........................................................................................................................................8
Summary..........................................................................................................................................8
-uthor 5io........................................................................................................................................8
The code..........................................................................................................................................9
1isclaimer and #ia%ility Notice.......................................................................................................86


The code

*&---------------------------------------------------------------------*
*& Report ZETA_EXCEL_DOWNLOAD_CLIPBOARD *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*

REPORT ZETA_EXCEL_DOWNLOAD_CLIPBOARD .
INCLUDE OLE2INCL.
.
DATA: w_ce! T"PE oe2_o#$ect%
w_ce2 T"PE oe2_o#$ect.

*--- Oe &'t' Dec'r't(o)*
DATA: +_e,ce T"PE oe2_o#$ect% - E,ce o#$ect
+_.'p T"PE oe2_o#$ect% - (*t o/ wor0#oo0*
+_.'p T"PE oe2_o#$ect% - wor0#oo0
+_1 T"PE oe2_o#$ect% - ce
+_/ T"PE oe2_o#$ect% - /o)t
2*_()ter(or T"PE oe2_o#$ect% - P'tter)
wor0*+eet T"PE oe2_o#$ect%
+_ce T"PE oe2_o#$ect%
+_ce! T"PE oe2_o#$ect%
r')2e T"PE oe2_o#$ect%
+_*+eet2 T"PE oe2_o#$ect%
+_*+eet3 T"PE oe2_o#$ect%
45_6ONT T"PE oe2_o#$ect%
/2_*top7!8 T"PE c.

*********************************************************************
** I)ter)' t'#e Dec'r't(o)
*********************************************************************

DATA: BE4IN O6 T_EXCEL OCCUR5 9%

:;OR47298 T"PE C% -5'e* Or2

:BT"P7298 T"PE C% -Doc<.e)t C'te2or=

AUART7298 T"PE C% -Doc<.e)t T=pe

ERNA>7298 T"PE C% -Cre'te& B=

:BELN7298 T"PE C% -Doc<.e)t N<.#er

PO5NR7298 T"PE C% -Ite. N<.#er

ERDAT7298 T"PE C% -Cre'te& D'te

:DATU7298 T"PE C% -?e'&er Re@<e*te& De(Aer= D'te

REBDAT7298 T"PE C% -Re@<e*t &'te

CONDAT7298 T"PE C% -Co)/(r. &'te

LI65;7298 T"PE C% -?e'&er Boc0

TXT397398 T"PE C% -Or&er U*er 5t't<* De*cr(pt(o)

LI65P7298 T"PE C% -L()e Boc0

DI5PO7298 T"PE C% ->RP Co)troer

D5NA>7298 T"PE C% ->RP Co)troer De*cr(pt(o)

:>5TA7298 T"PE C% ->'ter(' 5'e* 5t't<*

;UNNR7298 T"PE C% -5o& To

CNA>E73C8 T"PE C% -5o& To N'.e

RE4IO7298 T"PE C% -5t'te

CU6D7!98 T"PE C% -CUD

B5TN;7298 T"PE C% -POD

B5AR;7298 T"PE C% -Or&er()2 >et+o&

>ATNR7298 T"PE C% ->'ter('

>A;TX73C8 T"PE C% ->'ter(' De*cr(pt(o)

T2997298 T"PE C% -T299

:TEXT7298 T"PE C% -T299 De*cr(pt(o)

>AT;L7298 T"PE C% ->'ter(' 4ro<p

ZZBO>IND7E8 T"PE C% -BO> I)&(c'tor

O5TAT7298 T"PE C% -Or&er 5t't<*

C>45T7298 T"PE C% -CRD

INCO!7298 T"PE C% -I)coter.*

OBT"7298 T"PE C% -Or&er B<')t(t=

PBT"7298 T"PE C% -Ope) B<')t(t=

UNIT7298 T"PE C% -UO>

ONET7298 T"PE C% -Or&er :'<e

PNET7298 T"PE C% -Ope) :'<e

CURR7298 T"PE C% -C<rre)c= 0e=

5O_BEZEI LI;E T:;BT-BEZEI%-5'e* O//(ce

54_BEZEI LI;E T:4RT-BEZEI%-5'e* 4ro<p

BNA>E7298 T"PE C% -Or&er()2 P'rt=

CONTACT7298 T"PE C% -Co)t'ct N'.e

TEL6!7298 T"PE C% -Co)t'ct te/!

REBBT"7298 T"PE C% -Ite. Re@<e*t @t=

REB:AL7298 T"PE C% -Ite. Re@<e*t A'<e

CONBT"7298 T"PE C% -Ite. Co)/(r. @t=

CON:AL7298 T"PE C% -Ite. Co)/(r. A'<e

ZZRE:7928 T"PE C% -ReAe)<e reco2)(t(o) 'ccept')ce

BEZEI7298 T"PE C% -ReAe)<e reco2)(t(o) te,t

:4BEL7298 T"PE C% -Re/ere)ce Or&er /or RETURN5

999FTEXT72CC8 T"PE C% -I)ter)' Or&er Co..e)t Te,t

END O6 T_EXCEL.

DATA: T_EXCEL_BC;ORD LI;E T_EXCEL OCCUR5 9 WIT? ?EADER LINE%
T_EXCEL_BC;LO4 LI;E T_EXCEL OCCUR5 9 WIT? ?EADER LINE%
T_EXCEL_BL;ORD LI;E T_EXCEL OCCUR5 9 WIT? ?EADER LINE.

T"PE5: &'t'!7!C998 T"PE c%
t= T"PE TABLE O6 &'t'!.
DATA: (t T"PE t= WIT? ?EADER LINE%
(t_2 T"PE t= WIT? ?EADER LINE%
(t_3 T"PE t= WIT? ?EADER LINE%
rec T"PE *=-t/(%
&e(7!8 T"PE c%
_'.t7!F8 T"PE c.
DATA: BE4IN O6 +e,%
t'# T"PE ,%
END O6 +e,.

6IELD-5">BOL5: G/*H .

CON5TANT5 c)*_9I728 T"PE ) :ALUE 9I.

A55I4N &e( TO G/*H T"PE JXJ.
+e,-t'# K c)*_9I.
G/*H K +e,-t'#.

DATA 4:_5?EET_NA>E7298 T"PE C .

*----------------------------------------------------------------------*
* > A C R O Dec'r't(o)
*----------------------------------------------------------------------*
DE6INE oe_c+ec0_error.
(/ &! )e 9.
.e**'2e e99!7118 w(t+ &!.
e,(t.
e)&(/.
END-O6-DE6INITION.

T_EXCEL_BC;ORD-A0or2 K JABCJ.
T_EXCEL_BC;ORD-A#t=p K JDE6J.
T_EXCEL_BC;ORD-'<'rt K J4?IJ.
T_EXCEL_BC;ORD-er)'. K JL;LJ.
T_EXCEL_BC;ORD-A#e) K J>NOJ.
T_EXCEL_BC;ORD-999Fte,t K JX"ZJ.
APPEND T_EXCEL_BC;ORD.

T_EXCEL_BC;ORD-A0or2 K JABC!J.
T_EXCEL_BC;ORD-A#t=p K JDE6!J.
T_EXCEL_BC;ORD-'<'rt K J4?I!J.
T_EXCEL_BC;ORD-er)'. K JL;L!J.
T_EXCEL_BC;ORD-A#e) K J>NO!J.
T_EXCEL_BC;ORD-999Fte,t K JX"Z!J.
APPEND T_EXCEL_BC;ORD.

T_EXCEL_BC;ORD-A0or2 K JABC2J.
T_EXCEL_BC;ORD-A#t=p K JDE62J.
T_EXCEL_BC;ORD-'<'rt K J4?I2J.
T_EXCEL_BC;ORD-er)'. K JL;L2J.
T_EXCEL_BC;ORD-A#e) K J>NO2J.
T_EXCEL_BC;ORD-999Fte,t K JX"Z2J.
APPEND T_EXCEL_BC;ORD.



T_EXCEL_BC;LO4-A0or2 K JABCJ.
T_EXCEL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t<

T_EXCEL_BL;ORD-re@&'t

T_EXCEL_BL;ORD-co)&'t

T_EXCEL_BL;ORD-(/*0

T_EXCEL_BL;ORD-t,t39

T_EXCEL_BL;ORD-(/*p

T_EXCEL_BL;ORD-&(*po

T_EXCEL_BL;ORD-&*)'.

T_EXCEL_BL;ORD-A.*t'

T_EXCEL_BL;ORD-0<))r

T_EXCEL_BL;ORD-c)'.e

T_EXCEL_BL;ORD-re2(o

T_EXCEL_BL;ORD-c</&

T_EXCEL_BL;ORD-#*t)0

T_EXCEL_BL;ORD-#*'r0

T_EXCEL_BL;ORD-.'t)r

T_EXCEL_BL;ORD-.'0t,

T_EXCEL_BL;ORD-t299

T_EXCEL_BL;ORD-Ate,t

T_EXCEL_BL;ORD-.'t0

T_EXCEL_BL;ORD-11#o.()&

T_EXCEL_BL;ORD-o*t't

T_EXCEL_BL;ORD-c.2*t

T_EXCEL_BL;ORD-()co!

T_EXCEL_BL;ORD-o@t=

T_EXCEL_BL;ORD-p@t=

T_EXCEL_BL;ORD-<)(t

T_EXCEL_BL;ORD-o)et

T_EXCEL_BL;ORD-p)et

T_EXCEL_BL;ORD-c<rr

T_EXCEL_BL;ORD-*o_#e1e(

T_EXCEL_BL;ORD-*2_#e1e(

T_EXCEL_BL;ORD-#)'.e

T_EXCEL_BL;ORD-co)t'ct

T_EXCEL_BL;ORD-te/!

T_EXCEL_BL;ORD-re@@t=

T_EXCEL_BL;ORD-re@A'

T_EXCEL_BL;ORD-co)@t=

T_EXCEL_BL;ORD-co)A'

T_EXCEL_BL;ORD-11reA

T_EXCEL_BL;ORD-#e1e(

T_EXCEL_BL;ORD-A2#e

T_EXCEL_BL;ORD-999Fte,t

INTO (t_3
5EPARATED B" &e(.

APPEND (t_3.
CLEAR (t_3.
ENDLOOP.


* *t'rt E,ce
I6 +_e,ce-+e'&er K *p'ce OR +_e,ce-+')&e K -!.
CREATE OBLECT +_e,ce JEXCEL.APPLICATIONJ.
ENDI6.

*--- 2et (*t o/ wor0#oo0*% ()(t('= e.pt=
CALL >ET?OD O6 +_e,ce JWor0#oo0*J K +_.'p.
5ET PROPERT" O6 +_e,ce J:(*(#eJ K !.
CALL >ET?OD O6 +_.'p JA&&J K +_.'p.
4:_5?EET_NA>E K JB'c0 Or&er*J.
4ET PROPERT" O6 +_e,ce JACTI:E5?EETJ K wor0*+eet.
5ET PROPERT" O6 wor0*+eet JN'.eJ K 4:_5?EET_NA>E .


*--6or.'tt()2 t+e 're' o/ '&&(t(o)' &'t' ! ')& &o()2 t+e BOLD
CALL >ET?OD O6 ?_EXCEL JCe*J K w_CELL!
EXPORTIN4
D! K !
D2 K !.
CALL >ET?OD O6 ?_EXCEL JCe*J K W_CELL2
EXPORTIN4
D! K !
D2 K C9.
CALL >ET?OD O6 ?_EXCEL JR')2eJ K ?_CELL
EXPORTIN4
D! K W_CELL!
D2 K W_CELL2.
4ET PROPERT" O6 ?_CELL J6o)tJ K 45_6ONT .
5ET PROPERT" O6 45_6ONT JBo&J K ! .

DATA _rc T"PE (.
CALL >ET?OD c_2<(_/ro)te)&_*erA(ce*KHc(p#o'r&_e,port
I>PORTIN4
&'t' K (tNO
C?AN4IN4
rc K _rc
EXCEPTION5
c)t_error K !
error_)o_2<( K 2
)ot_*<pporte&_#=_2<( K 3
OT?ER5 K M.

CALL >ET?OD O6 +_e,ce JCe*J K w_ce!
EXPORTIN4
D! K !
D2 K !.

CALL >ET?OD O6 +_e,ce JCe*J K w_ce2
EXPORTIN4
D! K !
D2 K !.

CALL >ET?OD O6 +_e,ce JR')2eJ K r')2e
EXPORTIN4
D! K w_ce!
D2 K w_ce2.

CALL >ET?OD O6 r')2e J5eectJ.
CALL >ET?OD O6 wor0*+eet JP'*teJ.
4:_5?EET_NA>E K JB'c0o2J.
4ET PROPERT" O6 ?_EXCEL J5+eet*J K +_*+eet2 .
CALL >ET?OD O6 +_*+eet2 JA&&J K +_.'p.
5ET PROPERT" O6 +_.'p JN'.eJ K 4:_5?EET_NA>E .
4ET PROPERT" O6 +_e,ce JACTI:E5?EETJ K wor0*+eet.

*--6or.'tt()2 t+e 're' o/ '&&(t(o)' &'t' ! ')& &o()2 t+e BOLD
CALL >ET?OD O6 ?_EXCEL JCe*J K w_CELL!
EXPORTIN4
D! K !
D2 K !.
CALL >ET?OD O6 ?_EXCEL JCe*J K W_CELL2
EXPORTIN4
D! K !
D2 K C9.
CALL >ET?OD O6 ?_EXCEL JR')2eJ K ?_CELL
EXPORTIN4
D! K W_CELL!
D2 K W_CELL2.
4ET PROPERT" O6 ?_CELL J6o)tJ K 45_6ONT .
5ET PROPERT" O6 45_6ONT JBo&J K ! .

CALL >ET?OD c_2<(_/ro)te)&_*erA(ce*KHc(p#o'r&_e,port
I>PORTIN4
&'t' K (t_2NO
C?AN4IN4
rc K _rc
EXCEPTION5
c)t_error K !
error_)o_2<( K 2
)ot_*<pporte&_#=_2<( K 3
OT?ER5 K M.

CALL >ET?OD O6 +_e,ce JCe*J K w_ce!
EXPORTIN4
D! K !
D2 K !.

CALL >ET?OD O6 +_e,ce JCe*J K w_ce2
EXPORTIN4
D! K !
D2 K !.

CALL >ET?OD O6 +_e,ce JR')2eJ K r')2e
EXPORTIN4
D! K w_ce!
D2 K w_ce2.

CALL >ET?OD O6 r')2e J5eectJ.
CALL >ET?OD O6 wor0*+eet JP'*teJ.
4:_5?EET_NA>E K JBoc0e& Or&er*J.
4ET PROPERT" O6 ?_EXCEL J5+eet*J K +_*+eet3 .
CALL >ET?OD O6 +_*+eet3 JA&&J K +_.'p.
5ET PROPERT" O6 +_.'p JN'.eJ K 4:_5?EET_NA>E .
4ET PROPERT" O6 +_e,ce JACTI:E5?EETJ K wor0*+eet.


*--6or.'tt()2 t+e 're' o/ '&&(t(o)' &'t' ! ')& &o()2 t+e BOLD
CALL >ET?OD O6 ?_EXCEL JCe*J K w_CELL!
EXPORTIN4
D! K !
D2 K !.
CALL >ET?OD O6 ?_EXCEL JCe*J K W_CELL2
EXPORTIN4
D! K !
D2 K C9.
CALL >ET?OD O6 ?_EXCEL JR')2eJ K ?_CELL
EXPORTIN4
D! K W_CELL!
D2 K W_CELL2.
4ET PROPERT" O6 ?_CELL J6o)tJ K 45_6ONT .
5ET PROPERT" O6 45_6ONT JBo&J K ! .

CALL >ET?OD c_2<(_/ro)te)&_*erA(ce*KHc(p#o'r&_e,port
I>PORTIN4
&'t' K (t_3NO
C?AN4IN4
rc K _rc
EXCEPTION5
c)t_error K !
error_)o_2<( K 2
)ot_*<pporte&_#=_2<( K 3
OT?ER5 K M.

CALL >ET?OD O6 +_e,ce JCe*J K w_ce!
EXPORTIN4
D! K !
D2 K !.

CALL >ET?OD O6 +_e,ce JCe*J K w_ce2
EXPORTIN4
D! K !
D2 K !.

CALL >ET?OD O6 +_e,ce JR')2eJ K r')2e
EXPORTIN4
D! K w_ce!
D2 K w_ce2.

CALL >ET?OD O6 r')2e J5eectJ.
CALL >ET?OD O6 wor0*+eet JP'*teJ.


*--- &(*co))ect /ro. E,ce
6REE OBLECT +_1.
6REE OBLECT +_.'p.
6REE OBLECT +_.'p.
6REE OBLECT +_e,ce.

!isclaimer and "iability #otice
This document may discuss sample coding or other information that does not include S-. official interfaces and
therefore is not supported %y S-.. "hanges made %ased on this information are not supported and can %e
overwritten during an upgrade.
S-. will not %e held lia%le for any damages caused %y using or misusing the information, code or methods suggested
in this document, and anyone using these methods does so at his:her own ris'.
S-. offers no guarantees and assumes no responsi%ility or lia%ility of any type with respect to the content of this
technical article or code sample, including any lia%ility resulting from incompati%ility %etween the content within this
document and the materials and services offered %y S-.. ;ou agree that you will not hold, or see' to hold, S-.
responsi%le or lia%le with respect to the content of this document.

You might also like