SAP CNFA_SELECT_FIELDS Function Module for NOTRANSL: Projekt-Infosystem: Popup zur Auswahl von Feldern ohne Reihenfol









CNFA_SELECT_FIELDS is a standard cnfa select fields SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Projekt-Infosystem: Popup zur Auswahl von Feldern ohne Reihenfol 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 cnfa select fields FM, simply by entering the name CNFA_SELECT_FIELDS into the relevant SAP transaction such as SE37 or SE38.

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



Function CNFA_SELECT_FIELDS 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 'CNFA_SELECT_FIELDS'"NOTRANSL: Projekt-Infosystem: Popup zur Auswahl von Feldern ohne Reihenfol
EXPORTING
* I_FLG_KEYS = 'X' "Checkbox
* I_HEADER_1 = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* I_HEADER_2 = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* I_HEADER_3 = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* I_POPUP_WIDTH = "Predefined Type
* I_POPUP_HEIGHT = 18 "Predefined Type
* I_BUTTON_1 = "Menu Painter: Program interface for dynamic texts
* I_BUTTON_2 = "Menu Painter: Program interface for dynamic texts
* I_EXIT_FORM_1 = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* I_EXIT_FORM_2 = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* I_EXIT_PROGRAM = "Predefined Type
* I_FLG_FIELDS = 'X' "Checkbox
* I_FLG_UNITS = 'X' "Checkbox
* I_FLG_GROUPS = 'X' "Checkbox
* I_MIN_NUMBER = "Minimum Number
* I_MAX_NUMBER = "Maximum Number
* I_TITLE = "Title text
* I_FIELD_NAME = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* I_FIELDS_NAME = "DE-EN-LANG-SWITCH-NO-TRANSLATION

IMPORTING
E_FLG_BUTTON_1_PRESSED = "Checkbox
E_FLG_BUTTON_2_PRESSED = "Checkbox

TABLES
* T_ACTUAL_FIELDS = "Interface Structure for Func.Mod. MC_POPUP_TO_SELECT_FIELDS
T_ALL_FIELDS = "Interface Structure for Func.Mod. MC_POPUP_TO_SELECT_FIELDS
* T_INCL_FIELDS = "Structure of Excluding Tab. for FB MC_POPUP_TO_SELECT_FIELDS
* T_EXCL_FIELDS = "Structure of Excluding Tab. for FB MC_POPUP_TO_SELECT_FIELDS
* T_GROUPS = "Field Groups

EXCEPTIONS
CANCEL = 1 NO_ALLOWED_FIELDS = 2
.



IMPORTING Parameters details for CNFA_SELECT_FIELDS

I_FLG_KEYS - Checkbox

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

I_HEADER_1 - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

I_HEADER_2 - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

I_HEADER_3 - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

I_POPUP_WIDTH - Predefined Type

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

I_POPUP_HEIGHT - Predefined Type

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

I_BUTTON_1 - Menu Painter: Program interface for dynamic texts

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

I_BUTTON_2 - Menu Painter: Program interface for dynamic texts

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

I_EXIT_FORM_1 - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: Yes
Call by Reference: Yes

I_EXIT_FORM_2 - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: Yes
Call by Reference: Yes

I_EXIT_PROGRAM - Predefined Type

Data type: SY-REPID
Optional: Yes
Call by Reference: Yes

I_FLG_FIELDS - Checkbox

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

I_FLG_UNITS - Checkbox

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

I_FLG_GROUPS - Checkbox

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

I_MIN_NUMBER - Minimum Number

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

I_MAX_NUMBER - Maximum Number

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

I_TITLE - Title text

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

I_FIELD_NAME - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

I_FIELDS_NAME - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

EXPORTING Parameters details for CNFA_SELECT_FIELDS

E_FLG_BUTTON_1_PRESSED - Checkbox

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

E_FLG_BUTTON_2_PRESSED - Checkbox

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

TABLES Parameters details for CNFA_SELECT_FIELDS

T_ACTUAL_FIELDS - Interface Structure for Func.Mod. MC_POPUP_TO_SELECT_FIELDS

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

T_ALL_FIELDS - Interface Structure for Func.Mod. MC_POPUP_TO_SELECT_FIELDS

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

T_INCL_FIELDS - Structure of Excluding Tab. for FB MC_POPUP_TO_SELECT_FIELDS

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

T_EXCL_FIELDS - Structure of Excluding Tab. for FB MC_POPUP_TO_SELECT_FIELDS

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

