Skip to Content
0
Oct 29, 2007 at 09:48 PM

Trouble with BAPI_MATERIAL_SAVEDATA while updating MLGT table

730 Views

Hi Guys I am using BAPI_MATERIAL_SAVEDATA to update tables MARD and MLGT.

I am using the paramters "storagelocationdata" and "storagetypedata" to update MARD, with the following values;

zbapi_mard-plant = mard-werks. "S450

zbapi_mard-stge_loc = mard-lgort. "1800

zbapi_mard-stge_bin = u_lgpbe. "A101

zbapi_mardx-plant = mard-werks. "same as above

zbapi_mardx-stge_loc = mard-lgort.

zbapi_mardx-stge_bin = 'X'.

and for MLGT iam using "storagetypedata" and "storagetypedatax" and the values are

zbapi_mlgt-whse_no = mlgt-lgnum "w123

zbapi_mlgt-stge_type = mlgt-lgtyp "545

zbapi_mlgt-stge_bin = u_lgpla "A101

and

zbapi_mlgtx-whse_no = mlgt-lgnum "w123

zbapi_mlgtx-stge_type = mlgt-lgtyp "545

zbapi_mlgtx-stge_bin = 'X'

In the bapiheader I have the matnr , storage_view = 'X' and warehouse_view = 'X'.

The problem is that the MARD is getting updated but for MLGT it gives me an error saying that

Value A101 is not allowed for MLGT-LGPLA/BAPI_MLGT-STGE_BIN.

I think I am not using the BAPI correctly, Can anyone tell me how do I update the storage type data through this BAPI?

Definite points guys

Regards

Sameer Ahmed