2014 Jan 31 6:12 PM
Hello,
I am trying to update the field BAPI_MLAN of the view Purchase with the bapi BAPI_MATERIAL_SAVEDATA but i doesn't update.
bapi_mlan-tax_ind = 1.
*--- BAPI para crear material
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = bapi_head
clientdata = bapi_mara1
clientdatax = bapi_marax
plantdata = bapi_marc1
plantdatax = bapi_marcx
StorageLocationData = bapi_mard
StorageLocationDatax = bapi_mardx
valuationdata = bapi_mbew1
valuationdatax = bapi_mbewx
IMPORTING
return = bapi_return
TABLES
returnmessages = returnmessages
materialdescription = it_makt
TaxClassifications = bapi_mlan
extensionin = rex
extensioninx = rexx.
IF bapi_return-type = 'E'.
WRITE:/ 'Error:' ,bapi_return-message ,'for material:' ,bapi_head-material.
ELSEIF bapi_return-type = 'S'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
2014 Jan 31 9:37 PM
Hello,
Have you checked taxclass_1 and taxclass_9 correctly? Because these are the fields depending upon your tax category.
Check whether you have populated these data correctly or not?
Thanks & Regards,
Abhijit
2014 Jan 31 9:37 PM
Hello,
Have you checked taxclass_1 and taxclass_9 correctly? Because these are the fields depending upon your tax category.
Check whether you have populated these data correctly or not?
Thanks & Regards,
Abhijit
2014 Feb 01 2:56 PM
Hi,
Thanks so much, do you know which tables these values are saved, I don't know which values do I have to put in those fields, so I my plan is to find how other materials were saved
Thanks
2014 Feb 03 4:47 AM
Hi,
Check with TSKM Table .
DATA T_MLAN TYPE STANDARD TABLE OF BAPI_MLAN WITH HEADER LINE INITIAL SIZE 0.
T_MLAN-DEPCOUNTRY = 'DE'.
T_MLAN-TAX_TYPE_1 = 'MWST'. " Tax category
T_MLAN-TAXCLASS_1 = '0' . "Tax classification material
APPEND T_MLAN.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = bapi_head
clientdata = bapi_mara1
clientdatax = bapi_marax
plantdata = bapi_marc1
plantdatax = bapi_marcx
StorageLocationData = bapi_mard
StorageLocationDatax = bapi_mardx
valuationdata = bapi_mbew1
valuationdatax = bapi_mbewx
IMPORTING
return = bapi_return
TABLES
returnmessages = returnmessages
materialdescription = it_makt
TaxClassifications = T_MLAN " bapi_mlan
extensionin = rex
extensioninx = rexx.
Regard's
Smruti
2014 Feb 03 4:53 AM
Hi Enrique
What error message does it return when you are updating?
Nabheet
2014 Feb 03 3:46 PM
hello,
I dont have any error, but when I go to mm03 to consult the material, I dont see any value in the field taxim
2014 Feb 03 3:56 PM
are you also supplying the plant? I am pretty sure that fields is at plant level - so if you set the indicator and not the plant it applies to then it will not show up in material master
2014 Feb 03 4:03 PM
this is my code, i doesnt give any error but I dont see the value 1 in purchase view for the material.
* Compra
bapi_marc1-plant = it_data-werks.
bapi_marc1-pur_group = it_data-ekgrp.
bapi_marcx-plant = it_data-werks.
bapi_marcx-pur_group = 'X'.
this is the value of the table tskm
*Impuesto
"bapi_mlan-tax_ind = it_data-taxim.
bapi_mlan-depcountry = 'PE'.
bapi_mlan-tax_type_1 = 'MWST'.
bapi_mlan-taxclass_1 = it_data-taxim. "this is value 1
bapi_mlan-tax_ind = it_data-taxim. "this is value 1
*--- BAPI para crear material
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = bapi_head
clientdata = bapi_mara1
clientdatax = bapi_marax
plantdata = bapi_marc1
plantdatax = bapi_marcx
StorageLocationData = bapi_mard
StorageLocationDatax = bapi_mardx
valuationdata = bapi_mbew1
valuationdatax = bapi_mbewx
IMPORTING
return = bapi_return
TABLES
returnmessages = returnmessages
materialdescription = it_makt
TaxClassifications = bapi_mlan
materiallongtext = bapi_mltx
extensionin = rex
extensioninx = rexx.
IF bapi_return-type = 'E'.
WRITE:/ 'Error:' ,bapi_return-message ,'for material:' ,bapi_head-material.
ELSEIF bapi_return-type = 'S'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
2014 Feb 03 4:46 PM
2022 Jun 13 2:19 PM
It is possible to update with the values from the inner join of the T001W and TKMK1 tables.
If the values you entered in the DEPCOUNTRY eq (T001W-LAND1) and TAX_IND fields are not in the TKMK1 table, it may not be updating.
2025 Apr 08 6:32 PM
Hi together,
the LAND1 must not be taken from T001W, but via TVKO-VKORG => BUKRS => T001-LAND1.
Regards!