Application Development 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: 

Enabling BADI - CUSTOMER_ADD_DATA only for a particular division (SPART)

former_member687052
Participant
0 Kudos

Hello Experts,

I have created implementations in BADI CUSTOMER_ADD_DATA and CUSTOMER_ADD_DATA_CS for VD01/02/03 transactions.

I am using the following code in method CHECK_ADD_ON_ACTIVE to enable the BADI Enhancement:

IF i_screen_group = 'Z1' .

e_add_on_active = 'X'.

ENDIF.

Now my requirement is that this BADI Enhancement should be enabled only for a particular division (SPART).

To fulfill this requirement I am using the following statement in method CHECK_ADD_ON_ACTIVE to check the division:

GET PARAMETER ID 'SPA' FIELD spart.

But the method CHECK_ADD_ON_ACTIVE is being called as soon as the user launches VD03 transaction, even before the user enters details like customer, sales organization, division and so on in the first pop-up screen of VD03 transaction.

Is there a way to capture the user inputs before method CHECK_ADD_ON_ACTIVE is called and enable the badi enhancement.

Please share your valuable inputs on the same.

Thanks.

1 REPLY 1

Former Member
0 Kudos

Hi

No

Because the BADI is instantiated before entering the sales area data, all you can do it is to deactive the tabstrip by method SUPPRESS_TAXI_TABSTRIPS of CUSTOMER_ADD_DATA_CS

Max

Edited by: max bianchi on Sep 23, 2011 6:42 PM