cancel
Showing results for 
Search instead for 
Did you mean: 

user exit and badi

Former Member
0 Kudos

Hi expert,

I need some example of exits and BADI as i m new for these areas.

plz suggest some prog for this and proper way for these.

thanx .

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi sunil

BADI is just an object-oriented version of user-exit. Instead of entering program code into some function module (as in customer-exit), you define some class which has to implement predefined methods and those methods are fired at predefined points just like an old user-exit. Some BADI can have multiple independent implementations which is much better for software deployment as several developers can implement the same BADI independently.

check this link:

<a href="http://http://help.sap.com/saphelp_47x200/helpdata/en/ee/a1d548892b11d295d60000e82de14a/frameset.htm">http://http://help.sap.com/saphelp_47x200/helpdata/en/ee/a1d548892b11d295d60000e82de14a/frameset.htm</a>.

if useful reward points.

Thanks

senthil

Former Member
0 Kudos

hI,

Sample Code for BADI IMPLEMETING: : This code for replacing leading ZERO's with SPACE.

Data Decleration

Data: l_s_data_in type /BIC/CYZNCBSIS, "Source Structure

l_s_data_out type ZCZZNCBSIS. "Target Structure For BSIS

Data: t_company type /BIC/CYZNCBSIS-company,> "Temp variable For Company

t_ifiacg type /BIC/CYZNCBSIS-/bic/ifiacg,"Variable For Group Acct

DATA: t_len type I,

t_strlen type I.

  • Clear data Output

clear e_t_data_out. "Data Output

********************************************************

  • Loop at Internal table from Source

loop at i_t_data_in into l_s_data_in.

    • Delete the data if the Group Account is "No

Account"

IF l_s_data_in-/BIC/IFIACG = 'NO ACCOUNT'.

  • DONT TAKE THIS RECORD...

ELSE.

  • Find No of Leading Zeros in company

t_company = l_s_data_in-company.

t_strlen = strlen( l_s_data_in-company ).

do t_strlen times.

if t_company(1) <> '0'.

exit.

else.

t_len = t_len + 1.

shift t_company.

endif.

enddo.

  • Replace Initial Zero with Space

do t_len times.

REPLACE '0' WITH '' INTO l_s_data_in-company.

enddo.

CONDENSE l_s_data_in-company.

Modify i_t_data_in from l_s_data_in.

endloop.

Insert lines of l_s_data_in from 1 to e_t_data.

BW Open Hub (ppt)

https://websmp103.sap-ag.de/~sapidb/011000358700002201112003

For information on Exits, check these links

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

http://www.sapgenie.com/abap/code/abap26.htm

http://www.sap-img.com/abap/what-is-user-exits.htm

http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction

http://www.easymarketplace.de/userexit.php

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

http://www.sappoint.com/abap/userexit.pdfUser-Exit

http://www.planetsap.com/userexit_main_page.htm

<b>Reward points</b>

Regards

gopi_narendra
Active Contributor
0 Kudos

Get the Dev Class / Package of any Transaction code

Go to transaction SMOD , Press F4

Give in the Dev Class / Package, Press Enter

This gives the User Exits for any transaction

Goto SE84 --> Envir. --> Exit Techniques --> Business Add-ins --> Definitions

Give the Dev Class / Package and Press Enter

You will get the User Exits / BADIs' for a tcode

Regards

Gopi