2008 Apr 23 1:48 PM
Hi
I created a BAdI. Now I want to use this in My Program.
So, Wat is the code I need to write to call BAdI in my report.
I need sample code.
Regards
Sandeep Reddy
Hi
I created a BAdI. Now I want to use this in My Program.
So, Wat is the code I need to write to call BAdI in my report.
I need sample code.
Regards
Sandeep Reddy
2008 Apr 23 1:51 PM
Hi Sandeep,
You should not create and can't create your own BADIs, you have to implement the BADIs only when there is already a BADI Definition. You can not use the BADIs however you want. BADIs will be linked to particular transactions and they will get triggered when the transaction gets executed.
Regards,
Satish
2008 Apr 23 1:57 PM
2008 Apr 23 2:11 PM
SE18 contains the BADI definitions, and you can implement some using SE19 transaction.
As you implement some BADI, you can code some of it's methods, which will be called under standard transactions.
That's the BADI purpose: to enhance an existent standard transacion.
2008 Apr 23 2:31 PM
You must handle calling BADI from your program by:
data : obj type ref to <badi interface name>.
parameters: p_matnr like mara-matnr.
start-of-selection.
CL_EXITHANDLER=>GET_INSTANCE
instance = obj
exceptions
-
if sy-subrc = 0.
-
else.
callmethod obj->get_material
exporting
p_matnr = p_matnr
changing
x_mara = mara.
if not mara is initial .
write : / -
endif.
endif.
Reward if useful.
Dara.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |