SAP TTE_3_DOCUMENT_GET Function Module for Get TTE Document









TTE_3_DOCUMENT_GET is a standard tte 3 document get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get TTE Document 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 tte 3 document get FM, simply by entering the name TTE_3_DOCUMENT_GET into the relevant SAP transaction such as SE37 or SE38.

Function Group: CA_TTE_PER3
Program Name: SAPLCA_TTE_PER3
Main Program: SAPLCA_TTE_PER3
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function TTE_3_DOCUMENT_GET 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 'TTE_3_DOCUMENT_GET'"Get TTE Document
EXPORTING
I_HANDLE = "Document header
* I_WITH_USITEMS = 'Y' "
* I_READ_FROM_TTE = 'X' "Flag space= Read from DB

IMPORTING
O_DOCUMENT_ATR = "TTE Persistency Document

TABLES
IT_HEADER = "Header
IT_CURRENCYCONVERSION = "CurrencyConversions
IT_REPORTINGFIELD = "Reporting Field
IT_TAXSITUATION = "TaxSituation
IT_TAXDETERMINATION = "TaxDetermination
OT_HEADER = "Header
OT_ITEM = "Item
OT_TAXELEMENT = "TaxElement
OT_TAXVALUE = "TaxValue
OT_TAXSITUATION = "TaxSituation
OT_CURRENCYCONVERSION = "CurrencyConversions
IT_ITEM = "Item
OT_EXEMPTION = "Exemptions
OT_PARTNER = "Partner
OT_PARTNERTAXNUMBER = "PartnerTaxNumber
OT_TAXCLASSIFICATION = "TaxClassification
OT_TRACEENTRY = "Header
OT_US_TAX = "US Tax Interface : Communication Structure for Tax Calc.
IT_PRODUCT = "Product
IT_PRODUCTUSAGE = "ProductUsage
IT_PARTNER = "Partner
IT_PARTNERTAXNUMBER = "PartnerTaxNumber
IT_PRICINGELEMENT = "Pricing Element
IT_EXEMPTION = "Exemptions
IT_TAXCLASSIFICATION = "TaxClassification

EXCEPTIONS
COMMUNICATION_FAILURE = 1 NO_TTE_DOCUMENT = 2 SYSTEM_FAILURE = 3 IMPORT_ERROR = 4 OTHERS = 5
.



IMPORTING Parameters details for TTE_3_DOCUMENT_GET

I_HANDLE - Document header

Data type: TTEPDT_SAVE_HANDLE_ST
Optional: No
Call by Reference: No ( called with pass by value option)

I_WITH_USITEMS -

Data type: C
Default: 'Y'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_READ_FROM_TTE - Flag space= Read from DB

Data type: C
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for TTE_3_DOCUMENT_GET

O_DOCUMENT_ATR - TTE Persistency Document

Data type: TTEPD3_DOCUMENT
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for TTE_3_DOCUMENT_GET

IT_HEADER - Header

Data type: TTET_I_HEAD_COM
Optional: No
Call by Reference: Yes

IT_CURRENCYCONVERSION - CurrencyConversions

Data type: TTET_IT_CURRCON_COM
Optional: No
Call by Reference: Yes

IT_REPORTINGFIELD - Reporting Field

Data type: TTET_I_REPFLDS_COM
Optional: No
Call by Reference: Yes

IT_TAXSITUATION - TaxSituation

Data type: TTET_IO_TAXSITU_COM
Optional: No
Call by Reference: Yes

IT_TAXDETERMINATION - TaxDetermination

Data type: TTET_I_TAXDETE_COM
Optional: No
Call by Reference: Yes

OT_HEADER - Header

Data type: TTET_O_HEAD_COM
Optional: No
Call by Reference: Yes

OT_ITEM - Item

Data type: TTET_O_ITEM_COM
Optional: No
Call by Reference: Yes

OT_TAXELEMENT - TaxElement

Data type: TTET_O_TAXELE_COM
Optional: No
Call by Reference: Yes

OT_TAXVALUE - TaxValue

Data type: TTET_OT_TAXVAL_COM
Optional: No
Call by Reference: Yes

OT_TAXSITUATION - TaxSituation

