Fonction SAP CBIH_MP30_MP_FIND_BY_WAH - EHS: Search for Measurement Projects via Work Areas

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
I_DATERANGE RCGDATERANGE u 16 X
I_MPWAREC CIHPW_MPWAAPI_WA_TYPE 0 Search Criteria for Work Areas
I_SEARCHMODE ESESEARCHMODE C 1 ESP1_SEARCHMODE-WEAK X Search Mode
I_VALDAT RCGUADM-VALTO D 8 SY-DATUM X Key Date

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

Paramètre Reférence Long. Facultatif Description
E_KEY_TAB CIHMP_KEYTAB_TAB_TYPE 0 Record Number of Measurement Projects Found
I_RECNTWAH_TAB CIHWA_WAFAPI_KEY_TAB_TYPE 0 X Restriction via Work Area Assignment
I_RESTRICTION_TAB CIHMP_KEYTAB_TAB_TYPE 0 X Restriction via Record Numbers

Exception Description
INTERNAL_ERROR Internal Program Error

Functionality
This function module is used to determine measurement project recordnumbers by running a search based on the parameters entered by the userfor assigned work areas of the measurement project.
The function module has the following parameters:

  • I_VALDAT

  • Only data valid on this date is read.
    • I_MPWAREC

    • A data record of the assigned work area of the measurement project withsearch parameters. The search parameters are linked with an AND logicoperation.
      • I_SEARCHMODE

      • Search mode for the historical search, default value is 'w' = weak.
        • I_DATERANGE

        • 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

          • Returns the number of measurement project keys found.
            • I_RESTRICTION_TAB

            • Restriction to the search by predefined measurement project recordnumbers. If no measurement project record numbers are passed, the searchis run on all records of the measurement project header.
              • I_RECNTWAH_TAB

              • This table contains the internal work area keys for the assigned workareas. If entries exist in this table, the search is restricted to thosemeasurement projects that have an assigned work area listed in thistable.
                • E_KEY_TAB

                • All measurement project record numbers found are written to this resulttable.

                  Note
                  The search for a discrete "valid from" or "valid to" date within theheader record I_MPREC 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 change numbermust be set in the parameter I_VALDAT.