Fonction SAP CBIH_ER30_ER_DELETE - EHS: Delete Risk Assessment Entries

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
I_ADDINF RCGADDINF u 27 Additional Information on Object
I_FLG_ACTION ESP1_BOOLEAN 0 ESP1_FALSE X Indicator: Delete safety measures
I_FLG_ANALYSIS ESP1_BOOLEAN 0 ESP1_FALSE X Indicator: Delete analyses
I_FLG_ANALYSIS_DETAILS ESP1_BOOLEAN 0 ESP1_FALSE X Indicator: Delete analysis detail data
I_FLG_CHECK_ONLY ESP1_BOOLEAN 0 ESP1_FALSE X Indicator: Check data only
I_FLG_EXP_QUANTITY ESP1_BOOLEAN 0 ESP1_FALSE X Indicator: Delete amounts
I_FLG_FILL_EXTERROR ESP1_BOOLEAN 0 ESP1_FALSE X Indicator: Fill extended error information table
I_FLG_FREETEXT ESP1_BOOLEAN 0 ESP1_FALSE X
I_FLG_HAS_VAL ESP1_BOOLEAN 0 ESP1_FALSE X Indicator: Value assignment instances for exposure assignment header
I_FLG_HEADER ESP1_BOOLEAN 0 ESP1_FALSE X Indicator: Delete header data

Paramètre Reférence Type Long. Description
E_FLG_ERROR ESP1_BOOLEAN 0 Indicator: Error deleting a record
E_FLG_LOCKFAIL ESP1_BOOLEAN 0 Indicator: Lock on at least one record failed
E_FLG_WARNING ESP1_BOOLEAN 0 Indicator: Warning when deleting a record

Paramètre Reférence Long. Facultatif Description
X_API_ACTION_TAB CIHAC_ACHAPI_TAB_TYPE 0 X Industrial Hygiene and Safety Measures
X_API_ANALYSIS_AD08_TAB CIHEX_AD08API_TAB_TYPE 0 X
X_API_ANALYSIS_AD09_TAB CIHEX_AD09API_TAB_TYPE 0 X
X_API_ANALYSIS_AD10_TAB CIHEX_AD10API_TAB_TYPE 0 X
X_API_ANALYSIS_AM01_TAB CIHEX_AM01API_TAB_TYPE 0 X
X_API_ANALYSIS_AM02_TAB CIHEX_AM02API_TAB_TYPE 0 X
X_API_ANALYSIS_AM03_TAB CIHEX_AM03API_TAB_TYPE 0 X
X_API_ANALYSIS_AM04_TAB CIHEX_AM04API_TAB_TYPE 0 X
X_API_ANALYSIS_AM05_TAB CIHEX_AM05API_TAB_TYPE 0 X
X_API_ANALYSIS_AM06_TAB CIHEX_AM06API_TAB_TYPE 0 X
X_API_ANALYSIS_AM07_TAB CIHEX_AM07API_TAB_TYPE 0 X
X_API_ANALYSIS_AM08_TAB CIHEX_AM08API_TAB_TYPE 0 X
X_API_ANALYSIS_AM09_TAB CIHEX_AM09API_TAB_TYPE 0 X
X_API_ANALYSIS_AM10_TAB CIHEX_AM10API_TAB_TYPE 0 X
X_API_ANALYSIS_ANML_TAB CIHEX_ANMLAPI_TAB_TYPE 0 X
X_API_ANALYSIS_ANNC_TAB CIHEX_ANNCAPI_TAB_TYPE 0 X
X_API_ANALYSIS_ANQS_TAB CIHEX_ANQSGENAPI_TAB_TYPE 0 X Analysis method questionnaire
X_API_ANALYSIS_ANSC_TAB CIHEX_ANSCAPI_TAB_TYPE 0 X Analysis method summated rating header
X_API_ANALYSIS_ANSE_TAB CIHEX_ANSEAPI_TAB_TYPE 0 X Analysis method summated rating detail
X_API_EXP_QUANTITY_TAB CIHEX_ERQTAPI_TAB_TYPE 0 X Exposure amounts
X_API_FREETEXT_TAB CIH01_DFTAPI_TAB_TYPE 0 X
X_API_HAS_VAL_TAB CIH01_IHVALAPI_TAB_TYPE 0 X Value assignment instances for exposure assignment header
X_API_HEADER_TAB CIHEX_ERHAPI_TAB_TYPE 0 X Exposure assignment entry header data

