cancel
Showing results for 
Search instead for 
Did you mean: 

ODATA Service in SAP EM to be configured to send data via API

smriti1988
Explorer
0 Kudos

Hi EM Experts

We have a requirement where an external portal is looking for information from SAP EM system. This portal already is connected to other SAP systems via API connection so a design was proposed to use SAP EM Odata config to send FU Event Handler data via API to this portal.

As per the standard config, I have done the setting in the tab EM Odata Service by creating new User Profile, Display and Search Profiles. Then activated the service EM_SRV also. But now what next? I need help to understand how the API will send the search parameter value and then how the display parameter values would be sent back.

Please help.

Accepted Solutions (0)

Answers (4)

Answers (4)

butschbacher
Explorer
0 Kudos

Hi,

depends on the calling application. If this cannot handle Odata requests out of the box i think you are right.

In this case it is maybe better either to use the EM Enterprise Services

https://help.sap.com/viewer/f41336d24c554de8912c6756c44dff2f/7.0.4/en-US/fa437a92630a11da36bb000f20d...

SAP Note 1124226

or create a wrapper function module for the EM BAPI you need and expose it as simple Webservice(especially if you have only a few search criteria).

Best regards,

Steffen

smriti1988
Explorer
0 Kudos

Hi Steffan

The deeper I dig into this service, I get a feeling that it is only designed to build a fiori app and cannot be used to call from API system where we send a selection parameter and get the display parameters back.

Please help clarify this doubt.

butschbacher
Explorer
0 Kudos

Hi,

based on your defined criteria in the EM customizing you should then be able to create a filter query for the Entity Sets you see in the metadata.

e.g. if you have an EntitySet "MyEHDetailsS" you can define a query with filter for an eh_guid with

/sap/opu/odata/SAPTRX/EM_SRV/MyEHDetails?$filter=EventHandlerUUID eq 'enter your guid here'

For testing you can use the Gateway Client transaction /IWFND/GW_CLIENT and play around with some filters.

An Guide you can find here:

https://blogs.sap.com/2013/10/14/for-beginners-how-to-use-gateway-client/

Best regards,
Steffen

smriti1988
Explorer
0 Kudos

Hi Steffan

How did you know that the available filter is EventHandlerUUID , where can I see this detail ? Because in the SPRO config for ODATA, I don't see any place where this filter is maintained even for the standard ODATA for ODT40_TO object. Kindly help me understand this filter concept.

butschbacher
Explorer
0 Kudos

Hi Smriti,

you can see all filters in the metadata.

For the 'Details' the guid is always added as filter criteria. In the Fiori app you have the pattern to show a list and then navigate with the guid to one specific EH.

Regards,

Steffen

butschbacher
Explorer
0 Kudos

Hi Smriti,

in the transaction where you activate the Odata Service you should be able to open the metadata of your configured service where you find information about the API.

Regards,

Steffen

smriti1988
Explorer
0 Kudos

Yes Steffen I can see the Metadata but I still can't find how to give input parameter to this to extract the resultant data from SAP EM