2008 Apr 15 8:40 AM
Hi,
i do loop on Fm and i have to get table with data,
but after the loop the table is empty end i still get sy-ubrc = 0
what i have to ask instead ?
Regards
2008 Apr 15 8:46 AM
If your sy-subrc AFTER the loop = 0, this only means that looping over internal table was successfull. This doesn't say anything about your FM.
Maybe you can post a code extract, and we can see what is the exact problem.
Hi,
i do loop on Fm and i have to get table with data,
but after the loop the table is empty end i still get sy-ubrc = 0
what i have to ask instead ?
Regards
2008 Apr 15 8:46 AM
If your sy-subrc AFTER the loop = 0, this only means that looping over internal table was successfull. This doesn't say anything about your FM.
Maybe you can post a code extract, and we can see what is the exact problem.
2008 Apr 15 8:55 AM
2008 Apr 15 9:02 AM
hi,
this is the code i dont wont to do append if table is empty,
Regards
LOOP AT it_eme ASSIGNING <_emp>.
CALL FUNCTION 'Z_Logig'
EXPORTING
employee_number = <emp>-pernr
TABLES
data1 = data1
data2 = data2
data3 = data3.
APPEND LINES OF : data1 TO it_1,
data2 TO it_2,
data3 TO it_3.
ENDLOOP.
2008 Apr 15 9:13 AM
hi,
do this way ..
LOOP AT it_eme ASSIGNING <_emp>.
CALL FUNCTION 'Z_Logig'
EXPORTING
employee_number = <emp>-pernr
TABLES
data1 = data1
data2 = data2
data3 = data3.
if not data1[] is initial.
APPEND LINES OF : data1 TO it_1.
endif.
if not data2[] is initial.
APPEND LINES OF : data2 TO it_2.
endif.
if not data3[] is initial.
APPEND LINES OF : data3 TO it_3.
endif.
ENDLOOP.
2008 Apr 15 9:19 AM
Arona,
nothing to add anymore to code of Santosh. Looks pretty much the same as my suggestion.