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 Implementation

Former Member
0 Likes
1,402

Hi all,

In Transaction ME21N, there is a field 'OUR REFERENCE' in the Communication Tab. Now, we need to track the value entered and perform some ztable updation. I couldnt find a user-exit for the same but someone told me to implement a BADI ME_PROCESS_PO_CUST. I created a new BADI in SE19 and put the BADI name in the definition. i went inside one of the methods ( POST ) and tried putting the following code there.

if MEPOCOMM-UNSEZ is initial.

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

endif.

but the code is giving syntax error saying the field MEPOCOMM-UNSEZ is unknown. so its not getting activated. the field is the screen field name of the 'Our Reference' in ME21N.

is there something wrong with the interface?? is there somethng to be specified in Import Parameters or something?? I am new to BADIs. So please explain in a simple manner. Also, how to search for the BADI definition for a particular purpose in the first place?? I would like to know the procedure for how we go about finding the suitable BADI and then implementing it. I have already read the previous threads regarding BADIs.

All useful Inputs would be appropriately Acknowledged,

Thanks & Regards,

Bikash

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
958

Hi,

U can findout the BADI def. in SE18 by providing the dev.class/package (Just say F4 in Se18>click on Information system>give the package-->Enter).

How to find the Package for TCODE(System>status>program name>Se38>program name-->attributes). Hope u know this,but still.

Ans also u can find through SAP application wise in Se18.

Thanks

Eswar

6 REPLIES 6
Read only

Former Member
0 Likes
958

hi bikash,

Check this thread...

regards

vijay

Message was edited by: Vijay Babu Dudla

Read only

Former Member
0 Likes
958

The Import Parameters of the BADI need to be seen to varify if the field you want is there in the import parameters. BADI will have information about only the fields that are present in the import parameters.

If your field is not there then you will get syntax error, and this BADI will not be of any use to you in that case.

Read only

Former Member
0 Likes
958

Hi

The erros says symply the data you're using doesn't exist.

The method POST is two parameter, one is IM_HEADER, this parameter has several method to get and set header data.

You have to use these method to read and update the header data.

You should use the method GET_DATA of parameter IM_HEADER of method POST.

So you code should be like following:

DATA HEADER TYPE MEPOHEADER.

CALL METHOD IM_HEADER->GET_DATA

RETURNING RE_DATA = HEADER.

IF HEADER-UNSEZ.

ENDIF.

Max

Message was edited by: max bianchi

Read only

Former Member
0 Likes
959

Hi,

U can findout the BADI def. in SE18 by providing the dev.class/package (Just say F4 in Se18>click on Information system>give the package-->Enter).

How to find the Package for TCODE(System>status>program name>Se38>program name-->attributes). Hope u know this,but still.

Ans also u can find through SAP application wise in Se18.

Thanks

Eswar

Read only

Former Member
0 Likes
958

Vijay, the thread mentions 'Best of SDN 2005 your suggestions'. some mistake.

Max, i implemented ur suggestion got rid of the syntax error. But the error message(within the if endif condition in the BADI) is not getting displayed even wen the program flows thru it( i checked in debugging mode). I think it has something to do with ACTIVATION of the exit. Please give some inputs regarding the same.

Also please mention important points to remember while implementing any BADIs.

Thanks & Regards,

Bikash

Read only

0 Likes
958

hi sorry for that..

check this ..

see the sap help..

http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm

regards

vijay

Message was edited by: Vijay Babu Dudla