cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Assistance Required for Invoking 'CreateFixedAsset' Action of Odata v4 API from SAP CPI

0 Likes
708

Dear SAP Community,

I hope this message finds you well.

https://api.sap.com/api/sap-s4-CE_FIXEDASSET_0001-v1/overview

I am currently working on posting a Fixed Asset - Master Data using the OData v4 API mentioned above. My goal is to invoke the 'CreateFixedAsset' action from the OData v4 service through SAP Cloud Platform Integration (CPI). However, I am encountering difficulties in triggering this action within the SAP CPI iFlow. Specifically, I am unable to find the option to call the action within the iFlow configuration.

Could you please provide detailed guidance on how to invoke the 'CreateFixedAsset' action from SAP CPI? Additionally, I would appreciate your assistance in understanding how to call the SAP__self action operation within SAP CPI.

Any insights into the required steps, configurations, or prerequisites for successfully integrating these actions would be greatly appreciated.

alihassan_tahqeeq_0-1741709376827.png

 

alihassan_tahqeeq_1-1741709392032.png

Thank you for your support. I look forward to your guidance in resolving this issue.

Accepted Solutions (0)

Answers (1)

Answers (1)

Chris1973
Active Contributor
0 Likes

Hi @alihassan_tahqeeq36 

Thank you for sharing the details of your scenario and the screenshots. I understand you are trying to invoke the CreateFixedAsset action from the Fixed Asset Master Data OData v4 API using SAP Cloud Integration but you are facing challenges since the action does not show up in the CPI adapter dropdown.

Here is how you can approach it step by step:

  1. Here is why the action does not appear in CPI

The CPI OData adapter is mainly designed for standard CRUD operations (GET, POST to entity sets, PUT, PATCH).
Bound actions like CreateFixedAsset are not exposed in the dropdown. Instead, they must be called directly via their dedicated endpoint URL.

  1. The Correct Endpoint

The action is invoked with a POST request to a URL like this:

<S4HC_URL>/sap/opu/odata4/sap/api_fixedasset/srvd_a2x/sap/fixedasset/0001/FixedAssetSAP__self.CreateFixedAsset

  1. Below is how you can set this up in CPI
  1. In your iFlow, use an HTTP Receiver adapter instead of the OData adapter.
  2. Configure the adapter with:
    •  Method: POST
    • Address: the full action endpoint (see above)
    • Authentication: OAuth2 Client Credentials using the S/4HANA Cloud Communication Arrangement for scenario SAP_COM_0510 (Fixed Asset Integration).
    • Add the required HTTP headers such as Content-Type: application/json and Accept: application/json
  1. For the Payload, you will need to send the request body in JSON, matching the schema of the CreateFixedAsset action.
  2. About SAP__self, you noticed the SAP__self in the action definition, this simply means the action is bound to the entity itself. Technically, you just need to call the action URL directly as described above.
  3. I recommend testing the call first in Postman with the action endpoint, OAuth token, and payload. Once you confirm it works, replicate the same in your CPI iFlow.

I hope this gives you a clear path forward, Benjamin. Please let me know if you would like me to sketch a sample CPI iFlow design so you have a concrete template to start with.

I hope this provides the desired result. Happy to answer any further questions.

Best regards

Chris