Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to Business addin function in Standars transactiion
code. how it is steps

Answer Posted / sivaramakrishna.s.v

Example1 on BADI
BUSINESS REQUIREMENT
&#61656; 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.

&#61656; GO TO SE24

&#61656; Give the class name as CL_EXIT HANDLER (this
class triggered for all transactions )

&#61656; Click on display

&#61656; Double click on the method GET_INSTANCE (in this
method exit_name parameter return all the available badis)

&#61656; Put a break point

&#61656; Execute the TCODE XKO2

&#61656; Give the vender no as 1

&#61656; Click on Select all icon to check the check boxes

&#61656; Press enter

&#61656; Give the country as DE and click on save

&#61656; 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

&#61656; Go to se18&#61664;select badi name radio button
&#61656; Give the BADI NAME &#61664;click on display
&#61656; Select interface tab &#61664;And check all the methods
&#61656; 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.
&#61656; Then create badi implementation as below

Step 2 : Creating implementation for the BADI
&#61656; Go to SE19
&#61656; 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.
&#61656; Give the implementation name as
zvender_add_data ,click on continue.
&#61656; Give imple text.
&#61656; Now dbclick on the method check_all_data. Now
click on create button in displayed scree. &#61664;give the
enhancement impl name as zvendor_add_data and text. Click
on continue
&#61656; Give package name and select given implementation
zvendor_add_data in the displayed screen and click on
continue.
&#61656; Now the method will be opend and write the code
break_point. Activate.
&#61656; Back and avtivate.
&#61656;
Step 3 : TESTING weather BADI is correct or not
&#61656; Now run the transaction XKO2
&#61656; Our BADI will be triggered with a break point
&#61656; So, this is the BADI and method which we can use
for this business requirement.


&#61656; 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.

&#61656; SAVE AND ACTIVATE THE METHOD.
&#61656; Click on back
&#61656; 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


Please Help Members By Posting Answers For Below Questions

What are internal tables? How to use a specific number occurs statement?

1034


What is off cycle payroll run

2311


What is a data dictionary? : sap abap data dictionary

1009


Difference between select option and ranges ?

1163


In which cluster time results are stored? : abap hr

1112


What is protect & endprotect?

1073


how to update the filed value in SAP in ZAWSYS and create time and date? please tell me the answer

2312


wat is the difference between A-gate & W-gate?where are they used?

2019


What is the difference between the exits created in M.M and S&D?

2160


How to maintain lists?

1117


data:zxyz type xyz. where xyz is a standard sap structure where it contains data type fields and line type (refer to other structure) fields. my question is how to assign values to field zxyz-str-matnr where str is a structure inside xyz structure.

2365


Differentiate between the uline and write: sy-uline statements if any?

1264


the problem is that , while i am undergoing with my practice session, i am creating too many new programs.they are occupying much space in my hard-disk. how to delete un-necessary programs completely from my data- base........... plz help me with this .....

2067


What is its?

1149


How do we assign dynamic views while creating material master and generating bdc? : abap bdc

1200