Application Development 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: 

EXIT for ME51N

Former Member
0 Kudos

i want to put check while creating the PR for line items that Tracking No. is complusory, and then i want to check that Tracking no. with my SO whether the entered Material exists in SO or not. i have check the Enhancement MEREQ001 but not able to find any component in which Item details can be found out is there any Exit which can met my requirement.

abhishek suppal

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Try to use the BADI ME_PROCESS_REQ_CUST

Max

11 REPLIES 11

Former Member
0 Kudos

Hi

Try to use the BADI ME_PROCESS_REQ_CUST

Max

0 Kudos

Dear Max,

I haven't worked on BADI, can u guide me in this how to go for BADI..

Thanx

Abhishek Suppal

0 Kudos

Hi

Yes I can!

Trx SE18 to display the definition;

Trx SE19 to create an own implementation.

So run trx SE19 and create your BADI ZME_PROCESS_REQ_CUST as copy of ME_PROCESS_REQ_CUST.

After creating it, you should insert the code you need in a method.

If you want to manage item data, you should use PROCESS_ITEM, this method has the parameter IM_ITEM.

IM_ITEM is like the interface IF_PURCHASE_REQUISITION_ITEM, so you should use the method of this interface to manage the data of item.

To get data of the ITEM:

DATA: ITEM TYPE MEREQ_ITEM.

CALL METHOD IM_ITEM->GET_DATA

RETURNING

RE_DATA = ITEM.

Max

Max

Message was edited by: max bianchi

0 Kudos

Thanx MAX,

i am writing the code in

METHOD if_ex_me_process_req_cust~process_item .

  DATA: item TYPE mereq_item.

  CALL METHOD im_item->get_data
    returning
    re_data = item.


ENDMETHOD.

but it gives error am i doing the right i am writing this code oin PROCESS_ITEM..... shud this ITEM be checked item wise row by row....can u explain it in detail as i m writing it for first time.....

thanx

abhishek suppal

0 Kudos

Hi

Excuse me this is correct code

DATA: item TYPE mereq_item.

CALL METHOD im_item->get_data

receiving re_data = item.

Max

0 Kudos

it gives the following error MAX

Class ZCL_IM_ME_PROCESS_REQ_CUST,Method IF_EX_ME_PROCESS_REQ_CUST~PROCESS_ITEM	
"EXPORTING parameter", "IMPORTING parameter", "RECEIVING parameter",		
"CHANGING parameter" or "EXCEPTIONS parameter" expected,not "RETURNING	RE_DATA".		

0 Kudos

Hi

see my previous answer you have to use "RECEIVING" not RETURNING.

So your code should be:

METHOD if_ex_me_process_req_cust~process_item .

DATA: item TYPE mereq_item.

CALL METHOD im_item->get_data

receiving re_data = item.

ENDMETHOD.

Max

0 Kudos

MAX

oops i haven't seen....

will the item contains the current row data i have put the break point now while creating the PR it doesn't comes to this method shud i have to do some thing else also.

abhishek

0 Kudos

Hi

Have you actived your BADI

Max

0 Kudos

Thanx MAX..

abhishek

Former Member
0 Kudos

Hi

Refer this link to learn about BADIs.

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/56/3de8536d376d49b663a9b1e53297be/content.htm">BADIs</a>

Regards,

Raj