Fonction SAP CBIH_ER30_ER_FIND_BY_HEAD - EHS: Find Risk Assessment Entries Using Header Data

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
I_DATERANGE RCGDATERANGE u 16 X Time period for historical search
I_ERHREC CIHEX_ERHAPI_WA_TYPE 0 Search criteria for header data of exposure log entry
I_SEARCHMODE CCIHS_ERSEL-SEARCHMODEMAIN C 1 ESP1_SEARCHMODE-WEAK X Search mode for historical search
I_VALDAT RCGUADM-VALTO D 8 SY-DATUM X Key date for validity

Paramètre Reférence Type Long. Description
E_RECORDS_FOUND SYST-TABIX I 4 Number of exposure log entries found

Paramètre Reférence Long. Facultatif Description
E_KEY_TAB CIHEX_ERFAPI_KEY_TAB_TYPE 0 Record numbers of exposure log entries found
I_ERSTATUS_TAB CIHEX_EXPREG_STATUS_TAB_TYPE 0 List of statuses for searching for log entries
I_RESTRICTION_TAB CIHEX_ERFAPI_KEY_TAB_TYPE 0 X Restriction using record key
I_WKA_TAB CIHWA_WAFAPI_KEY_TAB_TYPE 0 X List of work area keys for search

Exception Description
INTERNAL_ERROR Internal program error

Functionality
This function module is used to determine risk assessment recordnumbers. To do this, a search is run using the parameters entered by theuser for the risk assessment header.
The function module has the following parameters:

  • I_ERHREC (CIHEX_ERHAPI_WA_TYPE)

  • A data record of the risk assessment header with search parameters. Moresearch parameters are linked with an AND logic operation.
    • I_SEARCHMODE (CCIHS_WASEL-SEARCHMODE)

    • Search mode for the historical search, default value is 'w' = weak.
      • I_VALDAT (RCGUADM-VALTO)

      • Only data valid on this date is read.
        • I_DATERANGE (RCGDATERANGE)

        • If I_DATERANGE is filled, the historical search is run. I_DATERANGEcontains the time period for the historical search. When searching withI_DATERANGE, only the search mode 'w' = weak is permitted.
          • E_RECORDS_FOUND (SY-TABIX)

          • Returns the number of risk assessment keys found.
            • I_RESTRICTION_TAB (CIHEX_ERFAPI_KEY_TAB_TYPE)

            • Restriction to the search by predefined risk assessment record numbers.If no risk assessment record numbers are passed, the search is run onall records of the risk assessment header.
              • I_ERSTATUS_TAB (CIHEX_EXPREG_STATUS_TAB_TYPE)

              • This table contains the status of risk assessments. If entries areincluded in this table, the search is restricted to those riskassessments that have a status listed in this table.
                • I_WKA_TAB (CIHWA_WAFAPI_KEY_TAB_TYPE)

                • Restriction to the search by predefined work area record numbers. If nowork area record numbers are passed, the search is run on all records ofthe risk assessment header.
                  • E_KEY_TAB (CIHEX_ERFAPI_KEY_TAB_TYPE)

                  • All risk assessment record numbers found are entered in this resulttable.

                    Notes
                    The search for a discrete "valid from" or "valid to" date within theheader record I_ERHREC is not supported. These values are used forselection in conjunction with the parameters I_VALDAT and I_DATERANGE.
                    The function module does not support a search via the change number.Before you call the function, the valid from date of the changenumber must be set in the parameter I_VALDAT.

                    Further information

                    • Type group CIH01

                    • Type group CIHEX

                    • Type group CIHER

562708Performance optimization in search and read modules