SAP TB_LIMIT_CHARS_MAIN_GEN Function Module for Central Distributor for Access to Limit Records in Generated DB Tables









TB_LIMIT_CHARS_MAIN_GEN is a standard tb limit chars main gen SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Central Distributor for Access to Limit Records in Generated DB Tables 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 limit chars main gen FM, simply by entering the name TB_LIMIT_CHARS_MAIN_GEN into the relevant SAP transaction such as SE37 or SE38.

Function Group: TBLS
Program Name: SAPLTBLS
Main Program: SAPLTBLS
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function TB_LIMIT_CHARS_MAIN_GEN 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_LIMIT_CHARS_MAIN_GEN'"Central Distributor for Access to Limit Records in Generated DB Tables
EXPORTING
* I_ACCESS_MODE = '1' "==> Long Text
* I_INCLUDE_INITIAL_VALUES = "'X': Selecion of Initial Characteristics
* I_ROWS = 0 "Option: ... up to x Rows
* I_CLEAR_VTBLS = 'X' "Delete Export Table Before Selection?
* I_MAX_FIELD = "Returns Max ( Field Name in i_max_field in e_max
* IR_SLDFIL = "Range for Display Filters
* IR_CHAR = "Generic Range for Any Number of Characteristics and Selections
* IT_ENTRIES_LM = "Selection Table for I_ACCESS_MODE = '2' and '3'
* IT_ENTRIES_LKEY = "Selection Table for I_ACCESS_MODE = '2' and '3'
* IT_WHERE = "Additional Where Condition

IMPORTING
E_MAX = "See I_MAX_FIELD

CHANGING
* CT_VTBLS = "Limit Records

EXCEPTIONS
PARAM_ERROR = 1 FNAME_ERROR = 2 EXPRESSION_ERROR = 3 TABLE_NOT_EXISTENT = 4
.



IMPORTING Parameters details for TB_LIMIT_CHARS_MAIN_GEN

I_ACCESS_MODE - ==> Long Text

Data type: C
Default: '1'
Optional: Yes
Call by Reference: Yes

I_INCLUDE_INITIAL_VALUES - 'X': Selecion of Initial Characteristics

Data type: BOOLE-BOOLE
Optional: Yes
Call by Reference: Yes

I_ROWS - Option: ... up to x Rows

Data type: SY-TABIX
Optional: Yes
Call by Reference: Yes

I_CLEAR_VTBLS - Delete Export Table Before Selection?

Data type: BOOLE-BOOLE
Default: 'X'
Optional: Yes
Call by Reference: Yes

I_MAX_FIELD - Returns Max ( Field Name in i_max_field in e_max

Data type: FELD-NAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

IR_SLDFIL - Range for Display Filters

Data type: TRLM_T_R_SLDFIL
Optional: Yes
Call by Reference: Yes

IR_CHAR - Generic Range for Any Number of Characteristics and Selections

Data type: RSDS_FRANGE_T
Optional: Yes
Call by Reference: Yes

IT_ENTRIES_LM - Selection Table for I_ACCESS_MODE = '2' and '3'

Data type: TRLM_T_LM
Optional: Yes
Call by Reference: Yes

IT_ENTRIES_LKEY - Selection Table for I_ACCESS_MODE = '2' and '3'

Data type: TRLM_T_TAKEY
Optional: Yes
Call by Reference: Yes

IT_WHERE - Additional Where Condition

Data type: RSDS_TWHERE
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for TB_LIMIT_CHARS_MAIN_GEN

E_MAX - See I_MAX_FIELD

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

CHANGING Parameters details for TB_LIMIT_CHARS_MAIN_GEN

CT_VTBLS - Limit Records

Data type: TRLM_T_LS
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

PARAM_ERROR - Invalid Call

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

FNAME_ERROR - Incorrect Field Name in I_MAX_FIELD

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

EXPRESSION_ERROR - Internal Error When Converting WHERE Condition

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

TABLE_NOT_EXISTENT - Limit Record Table Not Generated

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for TB_LIMIT_CHARS_MAIN_GEN 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_e_max  TYPE STRING, "   
lv_ct_vtbls  TYPE TRLM_T_LS, "   
lv_param_error  TYPE TRLM_T_LS, "   
lv_i_access_mode  TYPE C, "   '1'
lv_i_include_initial_values  TYPE BOOLE-BOOLE, "   
lv_i_rows  TYPE SY-TABIX, "   0
lv_fname_error  TYPE SY, "   
lv_i_clear_vtbls  TYPE BOOLE-BOOLE, "   'X'
lv_expression_error  TYPE BOOLE, "   
lv_i_max_field  TYPE FELD-NAME, "   
lv_table_not_existent  TYPE FELD, "   
lv_ir_sldfil  TYPE TRLM_T_R_SLDFIL, "   
lv_ir_char  TYPE RSDS_FRANGE_T, "   
lv_it_entries_lm  TYPE TRLM_T_LM, "   
lv_it_entries_lkey  TYPE TRLM_T_TAKEY, "   
lv_it_where  TYPE RSDS_TWHERE. "   

  CALL FUNCTION 'TB_LIMIT_CHARS_MAIN_GEN'  "Central Distributor for Access to Limit Records in Generated DB Tables
    EXPORTING
         I_ACCESS_MODE = lv_i_access_mode
         I_INCLUDE_INITIAL_VALUES = lv_i_include_initial_values
         I_ROWS = lv_i_rows
         I_CLEAR_VTBLS = lv_i_clear_vtbls
         I_MAX_FIELD = lv_i_max_field
         IR_SLDFIL = lv_ir_sldfil
         IR_CHAR = lv_ir_char
         IT_ENTRIES_LM = lv_it_entries_lm
         IT_ENTRIES_LKEY = lv_it_entries_lkey
         IT_WHERE = lv_it_where
    IMPORTING
         E_MAX = lv_e_max
    CHANGING
         CT_VTBLS = lv_ct_vtbls
    EXCEPTIONS
        PARAM_ERROR = 1
        FNAME_ERROR = 2
        EXPRESSION_ERROR = 3
        TABLE_NOT_EXISTENT = 4
. " TB_LIMIT_CHARS_MAIN_GEN




ABAP code using 7.40 inline data declarations to call FM TB_LIMIT_CHARS_MAIN_GEN

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.

 
 
 
DATA(ld_i_access_mode) = '1'.
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_include_initial_values).
 
"SELECT single TABIX FROM SY INTO @DATA(ld_i_rows).
 
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_clear_vtbls).
DATA(ld_i_clear_vtbls) = 'X'.
 
 
"SELECT single NAME FROM FELD INTO @DATA(ld_i_max_field).
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!