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: 

Change the Material price before goods issue via VL02N

Former Member
0 Kudos

Hi,

The project requirement is to change moving average price for the material ( using MR21) before post goods issue, done via VL02N and then once goods issue has been done, put back the old moving average price via MR21.

I am using the badi LE_SHP_GOODSMOVEMENT for implementing the logic to change the price using a BAPI for tcode MR21. I have added the code in the method CHANGE_INPUT_HEADER_AND_ITEMS.

This badi is called before the post goods issue . But if the goods issue fails for some reason, then i need to undo the change done to to the price and put back the old price. Is there any badi which i can use for this purpose - a post goods issue exit or badi ?

Any hint would be helpful

Thanks in advance

Kavitha

1 REPLY 1

Former Member
0 Kudos

Kavitha,

Use the method GET_INSTANCE of class CL_EXITHANDLER to find BADIs.

Place a break point on the statement

CALL METHOD cl_exithandler=>get_class_name_by_interface.

Execute the transaction / scenario for which you want to find a BADI. If there is any BADI, the name of the BADI will be captured in the  exit_name parameter of the above call method statement.

Thanks,

Sowbhagya