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: 

USer exit or BADI

Former Member
0 Kudos

In VL02n when we click on Status Overview then it display an ALV

about Delivery status eg.

Delivery Overall Pick Status Packing Pick confirmation Total Gds Mvt Billing Status

80000178 C C C C C

I want to genrate one flat file showing that all process successully completed include billing condition is ' C' Flag.

If everything is 'C' then only i want to genrate one Flat file .

What should be the user-exit or BADI for it ?

3 REPLIES 3

Former Member
0 Kudos

Hi,

Check BADI "LE_SHP_DELIVERY_PROC"

Thanks & Regards,

Navneeth K.

P561888
Active Contributor
0 Kudos

BADI is good...

Former Member
0 Kudos

check this.....

u can find BADI's in different ways...

1>First go to any transaction->iN THE menu bar SYSTEM->STATUS->Get the program name ->double click->u will go to the program attached to the tcode.Now search term will be CALL CL_EXITHANDLER.Now u will get list of BADI'S available..

2>Goto SE24->Give class name as CL_EXITHANDLER->Display->double click on get_instance mathod->Now u will go inside the method->Now put break point on the cl_exithandler.Now go to any transaction code and pass dat..U will see that it will be stopped on the break point which u set on the cl_exithandler...In the exit name u can find list of badi's attached to the tcode..

There are multiple ways of searching for BADI.

u2022 Finding BADI Using CL_EXITHANDLER=>GET_INSTANCE

u2022 Finding BADI Using SQL Trace (TCODE-ST05).

u2022 Finding BADI Using Repository Information System (TCODE- SE84).

1. Go to the Transaction, for which we want to find the BADI, take the example of Transaction VD02. Click on System->Status. Double click on the program name. Once inside the program search for u2018CL_EXITHANDLER=>GET_INSTANCEu2019.

Make sure the radio button u201CIn main programu201D is checked. A list of all the programs with call to the BADIu2019s will be listed.

The export parameter u2018EXIT_NAMEu2019 for the method GET_INSTANCE of class CL_EXITHANDLER will have the user exit assigned to it. The changing parameter u2018INSTANCEu2019 will have the interface assigned to it. Double click on the method to enter the source code.Definition of Instance would give you the Interface name.

2. Start transaction ST05 (Performance Analysis).

Set flag field "Buffer trace"

Remark: We need to trace also the buffer calls, because BADI database tables are buffered. (Especially view V_EXT_IMP and V_EXT_ACT)

Push the button "Activate Trace". Start transaction VA02 in a new GUI session. Go back to the Performance trace session.

Push the button "Deactivate Trace".

Push the button "Display Trace".

The popup screen "Set Restrictions for Displaying Trace" appears.

Now, filter the trace on Objects:

u2022 V_EXT_IMP

u2022 V_EXT_ACT

Push button "Multiple selections" button behind field Objects

Fill: V_EXT_IMP and V_EXT_ACT

All the interface class names of view V_EXT_IMP start with IF_EX_. This is the standard SAP prefix for BADI class interfaces. The BADI name is after the IF_EX_.

So the BADI name of IF_EX_CUSTOMER_ADD_DATA is CUSTOMER_ADD_DATA

3. Go to u201CMaintain Transactionu201D (TCODE- SE93).

Enter the Transaction VD02 for which you want to find BADI.

Click on the Display push buttons.

Get the Package Name. (Package VS in this case)

Go to TCode: SE84->Enhancements->Business Add-inns->Definition

Enter the Package Name and Execute.

Here you get a list of all the Enhancement BADIu2019s for the given package MB.

The simplese way for finding BADI is

1. chooes Tcode Program & package for that Tcode.

2. Go to Tcode se18

3. Press F4

4. search by package or by program.

Difference between customer exits and BAdiu2019s.

i. Customer exits assume a two-tiered system infrastructure (SAP - Customers). Where as in case of BAdiu2019s you can created and implement enhancements in as many software layers as you like.

ii. BAdiu2019s are considered as generalized BTEu2019s that can be used to bundle program, menu and screen enhancements into a single add-in. BAdiu2019s can be created and employed in each of the various software levels.

Advantages of BADIu2019s

a) This enhancement technique has the advantage of being based on a multi-level system landscape (SAP, country versions, IS solutions, partner, customer and so on).

b) We can create definitions and implementations of business add-ins at any level of the system landscape.

Following are the Tables which are relevant to BAdiu2019s

i. SXS_ATTRT - BAdi Definition list

ii. V_EXT_ACT - Active implementations of an exit

iii. V_EXT_ IMP - Implementation class for an interface+filter

iv. V_EXT_M - BAdiu2019s with filters

b) Transaction related to BAdiu2019s

i. SE18 - Business Add-in builder

ii. SE19 u2013 Implementation of Badi

iii. SE24 u2013 Class/Interface Builder

thk u

santhosh