SAP Reports / Programs

RTXWQU04 SAP ABAP Report - Export segment to file







RTXWQU04 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 RTXWQU04 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 RTXWQU04. "Basic submit
SUBMIT RTXWQU04 AND RETURN. "Return to original report after report execution complete
SUBMIT RTXWQU04 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: P_FILE = Data extract file name
Selection Text: P_VOLSET = D Directory set
Title: Export segment to file


INCLUDES used within this REPORT RTXWQU04

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:

TXW_EXTRACT_READ_INIT CALL FUNCTION 'TXW_EXTRACT_READ_INIT' EXPORTING FILE_NAME = P_FILE VOLDIR_SET = P_VOLSET TABLES T_TXW_DIR2 = ITXW_DIR2 T_TXW_NOTE = ITXW_NOTE.

TXW_EXTRACT_SEGMENT_DIR_READ CALL FUNCTION 'TXW_EXTRACT_SEGMENT_DIR_READ' TABLES T_TXW_DIRSG2 = ITXW_DIRSG2.

TXW_EXTRACT_SELECTION_READ CALL FUNCTION 'TXW_EXTRACT_SELECTION_READ' TABLES T_TXW_SEL = ITXW_SEL.

TXW_EXTRACT_METADATA_READ CALL FUNCTION 'TXW_EXTRACT_METADATA_READ' TABLES T_TXW_META = ITXW_META.

TXW_SEGMENT_INFO_GET CALL FUNCTION 'TXW_SEGMENT_INFO_GET' EXPORTING EXPORT_STRUCTURE = ITXW_DIRSG2-EXP_STRUCT IMPORTING PERIOD_FIELD = PERIOD_FIELD TABLES SEL_COMPANY_CODE = R_COMP_CODE SEL_PERIOD = R_PERIOD.

AUTHORITY_CHECK *call function 'AUTHORITY_CHECK' * EXPORTING * FIELD1 = 'OBJECT' 'F_TX_T? * FIELD2 = 'AUTH' dummy * FIELD3 = 'ACTVT' Export * OBJECT = 'S_USER_AUT' * USER = 'BUEHLER13' * VALUE1 = 'S_USER_AUT' * VALUE2 = 'S_USER_ALL' * VALUE3 = '02' * EXCEPTIONS * USER_DONT_EXIST = 1 * USER_IS_AUTHORIZED = 2 * USER_NOT_AUTHORIZED = 3 * USER_IS_LOCKED = 4 * OTHERS = 5 * .

TXW_FILE_NAME_GET CALL FUNCTION 'TXW_FILE_NAME_GET' EXPORTING VOLDIR_SET = P_OVOLST VOL_ID = SPACE LOG_FILENAME = P_OFILE IMPORTING PHY_FILENAME = EXPORT_FILE * EXCEPTIONS * VOLDIR_SET_INVALID = 1 * GET_FILENAME_FAILED = 2 * OTHERS = 3 .

TXW_FILE_OPEN_FOR_WRITE CALL FUNCTION 'TXW_FILE_OPEN_FOR_WRITE' EXPORTING FILE_NAME = EXPORT_FILE CLEAR_FILE = P_OOVRWR EXCEPTIONS FILE_OPEN_FAILED = 1 OTHERS = 2.

TXW_SEGMENT_QUERY_INIT CALL FUNCTION 'TXW_SEGMENT_QUERY_INIT' EXPORTING EXPORT_STRUCTURE = ITXW_DIRSG2-EXP_STRUCT TABLES T_QUERY = T_QUERY EXCEPTIONS NO_RECORD_FOUND = 4.

TXW_SEGMENT_QUERY_RECORD_READ CALL FUNCTION 'TXW_SEGMENT_QUERY_RECORD_READ' IMPORTING RECORD = WA_TXW_DATA EXCEPTIONS NO_MORE_RECORDS = 1.

TXW_SEGMENT_QUERY_RECORD_READ CALL FUNCTION 'TXW_SEGMENT_QUERY_RECORD_READ' IMPORTING RECORD = WA_TXW_DATA EXCEPTIONS NO_MORE_RECORDS = 1.

TXW_SEGMENT_QUERY_CLOSE CALL FUNCTION 'TXW_SEGMENT_QUERY_CLOSE'.



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 RTXWQU04 or its description.