Skip to Content

I need a BAPI to read Measurement documents given a Measurement Point.

I need a BAPI that will return the latest measurement document for a given Measurement point.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Feb 01, 2018 at 01:31 PM

    Hi,

    SAPMEINT uses MEASUREM_DOCUM_RFC_SINGLE_001 BAPI. Please consult SAP Note 2226006.

    Regards,

    Sergiy

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 06, 2018 at 07:32 AM

    Hello Neil,

    Following are some FM, may be useful for u

    MSAM_MEAS_POINT_GETDETAIL
    MSAM_MEAS_POINT_GETLIST
    MSAM_ML_MEAS_POINT_GETDETAIL
    MSAM_MO_ML_MEAS_HISTORY
    MSAM_MO_ML_MEAS_POINT_HEADER

    Regards

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 01, 2018 at 01:50 PM

    See RFC "MEASUREM_DOCUM_RFC_SINGLE_002" as a means to Read / Create / Update ... Check the RFC Documentation.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 01, 2018 at 11:32 PM

    I see value in the Answer by Yogini Thorat, as "MSAM_MEAS_POINT_GETDETAIL" would serve your Purpose. You could expose this as a Custom RFC by adding a Wrapper around it ("ZMSAM_MEAS_POINT_GETDETAIL" as RFC, calling "MSAM_MEAS_POINT_GETDETAIL") ...?

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Nic,

      That sound good, but I have no access to create custom RFCs.

      Is there not a standard RFC to read all measurement documents for a Measurement Point???

      Regards,

      Neil Morgan

  • Mar 01, 2018 at 01:33 PM

    You may be able to use RFC ALM_MEREP_041_GETDETAIL

    Regards,
    Christian

    Add comment
    10|10000 characters needed characters exceeded

    • I was able to get a response with details from MII. Also with the FM MSAM10_MEAS_POINT_GETDETAIL mentioned below. FYI when calling from MII I had to pad the Measuring point with leading zeros. If you are doing this and still having an issue be sure to do an authorization trace for the RFC connection user.

      Regards,
      Christian

  • Mar 02, 2018 at 02:59 PM

    Hello Neil

    Another round ...

    See if RFC "MSAM10_MEAS_POINT_GETDETAIL" Provides you with (all) the Data. It is RFC-Enabled, but I can only Get 1 MeasDoc when Using a MeasurePoint (and I see an ErrMsg "ALM_ME 024") ... How does this work out for you?

    It needs some Form of Customizing, by which the Default number of Documents / Historic data is fetched. Upon debugging I set that to a High Number instead of '1' thus receiving a wide range of MeasurementDocuments ...

    Hope this helps

    Nic T.

    Add comment
    10|10000 characters needed characters exceeded

    • Strange, I could make it work. However, this RFC is aimed at returing Data regarding Equipment and FunctionalLocation, so what are those Meas.Points attached to in your case?

      In this RFC, an internal FM "MSAM_MO_CMASTER_DATA_GETDETAIL" is called that determines is described 'Get Customization Settings maintained for various Master Data', and it would return Settings stored from Tables "MSAM_CEQUIPPRF" / "MSAM_CFUNLOCPRF" / "MSAM_CMASTRDAT".

      Now, for me too this Customizing returns no results, but the Below Code in the RFC allows for 1 (latest) Document-record to be requested :

      *---------------------------------------------------------*
      * Get the business data fetch the no of measurement documents
      * as per maintianed in Customizing,if not fetch the
      * last measurement history
      *---------------------------------------------------------*
          IF ls_master_settings-meas_no_docs IS INITIAL.
            lv_no_of_docs = 1.
          ELSE.
            lv_no_of_docs = ls_master_settings-meas_no_docs.
          ENDIF.<br>


      That way, it results in 1 record of "MEASUREMENT_HISTORY" which is Described as 'MSAM Measurement document structure'. So by Default I only get the Last record, by setting some kind of MasterData(?) (or by Altering the NoOfDocs via Debugging to '50'), I get some Result.


      This has proven to be a lot more Difficult that I imagined, so I would revert to SAP Support if this RFC is not applicable to your case.


      Nic T.