TTE_3_DOCUMENT_GET is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name TTE_3_DOCUMENT_GET into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
CA_TTE_PER3
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'TTE_3_DOCUMENT_GET' "Get TTE Document
EXPORTING
i_handle = " ttepdt_save_handle_st Document header
* i_with_usitems = 'Y' " c
* i_read_from_tte = 'X' " c Flag space= Read from DB
IMPORTING
o_document_atr = " ttepd3_document TTE Persistency Document
TABLES
it_header = " ttet_i_head_com Header
it_item = " ttet_i_item_com Item
it_product = " ttet_it_product_com Product
it_productusage = " ttet_i_prousag_com ProductUsage
it_partner = " ttet_i_partner_com Partner
it_partnertaxnumber = " ttet_i_pataxno_com PartnerTaxNumber
it_pricingelement = " ttet_it_prieles_com Pricing Element
it_exemption = " ttet_it_exemption_com Exemptions
it_taxclassification = " ttet_i_taxclas_com TaxClassification
it_currencyconversion = " ttet_it_currcon_com CurrencyConversions
it_reportingfield = " ttet_i_repflds_com Reporting Field
it_taxsituation = " ttet_io_taxsitu_com TaxSituation
it_taxdetermination = " ttet_i_taxdete_com TaxDetermination
ot_header = " ttet_o_head_com Header
ot_item = " ttet_o_item_com Item
ot_taxelement = " ttet_o_taxele_com TaxElement
ot_taxvalue = " ttet_ot_taxval_com TaxValue
ot_taxsituation = " ttet_io_taxsitu_com TaxSituation
ot_currencyconversion = " ttet_it_currcon_com CurrencyConversions
ot_exemption = " ttet_it_exemption_com Exemptions
ot_partner = " ttet_i_partner_com Partner
ot_partnertaxnumber = " ttet_i_pataxno_com PartnerTaxNumber
ot_taxclassification = " ttet_i_taxclas_com TaxClassification
ot_traceentry = " ttet_o_trace_com Header
ot_us_tax = " ttet_uscom_tax_com US Tax Interface : Communication Structure for Tax Calc.
EXCEPTIONS
COMMUNICATION_FAILURE = 1 " RFC error
NO_TTE_DOCUMENT = 2 " TTE document does not exist
SYSTEM_FAILURE = 3 " System failure
IMPORT_ERROR = 4 " Problems with IMPORT from cluster
OTHERS = 5 " Others
. " TTE_3_DOCUMENT_GET
The ABAP code below is a full code listing to execute function module TTE_3_DOCUMENT_GET including all data declarations. The code uses 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 original method of declaring data variables up front. 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).
| ld_o_document_atr | TYPE TTEPD3_DOCUMENT , |
| it_it_header | TYPE STANDARD TABLE OF TTET_I_HEAD_COM,"TABLES PARAM |
| wa_it_header | LIKE LINE OF it_it_header , |
| it_it_item | TYPE STANDARD TABLE OF TTET_I_ITEM_COM,"TABLES PARAM |
| wa_it_item | LIKE LINE OF it_it_item , |
| it_it_product | TYPE STANDARD TABLE OF TTET_IT_PRODUCT_COM,"TABLES PARAM |
| wa_it_product | LIKE LINE OF it_it_product , |
| it_it_productusage | TYPE STANDARD TABLE OF TTET_I_PROUSAG_COM,"TABLES PARAM |
| wa_it_productusage | LIKE LINE OF it_it_productusage , |
| it_it_partner | TYPE STANDARD TABLE OF TTET_I_PARTNER_COM,"TABLES PARAM |
| wa_it_partner | LIKE LINE OF it_it_partner , |
| it_it_partnertaxnumber | TYPE STANDARD TABLE OF TTET_I_PATAXNO_COM,"TABLES PARAM |
| wa_it_partnertaxnumber | LIKE LINE OF it_it_partnertaxnumber , |
| it_it_pricingelement | TYPE STANDARD TABLE OF TTET_IT_PRIELES_COM,"TABLES PARAM |
| wa_it_pricingelement | LIKE LINE OF it_it_pricingelement , |
| it_it_exemption | TYPE STANDARD TABLE OF TTET_IT_EXEMPTION_COM,"TABLES PARAM |
| wa_it_exemption | LIKE LINE OF it_it_exemption , |
| it_it_taxclassification | TYPE STANDARD TABLE OF TTET_I_TAXCLAS_COM,"TABLES PARAM |
| wa_it_taxclassification | LIKE LINE OF it_it_taxclassification , |
| it_it_currencyconversion | TYPE STANDARD TABLE OF TTET_IT_CURRCON_COM,"TABLES PARAM |
| wa_it_currencyconversion | LIKE LINE OF it_it_currencyconversion , |
| it_it_reportingfield | TYPE STANDARD TABLE OF TTET_I_REPFLDS_COM,"TABLES PARAM |
| wa_it_reportingfield | LIKE LINE OF it_it_reportingfield , |
| it_it_taxsituation | TYPE STANDARD TABLE OF TTET_IO_TAXSITU_COM,"TABLES PARAM |
| wa_it_taxsituation | LIKE LINE OF it_it_taxsituation , |
| it_it_taxdetermination | TYPE STANDARD TABLE OF TTET_I_TAXDETE_COM,"TABLES PARAM |
| wa_it_taxdetermination | LIKE LINE OF it_it_taxdetermination , |
| it_ot_header | TYPE STANDARD TABLE OF TTET_O_HEAD_COM,"TABLES PARAM |
| wa_ot_header | LIKE LINE OF it_ot_header , |
| it_ot_item | TYPE STANDARD TABLE OF TTET_O_ITEM_COM,"TABLES PARAM |
| wa_ot_item | LIKE LINE OF it_ot_item , |
| it_ot_taxelement | TYPE STANDARD TABLE OF TTET_O_TAXELE_COM,"TABLES PARAM |
| wa_ot_taxelement | LIKE LINE OF it_ot_taxelement , |
| it_ot_taxvalue | TYPE STANDARD TABLE OF TTET_OT_TAXVAL_COM,"TABLES PARAM |
| wa_ot_taxvalue | LIKE LINE OF it_ot_taxvalue , |
| it_ot_taxsituation | TYPE STANDARD TABLE OF TTET_IO_TAXSITU_COM,"TABLES PARAM |
| wa_ot_taxsituation | LIKE LINE OF it_ot_taxsituation , |
| it_ot_currencyconversion | TYPE STANDARD TABLE OF TTET_IT_CURRCON_COM,"TABLES PARAM |
| wa_ot_currencyconversion | LIKE LINE OF it_ot_currencyconversion , |
| it_ot_exemption | TYPE STANDARD TABLE OF TTET_IT_EXEMPTION_COM,"TABLES PARAM |
| wa_ot_exemption | LIKE LINE OF it_ot_exemption , |
| it_ot_partner | TYPE STANDARD TABLE OF TTET_I_PARTNER_COM,"TABLES PARAM |
| wa_ot_partner | LIKE LINE OF it_ot_partner , |
| it_ot_partnertaxnumber | TYPE STANDARD TABLE OF TTET_I_PATAXNO_COM,"TABLES PARAM |
| wa_ot_partnertaxnumber | LIKE LINE OF it_ot_partnertaxnumber , |
| it_ot_taxclassification | TYPE STANDARD TABLE OF TTET_I_TAXCLAS_COM,"TABLES PARAM |
| wa_ot_taxclassification | LIKE LINE OF it_ot_taxclassification , |
| it_ot_traceentry | TYPE STANDARD TABLE OF TTET_O_TRACE_COM,"TABLES PARAM |
| wa_ot_traceentry | LIKE LINE OF it_ot_traceentry , |
| it_ot_us_tax | TYPE STANDARD TABLE OF TTET_USCOM_TAX_COM,"TABLES PARAM |
| wa_ot_us_tax | LIKE LINE OF it_ot_us_tax . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_o_document_atr | TYPE TTEPD3_DOCUMENT , |
| ld_i_handle | TYPE TTEPDT_SAVE_HANDLE_ST , |
| it_it_header | TYPE STANDARD TABLE OF TTET_I_HEAD_COM , |
| wa_it_header | LIKE LINE OF it_it_header, |
| ld_i_with_usitems | TYPE C , |
| it_it_item | TYPE STANDARD TABLE OF TTET_I_ITEM_COM , |
| wa_it_item | LIKE LINE OF it_it_item, |
| ld_i_read_from_tte | TYPE C , |
| it_it_product | TYPE STANDARD TABLE OF TTET_IT_PRODUCT_COM , |
| wa_it_product | LIKE LINE OF it_it_product, |
| it_it_productusage | TYPE STANDARD TABLE OF TTET_I_PROUSAG_COM , |
| wa_it_productusage | LIKE LINE OF it_it_productusage, |
| it_it_partner | TYPE STANDARD TABLE OF TTET_I_PARTNER_COM , |
| wa_it_partner | LIKE LINE OF it_it_partner, |
| it_it_partnertaxnumber | TYPE STANDARD TABLE OF TTET_I_PATAXNO_COM , |
| wa_it_partnertaxnumber | LIKE LINE OF it_it_partnertaxnumber, |
| it_it_pricingelement | TYPE STANDARD TABLE OF TTET_IT_PRIELES_COM , |
| wa_it_pricingelement | LIKE LINE OF it_it_pricingelement, |
| it_it_exemption | TYPE STANDARD TABLE OF TTET_IT_EXEMPTION_COM , |
| wa_it_exemption | LIKE LINE OF it_it_exemption, |
| it_it_taxclassification | TYPE STANDARD TABLE OF TTET_I_TAXCLAS_COM , |
| wa_it_taxclassification | LIKE LINE OF it_it_taxclassification, |
| it_it_currencyconversion | TYPE STANDARD TABLE OF TTET_IT_CURRCON_COM , |
| wa_it_currencyconversion | LIKE LINE OF it_it_currencyconversion, |
| it_it_reportingfield | TYPE STANDARD TABLE OF TTET_I_REPFLDS_COM , |
| wa_it_reportingfield | LIKE LINE OF it_it_reportingfield, |
| it_it_taxsituation | TYPE STANDARD TABLE OF TTET_IO_TAXSITU_COM , |
| wa_it_taxsituation | LIKE LINE OF it_it_taxsituation, |
| it_it_taxdetermination | TYPE STANDARD TABLE OF TTET_I_TAXDETE_COM , |
| wa_it_taxdetermination | LIKE LINE OF it_it_taxdetermination, |
| it_ot_header | TYPE STANDARD TABLE OF TTET_O_HEAD_COM , |
| wa_ot_header | LIKE LINE OF it_ot_header, |
| it_ot_item | TYPE STANDARD TABLE OF TTET_O_ITEM_COM , |
| wa_ot_item | LIKE LINE OF it_ot_item, |
| it_ot_taxelement | TYPE STANDARD TABLE OF TTET_O_TAXELE_COM , |
| wa_ot_taxelement | LIKE LINE OF it_ot_taxelement, |
| it_ot_taxvalue | TYPE STANDARD TABLE OF TTET_OT_TAXVAL_COM , |
| wa_ot_taxvalue | LIKE LINE OF it_ot_taxvalue, |
| it_ot_taxsituation | TYPE STANDARD TABLE OF TTET_IO_TAXSITU_COM , |
| wa_ot_taxsituation | LIKE LINE OF it_ot_taxsituation, |
| it_ot_currencyconversion | TYPE STANDARD TABLE OF TTET_IT_CURRCON_COM , |
| wa_ot_currencyconversion | LIKE LINE OF it_ot_currencyconversion, |
| it_ot_exemption | TYPE STANDARD TABLE OF TTET_IT_EXEMPTION_COM , |
| wa_ot_exemption | LIKE LINE OF it_ot_exemption, |
| it_ot_partner | TYPE STANDARD TABLE OF TTET_I_PARTNER_COM , |
| wa_ot_partner | LIKE LINE OF it_ot_partner, |
| it_ot_partnertaxnumber | TYPE STANDARD TABLE OF TTET_I_PATAXNO_COM , |
| wa_ot_partnertaxnumber | LIKE LINE OF it_ot_partnertaxnumber, |
| it_ot_taxclassification | TYPE STANDARD TABLE OF TTET_I_TAXCLAS_COM , |
| wa_ot_taxclassification | LIKE LINE OF it_ot_taxclassification, |
| it_ot_traceentry | TYPE STANDARD TABLE OF TTET_O_TRACE_COM , |
| wa_ot_traceentry | LIKE LINE OF it_ot_traceentry, |
| it_ot_us_tax | TYPE STANDARD TABLE OF TTET_USCOM_TAX_COM , |
| wa_ot_us_tax | LIKE LINE OF it_ot_us_tax. |
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name TTE_3_DOCUMENT_GET or its description.
TTE_3_DOCUMENT_GET - Get TTE Document TTE_3_DOCUMENT_EXISTS - Check if TTE Document exists on DB. TTE_3_DOCUMENT_DISPLAY - FM: for Calling to TTE to get TteDocuments and Display in TTE_SIMULATI TTE_3_DOCUMENT_DELETE_UPD_CL0 - Delete Update Task for TTE Document TTE_3_DOCUMENT_DELETE_UPDATE - Delete Update Task for TTE Document TTE_3_DOCUMENT_DELETE_MULTI - Delete multible TTE Documents from DB