‎2012 Jul 12 5:11 PM
Hi Guys,
I have a requirement to create a FM and in source code i need to perform the logic to
submit < Zprog > and return.
Inside the <Zprog> i need to export the needed itabs,variables,etc.. and after returning to the main FM
i need to import the same which i exported and the output of FM must be the value from <itab>.
Code performed :
1. In FM
a. Submit <Zprog> and return.
b. Import <itab> to memory id 'XYZ'.
When Submit gets executed
2. In Zprog
Export <itab> from memory id 'XYZ'. is added.
But after executing this the <itab> is empty.
<< Urgency Downgraded >>
Note: <itab> in both FM and Zprog is same structure as below.
data: BEGIN OF it_error occurs 0,
lifex_er type likp-lifex,
ebeln_er type ekpo-ebeln,
date_er type sy-datum,
message_er type BAPIRET2-message,
type_er type BAPIRET2-type,
end of it_error.
Thanks!
Regards,
Manoj
Message was edited by: Kesavadas Thekkillath
‎2012 Jul 13 9:23 AM
Hi,
Can you try using the same internal table name in both the FM and in the report,
In FM:
IMPORT it_error FROM MEMORY ID 'XYZ'.
In Report
EXPORT it_error TO MEMORY ID 'XYZ'.
Cheers
~Niranjan
‎2012 Jul 13 1:09 PM
Use Submit and return.
Ex:
REPORT ytest_n1.
TYPES : BEGIN OF ty_mara,
matnr TYPE mara-matnr,
ernam TYPE mara-ernam,
flag TYPE c,
END OF ty_mara.
DATA : it_mara TYPE STANDARD TABLE OF ty_mara,
it_mara1 TYPE STANDARD TABLE OF ty_mara,
wa_mara TYPE ty_mara.
wa_mara-matnr = 'TEst_material'.
APPEND wa_mara TO it_mara.
EXPORT it_mara FROM it_mara
TO MEMORY ID 'MAT_ID'.
‎2012 Jul 13 2:21 PM
Hi Manoj.
Check this link
I think that can help you.
Regards,
Manuel H.