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_MATERIAL_SAVEDATA donu00B4t save LOADINGGRP field

Former Member
0 Likes
1,184

HI;

I´m extending materials with this bapi, for some reason this bapi doesn´t launch any error when finish and it updates all other fields except this one.

Any help..?

Thanks on advance.

part of the code:

The data defnition:

li_plant LIKE bapi_marc, " datos del material a nivel de planta

li_plantx LIKE bapi_marcx,

The value assignation:

li_plant-loadinggrp = tdata-ladgr.

li_plantx-loadinggrp = 'X'.

The bapi´s call:

CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'

EXPORTING

headdata = li_head

clientdata = li_client

clientdatax = li_clientx

plantdata = li_plant

plantdatax = li_plantx

forecastparameters = li_forecast

forecastparametersx = li_forecastx

storagelocationdata = li_store

storagelocationdatax = li_storex

valuationdata = li_account

valuationdatax = li_accountx

salesdata = li_sales

salesdatax = li_salesx

IMPORTING

return = wa_return

TABLES

materialdescription = li_makt

unitsofmeasure = li_unit

unitsofmeasurex = li_unitx

internationalartnos = li_ean

taxclassifications = li_tax.

HI;

I´m extending materials with this bapi, for some reason this bapi doesn´t launch any error when finish and it updates all other fields except this one.

Any help..?

Thanks on advance.

part of the code:

The data defnition:

li_plant LIKE bapi_marc, " datos del material a nivel de planta

li_plantx LIKE bapi_marcx,

The value assignation:

li_plant-loadinggrp = tdata-ladgr.

li_plantx-loadinggrp = 'X'.

The bapi´s call:

CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'

EXPORTING

headdata = li_head

clientdata = li_client

clientdatax = li_clientx

plantdata = li_plant

plantdatax = li_plantx

forecastparameters = li_forecast

forecastparametersx = li_forecastx

storagelocationdata = li_store

storagelocationdatax = li_storex

valuationdata = li_account

valuationdatax = li_accountx

salesdata = li_sales

salesdatax = li_salesx

IMPORTING

return = wa_return

TABLES

materialdescription = li_makt

unitsofmeasure = li_unit

unitsofmeasurex = li_unitx

internationalartnos = li_ean

taxclassifications = li_tax.

3 REPLIES 3
Read only

Former Member
0 Likes
897

Hi, David.

I´m having a similar problem with this bapi. It looks very complicated, as I can see...

My issue consists in the field batch_mgmt, placed into structures plantdata and clientdata, among import parameters. The point is, despite of I´m putting the corresponding value in these fields ("X"), my material is created with field MARA-XCHPF and MARC-XCHPF empty; in other words: I´m implementing the bapi call to create a material with batch management, and the bapi creates it without it.

By the moment, I´ve found out that it´s related with the customizing. If you configure transactions MM01/02/03 to put the batch management checkbox as a obligatory field, my bapi works fine and creates the material with batch management. Otherwise, it doesn´t work. I have no other explanation so far. I keep on working on the issue, in fact.

I hope you´re luckier than me and resolve your problem.

Regards!

Read only

0 Likes
897

Hi;

i solved marking SALES_VIEW = 'X' from bapimathead.

Thanks on advance.

Read only

0 Likes
897

Hi,

This might also be helpful for others: at structure CLIENTDATA there is also a field BATCH_MGMT. When I set the field BATCH_MGMT in both CLIENTDATA and PLANTDATA, the corresponding checkbox is now checked accordingly when viewed in MM03.