Fonction SAP CBIH_FA30_FAL_DELETE - EHS: Delete Injury/Illness Log Data

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 Check data only indicator
I_FLG_FALVAL ESP1_BOOLEAN 0 ESP1_FALSE X Indicator: Delete value assignment instance for injury/illness log header
I_FLG_FILL_EXTERROR ESP1_BOOLEAN 0 ESP1_FALSE X Indicator: Fill extended error information table
I_FLG_HEADER ESP1_BOOLEAN 0 ESP1_FALSE X Indicator: Delete injury/illness log header
I_FLG_INJURIES ESP1_BOOLEAN 0 ESP1_FALSE X Indicator: Delete injuries of persons affected
I_FLG_INVPERS ESP1_BOOLEAN 0 ESP1_FALSE X Indicator: Delete persons involved
I_FLG_MEDACT ESP1_BOOLEAN 0 ESP1_FALSE X Indicator: Delete medical activities

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

Paramètre Reférence Long. Facultatif Description
X_API_FALVAL_TAB CIH01_IHVALAPI_TAB_TYPE 0 X Value assignment instances for injury/illness log header
X_API_HEADER_TAB CIHAL_FALHAPI_TAB_TYPE 0 Injury/illness log header data
X_API_INJURIES_TAB CIHAL_IPEVINJAPI_TAB_TYPE 0 X Injuries to persons affected
X_API_INVPERSONS_TAB CIHAL_IPAPI_TAB_TYPE 0 X Persons involved
X_API_MEDACT_TAB CIHAL_FALMAAPI_TAB_TYPE 0 X Medical activities

Exception Description
CONVMODE_SET_FAILED Language support error
INTERNAL_ERROR Internal error or Customizing error
NO_OBJECT_SPECIFIED No objects were specified in the header table
PARAMETER_ERROR Indicator set but relevant table 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 ofinjury/illness log entriesor a group of subobjects of injury/illness log entries. Here, deletemeans that the Delete indicator (DELFLG field) for the objectsis set. The objects are not deleted physically.
This module only sets the deletion indicator within the buffer data.Only when the function moduleCBIH_FA30_FAL_SAVE_TO_DB is calledand a 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 indicators to specify which subobjects ofan injury/illness log entry are to be deleted. These indicators arearranged according to the following logical hierarchy:
Indicator | Corresponding
| table parameter
-------------------------------------|---------------------------
|
I_FLG_HEADER | X_API_HEADER_TAB
| |
|--I_FLG_FALVAL | X_API_FALVAL_TAB
|--I_FLG_MEDACT | X_API_MEDACT_TAB
|--I_FLG_INVPERS | X_API_INVPERSONS_TAB
|--I_FLG_INJURIES | X_API_INJURIES_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 injury/illness log header level, the RECNROOT fieldmust be filled in each row.
Below the injury/illness log header level, the foreign key fields forthe higher-level subobjects must be filled (for example,X_API_FALVAL_TAB-RECNTOBJ and X_API_IH_INVPERSONS-REFOBJ must befilled).
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

Preconditions
-

Flow
Input data is checked.
Locks are transmitted and input data is completed in such a way thatcomplete subobjects of injury/illness log entries are always deleted.(The data is read usingCBIH_FA30_FAL_READ.)
Delete indicators are set using the BUF_WRITE functions of the bufferlayer (with CBIH_FA40_FAL_BUF_WRITE,for example).

Postconditions
-

Possible Exceptions
NO_OBJECT_SPECIFIED - No objects were specified for deleting
PARAMETER_ERROR - Table for specified object missing
INTERNAL_ERROR - Internal processing error
CONVMODE_SET_FAILED - Character conversion error