I have created a Function Module, and from the function module i am calling a report program thru "SUBMIT" command.
now in the 'submit' command i add the addition 'exporting list to memory and return'.
after that i read the contents of the list using FM
now i enter the name of the internal table which i declared in FM. But this is giving me run time error.
for detaild view i post the code down below:-
submit zrpt_mm_045 with s_werks-low = s_werks
with s_mtart-low = s_mtart_low
with s_mtart-high = s_mtart_high
with s_matnr-low = s_matnr_low
with s_matnr-high = s_matnr_high
with s_budat-low = s_budat_low
with s_budat-high = s_budat_high
with s_lgort-low = s_lgort
with rb1 = rb1
with rb2 = rb2
with rb3 = rb3
EXPORTING LIST TO MEMORY AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
listobject = itmatgrp1 ---> from FM
NOT_FOUND = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.