10-19-2008 10:37 PM
Hi,
there is a way to send internal table in mail ?
for sending mail i use class cl_bcs ,i need example.
Regards
10-20-2008 7:47 AM
Hi Ricardo,
Check the standard demo programs starting with BCS_
Cheers,
Jose.
10-19-2008 10:46 PM
10-20-2008 9:56 AM
Hi MxG ,
yea i follow his blog but he don't move internal table just text.
i wont move the table as plain text i.e. in the body of the mail.
how can i do that?
Regards
10-20-2008 7:47 AM
Hi Ricardo,
Check the standard demo programs starting with BCS_
Cheers,
Jose.
10-20-2008 10:12 AM
Hi Jose ,
i take a look in the BCS programs but nothing there move internal table to mail body.
Regards
10-20-2008 1:08 PM
Hi Ricardo,
Kindly check the below program.
Also check the documentation given for the Func module WWW_ITAB_TO_HTML.Seems we can add colors, headers etc.
DATA: send_request TYPE REF TO cl_bcs,
document TYPE REF TO cl_document_bcs,
recipient TYPE REF TO cl_cam_address_bcs,
bcs_exception TYPE REF TO cx_bcs,
sent_to_all TYPE os_boolean,
lt_tab TYPE TABLE OF makt,
lt_fields TYPE TABLE OF w3fields,
lt_html TYPE TABLE OF w3html.
PARAMETER mailid TYPE adr6-smtp_addr.
SELECT * FROM makt UP TO 10 ROWS INTO TABLE lt_tab WHERE spras = 'E'.
CALL FUNCTION 'WWW_ITAB_TO_HTML'
TABLES
html = lt_html[]
fields = lt_fields
itable = lt_tab.
TRY.
send_request = cl_bcs=>create_persistent( ).
document = cl_document_bcs=>create_document( i_type = 'HTM'
i_text = lt_html
i_subject = 'Table' ).
send_request->set_document( document ).
recipient = cl_cam_address_bcs=>create_internet_address( mailid ).
send_request->add_recipient( EXPORTING i_recipient = recipient
i_express = 'X' ).
send_request->set_send_immediately( 'X' ).
send_request->send( EXPORTING i_with_error_screen = 'X'
RECEIVING result = sent_to_all ).
COMMIT WORK.
CATCH cx_bcs INTO bcs_exception.
EXIT.
ENDTRY.
Cheers,
Jose.
10-20-2008 2:10 PM
Hi Josh,
thanks u are Great ,
its working except the header , i saw that in the fm i have option to use header but i don't now, there is a loot of parameters there how maybe u have idea?
Thanks and Regards
10-20-2008 2:18 PM
Hi Ricardo,
Thanks for the compliment.
Check the documentation given for that FM in SE37. It has an
example with Header.
Cheers,
Jose.