Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

BAPI _Material_save_data

Hi Experts,

I am extending the material for new plant, sorg and division with reference material,ref plant,ref sorg and ref division using the ref mat it will be extended.

I am using BAPI_MATERIAL_GET_ALL to get all the data for the material based on ref mat.

then i am using BAPI_MATERIAL_SAVE_DATA to extend the material for few materials i can able to extend materials.

For few materials i am getting error.

i am getting error Tax category MWST is not defined for country NL.

The tax classification field with depcountry, taxtype and taxclass are appended

Where this is to maintain and how to solve this error. Give solution

my details given below:

headdata has material no basicview,salesview and accountive view.

IS_PLANTDATA-PLANT = '4000'.

IS_PLANTDATA-AVAILCHECK = 'KP'

IS_PLANTDATAX-PLANT = '4000'.

IS_PLANTDATAX-AVAILCHECK = 'X'.

IS_VALUATIONDATA-VAL_AREA = '4000'IS_PLANTDATA-PLANT.

IS_VALUATIONDATA-VAL_CLASS = '7921'.

IS_VALUATIONDATAX-VAL_AREA = 4000.

IS_VALUATIONDATAX-VAL_CLASS = 'X'.

IS_SALESDATA-SALES_ORG = '4000'.

IS_SALESDATA-DISTR_CHAN = '20'.

IS_SALESDATAX-SALES_ORG = '4000'.

IS_SALESDATAX-DISTR_CHAN = '20'.

DATA : WA_TAX TYPE BAPI_MLAN .

wa_tax-DEPCOUNTRY = 'NL'.

wa_tax-tax_type_1 = 'MWST'.

wa_tax-taxclass_1 = '1'.

append WA_TAX to IT_tax1.

clear wa_tax.

CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'

EXPORTING

HEADDATA = IS_HEADDATA

PLANTDATA = IS_PLANTDATA

PLANTDATAX = IS_PLANTDATAX

VALUATIONDATA = IS_VALUATIONDATA

VALUATIONDATAX = IS_VALUATIONDATAX

SALESDATA = IS_SALESDATA

SALESDATAX = IS_SALESDATAX

IMPORTING

RETURN = IS_RETURNS

TABLES

TAXCLASSIFICATIONS = IT_TAX1

RETURNMESSAGES = IT_RETURNS.

Not what you were looking for? View more on this topic or Ask a question