Fonction SAP CBIH_MP30_MP_FIND_BY_HEAD - EHS: Search for Measurement Projects via Header Data

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
I_AC_DATERANGE RCGDATERANGE u 16 X
I_CR_DATERANGE RCGDATERANGE u 16 X
I_DATERANGE RCGDATERANGE u 16 X Period for Historical Search
I_MPREC CIHMP_MPHAPI_WA_TYPE 0 Selection Criteria
I_PL_DATERANGE RCGDATERANGE u 16 X Planning Period
I_SEARCHMODE ESESEARCHMODE C 1 ESP1_SEARCHMODE-WEAK X Search Mode
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 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_RECNTMPV_TAB CIHMP_KEYTAB_TAB_TYPE 0 X Restriction via Preceding Project
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/System Error

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

  • I_VALDAT

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

    • A data record of the measurement project header with search parameters.The search parameters are linked with an AND logic operation.
      • 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 at measurement project header level. If entries exist in thistable, the search is restricted to those measurement projects that havean assigned work area listed in this table.
                • I_RECNTMPV_TAB

                • This table contains the internal measurement project keys for thepreceding projects. If entries exist in this table, the search isrestricted to those measurement projects that have one of the precedingprojects listed in this table.
                  • 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.