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

BAPI_BATCH_CHANGE

Former Member
0 Likes
3,460

Hello Everyone.


I have to use 'BAPI_BATCH_CHANGE' to update MCHA-BWTAR, MCHA-LIFNR, MCHA-LICHA.

The requirement is given below in two steps. How to I procedd. Please help. I'm very new to Abap.


A) Change batch valuation type (MCHA-BWTAR) base on the following logic:

Get VBAP-MATNR, VBAP-BWTAR, VBAP-WERKS and VBAP-CHARG where

        VBAP-VBELN = (from result screen)

        VBAP-UEPOS = VBAP-POSNR (from parts selected)

        VBAP-PSTYV= “YEXR”

Then go to table ZPWCS_REPAIRFLIP (CU60) . (This is a variant table and I have to use 'CARD_TABLE_READ_ENTRIE' function module to get the entries)

Get PWCS_COMP value when PWCS_YEXR = VBAP-BWTAR

Update MCHA-BWTAR

B) Change vendor (MCHA-LIFNR) and vendor batch (MCHA-LICHA) to value found in part sold on YEXR sales order line item using BAPI_BATCH_CHANGE

           

            Get MCHA-LIFNR and MCHA-LICHA where

                   MCHA-MATNR = VBAP-MATNR (step 3.2)

                   MCHA-CHARG = VBAP-CHARG (step 3.2)

                   MCHA-WERKS = VBAP-WERKS (step 3.2)

            Update MCHA-LIFNR and MCHA-LICHA with value found.



Please help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,969

First get those values (MATNR, CHARG, WERKS, LIFNR, LICHA, BWTAR) and then try the following....

Once done, you may have to call the 'BAPI_TRANSACTION_COMMIT' if there are no errors in 'return'.

-Chandra

2 REPLIES 2
Read only

Former Member
0 Likes
1,970

First get those values (MATNR, CHARG, WERKS, LIFNR, LICHA, BWTAR) and then try the following....

Once done, you may have to call the 'BAPI_TRANSACTION_COMMIT' if there are no errors in 'return'.

-Chandra

Read only

Former Member
0 Likes
1,969

Is your issue resolved? Please close the thread if it is resolved.