SAP TB_REF_COMPENSATION_LIST Function Module for Display a Netting as List
TB_REF_COMPENSATION_LIST is a standard tb ref compensation list SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Display a Netting as List 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 tb ref compensation list FM, simply by entering the name TB_REF_COMPENSATION_LIST into the relevant SAP transaction such as SE37 or SE38.
Function Group: TB92
Program Name: SAPLTB92
Main Program: SAPLTB92
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TB_REF_COMPENSATION_LIST 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 'TB_REF_COMPENSATION_LIST'"Display a Netting as List.
EXPORTING
I_HEAD = "Struktur des Komp.kopfes (VTB_CH)
* I_MODE = 'DISP' "Bearbeitungsmodus (CREA/CHNG/DISP/RSET)
* FLG_AS_LIST_WINDOW = ' ' "Liste als Listwindow oder Fullscreen ausgeben
* FLG_DISPLAY_ONLY = 'X' "Es kann nur in Anzeige-Trans. gesprungen werden!
IMPORTING
E_COMMIT = "ist 'X' falls Verbuchersätze geschrieben wurden
E_OKCODE = "letzter OKCODE (z.B. SAVE/BACK)
E_REFTYP = "Netting category
E_REFNR = "Kompensationsnummer (z.B. bei int. Nr.vergabe)
TABLES
T_CRNCY = "Tabelle der Komp.währungen (VTB_CC)
T_POSIT = "Tabelle der Komp.positionen (VTB_CP)
EXCEPTIONS
INTERNAL_ERROR = 1
IMPORTING Parameters details for TB_REF_COMPENSATION_LIST
I_HEAD - Struktur des Komp.kopfes (VTB_CH)
Data type: VTB_CHOptional: No
Call by Reference: No ( called with pass by value option)
I_MODE - Bearbeitungsmodus (CREA/CHNG/DISP/RSET)
Data type: SY-TCODEDefault: 'DISP'
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_AS_LIST_WINDOW - Liste als Listwindow oder Fullscreen ausgeben
Data type: SY-DATARDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_DISPLAY_ONLY - Es kann nur in Anzeige-Trans. gesprungen werden!
Data type: SY-DATARDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for TB_REF_COMPENSATION_LIST
E_COMMIT - ist 'X' falls Verbuchersätze geschrieben wurden
Data type: SY-DATAROptional: No
Call by Reference: No ( called with pass by value option)
E_OKCODE - letzter OKCODE (z.B. SAVE/BACK)
Data type: SY-TCODEOptional: No
Call by Reference: No ( called with pass by value option)
E_REFTYP - Netting category
Data type: REFH-REFTYPOptional: No
Call by Reference: No ( called with pass by value option)
E_REFNR - Kompensationsnummer (z.B. bei int. Nr.vergabe)
Data type: REFH-REFNROptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for TB_REF_COMPENSATION_LIST
T_CRNCY - Tabelle der Komp.währungen (VTB_CC)
Data type: VTB_CCOptional: No
Call by Reference: No ( called with pass by value option)
T_POSIT - Tabelle der Komp.positionen (VTB_CP)
Data type: VTB_CPOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INTERNAL_ERROR - Internal Error
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TB_REF_COMPENSATION_LIST 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: | ||||
| lv_i_head | TYPE VTB_CH, " | |||
| lt_t_crncy | TYPE STANDARD TABLE OF VTB_CC, " | |||
| lv_e_commit | TYPE SY-DATAR, " | |||
| lv_internal_error | TYPE SY, " | |||
| lv_i_mode | TYPE SY-TCODE, " 'DISP' | |||
| lt_t_posit | TYPE STANDARD TABLE OF VTB_CP, " | |||
| lv_e_okcode | TYPE SY-TCODE, " | |||
| lv_e_reftyp | TYPE REFH-REFTYP, " | |||
| lv_flg_as_list_window | TYPE SY-DATAR, " SPACE | |||
| lv_e_refnr | TYPE REFH-REFNR, " | |||
| lv_flg_display_only | TYPE SY-DATAR. " 'X' |
|   CALL FUNCTION 'TB_REF_COMPENSATION_LIST' "Display a Netting as List |
| EXPORTING | ||
| I_HEAD | = lv_i_head | |
| I_MODE | = lv_i_mode | |
| FLG_AS_LIST_WINDOW | = lv_flg_as_list_window | |
| FLG_DISPLAY_ONLY | = lv_flg_display_only | |
| IMPORTING | ||
| E_COMMIT | = lv_e_commit | |
| E_OKCODE | = lv_e_okcode | |
| E_REFTYP | = lv_e_reftyp | |
| E_REFNR | = lv_e_refnr | |
| TABLES | ||
| T_CRNCY | = lt_t_crncy | |
| T_POSIT | = lt_t_posit | |
| EXCEPTIONS | ||
| INTERNAL_ERROR = 1 | ||
| . " TB_REF_COMPENSATION_LIST | ||
ABAP code using 7.40 inline data declarations to call FM TB_REF_COMPENSATION_LIST
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 DATAR FROM SY INTO @DATA(ld_e_commit). | ||||
| "SELECT single TCODE FROM SY INTO @DATA(ld_i_mode). | ||||
| DATA(ld_i_mode) | = 'DISP'. | |||
| "SELECT single TCODE FROM SY INTO @DATA(ld_e_okcode). | ||||
| "SELECT single REFTYP FROM REFH INTO @DATA(ld_e_reftyp). | ||||
| "SELECT single DATAR FROM SY INTO @DATA(ld_flg_as_list_window). | ||||
| DATA(ld_flg_as_list_window) | = ' '. | |||
| "SELECT single REFNR FROM REFH INTO @DATA(ld_e_refnr). | ||||
| "SELECT single DATAR FROM SY INTO @DATA(ld_flg_display_only). | ||||
| DATA(ld_flg_display_only) | = 'X'. | |||
Search for further information about these or an SAP related objects