SAP CUPR_TABLE_SELECT Function Module for NOTRANSL: Allgemeine Selektion auf Variantentabelle
CUPR_TABLE_SELECT is a standard cupr table select SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Allgemeine Selektion auf Variantentabelle 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 cupr table select FM, simply by entering the name CUPR_TABLE_SELECT into the relevant SAP transaction such as SE37 or SE38.
Function Group: CUPR
Program Name: SAPLCUPR
Main Program: SAPLCUPR
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CUPR_TABLE_SELECT 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 'CUPR_TABLE_SELECT'"NOTRANSL: Allgemeine Selektion auf Variantentabelle.
EXPORTING
TAB = "Table
IMPORTING
ENTRIES_FOUND = "Number of records found
TABLES
QUERY = "Selection criterion and characteristics
MATCH = "Inferred characteristic values
EXCEPTIONS
NOT_FOUND = 1 NO_CHARACTERISTICS = 2 NO_QUERY = 3 NO_ENTRY_FOUND = 4 INTERNAL_ERROR = 5 UNKNOWN_CHARACTERISTIC = 6 WRONG_CONTEXT = 7
IMPORTING Parameters details for CUPR_TABLE_SELECT
TAB - Table
Data type: CUVTAB-VTNAMOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CUPR_TABLE_SELECT
ENTRIES_FOUND - Number of records found
Data type: SY-TMAXLOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CUPR_TABLE_SELECT
QUERY - Selection criterion and characteristics
Data type: CUOV_02Optional: No
Call by Reference: No ( called with pass by value option)
MATCH - Inferred characteristic values
Data type: CUOV_03Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_FOUND - Table not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_CHARACTERISTICS - Table has no characteristics
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_QUERY - No key values defined
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_ENTRY_FOUND - No record found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INTERNAL_ERROR - Internal error
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
UNKNOWN_CHARACTERISTIC - Table column not defined
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_CONTEXT -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for CUPR_TABLE_SELECT 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_tab | TYPE CUVTAB-VTNAM, " | |||
| lt_query | TYPE STANDARD TABLE OF CUOV_02, " | |||
| lv_not_found | TYPE CUOV_02, " | |||
| lv_entries_found | TYPE SY-TMAXL, " | |||
| lt_match | TYPE STANDARD TABLE OF CUOV_03, " | |||
| lv_no_characteristics | TYPE CUOV_03, " | |||
| lv_no_query | TYPE CUOV_03, " | |||
| lv_no_entry_found | TYPE CUOV_03, " | |||
| lv_internal_error | TYPE CUOV_03, " | |||
| lv_unknown_characteristic | TYPE CUOV_03, " | |||
| lv_wrong_context | TYPE CUOV_03. " |
|   CALL FUNCTION 'CUPR_TABLE_SELECT' "NOTRANSL: Allgemeine Selektion auf Variantentabelle |
| EXPORTING | ||
| TAB | = lv_tab | |
| IMPORTING | ||
| ENTRIES_FOUND | = lv_entries_found | |
| TABLES | ||
| QUERY | = lt_query | |
| MATCH | = lt_match | |
| EXCEPTIONS | ||
| NOT_FOUND = 1 | ||
| NO_CHARACTERISTICS = 2 | ||
| NO_QUERY = 3 | ||
| NO_ENTRY_FOUND = 4 | ||
| INTERNAL_ERROR = 5 | ||
| UNKNOWN_CHARACTERISTIC = 6 | ||
| WRONG_CONTEXT = 7 | ||
| . " CUPR_TABLE_SELECT | ||
ABAP code using 7.40 inline data declarations to call FM CUPR_TABLE_SELECT
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 VTNAM FROM CUVTAB INTO @DATA(ld_tab). | ||||
| "SELECT single TMAXL FROM SY INTO @DATA(ld_entries_found). | ||||
Search for further information about these or an SAP related objects