11-13-2007 3:28 PM
How can we access the global variables of a program from a BAdI ?The BAdI does not have that particular variable as a part of it's importing/exporting parameter.The BAdI gets triggered at a particular point in the program.The name of the BAdI is /SAPAPO/SDP_SELECTOR and the transaction is /SAPAPO/SDP94(Demand Planning: APO).
Thanks,
Savitha
11-13-2007 6:42 PM
Hello Savitha,
If the variables are not passed into the BADI then you do not have access to them. The only way around that would be to find a different user exit or BADI before that point where that data is available and save the variables you are interested in (e.g. export to memory). That is not the nicest way to do it but a possibility to get around the problem.
Hope that helps,
Michael
11-14-2007 3:24 PM
Hi,
Try to export the variable to memory id or use database memory id.
Like this.
Export l_vbeln to memory id 'ZTEST'.
you can give any name instead of ZTEST.
or u can export to database memory id
EXPORT tab = lt_vbkd
TO DATABASE indx(V1)
FROM ls_indx ID 'ZTEST'.
Regards,
Niyaz