2016 May 16 4:43 PM
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.
2016 May 16 5:48 PM
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
2016 May 16 5:48 PM
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
2016 May 17 3:37 PM
Is your issue resolved? Please close the thread if it is resolved.