SAP AP_TTE_CALCULATE_TAXES Function Module for RFC call to TTE: Calculate Taxes. ( TteDocument in table format)
AP_TTE_CALCULATE_TAXES is a standard ap tte calculate taxes SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for RFC call to TTE: Calculate Taxes. ( TteDocument in table format) processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for ap tte calculate taxes FM, simply by entering the name AP_TTE_CALCULATE_TAXES into the relevant SAP transaction such as SE37 or SE38.
Function Group: CA_TTE_VMC_RFC
Program Name: SAPLCA_TTE_VMC_RFC
Main Program: SAPLCA_TTE_VMC_RFC
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled JAVA Module
Update:
Function AP_TTE_CALCULATE_TAXES pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'AP_TTE_CALCULATE_TAXES'"RFC call to TTE: Calculate Taxes. ( TteDocument in table format).
EXPORTING
TTEDOCUMENTID = "TTE Command
* IT_TAXEL = "Document / Item tax element
* IT_TAXVALUE = "Document / Item tax value
* IT_PRODUCT = "Document product
* IT_PRTAXCL = "Document product tax class.
* IT_PRPROP = "Document product property
* IT_PARTNER = "Document business partner
* IT_PATAXCL = "Document business partner tax class.
* IT_PAPROP = "Document business partner property
* IT_PATAXNUM = "Document business partner tax number
* IT_CURRCONV = "Document curruncy conversion
IT_HEADER = "Document header
* IT_COUNTRIES = "Document business partner
* IT_TAXCODEVALUE = "Document / Item TaxCode Value
* IT_ACCUMVALUE = "Document business partner accum. values of with. tax.
* IT_EXEMPVALUE = "Document business partner aexemption values for with. tax.
* IT_ITEM = "Input item
* IT_TRANPROP = "Document transaction property
* IT_ORGUNIT = "Document org unit
* IT_ITEMPART = "Document item partner
* IT_PRICEL = "Document / Item pricing element
* IT_TAXDATE = "Document tax date
* IT_TAXEVENT = "Document / Item tax event
IMPORTING
RETURNCODE = "Return Code
OT_EXEMPT = "Output Exemptions
OT_USITEM = "US Tax Interface : Communication Structure for Tax Calc.
OT_HEADER = "Document header
OT_ITEM = "Output item
OT_TAXEVENT = "Document / Item tax event
OT_TAXEL = "Document / Item tax element
OT_TAXVALUE = "Document / Item tax value
OT_CURRCONV = "Document curruncy conversion
OT_TRACE = "Output Trace
OT_TEXT = "Document document textes
IMPORTING Parameters details for AP_TTE_CALCULATE_TAXES
TTEDOCUMENTID - TTE Command
Data type: TTET_TTEDOCUMENTID_COM_PDOptional: No
Call by Reference: No ( called with pass by value option)
IT_TAXEL - Document / Item tax element
Data type: TTEPDT_TAXEL_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_TAXVALUE - Document / Item tax value
Data type: TTEPDT_TAXVALUE_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_PRODUCT - Document product
Data type: TTEPDT_PRODUCT_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_PRTAXCL - Document product tax class.
Data type: TTEPDT_PRTAXCL_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_PRPROP - Document product property
Data type: TTEPDT_PRPROP_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_PARTNER - Document business partner
Data type: TTEPDT_PARTNER_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_PATAXCL - Document business partner tax class.
Data type: TTEPDT_PATAXCL_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_PAPROP - Document business partner property
Data type: TTEPDT_PAPROP_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_PATAXNUM - Document business partner tax number
Data type: TTEPDT_PATAXNUM_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_CURRCONV - Document curruncy conversion
Data type: TTEPDT_CURRCONV_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_HEADER - Document header
Data type: TTEPDT_HEADER_COM_TTOptional: No
Call by Reference: No ( called with pass by value option)
IT_COUNTRIES - Document business partner
Data type: TTEPDT_COUNTRIES_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_TAXCODEVALUE - Document / Item TaxCode Value
Data type: TTEPDT_TAXCODEVALUE_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_ACCUMVALUE - Document business partner accum. values of with. tax.
Data type: TTEPDT_ACCUMVALUE_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_EXEMPVALUE - Document business partner aexemption values for with. tax.
Data type: TTEPDT_EXEMPVALUE_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_ITEM - Input item
Data type: TTEPDT_ITEM_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_TRANPROP - Document transaction property
Data type: TTEPDT_TRANPROP_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_ORGUNIT - Document org unit
Data type: TTEPDT_ORGUNIT_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_ITEMPART - Document item partner
Data type: TTEPDT_ITEMPART_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_PRICEL - Document / Item pricing element
Data type: TTEPDT_PRICEL_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_TAXDATE - Document tax date
Data type: TTEPDT_TAXDATE_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_TAXEVENT - Document / Item tax event
Data type: TTEPDT_TAXEVENT_COM_TTOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for AP_TTE_CALCULATE_TAXES
RETURNCODE - Return Code
Data type: TTET_RETURNCODE_COMOptional: No
Call by Reference: No ( called with pass by value option)
OT_EXEMPT - Output Exemptions
Data type: TTEPDT_EXEMPT_COM_TTOptional: No
Call by Reference: No ( called with pass by value option)
OT_USITEM - US Tax Interface : Communication Structure for Tax Calc.
Data type: TTEPDT_USITEM_COM_TTOptional: No
Call by Reference: No ( called with pass by value option)
OT_HEADER - Document header
Data type: TTEPDT_OHEADER_COM_TTOptional: No
Call by Reference: No ( called with pass by value option)
OT_ITEM - Output item
Data type: TTEPDT_OITEM_COM_TTOptional: No
Call by Reference: No ( called with pass by value option)
OT_TAXEVENT - Document / Item tax event
Data type: TTEPDT_TAXEVENT_COM_TTOptional: No
Call by Reference: No ( called with pass by value option)
OT_TAXEL - Document / Item tax element
Data type: TTEPDT_TAXEL_COM_TTOptional: No
Call by Reference: No ( called with pass by value option)
OT_TAXVALUE - Document / Item tax value
Data type: TTEPDT_TAXVALUE_COM_TTOptional: No
Call by Reference: No ( called with pass by value option)
OT_CURRCONV - Document curruncy conversion
Data type: TTEPDT_CURRCONV_COM_TTOptional: No
Call by Reference: No ( called with pass by value option)
OT_TRACE - Output Trace
Data type: TTEPDT_TRACE_COM_TTOptional: No
Call by Reference: No ( called with pass by value option)
OT_TEXT - Document document textes
Data type: TTEPDT_TEXT_COM_TTOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for AP_TTE_CALCULATE_TAXES Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.DATA: | ||||
lv_returncode | TYPE TTET_RETURNCODE_COM, " | |||
lv_ttedocumentid | TYPE TTET_TTEDOCUMENTID_COM_PD, " | |||
lv_it_taxel | TYPE TTEPDT_TAXEL_COM_TT, " | |||
lv_ot_exempt | TYPE TTEPDT_EXEMPT_COM_TT, " | |||
lv_ot_usitem | TYPE TTEPDT_USITEM_COM_TT, " | |||
lv_it_taxvalue | TYPE TTEPDT_TAXVALUE_COM_TT, " | |||
lv_it_product | TYPE TTEPDT_PRODUCT_COM_TT, " | |||
lv_it_prtaxcl | TYPE TTEPDT_PRTAXCL_COM_TT, " | |||
lv_it_prprop | TYPE TTEPDT_PRPROP_COM_TT, " | |||
lv_it_partner | TYPE TTEPDT_PARTNER_COM_TT, " | |||
lv_it_pataxcl | TYPE TTEPDT_PATAXCL_COM_TT, " | |||
lv_it_paprop | TYPE TTEPDT_PAPROP_COM_TT, " | |||
lv_it_pataxnum | TYPE TTEPDT_PATAXNUM_COM_TT, " | |||
lv_it_currconv | TYPE TTEPDT_CURRCONV_COM_TT, " | |||
lv_it_header | TYPE TTEPDT_HEADER_COM_TT, " | |||
lv_ot_header | TYPE TTEPDT_OHEADER_COM_TT, " | |||
lv_it_countries | TYPE TTEPDT_COUNTRIES_COM_TT, " | |||
lv_it_taxcodevalue | TYPE TTEPDT_TAXCODEVALUE_COM_TT, " | |||
lv_it_accumvalue | TYPE TTEPDT_ACCUMVALUE_COM_TT, " | |||
lv_it_exempvalue | TYPE TTEPDT_EXEMPVALUE_COM_TT, " | |||
lv_it_item | TYPE TTEPDT_ITEM_COM_TT, " | |||
lv_ot_item | TYPE TTEPDT_OITEM_COM_TT, " | |||
lv_it_tranprop | TYPE TTEPDT_TRANPROP_COM_TT, " | |||
lv_ot_taxevent | TYPE TTEPDT_TAXEVENT_COM_TT, " | |||
lv_ot_taxel | TYPE TTEPDT_TAXEL_COM_TT, " | |||
lv_it_orgunit | TYPE TTEPDT_ORGUNIT_COM_TT, " | |||
lv_it_itempart | TYPE TTEPDT_ITEMPART_COM_TT, " | |||
lv_ot_taxvalue | TYPE TTEPDT_TAXVALUE_COM_TT, " | |||
lv_it_pricel | TYPE TTEPDT_PRICEL_COM_TT, " | |||
lv_ot_currconv | TYPE TTEPDT_CURRCONV_COM_TT, " | |||
lv_ot_trace | TYPE TTEPDT_TRACE_COM_TT, " | |||
lv_it_taxdate | TYPE TTEPDT_TAXDATE_COM_TT, " | |||
lv_ot_text | TYPE TTEPDT_TEXT_COM_TT, " | |||
lv_it_taxevent | TYPE TTEPDT_TAXEVENT_COM_TT. " |
  CALL FUNCTION 'AP_TTE_CALCULATE_TAXES' "RFC call to TTE: Calculate Taxes. ( TteDocument in table format) |
