SAP CUPB_CHECK Function Module for









CUPB_CHECK is a standard cupb 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 cupb check FM, simply by entering the name CUPB_CHECK into the relevant SAP transaction such as SE37 or SE38.

Function Group: CUPB
Program Name: SAPLCUPB
Main Program: SAPLCUPB
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CUPB_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 'CUPB_CHECK'"
EXPORTING
* EXPRESSION_ID = ' ' "Dependency identifier (for example, constraint name)
EXPRESSION_TYPE = "Dependency Type
* GRAMMAR = 'SAPLCUPB' "Name of I report containing grammar
* VALID_FROM = SY-DATUM "Valid-from date
* DARK_MODE = ' ' "Suppresses detailed error messages
* DECLARATIVE_MODE = 'X' "Shows that conditions are declarative
* IDOC_PROCESSING = "

IMPORTING
EXPR = "Index of parser result in (PARSI_TERMS)
MSG_NUMBER = "Message number in T100
WARNING_OCCURED = "
ET_RETURN = "Return Parameter Table
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 CUPB_CHECK

EXPRESSION_ID - Dependency identifier (for example, constraint name)

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

EXPRESSION_TYPE - Dependency Type

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

GRAMMAR - Name of I report containing grammar

Data type:
Default: 'SAPLCUPB'
Optional: Yes
Call by Reference: No ( called with pass by value option)

VALID_FROM - Valid-from date

Data type: SY-DATUM
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

DARK_MODE - Suppresses detailed error messages

Data type: PMST_MARK
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

DECLARATIVE_MODE - Shows that conditions are declarative

Data type: PMST_MARK
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IDOC_PROCESSING -

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

EXPORTING Parameters details for CUPB_CHECK

EXPR - Index of parser result in (PARSI_TERMS)

Data type:
Optional: 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)

WARNING_OCCURED -

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

ET_RETURN - Return Parameter Table

Data type: BAPIRET2_T
Optional: No
Call by Reference: Yes

RESULT - Result ('T' = OK, 'F' = error)

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

COL - Positioning of cursor in the event of error (column)

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

ROW - Position of cursor in case of error (line)

Data type:
Optional: 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 CUPB_CHECK

PARSD_SOURCE - Editor buffer

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

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 CUPB_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 STRING, "   
lt_parsd_source  TYPE STANDARD TABLE OF STRING, "   
lv_expression_id  TYPE STRING, "   SPACE
lv_internal_error  TYPE STRING, "   
lv_msg_number  TYPE STRING, "   
lv_warning_occured  TYPE C, "   
lv_et_return  TYPE BAPIRET2_T, "   
lv_result  TYPE BAPIRET2_T, "   
lv_expression_type  TYPE BAPIRET2_T, "   
lv_col  TYPE BAPIRET2_T, "   
lv_grammar  TYPE BAPIRET2_T, "   'SAPLCUPB'
lv_row  TYPE BAPIRET2_T, "   
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_declarative_mode  TYPE PMST_MARK, "   'X'
lv_msg_arg3  TYPE PMST_MARK, "   
lv_idoc_processing  TYPE C, "   
lv_msg_arg4  TYPE C, "   
lv_msg_id  TYPE C. "   

  CALL FUNCTION 'CUPB_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
         DECLARATIVE_MODE = lv_declarative_mode
         IDOC_PROCESSING = lv_idoc_processing
    IMPORTING
         EXPR = lv_expr
         MSG_NUMBER = lv_msg_number
         WARNING_OCCURED = lv_warning_occured
         ET_RETURN = lv_et_return
         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
. " CUPB_CHECK




ABAP code using 7.40 inline data declarations to call FM CUPB_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) = ' '.
 
 
 
 
 
 
 
 
DATA(ld_grammar) = 'SAPLCUPB'.
 
 
"SELECT single DATUM FROM SY INTO @DATA(ld_valid_from).
DATA(ld_valid_from) = SY-DATUM.
 
 
DATA(ld_dark_mode) = ' '.
 
 
DATA(ld_declarative_mode) = 'X'.
 
 
 
 
 


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!