on 08-24-2007 1:13 PM
I need a solution for Converting script into EXCEL and sending Excel as a attachment to the mail. In my current Program I am getting OTF data from script and converting into PDF using Function module ' CONVERT_OTF'
And sending PDF as a mail attachment using Function module 'SO_NEW_DOCUMENT_SEND_API1' it is working fine but
My current requirement is I need to send Excel as a mail attachment instead of PDF.
Hope it is clear for you, please give me possible solutions with sample code..
HI,
use this fm
SO_NEW_DOCUMENT_ATT_SEND_API1
thanks
vivekanand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
good
CONSTANTS: CON_CRET TYPE X VALUE '0D', "OK for non Unicode
CON_TAB TYPE X VALUE '09'. "OK for non Unicode
*If you have Unicode check active in program attributes thnen you will
*need to declare constants as follows
*class cl_abap_char_utilities definition load.
*constants:
con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
con_cret type c value cl_abap_char_utilities=>CR_LF.
CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
INTO IT_ATTACH SEPARATED BY CON_TAB.
CONCATENATE CON_CRET IT_ATTACH INTO IT_ATTACH.
APPEND IT_ATTACH.
LOOP AT IT_EKPO INTO WA_CHAREKPO.
CONCATENATE WA_CHAREKPO-EBELN WA_CHAREKPO-EBELP
WA_CHAREKPO-AEDAT WA_CHAREKPO-MATNR
INTO IT_ATTACH SEPARATED BY CON_TAB. " Check here
CONCATENATE CON_CRET IT_ATTACH INTO IT_ATTACH. " Check here
APPEND IT_ATTACH.
ENDLOOP.
thanks
mrutyun^
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for your reply.
The solution given by you is not suiting my requirement. My requirement is like converting the SAPSCRIPT output (which is OTF data) to excel format through report and sending through mail. But OTF is not a grid, like Excel, i am unable to do the conversion. If it is to PDF, i can do it easily. But the requirement is to put the data into excel file. Is there any way we can do it. Please give your possible solutions.
Thans
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.