Skip to Content
0
Jul 23, 2020 at 11:01 AM

SAP MDK - Is there a way to use rule in query while initializing offline OData

115 Views

Hi,

I need to fetch/request data only for set of records while initializing the OData(offline) service.

In the below code, I tried to define request with query option 'WorkOrderHeaderSet?$filter=OrderNumber eq 4000401 and OrderNumber eq 4000402'. The filter OrderNumber is a dynamic list. How can I achieve this. I couldn't see rule option for Query while initializing.

{
	"ActionResult": {
		"_Name": "result"
	},
	"ActivityIndicatorText": "$(L,loading)",
	"DefiningRequests": [
		{
			"Name": "WorkOrderHeaderSet",
			"Query": "WorkOrderHeaderSet?$filter=OrderNumber eq 4000401 and OrderNumber eq 4000402"
		}
	],
	"OnSuccess": "/SAPAssetManager/Actions/OData/InitializeSAM.action",
	"Service": "/SAPAssetManager/Services/SAM.service",
	"ShowActivityIndicator": true,
	"StoreEncryptionKey": "123456",
	"StoreName": "SAMStore",
	"_Type": "Action.Type.OfflineOData.Initialize"
}

Any input will be much appreciated...

Thanks