‎2014 Jun 06 7:42 PM
I need to import some tables in badi IF_EX_ CUSTOMER_ADD_DATA ~ CHECK_ALL DATE, to save some tables that I use the screens. I used the export code on the screens and badi in import command, but it seems the import field is not supported in OO.
Anyone know any way to pass these tables to badi?
‎2014 Jun 06 8:35 PM
‎2014 Jun 07 6:44 AM
Hi Lucas,
Import & Export statements are supported in OO context! There is another syntax of Import & Export which allows to achieve the necessary i.e,
EXPORT <var> FROM <var>
TO MEMORY ID 'VAR'.
IMPORT <var> TO <var>
TO MEMORY ID 'VAR'.
as compared to earlier syntax
Sample Code
" Since a lot of internal tables would have been declared with OCCURS addition
" we can declare our own internal table and pass it along for IMPORT.
DATA: IT_EXPORT TYPE STANDARD TABLE OF ITAB.
DELETE FROM MEMORY ID 'IT_EXPORT'.
IT_EXPORT[] = ITAB[].
EXPORT IT_EXPORT
FROM IT_EXPORT
TO MEMORY ID 'IT_EXPORT'.
In Calling Program you can write -
" Please note here your structure for IT_IMPORT should be same as IT_EXPORT.
IMPORT IT_EXPORT
TO IT_IMPORT
FROM MEMORY ID 'IT_EXPORT'.
Cheers,
Varun