SAP CN_CUA_DET_AND_SET Function Module for Determine and set GUI status
CN_CUA_DET_AND_SET is a standard cn cua det and set SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Determine and set GUI status 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 cn cua det and set FM, simply by entering the name CN_CUA_DET_AND_SET into the relevant SAP transaction such as SE37 or SE38.
Function Group: CNCU
Program Name: SAPLCNCU
Main Program: SAPLCNCU
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CN_CUA_DET_AND_SET 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 'CN_CUA_DET_AND_SET'"Determine and set GUI status.
EXPORTING
AKTYP = "Activity type
BLDGR = "Screen modification group
* RPACT = "
* DEACT_TYPE = '' "Deactivation category
MPOOL = "
PANEL = "Panel
PLNTY = "Task list type
TRTYP = "Transaction type
* TITLE_IMP = "
TABLES
* EXCL_TAB = "
IMPORTING Parameters details for CN_CUA_DET_AND_SET
AKTYP - Activity type
Data type: RC27S-AKTYPOptional: No
Call by Reference: No ( called with pass by value option)
BLDGR - Screen modification group
Data type: T185-BLDGROptional: No
Call by Reference: No ( called with pass by value option)
RPACT -
Data type: RC27S-FLG_RP_ACTOptional: Yes
Call by Reference: No ( called with pass by value option)
DEACT_TYPE - Deactivation category
Data type:Default: ''
Optional: Yes
Call by Reference: No ( called with pass by value option)
MPOOL -
Data type: SY-REPIDOptional: No
Call by Reference: No ( called with pass by value option)
PANEL - Panel
Data type: T185-PANELOptional: No
Call by Reference: No ( called with pass by value option)
PLNTY - Task list type
Data type: TCA01-PLNTYOptional: No
Call by Reference: No ( called with pass by value option)
TRTYP - Transaction type
Data type: TCA05-TRTYPOptional: No
Call by Reference: No ( called with pass by value option)
TITLE_IMP -
Data type: TCO05-TITELOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CN_CUA_DET_AND_SET
EXCL_TAB -
Data type: CUAFCODEOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CN_CUA_DET_AND_SET 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_aktyp | TYPE RC27S-AKTYP, " | |||
| lt_excl_tab | TYPE STANDARD TABLE OF CUAFCODE, " | |||
| lv_bldgr | TYPE T185-BLDGR, " | |||
| lv_rpact | TYPE RC27S-FLG_RP_ACT, " | |||
| lv_deact_type | TYPE RC27S, " '' | |||
| lv_mpool | TYPE SY-REPID, " | |||
| lv_panel | TYPE T185-PANEL, " | |||
| lv_plnty | TYPE TCA01-PLNTY, " | |||
| lv_trtyp | TYPE TCA05-TRTYP, " | |||
| lv_title_imp | TYPE TCO05-TITEL. " |
|   CALL FUNCTION 'CN_CUA_DET_AND_SET' "Determine and set GUI status |
| EXPORTING | ||
| AKTYP | = lv_aktyp | |
| BLDGR | = lv_bldgr | |
| RPACT | = lv_rpact | |
| DEACT_TYPE | = lv_deact_type | |
| MPOOL | = lv_mpool | |
| PANEL | = lv_panel | |
| PLNTY | = lv_plnty | |
| TRTYP | = lv_trtyp | |
| TITLE_IMP | = lv_title_imp | |
| TABLES | ||
| EXCL_TAB | = lt_excl_tab | |
| . " CN_CUA_DET_AND_SET | ||
ABAP code using 7.40 inline data declarations to call FM CN_CUA_DET_AND_SET
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 AKTYP FROM RC27S INTO @DATA(ld_aktyp). | ||||
| "SELECT single BLDGR FROM T185 INTO @DATA(ld_bldgr). | ||||
| "SELECT single FLG_RP_ACT FROM RC27S INTO @DATA(ld_rpact). | ||||
| DATA(ld_deact_type) | = ''. | |||
| "SELECT single REPID FROM SY INTO @DATA(ld_mpool). | ||||
| "SELECT single PANEL FROM T185 INTO @DATA(ld_panel). | ||||
| "SELECT single PLNTY FROM TCA01 INTO @DATA(ld_plnty). | ||||
| "SELECT single TRTYP FROM TCA05 INTO @DATA(ld_trtyp). | ||||
| "SELECT single TITEL FROM TCO05 INTO @DATA(ld_title_imp). | ||||
Search for further information about these or an SAP related objects