Data type: TTET_IO_TAXSITU_COM
Optional: No
Call by Reference: Yes

OT_CURRENCYCONVERSION - CurrencyConversions

Data type: TTET_IT_CURRCON_COM
Optional: No
Call by Reference: Yes

IT_ITEM - Item

Data type: TTET_I_ITEM_COM
Optional: No
Call by Reference: Yes

OT_EXEMPTION - Exemptions

Data type: TTET_IT_EXEMPTION_COM
Optional: No
Call by Reference: Yes

OT_PARTNER - Partner

Data type: TTET_I_PARTNER_COM
Optional: No
Call by Reference: Yes

OT_PARTNERTAXNUMBER - PartnerTaxNumber

Data type: TTET_I_PATAXNO_COM
Optional: No
Call by Reference: Yes

OT_TAXCLASSIFICATION - TaxClassification

Data type: TTET_I_TAXCLAS_COM
Optional: No
Call by Reference: Yes

OT_TRACEENTRY - Header

Data type: TTET_O_TRACE_COM
Optional: No
Call by Reference: Yes

OT_US_TAX - US Tax Interface : Communication Structure for Tax Calc.

Data type: TTET_USCOM_TAX_COM
Optional: No
Call by Reference: Yes

IT_PRODUCT - Product

Data type: TTET_IT_PRODUCT_COM
Optional: No
Call by Reference: Yes

IT_PRODUCTUSAGE - ProductUsage

Data type: TTET_I_PROUSAG_COM
Optional: No
Call by Reference: Yes

IT_PARTNER - Partner

Data type: TTET_I_PARTNER_COM
Optional: No
Call by Reference: Yes

IT_PARTNERTAXNUMBER - PartnerTaxNumber

Data type: TTET_I_PATAXNO_COM
Optional: No
Call by Reference: Yes

IT_PRICINGELEMENT - Pricing Element

Data type: TTET_IT_PRIELES_COM
Optional: No
Call by Reference: Yes

IT_EXEMPTION - Exemptions

Data type: TTET_IT_EXEMPTION_COM
Optional: No
Call by Reference: Yes

IT_TAXCLASSIFICATION - TaxClassification

Data type: TTET_I_TAXCLAS_COM
Optional: No
Call by Reference: Yes

EXCEPTIONS details

COMMUNICATION_FAILURE - RFC error

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_TTE_DOCUMENT - TTE document does not exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

SYSTEM_FAILURE - System failure

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

IMPORT_ERROR - Problems with IMPORT from cluster

Data type:
Optional: No
Call by Reference: Yes

