Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to store variable for each triggering?

Former Member
0 Likes
344

Hi,

Badi BADI_SCD_ACCTG will triggered every line item. Suppose, If I have three line items. If badi triggers first line item, here I m getting value Material Group. if again badi triggers for second line item, here all internal table information refreshed,. here also like this I am getting other material group. Here

(I didn't have global variables in BADI!!)

<b>My requirement is at last line item triggering collect all material groups wat available from first line item, All material groups I need to export to ABAP memory</b>. I will use this for different purpose.

Please guide me how it possible

1 REPLY 1
Read only

Former Member
0 Likes
291

hi

it's possible, i had a similar requirement in an user-exit

- build an internal table of all the fields taht you want

- import itab from memory id 'TRY'. (for the 1 st time nothng will come in)

- append values for the current line item to the itab and again export itab to memory id 'TRY'

- import and export till the last line item

if any error occurs, try setting a flag -> export that and when importing if the flag is x, free memory (to avoid erroneous data)

if helpful, reward

Sathish. R