Skip to Content
Oct 27, 2020 at 12:12 PM

Pass a variable value between methods in BADI


Hi Experts,

I've implemented a BADI which has 2 methods. Inside the loop for every record, I need the parameter of method1 in order to set the logic in method2.

What is the best possible way to achieve that?

1. Tried creating Instance attribute to implementation class and populated it in method 1. But it's getting cleared when it comes out of method1.

2. Tried Static Attribute and it's not clearing the variable for every record in the loop.

3. Import/Export, Set/Get - What are the possible consequences of using memory ID. For example, if 2 users use the same transaction at the same time?

Kindly share your suggestions.