Fonction SAP CBIH_MP30_MP_DELETE - EHS: Delete Measurement Projects

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
I_ADDINF RCGADDINF u 27 Additional Information on Object
I_FLG_CHECK_ONLY ESP1_BOOLEAN 0 ESP1_FALSE X Indicator: Check data only
I_FLG_FILL_EXTERROR ESP1_BOOLEAN 0 ESP1_FALSE X Indicator: Fill extended error information table
I_FLG_KEY_DATE_SWITCH_ONLY ESP1_BOOLEAN 0 ESP1_FALSE X Indicator: Change key date and change number only
I_FLG_MJ_HEADER ESP1_BOOLEAN 0 ESP1_FALSE X
I_FLG_MJ_HEADER_VAL ESP1_BOOLEAN 0 ESP1_FALSE X
I_FLG_MJ_JOIN_WA ESP1_BOOLEAN 0 ESP1_FALSE X
I_FLG_MJ_REFERENCE ESP1_BOOLEAN 0 ESP1_FALSE X
I_FLG_MJ_VALUES ESP1_BOOLEAN 0 ESP1_FALSE X
I_FLG_MP_EQUIPMENT ESP1_BOOLEAN 0 ESP1_FALSE X
I_FLG_MP_HEADER ESP1_BOOLEAN 0 ESP1_FALSE X
I_FLG_MP_HEADER_VAL ESP1_BOOLEAN 0 ESP1_FALSE X
I_FLG_MP_PLAN ESP1_BOOLEAN 0 ESP1_FALSE X
I_FLG_MP_PLMET ESP1_BOOLEAN 0 ESP1_FALSE X
I_FLG_MP_WA ESP1_BOOLEAN 0 ESP1_FALSE X
I_VALFR RCGADDINF-VALDAT D 8 X Lower Time Interval Limit
I_VALTO RCGADDINF-VALDAT D 8 X Upper Time Interval Limit

Paramètre Reférence Type Long. Description
E_FLG_ERROR ESP1_BOOLEAN 0 Error reading a record indicator
E_FLG_LOCKFAIL ESP1_BOOLEAN 0
E_FLG_WARNING ESP1_BOOLEAN 0 Warning reading a record indicator

Paramètre Reférence Long. Facultatif Description
X_API_MJ_HEADER_TAB CIHMJ_MJAPI_TAB_TYPE 0 X
X_API_MJ_HEADER_VAL_TAB CIH01_IHVALAPI_TAB_TYPE 0 X
X_API_MJ_JOIN_WA_TAB CIHMW_MJWAAPI_TAB_TYPE 0 X
X_API_MJ_REFERENCE_TAB CIHMR_RFMJAPI_TAB_TYPE 0 X
X_API_MJ_VALUES_TAB CIHMV_MJVAAPI_TAB_TYPE 0 X
X_API_MP_EQUIPMENT_TAB CIHPD_MPDVAPI_TAB_TYPE 0 X
X_API_MP_HEADER_TAB CIHMP_MPHAPI_TAB_TYPE 0
X_API_MP_HEADER_VAL_TAB CIH01_IHVALAPI_TAB_TYPE 0 X
X_API_MP_PLAN_TAB CIHPL_MPPLAPI_TAB_TYPE 0 X
X_API_MP_PLMET_TAB CIHMT_MPMTAPI_TAB_TYPE 0 X
X_API_MP_WA_TAB CIHPW_MPWAAPI_TAB_TYPE 0 X

Exception Description
CONVMODE_SET_FAILED Language Support Error
INTERNAL_ERROR Internal error or Customizing error
INTERVAL_ACCESS_ERROR Access to time intervals failed
NO_OBJECT_SPECIFIED No objects were specified in the header table
PARAMETER_ERROR Indicator set but relevant table missing

Functionality
This function module is part of theApplication ProgrammingInterface (API) of the Environment, Health and Safety(EH&S) component.
It is used to delete a group of measurement projects or a group ofsubobjects of measurement projects. Here, "delete" means that theDelete indicator (DELFLG field) for the objects is set.The objects are not deleted physically.
This module only sets the deletion indicator within the buffer data.Only when the function moduleCBIH_MP30_MP_SAVE_TO_DB is called anda COMMIT WORK is subsequently transmitted doesthe 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 Boolean parameters to specify whichsubobjects of which specifications are to be deleted. These parametersare arranged according to the following logical hierarchy:
Boolean parameters | Corresponding
| table parameters
--------------------------------------|--------------------------
|
I_FLG_MP_HEADER | X_API_MP_HEADER_TAB
| |
|--I_FLG_MP_HEADER_VAL | X_API_MP_HEADER_VAL_TAB
| |
|-- I_FLG_MP_EQUIPMENT | X_API_MP_EQUIPMENT_TAB
|-- I_FLG_MP_WA | X_API_MP_WA_TAB
| |
|-- I_FLG_MP_PLMET | X_API_MP_PLMET_TAB
|-- I_FLG_MP_PLAN | X_API_MP_PLAN_TAB
|-- I_FLG_MJ_HEADER | X_API_MJ_HEADER_TAB
| |
|-- I_FLG_MJ_REFERENCE | X_API_MJ_REFERENCE_TAB
|-- I_FLG_MJ_VALUES | X_API_MJ_VALUES_TAB
|-- I_FLG_MJ_JOIN_WA | X_API_MJ_JOIN_WA_TAB
The calling program first determines which subobjects are to be deletedby setting the corresponding Boolean parameters 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 measurement project header level, the RECNROOT field
  • must be filled in each row.
    • Below the measurement project header level, the foreign key fields
    • for the higher-level subobjects must be filled (for example,X_API_MP_PLAN_TAB-RECNTMPWA must 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.
      INCLUDE EHS_FMODULE_API_INTERVAL_ACC OBJECT DOKU ID TX

      Flow Logic
      Input data is checked.
      Locks are transmitted and input data is completed in such a way thatcomplete subobjects of measurement projects are always deleted. (Thedata is read using CBIH_MP30_MP_READ.)
      Delete indicators are set using the BUF_WRITE functions of the bufferlayer.