SAP CUPS_CHECK Function Module for
CUPS_CHECK is a standard cups check SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 cups check FM, simply by entering the name CUPS_CHECK into the relevant SAP transaction such as SE37 or SE38.
Function Group: CUPS
Program Name: SAPLCUPS
Main Program: SAPLCUPS
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CUPS_CHECK 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 'CUPS_CHECK'".
EXPORTING
* EXPRESSION_ID = ' ' "
EXPRESSION_TYPE = "Dependency Type
* GRAMMAR = 'SAPLCUPS' "
* VALID_FROM = SY-DATUM "Valid-from date
* DARK_MODE = ' ' "Suppresses detailed error messages
* IDOC_PROCESSING = "
IMPORTING
EXPR = "
MSG_NUMBER = "Message number in T100
RESULT = "Result ('T' = OK, 'F' = error)
COL = "Positioning of cursor in the event of error (column)
ROW = "Position of cursor in case of error (line)
MSG_ARG1 = "Additional argument for message
MSG_ARG2 = "Additional argument for message
MSG_ARG3 = "Additional argument for message
MSG_ARG4 = "Additional argument for message
MSG_ID = "Message Class
TABLES
PARSD_SOURCE = "Editor buffer
EXCEPTIONS
INTERNAL_ERROR = 1
IMPORTING Parameters details for CUPS_CHECK
EXPRESSION_ID -
Data type: PMST_KEYDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPRESSION_TYPE - Dependency Type
Data type: PMST_KEYOptional: No
Call by Reference: No ( called with pass by value option)
GRAMMAR -
Data type:Default: 'SAPLCUPS'
Optional: Yes
Call by Reference: No ( called with pass by value option)
VALID_FROM - Valid-from date
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
DARK_MODE - Suppresses detailed error messages
Data type: PMST_MARKDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IDOC_PROCESSING -
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CUPS_CHECK
EXPR -
Data type: PMST_IDXOptional: No
Call by Reference: No ( called with pass by value option)
MSG_NUMBER - Message number in T100
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RESULT - Result ('T' = OK, 'F' = error)
Data type: PMST_RESULTOptional: No
Call by Reference: No ( called with pass by value option)
COL - Positioning of cursor in the event of error (column)
Data type: PARS_TOKEN-COLOptional: No
Call by Reference: No ( called with pass by value option)
ROW - Position of cursor in case of error (line)
Data type: PARS_TOKEN-ROWOptional: No
Call by Reference: No ( called with pass by value option)
MSG_ARG1 - Additional argument for message
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MSG_ARG2 - Additional argument for message
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MSG_ARG3 - Additional argument for message
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MSG_ARG4 - Additional argument for message
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MSG_ID - Message Class
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CUPS_CHECK
PARSD_SOURCE - Editor buffer
Data type:Optional: No
Call by Reference: Yes
EXCEPTIONS details
INTERNAL_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CUPS_CHECK 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_expr | TYPE PMST_IDX, " | |||
| lt_parsd_source | TYPE STANDARD TABLE OF PMST_IDX, " | |||
| lv_expression_id | TYPE PMST_KEY, " SPACE | |||
| lv_internal_error | TYPE PMST_KEY, " | |||
| lv_msg_number | TYPE PMST_KEY, " | |||
| lv_result | TYPE PMST_RESULT, " | |||
| lv_expression_type | TYPE PMST_KEY, " | |||
| lv_col | TYPE PARS_TOKEN-COL, " | |||
| lv_grammar | TYPE PARS_TOKEN, " 'SAPLCUPS' | |||
| lv_row | TYPE PARS_TOKEN-ROW, " | |||
| lv_valid_from | TYPE SY-DATUM, " SY-DATUM | |||
| lv_msg_arg1 | TYPE SY, " | |||
| lv_dark_mode | TYPE PMST_MARK, " SPACE | |||
| lv_msg_arg2 | TYPE PMST_MARK, " | |||
| lv_idoc_processing | TYPE C, " | |||
| lv_msg_arg3 | TYPE C, " | |||
| lv_msg_arg4 | TYPE C, " | |||
| lv_msg_id | TYPE C. " |
|   CALL FUNCTION 'CUPS_CHECK' " |
| EXPORTING | ||
| EXPRESSION_ID | = lv_expression_id | |
| EXPRESSION_TYPE | = lv_expression_type | |
| GRAMMAR | = lv_grammar | |
| VALID_FROM | = lv_valid_from | |
| DARK_MODE | = lv_dark_mode | |
| IDOC_PROCESSING | = lv_idoc_processing | |
| IMPORTING | ||
| EXPR | = lv_expr | |
| MSG_NUMBER | = lv_msg_number | |
| RESULT | = lv_result | |
| COL | = lv_col | |
| ROW | = lv_row | |
| MSG_ARG1 | = lv_msg_arg1 | |
| MSG_ARG2 | = lv_msg_arg2 | |
| MSG_ARG3 | = lv_msg_arg3 | |
| MSG_ARG4 | = lv_msg_arg4 | |
| MSG_ID | = lv_msg_id | |
| TABLES | ||
| PARSD_SOURCE | = lt_parsd_source | |
| EXCEPTIONS | ||
| INTERNAL_ERROR = 1 | ||
| . " CUPS_CHECK | ||
ABAP code using 7.40 inline data declarations to call FM CUPS_CHECK
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_expression_id) | = ' '. | |||
| "SELECT single COL FROM PARS_TOKEN INTO @DATA(ld_col). | ||||
| DATA(ld_grammar) | = 'SAPLCUPS'. | |||
| "SELECT single ROW FROM PARS_TOKEN INTO @DATA(ld_row). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_valid_from). | ||||
| DATA(ld_valid_from) | = SY-DATUM. | |||
| DATA(ld_dark_mode) | = ' '. | |||
Search for further information about these or an SAP related objects