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

Make a variable public for all the BADI.

Former Member
0 Likes
885

Hi All,

I am new to ABAP and I am working on implementing the following

Now inside the BADI Z_CTS_REQUEST_CHECK - method CHECK_BEFORE_RELEASE I have certain values inside the Request variable.

I want to  use the same data inside this variable  in the SCI_CHECK method.

Overall the question would be if I can declare a variable at some public section and then use them wherever inside the BADI?

Appreciate your help.

Best regards,

Elena

2 REPLIES 2
Read only

SimoneMilesi
Active Contributor
0 Likes
610

i do not have the badi in my system, however for a similar purpose i found already implemented by previous developer this trick:

1->under Attributes in your ZCL... class that implements the badi declare an INSTANCE ATTRIBUTE with the structure/tipe you need

2->Fill it in method CHECK_BEFORE_RELEASE

3->You should access your attribute even in SCI_CHECK


As i told, i do not have the badi on my system so i do not know which is the sequence of the calls for the methods

Read only

JuanCarlosDelga
Contributor
0 Likes
610

Hi Elena

Keep in mind this picture you even can declare an atribute in your ZCL_ class as static attribute.