Skip to Content
0

Service Layer API retrieving ProductionOrders incremental Data

Dec 15, 2017 at 07:35 PM

47

avatar image
Former Member

In short:
Is there a way in the Service Layer API to filter entities on the last modified date time?


Situation:
At the moment we are building an integration between our own application and SAP.

To do this we are using the Service Layer API.
For an initial / full run of the Production Orders we can use the oData filter statements.

/b1s/v1/ProductionOrders?$filter=ProductionOrderStatus%20eq%20%27boposPlanned%27%20or%20ProductionOrderStatus%20eq%20%27boposReleased%27

No problem there.

However next to the full run we would also like to execute an incremental run. So we can retrieve only the small set of only the changed orders. We where expecting a system modified date time field in the entities. And using the oData filter statement on that field.

Problem is that if I get a list of Production Orders I do not see any date time field with the last time a production order has been changed. So it looks like I can not use the Odata filter option for this.

In the reference documentation there is a mention of ChangeLogsService, however it seems like that service is intended to receive the changes of 1 specific object. Not to retrieve a list of items for a specific object changed after a certain date.

Is there a service or maybe a hidden field I can use in the Service API layer that I can use?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Ralph Oliveira
Dec 18, 2017 at 10:11 AM
0

The Production Order history is handled in the table AWOR. Which isn't exposed by the DI API and therefore, not available in the Service Layer.

You could have this data via REST creating a Graphic Calculation View and exposing it using XSOdata. You can use the same odata annotations ($filter, $select and etc) on top of it.

We have plans to make Calculation Views accessible directly via service layer, which won't require the xsodata file, but for now, this is the way I see it.

Share
10 |10000 characters needed characters left characters exceeded