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: 

BADI to change invoice receipt on saving PO ekpo structure

former_member242512
Participant
0 Kudos
451

Hi All

I checked i used badi ME_PROCESS_PO_CUST method PROCESS_ITEM but it started changing the invoice reciept field on chaging PO.

I found anotther badi ME_PURCHDOC_POSTED method POSTED but it didn't allowed to chnage ekpo-repos field.

Please help , i want to change EKPO-REPOS field to 'X' on save .

Regards Ujjwal

5 REPLIES 5

Former Member
0 Kudos
143

Hi

keep a debugging point in class CL_EXITHANDLER and then run your t code and make the changes in required field, then check which badi is getting triggered. use the badi and write the code in it.

0 Kudos
143

Thanks for reply .. but i cannot put code in which gets triggered when chaanging.. as this will uncheck free goods field from ME21 N ......... so i should be just able to make last at save time.

0 Kudos
143

Im using below code in bapi and method post.

  if_ex_me_process_po_cust~post

     LOOP AT lt_items INTO lwa_items.
      lwa_details = lwa_items-item->get_data( ).
* Get conditions for line items
      lwa_details-repos = 'X'.

      lwa_items-item->set_data( lwa_details ).
      CLEAR: lwa_details.
    ENDLOOP.

but still ekpo data on using set_data is not changing.

Can someone help on this.

Former Member
0 Kudos
143

HI Ujjwal,

Why to go for BADI,

It is very easy to do it through EXIT EXIT_SAPMM06E_013. You will get here one structure XEKPO in that one I hope you will get the required field, update it the way you want.

This EXIT will be called just before saving PO and I hope this will do your work.

Thanks

Rahul

0 Kudos
143

I tried this too and changes the XEKPO-repos to X ...... but it didn't worked.