SAP COTPL_PARAMETER_POPUP Function Module for Parameter Popup









COTPL_PARAMETER_POPUP is a standard cotpl parameter popup SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Parameter Popup 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 cotpl parameter popup FM, simply by entering the name COTPL_PARAMETER_POPUP into the relevant SAP transaction such as SE37 or SE38.

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



Function COTPL_PARAMETER_POPUP 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_PARAMETER_POPUP'"Parameter Popup
EXPORTING
* COAREA = ' ' "Controlling Area
CLASS = "Valid Environments
* TEMPLATE = ' ' "Template
FUNCTION = "
* LINETYPE = '*' "Template Row Types
* TPLCOL = '*' "Template columntypes
* EDITORTYPE = '*' "ABC: Formula Editor Type
* PARAM_ID = '*' "Parameter to be shown, * for all
* MODE = '2' "Mode : Display (1) or Change (2)

IMPORTING
FUNCTION_STRING = "Function with filled parameters
VALUE_STRING = "Value of the first parameter

CHANGING
RESULT = "boolean variable (X=true, -=false, space=unknown)

TABLES
COTPL_FUNCTIONS = "Template Functions

EXCEPTIONS
NO_PARAMETER = 1 WRONG_INPUT = 2
.



IMPORTING Parameters details for COTPL_PARAMETER_POPUP

COAREA - Controlling Area

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

CLASS - Valid Environments

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

TEMPLATE - Template

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

FUNCTION -

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

LINETYPE - Template Row Types

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

TPLCOL - Template columntypes

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

EDITORTYPE - ABC: Formula Editor Type

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

PARAM_ID - Parameter to be shown, * for all

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

MODE - Mode : Display (1) or Change (2)

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

EXPORTING Parameters details for COTPL_PARAMETER_POPUP

FUNCTION_STRING - Function with filled parameters

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

VALUE_STRING - Value of the first parameter

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

CHANGING Parameters details for COTPL_PARAMETER_POPUP

RESULT - boolean variable (X=true, -=false, space=unknown)

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

TABLES Parameters details for COTPL_PARAMETER_POPUP

COTPL_FUNCTIONS - Template Functions

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

EXCEPTIONS details

NO_PARAMETER - Function has no parameters to maintain

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

WRONG_INPUT - Some non-optional parameters are not field

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for COTPL_PARAMETER_POPUP 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_coarea  TYPE KOKRS, "   SPACE
lv_result  TYPE BOOLEAN, "   
lv_no_parameter  TYPE BOOLEAN, "   
lt_cotpl_functions  TYPE STANDARD TABLE OF TPLIC_FUNC_TAB_NEW, "   
lv_function_string  TYPE STRING, "   
lv_class  TYPE TPL_SCR-CLASS, "   
lv_wrong_input  TYPE TPL_SCR, "   
lv_value_string  TYPE STRING, "   
lv_template  TYPE ABC_TEMPL, "   SPACE
lv_function  TYPE TPLIC_FUNC_NEW, "   
lv_linetype  TYPE COTPL_LINETYPE, "   '*'
lv_tplcol  TYPE COTPL_COLUMN, "   '*'
lv_editortype  TYPE ABC_ETYPE, "   '*'
lv_param_id  TYPE RSIMP-PARAMETER, "   '*'
lv_mode  TYPE FLAG. "   '2'

  CALL FUNCTION 'COTPL_PARAMETER_POPUP'  "Parameter Popup
    EXPORTING
         COAREA = lv_coarea
         CLASS = lv_class
         TEMPLATE = lv_template
         FUNCTION = lv_function
         LINETYPE = lv_linetype
         TPLCOL = lv_tplcol
         EDITORTYPE = lv_editortype
         PARAM_ID = lv_param_id
         MODE = lv_mode
    IMPORTING
         FUNCTION_STRING = lv_function_string
         VALUE_STRING = lv_value_string
    CHANGING
         RESULT = lv_result
    TABLES
         COTPL_FUNCTIONS = lt_cotpl_functions
    EXCEPTIONS
        NO_PARAMETER = 1
        WRONG_INPUT = 2
. " COTPL_PARAMETER_POPUP




ABAP code using 7.40 inline data declarations to call FM COTPL_PARAMETER_POPUP

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_coarea) = ' '.
 
 
 
 
 
"SELECT single CLASS FROM TPL_SCR INTO @DATA(ld_class).
 
 
 
DATA(ld_template) = ' '.
 
 
DATA(ld_linetype) = '*'.
 
DATA(ld_tplcol) = '*'.
 
DATA(ld_editortype) = '*'.
 
"SELECT single PARAMETER FROM RSIMP INTO @DATA(ld_param_id).
DATA(ld_param_id) = '*'.
 
DATA(ld_mode) = '2'.
 


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!