T_GROUPS - Field Groups

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

EXCEPTIONS details

CANCEL - Cancel

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

NO_ALLOWED_FIELDS - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

Copy and paste ABAP code example for CNFA_SELECT_FIELDS 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_cancel  TYPE STRING, "   
lv_i_flg_keys  TYPE XFELD, "   'X'
lt_t_actual_fields  TYPE STANDARD TABLE OF MCS01, "   
lv_e_flg_button_1_pressed  TYPE XFELD, "   
lv_i_header_1  TYPE XFELD, "   
lv_i_header_2  TYPE XFELD, "   
lv_i_header_3  TYPE XFELD, "   
lv_i_popup_width  TYPE I, "   
lv_i_popup_height  TYPE I, "   18
lv_i_button_1  TYPE SMP_DYNTXT, "   
lv_i_button_2  TYPE SMP_DYNTXT, "   
lv_i_exit_form_1  TYPE SMP_DYNTXT, "   
lv_i_exit_form_2  TYPE SMP_DYNTXT, "   
lv_i_exit_program  TYPE SY-REPID, "   
lv_i_flg_fields  TYPE XFELD, "   'X'
lt_t_all_fields  TYPE STANDARD TABLE OF MCS01, "   
lv_no_allowed_fields  TYPE MCS01, "   
lv_e_flg_button_2_pressed  TYPE XFELD, "   
lv_i_flg_units  TYPE XFELD, "   'X'
lt_t_incl_fields  TYPE STANDARD TABLE OF MCS02, "   
lv_i_flg_groups  TYPE XFELD, "   'X'
lt_t_excl_fields  TYPE STANDARD TABLE OF MCS02, "   
lt_t_groups  TYPE STANDARD TABLE OF CNFA_GROUPS, "   
lv_i_min_number  TYPE I, "   
lv_i_max_number  TYPE I, "   
lv_i_title  TYPE I, "   
lv_i_field_name  TYPE I, "   
lv_i_fields_name  TYPE I. "   

  CALL FUNCTION 'CNFA_SELECT_FIELDS'  "NOTRANSL: Projekt-Infosystem: Popup zur Auswahl von Feldern ohne Reihenfol
    EXPORTING
         I_FLG_KEYS = lv_i_flg_keys
         I_HEADER_1 = lv_i_header_1
         I_HEADER_2 = lv_i_header_2
         I_HEADER_3 = lv_i_header_3
         I_POPUP_WIDTH = lv_i_popup_width
         I_POPUP_HEIGHT = lv_i_popup_height
         I_BUTTON_1 = lv_i_button_1
         I_BUTTON_2 = lv_i_button_2
         I_EXIT_FORM_1 = lv_i_exit_form_1
         I_EXIT_FORM_2 = lv_i_exit_form_2
         I_EXIT_PROGRAM = lv_i_exit_program
         I_FLG_FIELDS = lv_i_flg_fields
         I_FLG_UNITS = lv_i_flg_units
         I_FLG_GROUPS = lv_i_flg_groups
         I_MIN_NUMBER = lv_i_min_number
         I_MAX_NUMBER = lv_i_max_number
         I_TITLE = lv_i_title
         I_FIELD_NAME = lv_i_field_name
         I_FIELDS_NAME = lv_i_fields_name
    IMPORTING
         E_FLG_BUTTON_1_PRESSED = lv_e_flg_button_1_pressed
         E_FLG_BUTTON_2_PRESSED = lv_e_flg_button_2_pressed
    TABLES
         T_ACTUAL_FIELDS = lt_t_actual_fields
         T_ALL_FIELDS = lt_t_all_fields
         T_INCL_FIELDS = lt_t_incl_fields
         T_EXCL_FIELDS = lt_t_excl_fields
         T_GROUPS = lt_t_groups
    EXCEPTIONS
        CANCEL = 1
        NO_ALLOWED_FIELDS = 2
. " CNFA_SELECT_FIELDS




ABAP code using 7.40 inline data declarations to call FM CNFA_SELECT_FIELDS

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_i_flg_keys) = 'X'.
 
 
 
 
 
 
 
DATA(ld_i_popup_height) = 18.
 
 
 
 
 
"SELECT single REPID FROM SY INTO @DATA(ld_i_exit_program).
 
DATA(ld_i_flg_fields) = 'X'.
 
 
 
 
DATA(ld_i_flg_units) = 'X'.
 
 
DATA(ld_i_flg_groups) = '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!