Skip to Content

How should I expose BAPI_ALM_NOTIF_CREATE using oData and the gateway service builder?

How should I expose BAPI_ALM_NOTIF_CREATE using oData and the gateway service builder?

If I import the RFC ( using RFC or BOR ) it creates a bunch of entities but then it expects keys for all of them.

Am I on the right track, do I just need to define key properties for these structures?

Is there an easy way to map the values passed in to make the call to the RFC?

Alternatively I could create my own RFC that calls BAPI_ALM_NOTIF_CREATE and just expose the parameters that I want to pass over, but that might be more work.

errors.png (8.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 12, 2017 at 12:31 PM

    I suggest to stick with OData instead of going back to RFC (despite you need to work between 2 SAP Systems, but in this case you can avoid the wrapper Z) .

    Am I on the right track, do I just need to define key properties for these structures?

    Definitively yes, you are on the right track.

    For my own choice i prefer to build my custom entity and mask the use of the BAPIs behind each single method, so i can choose better which field to expose/manage.

    This because exposing entities with tons of fields could be a problem for the developers on the other side who needs to invoke the service.

    Add comment
    10|10000 characters needed characters exceeded

    • Yes, exactly.

      To explain my point, i'll show you the service i just implemented in order to create/update/ delete a BOM.

      i created 2 entity: BOMHeader and BOMItem, the properties you see duplicated are the "keys" to link them (BOM items got also Item as key property)

      The operation availables are defined to with their own methods

      Which i redefined

      The "Create" methods are not redefined because via the Navigation Property i create both BOMHeader and BOMitem as deep entity (you can find tons of examples here on scn if you need them!).

      In this way, i expose just the minimal information the service-consumer needs to pass me instead of having a bunch of fields meaningless.

      1.png (10.1 kB)
      2.png (19.6 kB)
      3.png (6.5 kB)
  • Jan 17, 2017 at 05:42 AM

    Just a suggestion before you go the RFC way. Please go through the comments of the below blog.

    https://blogs.sap.com/2014/06/04/how-to-design-rfcs-for-odata-service-generation/

    Also this discussion.

    https://archive.sap.com/discussions/thread/3432368

    Add comment
    10|10000 characters needed characters exceeded