Fonction SAP CBIH_MP30_MJ_FIND_BY_HEAD - EHS: Search for Measurements via Header Data

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
I_DATERANGE RCGDATERANGE u 16 X Period for Historical Search
I_FLG_ONLY_CLOSED ESP1_BOOLEAN 0 ESP1_FALSE X
I_MJREC CIHMJ_MJAPI_WA_TYPE 0 Selection Criteria
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 CIHMJ_KEYTAB_TAB_TYPE 0 Record Number of Measurement Jobs Found
I_MDATERANGE_TAB CIHMJ_MJAPI_TAB_SEL_TYPE 0 X
I_MPWA_KEYTAB CIHPW_KEYTAB_TAB_TYPE 0 X
I_MP_KEYTAB CIHMP_KEYTAB_TAB_TYPE 0 X Record Key for Measurement Project
I_RESTRICTION_TAB CIHMJ_KEYTAB_TAB_TYPE 0 X

Exception Description
INTERNAL_ERROR Internal Program/System Error

Functionality
This function module is used to determine measurement job recordnumbers. This is done by running a search based on the parametersentered by the user for the measurement job.
The function module has the following parameters:

  • I_VALDAT

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

    • A data record for the measurement job header. Several search parametersare linked with AND.
      • 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 job record numbers.If no record numbers are passed, the search is run on all records of themeasurement job header.
              • I_MPWA_KEYTAB

              • This table contains the internal keys for the assigned work areas. Ifentries exist in this table, the search is restricted to thosemeasurement jobs that have one of the assigned work areas listed in thistable.
                • I_MP_KEYTAB

                • This table contains the internal measurement project keys. If entriesexist in this table, the search is restricted to those measurement jobsthat have one of the measurement projects listed in this table.
                  • E_KEY_TAB

                  • All measurement job 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.