Please guide me on which are the parameters need to be passed to RFC_CALCULATE_TAXES_DOC and RFC_UPDATE_TAXES_DOC.
I tried testing both, but not getting any fruitful results.
I know the Import Parameters are:
I_SAP_CONTROL_DATA, I_TAX_CAL_HEAD_IN, I_TAX_CAL_ITEM_IN
and i get to know results from:
O_EXT_CONTROL_DATA, O_COM_ERR_DOC under Export parameters and
O_TAX_CAL_ITEM_OUT, O_TAX_CAL_JUR_LEVEL_OUT under Tables.
My scenario is something like:
I need to fetch data from BKPF, BSEG, MSEG and pass the relvant data to function module
RFC_CALCULATE_TAXES_DOC to calculate Tax and need to post that tax into SAP as well as external system.
I need to call RFC_CALCULATE_TAXES_DOC twice:
Call 1 - to determine what the tax determination would have been on the original purchase and store the tax amount value.
Call 2 - second time to determine tax on the movement itself (inclusive of cost objects and/or updated locations) and store the tax amount value.
tax amount = call1 - call2.
Now need to update this tax to SAP and External system.