09-28-2008 9:19 AM
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.
09-29-2008 8:07 PM
The question solved related to which i posted.
The status of the material is display when used the BAPI_MATERIAL_GET_ALL
in the clientdata in main_stat field its displayed.
then whil using BAPI_MATERIAL_SAVE_DATA
while passing headear data for which views be sure to search 'K'
IS_HEADDATA-MATERIAL = IT_CLIENTDATA-MATERIAL.
To check Status of View.
WA_STATUS = IT_CLIENTDATA-MAINT_STAT.
SEARCH WA_STATUS FOR 'K'.
IF SY-SUBRC = 0.
IS_HEADDATA-BASIC_VIEW = 'X'.
ENDIF.
SEARCH WA_STATUS FOR 'V'.
IF SY-SUBRC = 0.
IS_HEADDATA-SALES_VIEW = 'X'.
ENDIF.
The status are stored in table T132T ..
Thanks all