SAP EHQM09_CLEAR_CHA_FIELDS Function Module for NOTRANSL: EH&S-QM: Prüfmerkmal aufbauen wenn keine Zusammensetzung vorlieg
EHQM09_CLEAR_CHA_FIELDS is a standard ehqm09 clear cha 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: EH&S-QM: Prüfmerkmal aufbauen wenn keine Zusammensetzung vorlieg 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 clear cha fields FM, simply by entering the name EHQM09_CLEAR_CHA_FIELDS 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_CLEAR_CHA_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 'EHQM09_CLEAR_CHA_FIELDS'"NOTRANSL: EH&S-QM: Prüfmerkmal aufbauen wenn keine Zusammensetzung vorlieg.
IMPORTING
E_SHORTTEXT = "Short Text for the Inspection Characteristic
E_FLG_UPPER_LIMIT_NOT_INITIAL = "Value Not Initial If Set
E_DECIMALS = "Number of Places to Right of Decimal Point (Accuracy)
E_UOM = "Unit of Measurement, in Which Quantitative Data Is Stored
E_INFO = "Text Line for Additional Information
E_SELECTED_SET = "Assigned Code Group or Selected Set
E_PLANT_SELECTED_SET = "Plant of the assigned selected set
E_CHA_LONGTEXT_TAB = "
E_METHOD = "Check method
E_PLANT_METHOD = "Plant for inspection method
E_VERSION_METHOD = "Version number of the inspection method
E_TARGET_VALUE = "Target Value for a Quantitative Characteristic
E_LOWER_LIMIT = "Lower Tolerance Limit
E_UPPER_LIMIT = "Upper Threshold Value
E_FLG_TARGET_VALUE_NOT_INITIAL = "Value Not Initial If Set
E_FLG_LOWER_LIMIT_NOT_INITIAL = "Value Not Initial If Set
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
EXPORTING Parameters details for EHQM09_CLEAR_CHA_FIELDS
E_SHORTTEXT - Short Text for the Inspection Characteristic
Data type: QTXT_CHAOptional: No
Call by Reference: Yes
E_FLG_UPPER_LIMIT_NOT_INITIAL - Value Not Initial If Set
Data type: QNINITIALOptional: No
Call by Reference: Yes
E_DECIMALS - Number of Places to Right of Decimal Point (Accuracy)
Data type: QSTELLENOptional: No
Call by Reference: Yes
E_UOM - Unit of Measurement, in Which Quantitative Data Is Stored
Data type: QMASSEHOptional: No
Call by Reference: Yes
E_INFO - Text Line for Additional Information
Data type: QTXT40Optional: No
Call by Reference: Yes
E_SELECTED_SET - Assigned Code Group or Selected Set
Data type: QCGRAUSWOptional: No
Call by Reference: Yes
E_PLANT_SELECTED_SET - Plant of the assigned selected set
Data type: QWERKAUSWOptional: No
Call by Reference: Yes
E_CHA_LONGTEXT_TAB -
Data type: EHQ01_LONGTEXT_T_TYPEOptional: No
Call by Reference: Yes
E_METHOD - Check method
Data type: QPMETHODEOptional: No
Call by Reference: Yes
E_PLANT_METHOD - Plant for inspection method
Data type: Q_METH_PLANTOptional: No
Call by Reference: Yes
E_VERSION_METHOD - Version number of the inspection method
Data type: QVERSNRPMOptional: No
Call by Reference: Yes
E_TARGET_VALUE - Target Value for a Quantitative Characteristic
Data type: QSOLLWERTEOptional: No
Call by Reference: Yes
E_LOWER_LIMIT - Lower Tolerance Limit
Data type: QTOLUNOptional: No
Call by Reference: Yes
E_UPPER_LIMIT - Upper Threshold Value
Data type: QTOLOBOptional: No
Call by Reference: Yes
E_FLG_TARGET_VALUE_NOT_INITIAL - Value Not Initial If Set
Data type: QNINITIALOptional: No
Call by Reference: Yes
E_FLG_LOWER_LIMIT_NOT_INITIAL - Value Not Initial If Set
Data type: QNINITIALOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for EHQM09_CLEAR_CHA_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_e_shorttext | TYPE QTXT_CHA, " | |||
| lv_e_flg_upper_limit_not_initial | TYPE QNINITIAL, " | |||
| lv_e_decimals | TYPE QSTELLEN, " | |||
| lv_e_uom | TYPE QMASSEH, " | |||
| lv_e_info | TYPE QTXT40, " | |||
| lv_e_selected_set | TYPE QCGRAUSW, " | |||
| lv_e_plant_selected_set | TYPE QWERKAUSW, " | |||
| lv_e_cha_longtext_tab | TYPE EHQ01_LONGTEXT_T_TYPE, " | |||
| lv_e_method | TYPE QPMETHODE, " | |||
| lv_e_plant_method | TYPE Q_METH_PLANT, " | |||
| lv_e_version_method | TYPE QVERSNRPM, " | |||
| lv_e_target_value | TYPE QSOLLWERTE, " | |||
| lv_e_lower_limit | TYPE QTOLUN, " | |||
| lv_e_upper_limit | TYPE QTOLOB, " | |||
| lv_e_flg_target_value_not_initial | TYPE QNINITIAL, " | |||
| lv_e_flg_lower_limit_not_initial | TYPE QNINITIAL. " |
|   CALL FUNCTION 'EHQM09_CLEAR_CHA_FIELDS' "NOTRANSL: EH&S-QM: Prüfmerkmal aufbauen wenn keine Zusammensetzung vorlieg |
| IMPORTING | ||
| E_SHORTTEXT | = lv_e_shorttext | |
| E_FLG_UPPER_LIMIT_NOT_INITIAL | = lv_e_flg_upper_limit_not_initial | |
| E_DECIMALS | = lv_e_decimals | |
| E_UOM | = lv_e_uom | |
| E_INFO | = lv_e_info | |
| E_SELECTED_SET | = lv_e_selected_set | |
| E_PLANT_SELECTED_SET | = lv_e_plant_selected_set | |
| E_CHA_LONGTEXT_TAB | = lv_e_cha_longtext_tab | |
| E_METHOD | = lv_e_method | |
| E_PLANT_METHOD | = lv_e_plant_method | |
| E_VERSION_METHOD | = lv_e_version_method | |
| E_TARGET_VALUE | = lv_e_target_value | |
| E_LOWER_LIMIT | = lv_e_lower_limit | |
| E_UPPER_LIMIT | = lv_e_upper_limit | |
| E_FLG_TARGET_VALUE_NOT_INITIAL | = lv_e_flg_target_value_not_initial | |
| E_FLG_LOWER_LIMIT_NOT_INITIAL | = lv_e_flg_lower_limit_not_initial | |
| . " EHQM09_CLEAR_CHA_FIELDS | ||
ABAP code using 7.40 inline data declarations to call FM EHQM09_CLEAR_CHA_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.Search for further information about these or an SAP related objects