12-26-2014 2:13 PM
hi,
i created a fm. and i want to give an internal table to imports value. then i want to send this internal table with html mail. but how can i give internal table to fm. because data type is unknown. it can changes. please help me.
12-28-2014 12:20 PM
Hi,
I had some extra time so here it is .
global-y_r_eitan_tests_05.txt - This go to the gloabl (support class)
y_r_eitan_tests_05.txt - The function - generate html table and send by using cl_bcs .
Using:
FORM test_07 .
DATA: it_sflight TYPE TABLE OF sflight .
SELECT * INTO TABLE it_sflight
FROM sflight
UP TO 100 ROWS .
DATA: it_receivers TYPE somlreci1_t .
APPEND '<receiver mail>' TO it_receivers .
CALL FUNCTION 'Y_R_EITAN_TESTS_05'
EXPORTING
i_subject = 'Hi there'
it_receivers = it_receivers
it_data = it_sflight.
ENDFORM . "test_07
Regards.
12-26-2014 2:27 PM
Hi Burak,
Can you provide bit more information about your requirement?
Is the FM should work with all type of Internal Table?
Regrads.
Praveer.
12-26-2014 2:39 PM
hi praveer,
yes fm should work all type of internal table. because we cant know. which internal tables need
regards.
12-26-2014 2:57 PM
12-26-2014 2:50 PM
Hi,
You can use parameter type table .
You can use cl_salv_ddic=>get_by_data to find out the structure of the table .
regards.
FUNCTION y_r_eitan_tests_05 .
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(IT_DATA) TYPE TABLE
*"----------------------------------------------------------------------
DATA: it_ddfields TYPE ddfields .
FIELD-SYMBOLS: <st_ddfields> LIKE LINE OF it_ddfields .
* Get DDIC Information
CALL METHOD cl_salv_ddic=>get_by_data
EXPORTING
data = it_data
RECEIVING
t_dfies = it_ddfields.
ENDFUNCTION.
See http://scn.sap.com/message/14309154#14309154
In program y_r_eitan_test_10_02
FORM mail_1_prep_2 the use of cl_salv_ddic=>get_by_data to generate html table .
12-27-2014 10:00 AM
hi again, thanks a lot. i did it. but fm is not working when i added it_data in import. then i want to execute but it says;
Error generating the test frame
regards,
burak
12-27-2014 4:01 PM
Hi,
Please upload the program mention and study "FORM mail_1_prep_2"
The program sends many types of attachments.
"error generating the test frame"
You cannot test this function using se37 .
Write a program that send a table to the function.
Regards.
12-27-2014 11:01 AM
12-28-2014 3:58 AM
12-28-2014 12:20 PM
Hi,
I had some extra time so here it is .
global-y_r_eitan_tests_05.txt - This go to the gloabl (support class)
y_r_eitan_tests_05.txt - The function - generate html table and send by using cl_bcs .
Using:
FORM test_07 .
DATA: it_sflight TYPE TABLE OF sflight .
SELECT * INTO TABLE it_sflight
FROM sflight
UP TO 100 ROWS .
DATA: it_receivers TYPE somlreci1_t .
APPEND '<receiver mail>' TO it_receivers .
CALL FUNCTION 'Y_R_EITAN_TESTS_05'
EXPORTING
i_subject = 'Hi there'
it_receivers = it_receivers
it_data = it_sflight.
ENDFORM . "test_07
Regards.
12-29-2014 7:08 AM
12-29-2014 7:11 AM