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

ME_PROCESS_PO_CUST

Former Member
0 Likes
809

I am trying to implement ME_PROCESS_PO_CUST. My requirement is before the PO is saved it should check whether the kepo-pstyp = 3 then blank out kepo-inmsk. Which method should I use and in which interface. I have tried Process_Item method, it does not work. Any other method? Please reply me at the earliest. Thanks.

I am trying to implement ME_PROCESS_PO_CUST. My requirement is before the PO is saved it should check whether the kepo-pstyp = 3 then blank out kepo-inmsk. Which method should I use and in which interface. I have tried Process_Item method, it does not work. Any other method? Please reply me at the earliest. Thanks.

6 REPLIES 6
Read only

Former Member
0 Likes
774

you have to use only PROCESS_ITEM method.

inside the method first get the data using the method

GET_DATA and then check all what ever you want, if you want to set you have to use the SET_DATA method.

data: item type MEPOITEM.

ITEM = IM_ITEM->GET_DATA( ).

now check the condition, then

ITEM-iNMSK = ''.

IM_ITEM->SET_DATA( item ).

Read only

0 Likes
774

Hi Vijay,

Thanks for reply. Before I wrote my code, I put break point at Process_Item. It did not fired during the po save. Any other suggestion?

Read only

0 Likes
774

if you want the Before save then you have o use the POST method.

How ever the Method Process_item will trigger for each and every change in the item processing., when you change any thing in the line item and press enter then you will see it will tirgger.

Activate the implementations and check.

Read only

0 Likes
774

Hi Vijay,

I wrote my code in Item_process. It does not hit during entering the line item.

I want to achieve during the saving of PO doc.

Let me know if you have any other suggestion.

Appreciate your reply.

Read only

0 Likes
774

Just keep a break point inside the method.

Once you edit/inout the item details, then press enter , It should land to PROCESS_ITEM. if it is not then some thing wrong with your implementation of the BADI.

Did you activated the Implementation.

Read only

0 Likes
774

Hi Vijay,

There is nothing wrong in Badi Implementation. It is activated and implemented very well.

I am very surprise why it is not working at all.

Here is the code:

data: w_data type mepoitem.

  • Retrieve item data

call method im_item->get_data

receiving re_data = w_data.

  • Condition.

If w_data-pstyp = 3.

clear w_data-insmk.

w_data-insmk = space.

endif.

  • Update changes

call method im_item->set_data

exporting im_data = w_data.

Any other suggestion?

Appreciate your great help.