SAP COTPL_CHECK_OPERANDS Function Module for









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

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



Function COTPL_CHECK_OPERANDS 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 'COTPL_CHECK_OPERANDS'"
EXPORTING
* MANDT = SY-MANDT "
* REF_TABLE = "
* CONVERSION = 'I' "
* MESSAGE_TYPE = 'I' "
* BUFFER_RESET = ' ' "
* MESSAGES_SHOW = ' ' "
* KOKRS = "
* TEMPLATE = "
LANGU = "
ENVIRONMENT = "
LINETYPE = "
TPLCOL = "
* EDITORTYPE = "
OPERAND1 = "
* COTPL_PARAM = "
* COTPL_OPERATOR = '' "

CHANGING
OPERAND2 = "

TABLES
COTPL_FUNCTIONS = "
* PARAMETER_INFO = "

EXCEPTIONS
WRONG_INPUT = 1 NOTHING_FOUND = 2
.



IMPORTING Parameters details for COTPL_CHECK_OPERANDS

MANDT -

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

REF_TABLE -

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

CONVERSION -

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

MESSAGE_TYPE -

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

BUFFER_RESET -

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

MESSAGES_SHOW -

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

KOKRS -

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

TEMPLATE -

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

LANGU -

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

ENVIRONMENT -

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

LINETYPE -

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

TPLCOL -

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

EDITORTYPE -

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

OPERAND1 -

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

COTPL_PARAM -

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

COTPL_OPERATOR -

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

CHANGING Parameters details for COTPL_CHECK_OPERANDS

OPERAND2 -

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

TABLES Parameters details for COTPL_CHECK_OPERANDS

COTPL_FUNCTIONS -

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

PARAMETER_INFO -

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

EXCEPTIONS details

WRONG_INPUT -

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

NOTHING_FOUND -

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

Copy and paste ABAP code example for COTPL_CHECK_OPERANDS 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_mandt  TYPE SY-MANDT, "   SY-MANDT
lv_operand2  TYPE TPLIC_SYNTAX_NODE, "   
lv_wrong_input  TYPE TPLIC_SYNTAX_NODE, "   
lt_cotpl_functions  TYPE STANDARD TABLE OF TPLIC_FUNC_TAB_NEW, "   
lv_ref_table  TYPE COFUNC1-REF_TABLE, "   
lv_conversion  TYPE CHAR1, "   'I'
lv_message_type  TYPE SYMSGTY, "   'I'
lv_buffer_reset  TYPE SYMSGTY, "   ' '
lv_messages_show  TYPE SYMSGTY, "   ' '
lv_kokrs  TYPE KOKRS, "   
lv_template  TYPE ABC_TEMPL, "   
lv_langu  TYPE LANGU, "   
lv_nothing_found  TYPE LANGU, "   
lt_parameter_info  TYPE STANDARD TABLE OF TPL_PAR_F4, "   
lv_environment  TYPE COTPL_MCLASS, "   
lv_linetype  TYPE COTPL_LINETYPE, "   
lv_tplcol  TYPE COTPL_COLUMN, "   
lv_editortype  TYPE ABC_ETYPE, "   
lv_operand1  TYPE TPLIC_SYNTAX_NODE, "   
lv_cotpl_param  TYPE TPLIC_PARM_NEW, "   
lv_cotpl_operator  TYPE CHAR2. "   ''

  CALL FUNCTION 'COTPL_CHECK_OPERANDS'  "
    EXPORTING
         MANDT = lv_mandt
         REF_TABLE = lv_ref_table
         CONVERSION = lv_conversion
         MESSAGE_TYPE = lv_message_type
         BUFFER_RESET = lv_buffer_reset
         MESSAGES_SHOW = lv_messages_show
         KOKRS = lv_kokrs
         TEMPLATE = lv_template
         LANGU = lv_langu
         ENVIRONMENT = lv_environment
         LINETYPE = lv_linetype
         TPLCOL = lv_tplcol
         EDITORTYPE = lv_editortype
         OPERAND1 = lv_operand1
         COTPL_PARAM = lv_cotpl_param
         COTPL_OPERATOR = lv_cotpl_operator
    CHANGING
         OPERAND2 = lv_operand2
    TABLES
         COTPL_FUNCTIONS = lt_cotpl_functions
         PARAMETER_INFO = lt_parameter_info
    EXCEPTIONS
        WRONG_INPUT = 1
        NOTHING_FOUND = 2
. " COTPL_CHECK_OPERANDS




ABAP code using 7.40 inline data declarations to call FM COTPL_CHECK_OPERANDS

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 MANDT FROM SY INTO @DATA(ld_mandt).
DATA(ld_mandt) = SY-MANDT.
 
 
 
 
"SELECT single REF_TABLE FROM COFUNC1 INTO @DATA(ld_ref_table).
 
DATA(ld_conversion) = 'I'.
 
DATA(ld_message_type) = 'I'.
 
DATA(ld_buffer_reset) = ' '.
 
DATA(ld_messages_show) = ' '.
 
 
 
 
 
 
 
 
 
 
 
 
DATA(ld_cotpl_operator) = ''.
 


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!