SAP EHQM09_CREATE_SELECTED_SET Function Module for NOTRANSL: EH&S-QM: Auswahlmenge ermitteln
EHQM09_CREATE_SELECTED_SET is a standard ehqm09 create selected 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 NOTRANSL: EH&S-QM: Auswahlmenge ermitteln 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 ehqm09 create selected set FM, simply by entering the name EHQM09_CREATE_SELECTED_SET into the relevant SAP transaction such as SE37 or SE38.
Function Group: EHQM09
Program Name: SAPLEHQM09
Main Program: SAPLEHQM09
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function EHQM09_CREATE_SELECTED_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 'EHQM09_CREATE_SELECTED_SET'"NOTRANSL: EH&S-QM: Auswahlmenge ermitteln.
EXPORTING
I_CODE_FOR_SELSET_TAB = "
I_CATALOG_NOK = "Catalog
I_CODEGRP_NOK = "Code Group
I_CODE_NOK = "Code
I_DEF_CLASS = "Error Class
I_PLANT = "Plant
I_VALDAT = "Key Date
I_SHORTTEXT_TAB = "Short Text
IMPORTING
E_SEL_SET = "Assigned Code Group or Selected Set
E_PLANT_SEL_SET = "Plant of the assigned selected set
EXCEPTIONS
CREATION_FAILURE = 1
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLEHQM09_001 EH&S-QM: Determine QM Code
EXIT_SAPLEHQM09_002 EH&S-QM: Determine QM Code Group
EXIT_SAPLEHQM09_003 EH&S-QM: Determine QM Selected Set
EXIT_SAPLEHQM09_004 EH&S-QM: Add Data to Inspection Characteristic
EXIT_SAPLEHQM09_005 EH&S-QM: Add Long Text Data to Inspection Characteristic
EXIT_SAPLEHQM09_006 EH&S-QM: Build Inspection Characteristic with Parameter Characteristics
EXIT_SAPLEHQM09_007 EH&S-QM: Handling Parameter Characteristics
IMPORTING Parameters details for EHQM09_CREATE_SELECTED_SET
I_CODE_FOR_SELSET_TAB -
Data type: EHQ01_CODE_FOR_SELSET_T_TYPEOptional: No
Call by Reference: Yes
I_CATALOG_NOK - Catalog
Data type: QKATARTOptional: No
Call by Reference: Yes
I_CODEGRP_NOK - Code Group
Data type: QCODEGRPOptional: No
Call by Reference: Yes
I_CODE_NOK - Code
Data type: QCODEOptional: No
Call by Reference: Yes
I_DEF_CLASS - Error Class
Data type: QFEHLKLASOptional: No
Call by Reference: Yes
I_PLANT - Plant
Data type: WERKS_DOptional: No
Call by Reference: Yes
I_VALDAT - Key Date
Data type: ESEDIAGVDOptional: No
Call by Reference: Yes
I_SHORTTEXT_TAB - Short Text
Data type: EHQ01_SHORTTEXT_T_TYPEOptional: No
Call by Reference: Yes
EXPORTING Parameters details for EHQM09_CREATE_SELECTED_SET
E_SEL_SET - Assigned Code Group or Selected Set
Data type: QCGRAUSWOptional: No
Call by Reference: Yes
E_PLANT_SEL_SET - Plant of the assigned selected set
Data type: QWERKAUSWOptional: No
Call by Reference: Yes
EXCEPTIONS details
CREATION_FAILURE - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for EHQM09_CREATE_SELECTED_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_e_sel_set | TYPE QCGRAUSW, " | |||
| lv_creation_failure | TYPE QCGRAUSW, " | |||
| lv_i_code_for_selset_tab | TYPE EHQ01_CODE_FOR_SELSET_T_TYPE, " | |||
| lv_i_catalog_nok | TYPE QKATART, " | |||
| lv_e_plant_sel_set | TYPE QWERKAUSW, " | |||
| lv_i_codegrp_nok | TYPE QCODEGRP, " | |||
| lv_i_code_nok | TYPE QCODE, " | |||
| lv_i_def_class | TYPE QFEHLKLAS, " | |||
| lv_i_plant | TYPE WERKS_D, " | |||
| lv_i_valdat | TYPE ESEDIAGVD, " | |||
| lv_i_shorttext_tab | TYPE EHQ01_SHORTTEXT_T_TYPE. " |
|   CALL FUNCTION 'EHQM09_CREATE_SELECTED_SET' "NOTRANSL: EH&S-QM: Auswahlmenge ermitteln |
| EXPORTING | ||
| I_CODE_FOR_SELSET_TAB | = lv_i_code_for_selset_tab | |
| I_CATALOG_NOK | = lv_i_catalog_nok | |
| I_CODEGRP_NOK | = lv_i_codegrp_nok | |
| I_CODE_NOK | = lv_i_code_nok | |
| I_DEF_CLASS | = lv_i_def_class | |
| I_PLANT | = lv_i_plant | |
| I_VALDAT | = lv_i_valdat | |
| I_SHORTTEXT_TAB | = lv_i_shorttext_tab | |
| IMPORTING | ||
| E_SEL_SET | = lv_e_sel_set | |
| E_PLANT_SEL_SET | = lv_e_plant_sel_set | |
| EXCEPTIONS | ||
| CREATION_FAILURE = 1 | ||
| . " EHQM09_CREATE_SELECTED_SET | ||
ABAP code using 7.40 inline data declarations to call FM EHQM09_CREATE_SELECTED_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.Search for further information about these or an SAP related objects