TXW_SEGMENT_REBUILD 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 TXW_SEGMENT_REBUILD into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
TXW2
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'TXW_SEGMENT_REBUILD' "Export segment rebuilding from data using forms if necessary
EXPORTING
p_form = " Flag to show if internal program to be used
p_form_prog = " Internal program name for conversion
p_segment_structure = " txw_dirsg2-exp_struct Segment to be rebuilt
* p_flag_collect = SPACE " Flag: collect export data in t_out_data
p_segdat_len6 = " flag segdat length = 6
TABLES
t_buf_txw_meta = " txw_meta Meta data in global buffer
t_itxw_meta = " txw_meta Meta data
t_itxw_dirsg2 = " txw_dirsg2 Segment data, segtype ...
t_itxw_dir2 = " txw_dir2 Input for filename and compression
* t_out_data = " txw_data Holder for records, if collect flag
. " TXW_SEGMENT_REBUILD
The ABAP code below is a full code listing to execute function module TXW_SEGMENT_REBUILD 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).
| it_t_buf_txw_meta | TYPE STANDARD TABLE OF TXW_META,"TABLES PARAM |
| wa_t_buf_txw_meta | LIKE LINE OF it_t_buf_txw_meta , |
| it_t_itxw_meta | TYPE STANDARD TABLE OF TXW_META,"TABLES PARAM |
| wa_t_itxw_meta | LIKE LINE OF it_t_itxw_meta , |
| it_t_itxw_dirsg2 | TYPE STANDARD TABLE OF TXW_DIRSG2,"TABLES PARAM |
| wa_t_itxw_dirsg2 | LIKE LINE OF it_t_itxw_dirsg2 , |
| it_t_itxw_dir2 | TYPE STANDARD TABLE OF TXW_DIR2,"TABLES PARAM |
| wa_t_itxw_dir2 | LIKE LINE OF it_t_itxw_dir2 , |
| it_t_out_data | TYPE STANDARD TABLE OF TXW_DATA,"TABLES PARAM |
| wa_t_out_data | LIKE LINE OF it_t_out_data . |
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_p_form | TYPE STRING , |
| it_t_buf_txw_meta | TYPE STANDARD TABLE OF TXW_META , |
| wa_t_buf_txw_meta | LIKE LINE OF it_t_buf_txw_meta, |
| ld_p_form_prog | TYPE STRING , |
| it_t_itxw_meta | TYPE STANDARD TABLE OF TXW_META , |
| wa_t_itxw_meta | LIKE LINE OF it_t_itxw_meta, |
| ld_p_segment_structure | TYPE TXW_DIRSG2-EXP_STRUCT , |
| it_t_itxw_dirsg2 | TYPE STANDARD TABLE OF TXW_DIRSG2 , |
| wa_t_itxw_dirsg2 | LIKE LINE OF it_t_itxw_dirsg2, |
| ld_p_flag_collect | TYPE STRING , |
| it_t_itxw_dir2 | TYPE STANDARD TABLE OF TXW_DIR2 , |
| wa_t_itxw_dir2 | LIKE LINE OF it_t_itxw_dir2, |
| ld_p_segdat_len6 | TYPE FLAG , |
| it_t_out_data | TYPE STANDARD TABLE OF TXW_DATA , |
| wa_t_out_data | LIKE LINE OF it_t_out_data. |
Note: This requires the p_form_prog to have been generated prior to
being called. This has been done for programs rtxwcf05 and rtxwmg01.
...See here for full SAP fm documentation
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 TXW_SEGMENT_REBUILD or its description.
TXW_SEGMENT_REBUILD - Export segment rebuilding from data using forms if necessary TXW_SEGMENT_READ_NEXT_REC - Read all segment records from file into internal table TXW_SEGMENT_READ_INIT - Initialize new read request TXW_SEGMENT_READ_CLOSE - Close last read request TXW_SEGMENT_QUERY_RECORD_READ - Read next record from segment TXW_SEGMENT_QUERY_INIT - Initialize new query on data segment