Exception Description
INTERNAL_ERROR Internal system error
NO_OBJECT_SPECIFIED No object specified for deleting
PARAMETER_ERROR Indicator set but corresponding data missing

Functionality

General
This function module is part of the Application Programming Interface(API) of the EH&Scomponent Industrial Hygiene and Safety.
It is used to delete a group ofrisk assessment records ora group of subobjects of risk assessments. Here, delete means that theDelete indicator (DELFLG field) for the objects is set. Theobjects are not deleted physically.
This module only sets the deletion indicator within the buffer data.Only when the function moduleCBIH_ER30_ER_SAVE_TO_DB iscalled and a COMMIT WORK is subsequently transmitteddoes the system definitively update the modifications in the database.
Objects that are stored in SAP-internal database tables (characteristicvalues and long texts, for example) cannot be deleted by this module.

Interface

Input
The calling program can use indicators to specify which subobjects of arisk assessment are to be deleted. These indicators are arrangedaccording to the following logical hierarchy:
NEW-PAGE
Indicator | Corresponding
| table parameter
-------------------------------------|---------------------------
I_FLG_HEADER | X_API_HEADER_TAB
| |
|--I_FLG_HAS_VAL | X_API_HAS_VAL_TAB
|--I_FLG_EXP_QUANTITY | X_API_EXP_QUANTITY_TAB
|--I_FLG_ACTION | X_API_ACTION_TAB
|--I_FLG_ANALYSIS | X_API_ANALYSIS_ANML_TAB
| X_API_ANALYSIS_ANNC_TAB
| X_API_ANALYSIS_ANQS_TAB
| X_API_ANALYSIS_ANSC_TAB
| X_API_ANALYSIS_ANSE_TAB
| X_API_ANALYSIS_AM01_TAB
| X_API_ANALYSIS_AM02_TAB
| X_API_ANALYSIS_AM03_TAB
| X_API_ANALYSIS_AM04_TAB
| X_API_ANALYSIS_AM05_TAB
| X_API_ANALYSIS_AM06_TAB
| X_API_ANALYSIS_AM07_TAB
| X_API_ANALYSIS_AM08_TAB
| X_API_ANALYSIS_AM09_TAB
| X_API_ANALYSIS_AM10_TAB
| X_API_ANALYSIS_AD08_TAB
| X_API_ANALYSIS_AD09_TAB
| X_API_ANALYSIS_AD10_TAB
--------------------------------------------------------------
The calling program first determines which subobjects are to be deletedby setting the corresponding indicator to TRUE ("TRUE" and"FALSE" are defined as constants in the Include CBUI09). Thenthe calling program determines the corresponding table parameters withthe subobjects to be deleted. To do this, the table parameters must befilled as follows:

  • The RECN field must be filled in each row.

  • Below the risk assessment header level, the RECNROOT field must
  • be filled in each row.
    • Below the risk assessment header level, the foreign key fields for the
    • higher-level subobjects must be filled, meaning, for example,X_API_HAS_VAL_TAB-RECNTOBJ and X_API_HAS_VAL_TAB-REFOBJmust be filled.
      The function module independently determines the dependent subobjectsfor each subobject to be deleted and also deletes them. Furthermore,all locks required are set.
      It is not advisable to fill a table and a lower-level table (inaccordance with the above hierarchy) at the same time, since thefunction module deletes the contents of the lower-level table andrefills it with the subobjects that depend on the contents of thehigher-level table.

      Output
      Boolean parameters indicate whether errors occurred when the subobjectswere being processed. The following errors can occur:

      • Lock error: E_FLG_LOCKFAIL = TRUE

      • Processing error: E_FLG_ERROR = TRUE

      • Processing warning: E_FLG_WARNING = TRUE
      • Flow Logic
        Input data is checked.
        Locks are transmitted and input data is completed in such a way thatcomplete subobjects of risk assessments are always deleted. (The datais read using CBIH_ER30_ER_READ.)
        Delete indicators are set using the BUF_WRITE functions of the bufferlayer (withCBIH_ER40_ERH_BUF_WRITE, forexample).

        Possible Exceptions

        • NO_OBJECT_SPECIFIED: No objects were specified for deleting

        • PARAMETER_ERROR: Table for specified object missing

        • INTERNAL_ERROR: Internal processing error
        • Further information

          • Type group ESPAP

          • Type group CIH01

          • Type group CIHEX

          • Type group CIHER

          • Type group CIHWA