2022 Nov 15 6:29 PM
Hi All,
We are using BAPI 'BAPI_BATCH_SAVE_REPLICA' to update the manufacturing date 'BATCHATTRIBUTES-HSDAT & BATCHATTRIBUTES-VFDAT' and parallelly it should update the corresponding batch characteristics 'LOBM_HSDAT' & 'LOBM_VFDAT'.
For batch characteristics update, have maintained the parameter 'CLASSALLOCATIONS' & CLASSVALUATIONSNUM' with below values
CLASSALLOCATIONS -
Class_type = 023
Objectkey = concatenated matnr & batch
Objecttable = MCH1
Classnum = ZCLASS
Classtype = 023
CLASSVALUATIONNUM
Class_type = 023
Objectkey = concatenated matnr & batch
Objecttable = MCH1
Charact = LOBM_VFDAT
Value_from = sy-datum
Similarly , have maintained for LOBM_HSDAT.
The manufacturing date and expiry date with batch characteristics are updated successfully but in addition it is deleting the other batch characteristics.
Please need inputs here urgently why it is deleting other batch characteristics. Is anything missing in BAPI.
Regards,
Mohammed
2022 Nov 16 7:37 AM
Hello shahabansari
I guess that is how BAPI_BATCH_SAVE_REPLICA works - it saves the replica of a batch, ie. saves all the batch data as transferred to the function. So if you don't transfer characteristics data when calling the function, the characteristics are not saved in the batch replica or in other words the characteristics are deleted from an existing batch.
Why don't you use BAPI_BATCH_CHANGE instead to update batch data selectively? You need to update only two batch fields i.e. expiration and manufacturing dates.
Best regards
Dominik Tylczynski
Hi All,
We are using BAPI 'BAPI_BATCH_SAVE_REPLICA' to update the manufacturing date 'BATCHATTRIBUTES-HSDAT & BATCHATTRIBUTES-VFDAT' and parallelly it should update the corresponding batch characteristics 'LOBM_HSDAT' & 'LOBM_VFDAT'.
For batch characteristics update, have maintained the parameter 'CLASSALLOCATIONS' & CLASSVALUATIONSNUM' with below values
CLASSALLOCATIONS -
Class_type = 023
Objectkey = concatenated matnr & batch
Objecttable = MCH1
Classnum = ZCLASS
Classtype = 023
CLASSVALUATIONNUM
Class_type = 023
Objectkey = concatenated matnr & batch
Objecttable = MCH1
Charact = LOBM_VFDAT
Value_from = sy-datum
Similarly , have maintained for LOBM_HSDAT.
The manufacturing date and expiry date with batch characteristics are updated successfully but in addition it is deleting the other batch characteristics.
Please need inputs here urgently why it is deleting other batch characteristics. Is anything missing in BAPI.
Regards,
Mohammed
2022 Nov 16 7:37 AM
Hello shahabansari
I guess that is how BAPI_BATCH_SAVE_REPLICA works - it saves the replica of a batch, ie. saves all the batch data as transferred to the function. So if you don't transfer characteristics data when calling the function, the characteristics are not saved in the batch replica or in other words the characteristics are deleted from an existing batch.
Why don't you use BAPI_BATCH_CHANGE instead to update batch data selectively? You need to update only two batch fields i.e. expiration and manufacturing dates.
Best regards
Dominik Tylczynski
2022 Nov 16 8:16 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |