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

Regarding BADI

Former Member
0 Likes
746

I am new in abap

I have used se24 and put cl_exithandeler in object name and set a breakpoint in get instance method , and starts a transaction me21n

I am getting the Badi names from the parameter value exit_name but i could not undersatnd

which badi should be use for the for the vendor field in me21n?

(I know iit is me_process_po_cust but dont know how to identify it is their any way to know from debuging )

And after that which method should be use to access the field?

(I knows that is im_header and get data but is their any specific way to find it out?)

After all of thhis I went to tcode se19

when I m trying to create implementation after fullfill the requirements i got an error

"THE ENHANCEMENT OBJECT EHNS ME_PROCESS_PO_CUST CAN NOT BE READ"

Moderator message: please use more descriptive subject lines for your posts.

Edited by: Thomas Zloch on Mar 4, 2011 2:32 PM

6 REPLIES 6
Read only

Former Member
0 Likes
708

My experience says that you are using the right method to find out the BADi while denugging .

That is set a break at EXIT_HANDLER and then GET_INSTANCE .

Seconldy if you are talking of where to write then there are many things one has to understand .

1- Read the documentation of the BADi and find out what is the purpose for which it is provided .

2- Look at the parameters in Method i.e import and export are they having the fields that you are looking for .

3- Method itself should be selected judiciously for doing the development .

As a newbie i would advice , do a lot of R&D in sandbox client with diffrent scenarios to understand the subject better .

Cheers ,

Dewang

Read only

Former Member
0 Likes
708

Yes, do a lot of RD in sand box.Let us know what you want to do, whether your BADI should execute after saving the ME21N.

e.g. If you want your enhancement should trigger after saving the BADI then 1st go to ME21N fill all your data THEN set ur break at GET_INSTANCE.Now Check out which BADI from the list will suit your need, that means check the BADI parameters if your need can be done by those parameters then that will be the suit BADi.

Now go to se19 as you have followed.At first put a break point over Method AND ACTIVATE that method then press back and in the implimentation object screen again press activate.I think your problem might be for this reasos.

Do it and let me know.

Read only

Former Member
0 Likes
708

Hi Somabap,

Since BADI's are meant to be used by SAP customer's they are pretty well documented in general and even sometimes sample code is delivered with them.

For your requirement go to SE18 and display ME_PROCESS_PO_CUST.

Under the GOTO menu you will find SAMPLE CODE and DOCUMENTATION.

The documenation will explain to you at which point the various methods are invoked and based on this you determine which method will be most suited for the task at hand.

Kind regards,

Robert.

Read only

0 Likes
708

i go to tcode se19 crete an implementation over me21n

create an implementation me_process_po_cust over crete implemetation in classical badi

than i made a zme_process_po_cust implemetation name

now when i am trying to save it it shows me an error

"THE ENHANCEMENT OBJECT EHNS ME_PROCESS_PO_CUST CAN NOT BE READ"

could u help me about this.....?????????

Read only

0 Likes
708

There are two kinds of BAdI in SE19: Classic and New BAdI

- By using the break-point in cl_exithandler method you get a classical BAdI (old) ME_PROCESS_PO_CUST.

- By default SE19 waits for a Enhancement Spot, check on the second line Classic BAdI and fill the BAdI Name field.

Regards,

Raymond

Read only

0 Likes
708

Hi Soma,

I agree with Raymond.

When you go to SE19 you can see Edit Implementation and Create Implementaion.

In the Create Imp. which is in 2nd box click on Classical BADI provide the name ME_Process_PO_cust

and than click on Create Implementation and hence you provide the Zname and create it and save and activate it.

For change see the 1st box Edit impl. and click on Classical BADI.

Note down that this particular BADI cannot be use multiple times.

Thanks

Arbind