SAP FITRV_PRINT_TABLE_CONTROL_DATA Function Module for Print/Display Data of Any Table Control
FITRV_PRINT_TABLE_CONTROL_DATA is a standard fitrv print table control data SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Print/Display Data of Any Table Control 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 fitrv print table control data FM, simply by entering the name FITRV_PRINT_TABLE_CONTROL_DATA into the relevant SAP transaction such as SE37 or SE38.
Function Group: FITRV_UTIL
Program Name: SAPLFITRV_UTIL
Main Program:
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FITRV_PRINT_TABLE_CONTROL_DATA 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 'FITRV_PRINT_TABLE_CONTROL_DATA'"Print/Display Data of Any Table Control.
EXPORTING
TABLE_CONTROL = "Name of table control
* PRINT_IMMEDIATELY = ' ' "Print Immediately X = Yes, ' ' = Print Preview
CALLBACK_PROGRAM = "Callback Program for Page Header/Footer
* CALLBACK_TOP_OF_LIST = "Form Routine for Printing a List Header
* CALLBACK_TOP_OF_PAGE = "Form Routine for Page Header/Heading
* CALLBACK_END_OF_PAGE = "Form Routine for Page Footer
* CALLBACK_END_OF_LIST = "Form Routine for Printing End of List
* OPTIMIZE_COLUMN_WIDTH = 'X' "Optimize Column Width of List X = Yes
* GET_CURR_QUAN_FIELDS_FROM_DDIC = ' ' "Reference Fields for CURR and QUAN Fields from DDIC
* WINDOW_TITLE = "Title of Popup in Query 'Print Immediately?'
TABLES
PRINT_DATA = "Table with Data to Be Printed
EXCEPTIONS
COLUMN_INFORMATION_MISSING = 1 PRINTING_NOT_POSSIBLE = 2
IMPORTING Parameters details for FITRV_PRINT_TABLE_CONTROL_DATA
TABLE_CONTROL - Name of table control
Data type: CXTAB_CONTROLOptional: No
Call by Reference: No ( called with pass by value option)
PRINT_IMMEDIATELY - Print Immediately X = Yes, ' ' = Print Preview
Data type: BAPITRVXXX-BOOLEANDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CALLBACK_PROGRAM - Callback Program for Page Header/Footer
Data type: SY-REPIDOptional: No
Call by Reference: No ( called with pass by value option)
CALLBACK_TOP_OF_LIST - Form Routine for Printing a List Header
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
CALLBACK_TOP_OF_PAGE - Form Routine for Page Header/Heading
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
CALLBACK_END_OF_PAGE - Form Routine for Page Footer
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
CALLBACK_END_OF_LIST - Form Routine for Printing End of List
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
OPTIMIZE_COLUMN_WIDTH - Optimize Column Width of List X = Yes
Data type: BAPITRVXXX-BOOLEANDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
GET_CURR_QUAN_FIELDS_FROM_DDIC - Reference Fields for CURR and QUAN Fields from DDIC
Data type: BAPITRVXXX-BOOLEANDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WINDOW_TITLE - Title of Popup in Query 'Print Immediately?'
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for FITRV_PRINT_TABLE_CONTROL_DATA
PRINT_DATA - Table with Data to Be Printed
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
COLUMN_INFORMATION_MISSING - Column Information for Table Controls Missing
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PRINTING_NOT_POSSIBLE - Field Catalog for List Viewer Empty
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for FITRV_PRINT_TABLE_CONTROL_DATA 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: | ||||
| lt_print_data | TYPE STANDARD TABLE OF STRING, " | |||
| lv_table_control | TYPE CXTAB_CONTROL, " | |||
| lv_column_information_missing | TYPE CXTAB_CONTROL, " | |||
| lv_print_immediately | TYPE BAPITRVXXX-BOOLEAN, " SPACE | |||
| lv_callback_program | TYPE SY-REPID, " | |||
| lv_printing_not_possible | TYPE SY, " | |||
| lv_callback_top_of_list | TYPE SY, " | |||
| lv_callback_top_of_page | TYPE SY, " | |||
| lv_callback_end_of_page | TYPE SY, " | |||
| lv_callback_end_of_list | TYPE SY, " | |||
| lv_optimize_column_width | TYPE BAPITRVXXX-BOOLEAN, " 'X' | |||
| lv_get_curr_quan_fields_from_ddic | TYPE BAPITRVXXX-BOOLEAN, " SPACE | |||
| lv_window_title | TYPE BAPITRVXXX. " |
|   CALL FUNCTION 'FITRV_PRINT_TABLE_CONTROL_DATA' "Print/Display Data of Any Table Control |
| EXPORTING | ||
| TABLE_CONTROL | = lv_table_control | |
| PRINT_IMMEDIATELY | = lv_print_immediately | |
| CALLBACK_PROGRAM | = lv_callback_program | |
| CALLBACK_TOP_OF_LIST | = lv_callback_top_of_list | |
| CALLBACK_TOP_OF_PAGE | = lv_callback_top_of_page | |
| CALLBACK_END_OF_PAGE | = lv_callback_end_of_page | |
| CALLBACK_END_OF_LIST | = lv_callback_end_of_list | |
| OPTIMIZE_COLUMN_WIDTH | = lv_optimize_column_width | |
| GET_CURR_QUAN_FIELDS_FROM_DDIC | = lv_get_curr_quan_fields_from_ddic | |
| WINDOW_TITLE | = lv_window_title | |
| TABLES | ||
| PRINT_DATA | = lt_print_data | |
| EXCEPTIONS | ||
| COLUMN_INFORMATION_MISSING = 1 | ||
| PRINTING_NOT_POSSIBLE = 2 | ||
| . " FITRV_PRINT_TABLE_CONTROL_DATA | ||
ABAP code using 7.40 inline data declarations to call FM FITRV_PRINT_TABLE_CONTROL_DATA
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.| "SELECT single BOOLEAN FROM BAPITRVXXX INTO @DATA(ld_print_immediately). | ||||
| DATA(ld_print_immediately) | = ' '. | |||
| "SELECT single REPID FROM SY INTO @DATA(ld_callback_program). | ||||
| "SELECT single BOOLEAN FROM BAPITRVXXX INTO @DATA(ld_optimize_column_width). | ||||
| DATA(ld_optimize_column_width) | = 'X'. | |||
| "SELECT single BOOLEAN FROM BAPITRVXXX INTO @DATA(ld_get_curr_quan_fields_from_ddic). | ||||
| DATA(ld_get_curr_quan_fields_from_ddic) | = ' '. | |||
Search for further information about these or an SAP related objects