Application Development and Automation 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: 
Read only

BADI

Former Member
0 Likes
1,683

hi all,

i'm new in badi's so i need to create a program that use the following badi sd_billing. can any body tell me an example of this badi?.

regards,

Jose Roberto

1 ACCEPTED SOLUTION
Read only

alejandro_lpez
Contributor
0 Likes
1,248

Hi Roberto,

if you want to use the BADI BADI_SD_BILLING, you should create an implementation of badi in transaction SE19.

Then in the list fo methods availaible for modification in the BADI, you must select the method according with your requirement, and double click it to insert the code. Finally active the badi.

To call badi, you should create an instance of badi

data: handle_i TYPE REF TO IF_EX_BADI_SD_BILLING,

BADI_SD_BILLING_ACTIVE TYPE XFELD VALUE 'X'.

CALL METHOD CL_EXITHANDLER=>GET_INSTANCE

EXPORTING

EXIT_NAME = 'BADI_SD_BILLING'

NULL_INSTANCE_ACCEPTED = 'X'

IMPORTING

ACT_IMP_EXISTING = BADI_SD_BILLING_ACTIVE

CHANGING

INSTANCE = handle_i

EXCEPTIONS

OTHERS = 1.

With instance handle_i call the method required.

handle_i->method().

regards,

Alejandro.

3 REPLIES 3
Read only

alejandro_lpez
Contributor
0 Likes
1,249

Hi Roberto,

if you want to use the BADI BADI_SD_BILLING, you should create an implementation of badi in transaction SE19.

Then in the list fo methods availaible for modification in the BADI, you must select the method according with your requirement, and double click it to insert the code. Finally active the badi.

To call badi, you should create an instance of badi

data: handle_i TYPE REF TO IF_EX_BADI_SD_BILLING,

BADI_SD_BILLING_ACTIVE TYPE XFELD VALUE 'X'.

CALL METHOD CL_EXITHANDLER=>GET_INSTANCE

EXPORTING

EXIT_NAME = 'BADI_SD_BILLING'

NULL_INSTANCE_ACCEPTED = 'X'

IMPORTING

ACT_IMP_EXISTING = BADI_SD_BILLING_ACTIVE

CHANGING

INSTANCE = handle_i

EXCEPTIONS

OTHERS = 1.

With instance handle_i call the method required.

handle_i->method().

regards,

Alejandro.

Read only

Former Member
0 Likes
1,248

Hi,

Go through the link,

http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm

Regards,

Azaz Ali.

Read only

jimmyIbarra
Explorer
0 Likes
1,248