EXPORTING | ||
TTEDOCUMENTID | = lv_ttedocumentid | |
IT_TAXEL | = lv_it_taxel | |
IT_TAXVALUE | = lv_it_taxvalue | |
IT_PRODUCT | = lv_it_product | |
IT_PRTAXCL | = lv_it_prtaxcl | |
IT_PRPROP | = lv_it_prprop | |
IT_PARTNER | = lv_it_partner | |
IT_PATAXCL | = lv_it_pataxcl | |
IT_PAPROP | = lv_it_paprop | |
IT_PATAXNUM | = lv_it_pataxnum | |
IT_CURRCONV | = lv_it_currconv | |
IT_HEADER | = lv_it_header | |
IT_COUNTRIES | = lv_it_countries | |
IT_TAXCODEVALUE | = lv_it_taxcodevalue | |
IT_ACCUMVALUE | = lv_it_accumvalue | |
IT_EXEMPVALUE | = lv_it_exempvalue | |
IT_ITEM | = lv_it_item | |
IT_TRANPROP | = lv_it_tranprop | |
IT_ORGUNIT | = lv_it_orgunit | |
IT_ITEMPART | = lv_it_itempart | |
IT_PRICEL | = lv_it_pricel | |
IT_TAXDATE | = lv_it_taxdate | |
IT_TAXEVENT | = lv_it_taxevent | |
IMPORTING | ||
RETURNCODE | = lv_returncode | |
OT_EXEMPT | = lv_ot_exempt | |
OT_USITEM | = lv_ot_usitem | |
OT_HEADER | = lv_ot_header | |
OT_ITEM | = lv_ot_item | |
OT_TAXEVENT | = lv_ot_taxevent | |
OT_TAXEL | = lv_ot_taxel | |
OT_TAXVALUE | = lv_ot_taxvalue | |
OT_CURRCONV | = lv_ot_currconv | |
OT_TRACE | = lv_ot_trace | |
OT_TEXT | = lv_ot_text | |
. " AP_TTE_CALCULATE_TAXES |
ABAP code using 7.40 inline data declarations to call FM AP_TTE_CALCULATE_TAXES
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.Search for further information about these or an SAP related objects