03-30-2017 7:21 AM
iam using BAPI_SERVICE_CREATE to create a service master records.. now i want to update the TAX TARIFF CODE in service master records... iam having TAX TARIFF CODE field in AC03 as well as in ASMD table...but i could not find it in BAPI_SERVICE_CREATE.. so i have to use BAPI extension... iam not aware of Bapi extension ... Anybody give me the proper steps to use the bapi extension to update the tax tariff code in service master ..
Thanks in advance
03-30-2017 10:02 AM
First ask functionals, as this field should come from Customizing and other master data.
From this BAPI documentation (BAdI are listed the end of the FM doc.) you should have found that you could either
To fill the EXTENSIONIN structure, pass the structure name to STRUCTURE field and map the data to the VALUEPART fields using a class like the generic cl_abap_container_utilities or the more specific cl_nls_struc_container class. (perform some where-used search for samples)
03-30-2017 10:02 AM
First ask functionals, as this field should come from Customizing and other master data.
From this BAPI documentation (BAdI are listed the end of the FM doc.) you should have found that you could either
To fill the EXTENSIONIN structure, pass the structure name to STRUCTURE field and map the data to the VALUEPART fields using a class like the generic cl_abap_container_utilities or the more specific cl_nls_struc_container class. (perform some where-used search for samples)
04-12-2017 1:44 PM
Thanks for your valuable comment.... i cannot add the TAXTARRIFCODE in the structure BAPISRV_TE_ASMD and
BAPISRV_TE_ASMDx .... it says ERROE-the ASMD table you cannot specific TAXTARRIFCODE Twice..... but i have added custom field ZTARRIF in BAPISRV_TE_ASMD and BAPISRV_TE_ASMDx and i have pass the value via BAPI and its get updated... now i want to pass the TAXTARRIFCODE via BAPI which is already exist in ASMD and does not exist in BAPISRV_TE_ASMD and BAPISRV_TE_ASMDx ... kindly provide any suggestions... thanks in advance..
03-31-2017 10:01 AM
hi Prasath,
The following code will be helpful for you i think.but tax is updated in table.tax tariff code is not updated.For taxtariff code BADI should be implemented as Mr.Raymond Giuseppi told.
**Importing
DATA : serv_data TYPE bapisrv_asmd,
serv_datax TYPE bapisrv_asmdx.
**Tables
DATA : lt_desc TYPE TABLE OF bapisrv_asmdt,
ls_desc TYPE bapisrv_asmdt,
lt_return TYPE TABLE OF bapiret2,
ls_return TYPE bapiret2.
DATA : lt_ex_in TYPE TABLE OF bapiparex,
ls_ex_in TYPE bapiparex.
DATA : ls_ext TYPE bapisrv_te_asmd.
serv_data-base_uom = 'EA'.
serv_datax-base_uom = 'X'.
serv_data-serv_cat = 'SERV'.
serv_datax-serv_cat = 'X'.
ls_desc-language = 'EN'.
ls_desc-short_text = 'service master'.
APPEND ls_desc TO lt_desc.
CLEAR ls_desc.
ls_ex_in-structure = 'BAPISRV_TE_ASMD'.
ls_ext-tax = 'NCM01'.
ls_ex_in-valuepart1 = ls_ext.
APPEND ls_ex_in TO lt_ex_in.
ls_ex_in-structure = 'BAPISRV_TE_ASMDX'.
ls_ex_in-valuepart1 = 'X'.
APPEND ls_ex_in TO lt_ex_in.
CALL FUNCTION 'BAPI_SERVICE_CREATE'
EXPORTING
im_service_data = serv_data
im_service_datax = serv_datax
TABLES
return = lt_return
service_description = lt_desc
extension_in = lt_ex_in.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
06-15-2017 7:07 AM
HI Prasath,
Have you solved this issue? We are also facing same issue, could you please help us
Chandra
07-25-2017 7:41 AM
Still facing the problem,cannot find the exact solution , if you find the solution please post here thanks.
if you are using inside the sap system, you can use ASMD_UPDATE_SINGLE FM which is having TAXTARIFFCODE and we can update, iam using .net system to update taxtariffcode in sap system so the update FM is not accepted.
09-13-2017 12:31 PM
09-14-2017 1:41 PM
Still facing the problem,cannot find the exact solution , if you find the solution please post here thanks.
if you are using inside the sap system, you can use ASMD_UPDATE_SINGLE FM which is having TAXTARIFFCODE and we can update, iam using .net system to update taxtariffcode in sap system so the update FM is not accepted.
02-10-2021 5:42 PM
I am afraid it's not possible to add TAXTARIFFCODE as an extension of BAPI_SERVICE_CREATE, because TAXTARIFFCODE is already an extension of ASMD.
The structure CI_ASMDDB (used in BAPISRV_TE_ASMD) is included in both BAPISRV_TE_ASMD and ASMD standard table. As you have already extended standard field TAXTARIFFCODE, it will duplicate the field trying to extend TAXTARIFFCODE in BAPI.
The solution is maybe use BAPI_SERVICE_CHANGE after CREATE or ASMD_UPDATE_SINGLE.
You can also use LSWM only to update the TAXTARIFFCODE field, if this operation is not a daily operation of course.