How to Business addin function in Standars transactiion
code. how it is steps
Answer Posted / sivaramakrishna.s.v
Example1 on BADI
BUSINESS REQUIREMENT
 Raise an error message whenever the vender
belongs to german country and region is not specified.
STEP 1: Find the list of the BADIS for TCODE XKO2.
 GO TO SE24
 Give the class name as CL_EXIT HANDLER (this
class triggered for all transactions )
 Click on display
 Double click on the method GET_INSTANCE (in this
method exit_name parameter return all the available badis)
 Put a break point
 Execute the TCODE XKO2
 Give the vender no as 1
 Click on Select all icon to check the check boxes
 Press enter
 Give the country as DE and click on save
 The debugger will start and note down the list of
the BADIS
For first screen
VENDER_FIELDSTATUS
GOS_SRV_SELECT
For second screen
After save button u can find below badi
ADDRESS_CHECK
ADDR_TXJCD_CHECK
BADI_LAYER
ADDRESS_UPDATE
VENDER_ADD_DATA
 Go to se18select badi name radio button
 Give the BADI NAME click on display
 Select interface tab And check all the methods
 Find the suitable/roughly decide BADI name and
method by reading the description and checking the
signature. Here for our requirement check_all_data is the
method.
 Then create badi implementation as below
Step 2 : Creating implementation for the BADI
 Go to SE19
 Select classical badi radio button and give the
badi name vender_add_data in the second selection screen.
Now click on create implementation button below.
 Give the implementation name as
zvender_add_data ,click on continue.
 Give imple text.
 Now dbclick on the method check_all_data. Now
click on create button in displayed scree. give the
enhancement impl name as zvendor_add_data and text. Click
on continue
 Give package name and select given implementation
zvendor_add_data in the displayed screen and click on
continue.
 Now the method will be opend and write the code
break_point. Activate.
 Back and avtivate.

Step 3 : TESTING weather BADI is correct or not
 Now run the transaction XKO2
 Our BADI will be triggered with a break point
 So, this is the BADI and method which we can use
for this business requirement.
 Finally write the below code
METHOD IF_EX_VENDER_ADD_DATA~CHECK_ALL_DATA.
IF I_LFA1=LAND1=`DE’AND I_LFA1-REGIO=` ‘.
Massage ‘Region is mandatory for GERMAN VENDORS’ TYPE ‘E’.
ENDMETHOD.
 SAVE AND ACTIVATE THE METHOD.
 Click on back
 Activate the implementation
Step 4: UNIT TESTING
• Now test the transaction XKO2 by giving vender
country as ‘DE’ and without specifying the region.
• The Error message is displayed.
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
When the top-of-page event does get triggered?
In selection screen I have three fields, plant mat no and material group. If I input plant how do I get the mat no and material group based on plant dynamically?
What is a data dictionary? : abap data dictionary
How memory management happens for internal tables and work areas in abap?
What is a table attribute?
How can we set the tablespaces and extent sizes ?
What are the uses of table pool or table cluster.
Describe the difference between macro and subroutine?
Explain what are the various types of selection screen event?
What are the basic objects of the data dictionary? : abap data dictionary
1)can any body tell the transport request number concept and 2)there are 3 screens in one screen u have uploaded the resume and second screen also u have done the same thing but when u are uploading the resume in third screen u got some error in somewhere else but whatever u have uploaded the resume in 1 and 2 should not
Reports: Event functionality.
can anybody give me functional specification (or table name & field names) of stock analysis report, work in progress report,generating vendor detailed list
how 2 create the normal form by using functional module
Explain what are standard layouts sets in the sap script?