Hi All,
I am updating Planned Delivery Time in MRP2 view of material in MM02 via BAPI_MATERIAL_SAVEREPLICA .
for ex -
Material - 12345( its 16digit) , Plant - 1111 & 2222 .
So I want to update the Planned delivery Time for this material 12345 for both plant 1111, 2222 .
Say PDT for material 12345, Plant -1111 -> needs to be updated as 10 and
Material 12345 , Plant - 2222 -> needs to be updated as 20 .,
But Its not updating , In Debug , I found inside this BAPI_MATERIAL_SAVEREPLICA ,there is a perform statement
PERFORM DEL_DUPLICATE_RECORDS for deleting duplicate records based on Material , so as a result its deleting 1 row .,and its gets failed This perform actually deletes data from CLIENTDATA internal table based on Material .
How to rectify this error, please give some idea.
Code is as below - :
for BAPI, I am passing these values
HEADDATA -> MATNR = 12345
-> Basic_view = 'X' , -Purchase_View = 'X' , MRP View = 'X'
CLIENTDATA - > MATERIAL = 12345 , OLD_MAT_NO = 12345 , (2 rows of records with same material)
CLIENTDATAX-> MATERIAL = 12345 , OLD_MAT_NO = 'X' ,
PLANTDATA - > MATERIAL = 12345 , PLANT = 1111 & 2222 , PLND_DELRY = 10 & 20 .
PLANTDATAX-> MATERIAL = 12345 , PLANT = 1111 & 2222, PLND_DELRY = 'X' .
Please suggest whats wrong I am doing. Also is there any BAPI we can use instead of BAPI_SAVEDATA , I want to update multiple materials at one go , so choosed this BAPI_SAVEREPLICA . .
Waiting for some suggestions !!!!