SAP Reports / Programs | Application Platform | Transaction Tax Engine(AP-TTE) SAP AP

TTE_DOC_WRI SAP ABAP Report - Archiving TTE Documents: write program







TTE_DOC_WRI is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). Below is the basic information available for this SAP report including which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC. Also check out the submitted Comments related to this SAP report or see any standard documentation available.

If you would like to execute this report or see the full code listing simply enter TTE_DOC_WRI into the relevant SAP transactions such as SE38 or SE80


ABAP code to call this SAP report using the submit statement

This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.






SUBMIT TTE_DOC_WRI. "Basic submit
SUBMIT TTE_DOC_WRI AND RETURN. "Return to original report after report execution complete
SUBMIT TTE_DOC_WRI VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Selection Text: OBJ_KEY = D Ref.Obj Key.
Selection Text: OBJ_SYS = D Ref.Obj Sys.
Selection Text: OBJ_TYPE = D Ref.Obj Type
Selection Text: P_COMENT = D Archiving Session Note
Selection Text: P_DELTST = D Delete with Test Variant
Selection Text: P_PROT = D Detail Log
Selection Text: P_WRIPRD = D Product. Mode
Selection Text: P_WRITST = D Test Mode
Selection Text: TODATE = Latest change date
Title: Archiving TTE Documents: write program
Text Symbol: 001 = TTE Documents
Text Symbol: 002 = Restrictions


INCLUDES used within this REPORT TTE_DOC_WRI

No INCLUDES are used within this REPORT code!


TABLES used within REPORT and the associated SELECT statement:





No SAP DATABASE tables are accessed within this REPORT code!


Function Modules used within report and the associated call statement:

ARCHIVE_PROTOCOL_LINE_DETAIL CALL FUNCTION 'ARCHIVE_PROTOCOL_LINE_DETAIL'.

ARCHIVE_PROTOCOL_INIT CALL FUNCTION 'ARCHIVE_PROTOCOL_INIT' EXPORTING i_detailprotocol = v_prot.

ARCHIVE_OPEN_FOR_WRITE CALL FUNCTION 'ARCHIVE_OPEN_FOR_WRITE' EXPORTING call_delete_job_in_test_mode = v_deltst create_archive_file = l_create_file object = 'TTE_DOC' comments = u_comment output_sel_screen_when_dialog = space IMPORTING archive_handle = r_handle.

DB_COMMIT CALL FUNCTION 'DB_COMMIT'.

ARCHIVE_WRITE_STATISTICS CALL FUNCTION 'ARCHIVE_WRITE_STATISTICS' EXPORTING archive_handle = v_handle.

ARCHIVE_CLOSE_FILE CALL FUNCTION 'ARCHIVE_CLOSE_FILE' EXPORTING archive_handle = v_handle.

ARCHIVE_PROTOCOL_WRITE CALL FUNCTION 'ARCHIVE_PROTOCOL_WRITE'.

TTE_4_DOCUMENT_GET_DB CALL FUNCTION 'TTE_4_DOCUMENT_GET_DB' EXPORTING i_reftooriginal = v_docref-reftooriginal TABLES it_document = r_document-document it_header = r_document-header it_item = r_document-item it_tranprop = r_document-tranprop it_orgunit = r_document-orgunit it_itempart = r_document-itempart it_pricel = r_document-pricel it_taxdate = r_document-taxdate it_taxevent = r_document-taxevent it_taxel = r_document-taxel it_taxvalue = r_document-taxvalue it_product = r_document-product it_prtaxcl = r_document-prtaxcl it_prprop = r_document-prprop it_partner = r_document-partner it_pataxcl = r_document-pataxcl it_paprop = r_document-paprop it_pataxnum = r_document-pataxnum it_currconv = r_document-currconv it_countries = r_document-countries it_text = r_document-text it_exempt = r_document-exempt it_taxcodva = r_document-taxcodva EXCEPTIONS no_tte_document = 1 import_error = 2.

ARCHIVE_PUT_TABLE CALL FUNCTION 'ARCHIVE_PUT_TABLE' EXPORTING archive_handle = v_handle record_structure = l_tabname TABLES table = rt_data.

ARCHIVE_NEW_OBJECT CALL FUNCTION 'ARCHIVE_NEW_OBJECT' EXPORTING archive_handle = v_handle.

ARCHIVE_SAVE_OBJECT CALL FUNCTION 'ARCHIVE_SAVE_OBJECT' EXPORTING archive_handle = v_handle EXCEPTIONS termination_requested = 4.

PROGRESS_INDICATOR CALL FUNCTION 'PROGRESS_INDICATOR' EXPORTING i_msgid = 'CA_TTE_TEST' i_msgno = '301' i_processed = v_processed i_total = v_total i_output_immediately = v_immediate IMPORTING e_progress_sent = l_sent.

DB_COMMIT CALL FUNCTION 'DB_COMMIT'.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = l_objastext i_msgtype = v_msgtype i_msgid = 'CA_TTE_TEST' i_msgno = v_msgno.

OWN_LOGICAL_SYSTEM_GET CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET' IMPORTING own_logical_system = r_obj_sys EXCEPTIONS own_logical_system_not_defined = 0. "then leave it blank



Contribute (Add Comments)

Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.







The contribute/comments section below therefore offer's an opportunity for anyone to add additional information. This can be anything from useful hints, tips and screen shots to relevant SAP notes or anything else you feel is relevant to this report.

This will then be available for everyone to easily find by simply searching on the report name TTE_DOC_WRI or its description.