‎2007 Dec 05 5:00 AM
Hi all,
I want to export some data from BADI & Import it back in user exit.
I wrote following line of code in BADI
export P1 FROM xstr to memory id 'ZABHI'.
& following line of code in User Exit
import P1 to xstr FROM memory id 'ZABHI'.
After export sy-subrc becomes 0 hence export statement is working fine but when aftr import xstr remains blank.(sy-subrc = 4)
I tried to execute same code in single ztest abap program & it works fine there.
Thanks in advance.
‎2007 Dec 05 5:08 AM
Hi,
You could also try the EXPORT TO DATABASE statement
EXPORT pname = cname TO DATABASE indx(xy) FROM wa_indx CLIENT
sy-mandt ID 'ZABHI'.
and import from database likewise, but be sure to delete it from that location
once u've read it into the user exit.
Regards,
Samson Rodrigues.
‎2007 Dec 05 5:02 AM
‎2007 Dec 05 5:08 AM
Hi,
You could also try the EXPORT TO DATABASE statement
EXPORT pname = cname TO DATABASE indx(xy) FROM wa_indx CLIENT
sy-mandt ID 'ZABHI'.
and import from database likewise, but be sure to delete it from that location
once u've read it into the user exit.
Regards,
Samson Rodrigues.
‎2007 Dec 05 6:05 AM
Thanks Samson,
That solved the problem. May I know why the earlier statement was not working?
Also please tell me how do I delete it form database? and why do we need to delete it.
‎2007 Dec 05 6:34 AM
hi abhijeet,
you are most welcome....
to delete, use
** deletes the data to save wastage of memory
delete from database indx(xy)
client sy-mandt
id 'ZABHI'.you need to delete it coz, its available to all programs in the R/3
server via the ID and you don't want anybody to view the data u are
sending into memory.
the statement that u used earlier was program specific and hence
not accessible to the user exit.
Regards,
Samson Rodrigues.
‎2007 Dec 05 5:08 AM
Hi,
If the memory is cleared before the import, then it can be blank.
‎2007 Dec 05 5:12 AM
Hi
Check Program demo_data_ext_cluster_import
in ur system . Hope it Helps.
Praveen.
‎2007 Dec 05 5:13 AM
hi
pls check the ur import parameter type and fm import parameter types .
doublie click on that fm check the impoty parameter types
regards
kk.