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

Help on BADI

Former Member
0 Likes
422

Hi all

i am new to BADI, so i need your help regarding this.

I hav 2 BADis. i have created implementations for these BADIs in se19.

Now my requirement is - in my 1st BADI i need to check the Billing Type. Only if the billing type is F2 , should the 2nd BADI be executed.

What i have decided is to set a flag in my 1st BADi, and check the status of my flag in my 2nd BADI. but my flag is a local variable and i cant acess the flag in my 2nd BADI.

Iis there any other way of doing it or can i declare my flag as a global variable.If so, how 2 do it.

Please help

Thanks in advance

Winnie

Hi all

i am new to BADI, so i need your help regarding this.

I hav 2 BADis. i have created implementations for these BADIs in se19.

Now my requirement is - in my 1st BADI i need to check the Billing Type. Only if the billing type is F2 , should the 2nd BADI be executed.

What i have decided is to set a flag in my 1st BADi, and check the status of my flag in my 2nd BADI. but my flag is a local variable and i cant acess the flag in my 2nd BADI.

Iis there any other way of doing it or can i declare my flag as a global variable.If so, how 2 do it.

Please help

Thanks in advance

Winnie

2 REPLIES 2
Read only

Former Member
0 Likes
398

Hi Winnie,

I have one idea here. Try using this using EXPORT and IMPORT statements.

In First BADI use EXPORT TO MEMORY <VARIABLE> ID <MEMID>.

In second BADI use IMPORT the same value IMPORT <VARIABLE> FROM MEMORY ID <MEMID>.

Check whether IMPORT is successful with sy-subrc value.

IF SY-SUBRC = 0.

ENDIF.

For clarity on syntax of IMPORT and EXPORT please refer to F1 help.

Regards,

Ramesh.

Edited by: Ramesh Kashigari on Nov 18, 2008 11:00 AM

Read only

Former Member
0 Likes
398

Hi Winnie,

You can check billing type in 2nd BADI Implementation.

This way both BADI will always be trigerred, but 2nd BADIs logic will be executed only if billing type is F2.

Regards,

Mohaiyuddin