cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to get response when passing filter from SAP UI5 to Gateway Service

former_member461047
Participant
0 Kudos

Hello Experts,

I am passing multiple filters from frontend thereby following all the protocols related to UI5 Routing:

1. Attachment_1 - Filter String looks something like this

2. Attachment_2 - Backend Service gets triggered

3. Attachment_3 - Read throws success message

I am not able to see the entries on the output table. Have I missed anything ? Can anyone please guide me?

Should I mention anything here:

-

Thanks and Best Regards,

Naresh

Accepted Solutions (0)

Answers (1)

Answers (1)

maheshpalavalli
Active Contributor
0 Kudos

I don't see the code for reading the response data and setting it to a JSON model. And this model should be bound to the ui5 table. Then the data will flow.

U can check the below link: answer is opd and don't follow the latest ui5 standards, but the idea is u need to read the response and set it to a model.

https://stackoverflow.com/questions/36278900/converting-odatamodel-into-json-model

U can also bind the odata model directly to the table and apply filter on it.

https://sapui5.hana.ondemand.com/sdk/#/topic/5295470d7eee46c1898ee46c1b9ad763

former_member461047
Participant
0 Kudos

Hey Mahesh,

thanks for replying, I went thru the links and I understood that first I should convert my ODATA Model to JSON and then pass the response from the read statement to the setData method.

changes-code.txt

I tried running this but it didn't work. I am sure I am missing something basic here. 😞 Can you please help me out?

maheshpalavalli
Active Contributor
0 Kudos

chandan.naresh,

first, don't use odata, it is not supported by SAP anymore, use odata.v2 version

next check the data in that is coming in response (oData). then according to the path you need to update the binding in the m.table.

I understand you are new to this, I can only help this much with the very small information you have provided. I suggest you to learn ui5 a bit , especially the binding part, this will definitely help you to solve this issue.

Else share your working example using "Plunker". so it is easy for us community folks to solve your issue.

former_member461047
Participant
0 Kudos

Hallo Mahesh,

yes you are correct.

I am getting null value in response (oData) and I also read about Binding and updated the code. I am not able to understand as to why debugger in S4 HANA is getting triggered but response oData is null. Have I missed to add anything? (ret_Array in Attachment 1)

Yes I am new to this Mahesh, in training they showed us couple of examples on parameter binding but in real scenarios I think Filter Binding + GetEntitySet is the way forward.

maheshpalavalli
Active Contributor
0 Kudos

chandan.naresh, check the odata uri in the network and check with the backend team and see if the issue is from their set.