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: 

Urgent help in BADI

Former Member
0 Kudos

Hi Abappers,

Kindly help me out as i am in trouble. I have got a requirement to add customized fields onto O4_TIGER screen using BADI. I have got the name of the BADI definition ie., OII_DIP_ADD_COLUMNS . This screen is related to MM -> Inventory mangement -> Is-OIL.

Can anyone pl help me out of how to add fields . Coz i have absolutely nil knowledge in BADIs and Userexits. I would be very much pleased if some one suggest me a step by step process.

Regards.

2 REPLIES 2

Former Member
0 Kudos

first you have to implement the BADI

Go to the Transaction SE19

Enter the Implementation name ' Z***** '

Press Create button

It will ask you the definition name

Enter the definition name as 'OII_DIP_ADD_COLUMNS'

Press enter

\Enter the short text for implementation

Then Save it.

Then Press the interface tab

select the method which is suitable for your requirement.

For in my system the BADI Definition is not aviable.

So I don't know which method is suitable for your case.

Then add the fileds to the your screen in that method.

Thanks

Sekhar

Former Member
0 Kudos

<b>first u define BADI in " SE18", and implement in "SE19".

for predefined GLOBAL CLASS : CL_EXITHANDLER which can enable BADI service.

method-->GET_INSTANCE (which can create instance of a class)

gowith SE18 --> NAME..... Z***** --> CREATE,

click check box MULTIPLE USE.

select INTERFACE tab

INTERFACE ..... ZIF_EX_**** <-----click on this -


> enter.

save details.

METHODS LEVEL DESCRIPTION

SELECT-DATA INSTANCE SELECTING DATA

select PARAMETERS

PARAMETER TYPE TYPING

CUST_LOW IMPORTING TYPE KNA1-KUNNR

CUST_HIGH IMPORTING TYPE KNA1-KUNNR

SAVE DETAILS.

implementing BADI -


> SE19

implementation name ...... Z**********-----> CREATE

DESCRIPTION--...DEMO FOR BADI

select--> INTERFACE

for method> SELECT_DATA <--- click on this ---> enter

save details.

METHOD

DATA : ITAB TYPE TABLE OF KNA1,

WA TYPE KNA1.

SELECT KUNNR LAND1 NAME1 ORT01 FROM KNA1 INTO TABLE ITAB WHERE KUNNR BETWEEN CUST_LOW AND CUST_HIGH.

LOOP AT ITAB INTO WA.

WRITE:/ WA-KUNNR,WA-LAND1,WA-NAME1,WA-ORT01.

ENDLOOP.

ENDMETHOD.

F3 , SAVE and ACTIVATE.

LETUS CREATE EXECUTABLE PROGRAM (SE38).

PROVIDE TABLE WA.

REPORT Z*******

TABLES: KNA1.

SELECT-OPTIONS: S_KUNNR FOR KNA1-KUNNR.

    • declaration.

CLASS CL_EXITHANDLER DEFINITION LOAD.

    • interface reference

DATA: OBJ_EXIT TYPE REF TO ZIF_EX_*****.

START-OF-SELECTION.

gowith PATTERN ---> AABAP object pattern --> ENTER.

CALL METHOD

CLASS---- CL_EXITHANDLER

METHOD--- GET_INSTANCE

ENTER.

CALL METHOD.............

CHANGING

INSTANCE = OBJ_EXIT.

gowith PATTERN> AABAP OBJECT--> ENTER

CALL METHOD

OBJ---> OBJ_EXIT,

CLASS---> ZIF_EX_*******,

METHOD----> SELECT_DATA.

CALL METHOD.................

EXPORTING

CUST_LOW = S_KUNNR-LOW

CUST_HIGH = S_KUNNR-HIGH.

SAVE and ACTIVATE.

EXECUTE.</b>