Calling Standard Program Using Keyworkd 'SUBMIT'.
Hi All,
I have the requirement where i have to capture the output of Tcode: MC.5 into an internal table and then i have to manupulate that data.
I have used 'submit' keyword with the proper addition keywords to transfer the output into the memory and then picking it from the memory using FM 'LIST_FROM_MEMORY' and then converting it into the ASCI format using FM
'LIST_TO_ASCI'.
I am getting the output with null values but when i am executing the MC.5 with the same selection there are no values for the output fields.Please help me in this ....
Attached is the code which i have used....
selpr-selname = 'SL_WERKS'.
selpr-kind = 'S'.
selpr-sign = 'I'.
selpr-option = 'EQ'.
selpr-low = '1100'.
append selpr.
clear selpr.
selpr-selname = 'SL_MATNR'.
selpr-kind = 'S'.
selpr-sign = 'I'.
selpr-option = 'EQ'.
selpr-low = '100000005'.
append selpr.
clear selpr.
selpr-selname = 'SL_SPMON'.
selpr-kind = 'S'.
selpr-sign = 'I'.
selpr-option = 'EQ'.
selpr-low = '082007'.
selpr-high = '082007'.
append selpr.
clear selpr.
selpr-selname = 'SLV_NO'.
selpr-kind = 'P'.
selpr-sign = 'I'.
selpr-option = 'EQ'.
selpr-low = 'Z001'.
*selpr-high = '082007'.
append selpr.
clear selpr.
submit rmcb0100
with selection-table selpr
and return
exporting list to memory.
clear: ws_list, it_asc.
call function 'LIST_FROM_MEMORY'
tables
listobject = ws_list
exceptions
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.
endif.
IF SY-SUBRC = 0.
"convert it to ASCI
call function 'LIST_TO_ASCI'
tables
listasci = it_asc
listobject = ws_list
exceptions
empty_list = 1
list_index_invalid = 2
others = 3.
Thanks in Advance
Ganga B