on ‎2024 Aug 02 1:35 PM
Hi Experts!
I'm trying to build a RAP scenario to create a Sales Order.
I'm using two custom entities (Header and Positions) with a handler class to retrieve the data, since we need to do a lot of custom logic besides from the data fetch.
Apart from that, I created a behavior that enhances the custom entities with an unmanaged implementation to handle the POST and create the sales order. This is working fine but the problem is that I'm not being able to modify the response to update some fields that are calculated when using I_SALESORDERTP.
I need my app to work similar to API_SALESORDER_SRV or API_SALESORDERSIMULATION_SRV where you can do a POST call and then you receive different data in the response BODY that the one you sent in the request BODY.
Is this possible? Or I may need to go with a different approach like a custom HTTP service?
Thanks and regards!
Nic.
Request clarification before answering.
One idea I got when dealing with this situation is to use READ ENTITIES and pass the %pid of the SalesOrder (it is possible as alternative to the actual key).
However, this does not return the buffered entity data,, even if the %pid is correct (only one PID is valid for I_SalesOrderTp, whicch only allows a sales order at a time: 00...00).
I'd say that this is the actual gap. If you could the buffered data of yet un-numbered object based on its temporary ID, the problem would be gone. Sure, RAP introduces an additional complexity layer here.
===
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 11 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.