Sunteți pe pagina 1din 5

USING FILTER BADI

----BY ARJUN
1) Goto SE18 2) Give a BADI Name 3) Click on Create

4) 5) Give description 6) Check the checkbox FIlter dependant 7) Enter a FIllter type Ex: Land1

8) 9) Click on Interface TAB 10) The interfcae name will be generated automatically 11) 12) Save it 13) Double clik on Interface Name 14) Declare a method as Below

15) 16) Provide the parameters as below . 17)

18) SAVE IT 19) Activate it. 20) A message will be displayed as below.

21) 22) Click on Chnge add-in button. 23) Automatically an extra parameter will be added by name FLT_VAL 24)

25) Save it->Activate the BADI . Creating First Implementation 1) Clcik on Implementation->Create 2) Give a Name

3) 4) 3.Give "IN" as Filter Value

5) 6) click on Interface Tab 7) DOuble click on the method " CALC_TAX"

8) 9) Write the Below COde .

10)
11) Save it 12) Activate all the objects

13)

14) Click on Back 15) Activate the Implementation Name .

Creating Second Implementation


1) Clcik on Implementation->Create 2) Give a Name

3) 4) 3.Give "US" as Filter Value

5) 6) click on Interface Tab 7) DOuble click on the method " CALC_TAX" 8) Write the Below COde .

9)

10) Save it 11) Activate all the objects

12) Click on Back 13) Activate the Implementation Name .

Executing the BADI from a program.


Write The Below COde. Step1. Declare an object for the BADI interface. Step2. Create object /Get the instance for the BADI interface using the class CL_EXITHANDLER and Method GET_INSTANCE. Step3. Call the Method using the above instance and provide the exporting parameters along with the Filter Value "US".

Step4. The output will be "60" B'coz Second implementation is executed

Step5. Now, Call the Method again provide the exporting parameters along with the Filter Value "IN".

Step6. The output will be "20" B'coz First implementation is executed

S-ar putea să vă placă și