OTHERS - Others

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for TTE_3_DOCUMENT_GET 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_i_handle  TYPE TTEPDT_SAVE_HANDLE_ST, "   
lt_it_header  TYPE STANDARD TABLE OF TTET_I_HEAD_COM, "   
lv_o_document_atr  TYPE TTEPD3_DOCUMENT, "   
lv_communication_failure  TYPE TTEPD3_DOCUMENT, "   
lt_it_currencyconversion  TYPE STANDARD TABLE OF TTET_IT_CURRCON_COM, "   
lt_it_reportingfield  TYPE STANDARD TABLE OF TTET_I_REPFLDS_COM, "   
lt_it_taxsituation  TYPE STANDARD TABLE OF TTET_IO_TAXSITU_COM, "   
lt_it_taxdetermination  TYPE STANDARD TABLE OF TTET_I_TAXDETE_COM, "   
lt_ot_header  TYPE STANDARD TABLE OF TTET_O_HEAD_COM, "   
lt_ot_item  TYPE STANDARD TABLE OF TTET_O_ITEM_COM, "   
lt_ot_taxelement  TYPE STANDARD TABLE OF TTET_O_TAXELE_COM, "   
lt_ot_taxvalue  TYPE STANDARD TABLE OF TTET_OT_TAXVAL_COM, "   
lt_ot_taxsituation  TYPE STANDARD TABLE OF TTET_IO_TAXSITU_COM, "   
lt_ot_currencyconversion  TYPE STANDARD TABLE OF TTET_IT_CURRCON_COM, "   
lt_it_item  TYPE STANDARD TABLE OF TTET_I_ITEM_COM, "   
lv_i_with_usitems  TYPE C, "   'Y'
lv_no_tte_document  TYPE C, "   
lt_ot_exemption  TYPE STANDARD TABLE OF TTET_IT_EXEMPTION_COM, "   
lt_ot_partner  TYPE STANDARD TABLE OF TTET_I_PARTNER_COM, "   
lt_ot_partnertaxnumber  TYPE STANDARD TABLE OF TTET_I_PATAXNO_COM, "   
lt_ot_taxclassification  TYPE STANDARD TABLE OF TTET_I_TAXCLAS_COM, "   
lt_ot_traceentry  TYPE STANDARD TABLE OF TTET_O_TRACE_COM, "   
lt_ot_us_tax  TYPE STANDARD TABLE OF TTET_USCOM_TAX_COM, "   
lt_it_product  TYPE STANDARD TABLE OF TTET_IT_PRODUCT_COM, "   
lv_system_failure  TYPE TTET_IT_PRODUCT_COM, "   
lv_i_read_from_tte  TYPE C, "   'X'
lv_import_error  TYPE C, "   
lt_it_productusage  TYPE STANDARD TABLE OF TTET_I_PROUSAG_COM, "   
lv_others  TYPE TTET_I_PROUSAG_COM, "   
lt_it_partner  TYPE STANDARD TABLE OF TTET_I_PARTNER_COM, "   
lt_it_partnertaxnumber  TYPE STANDARD TABLE OF TTET_I_PATAXNO_COM, "   
lt_it_pricingelement  TYPE STANDARD TABLE OF TTET_IT_PRIELES_COM, "   
lt_it_exemption  TYPE STANDARD TABLE OF TTET_IT_EXEMPTION_COM, "   
lt_it_taxclassification  TYPE STANDARD TABLE OF TTET_I_TAXCLAS_COM. "   

  CALL FUNCTION 'TTE_3_DOCUMENT_GET'  "Get TTE Document
    EXPORTING
         I_HANDLE = lv_i_handle
         I_WITH_USITEMS = lv_i_with_usitems
         I_READ_FROM_TTE = lv_i_read_from_tte
    IMPORTING
         O_DOCUMENT_ATR = lv_o_document_atr
    TABLES
         IT_HEADER = lt_it_header
         IT_CURRENCYCONVERSION = lt_it_currencyconversion
         IT_REPORTINGFIELD = lt_it_reportingfield
         IT_TAXSITUATION = lt_it_taxsituation
         IT_TAXDETERMINATION = lt_it_taxdetermination
         OT_HEADER = lt_ot_header
         OT_ITEM = lt_ot_item
         OT_TAXELEMENT = lt_ot_taxelement
         OT_TAXVALUE = lt_ot_taxvalue
         OT_TAXSITUATION = lt_ot_taxsituation
         OT_CURRENCYCONVERSION = lt_ot_currencyconversion
         IT_ITEM = lt_it_item
         OT_EXEMPTION = lt_ot_exemption
         OT_PARTNER = lt_ot_partner
         OT_PARTNERTAXNUMBER = lt_ot_partnertaxnumber
         OT_TAXCLASSIFICATION = lt_ot_taxclassification
         OT_TRACEENTRY = lt_ot_traceentry
         OT_US_TAX = lt_ot_us_tax
         IT_PRODUCT = lt_it_product
         IT_PRODUCTUSAGE = lt_it_productusage
         IT_PARTNER = lt_it_partner
         IT_PARTNERTAXNUMBER = lt_it_partnertaxnumber
         IT_PRICINGELEMENT = lt_it_pricingelement
         IT_EXEMPTION = lt_it_exemption
         IT_TAXCLASSIFICATION = lt_it_taxclassification
    EXCEPTIONS
        COMMUNICATION_FAILURE = 1
        NO_TTE_DOCUMENT = 2
        SYSTEM_FAILURE = 3
        IMPORT_ERROR = 4
        OTHERS = 5
. " TTE_3_DOCUMENT_GET




ABAP code using 7.40 inline data declarations to call FM TTE_3_DOCUMENT_GET

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.

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DATA(ld_i_with_usitems) = 'Y'.
 
 
 
 
 
 
 
 
 
 
DATA(ld_i_read_from_tte) = 'X'.
 
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!