‎2010 Mar 15 2:24 PM
Hi, I'm implementing a badi, this is executed after commit work executed by vl02n t-code. Here I want to access the table "SER01" to get the serial list codes associated with the materials in the delivery orders, but the "SER01" table is not updated yet. I give 5 seconds through "wait up to" statement until the table is updated and then get the records.
is there another way to obtain these records without using the wait up to?
‎2010 Mar 15 2:36 PM
Hi,
In your BADI, check the call stack if the main program is available(In debug mode u can check this). In main program, the data you want will be in some internal table. Identify that and try in below way.
eg: If i want to access delivery item data....
FIELD-SYMBOLS:<lfs_xlips> TYPE ANY.
ASSIGN: ('(SAPMV50A)XLIPS[]') TO <lfs_xlips>.SAPMV50A is the main program name and XLIPS is the internal table in the main program which has item data.
Other way could be EXPORT from some user exit (Say MV50AFZ1) and IMPORT in BADI.Check F1 help for more details on this. If both the ways won't work, then wait is the only option. But i am sure that one of the above will work for you.
Thanks,
Vinod.