Fonction SAP CBIH_WA30_WA_FIND_BY_HEAD - EHS: Find Work Areas Using the Work Area Header

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
I_DATERANGE RCGDATERANGE u 16 X Time period for historical search
I_SEARCHMODE CCIHS_WASEL-SEARCHMODE C 1 ESP1_SEARCHMODE-WEAK X Search mode for historical search
I_VALDAT RCGUADM-VALTO D 8 SY-DATUM X Key date for validity
I_WAHREC CIHWA_WAHAPI_WA_TYPE 0 Search criteria for the work area header

Paramètre Reférence Type Long. Description
E_RECORDS_FOUND SYST-TABIX I 4 Number of work areas found

Paramètre Reférence Long. Facultatif Description
E_KEY_TAB CIHWA_WAFAPI_KEY_TAB_TYPE 0 Record numbers of work areas found
I_RESTRICTION_TAB CIHWA_WAFAPI_KEY_TAB_TYPE 0 X Restriction using record key
I_SUPORD_WKA_TAB CIHWA_WAFAPI_KEY_TAB_TYPE 0 X Restriction using higher-level work areas
I_WAID_RANGE_TAB CCIHY_WAID_RANGE 43 X
I_WAPLANT_RANGE_TAB CCIHY_WAPLANT_RANGE 11 X
I_WATYPE_RANGE_TAB CCIHY_WATYPE_RANGE 7 X

Exception Description
INTERNAL_ERROR Internal program error

Functionality
This function module is used to determine work area record numbers. Todo this, a search is run using the parameters entered by the user forthe work area header.
The function module has the following parameters:

  • I_WAHREC (CIHWA_WAHAPI_WA_TYPE)

  • A data record of the work area 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_DATERANGE contains the time period for the historical search.When searching with I_DATERANGE, only the search mode 'w' = weakis permitted.
          • E_RECORDS_FOUND (SY-TABIX)

          • Returns the number of work area keys found.
            • I_RESTRICTION_TAB (RCGSTDRECN)

            • Restriction to the search by predefined work area record numbers. If nowork area record numbers are passed, the search is run on all recordsof the work area header.
              • I_SUPORD_WKA_TAB (CIHWA_WAFAPI_KEY_TAB_TYPE)

              • This table contains the internal work area keys for higher-level workareas. If entries are included in this table, the search is restrictedto those work areas that have a higher-level work area listed in thistable.
                • E_KEY_TAB (CIHWA_WAFAPI_KEY_TAB_TYPE)

                • All work area record numbers found are entered in this result table.

                  Notes
                  The search for a discrete "valid from" or "valid to" date within theheader record I_WAHREC is not supported. These values are usedfor selection in conjunction with the parameters I_VALDAT andI_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 CIHWA

                  • Type group CIH01

                  • Type group CIHAC

562708Performance optimization in search and read modules