Skip to Content

Odata issue in internal table passing to different screen

Hello SAP Gurus,

I was facing in a issue. Check the below example -

Request uri - sap/odata/sap/yodata_test_srv/salesorders(vblen = '001')

Get entity method, I have store an internal table in instance variable t1(table type).

But when I heat a new uri. Uri- sap/odata/sap/yodata_test_srv?$filter=(vbeln ge '001' and vbeln le '002') It calls get entity set method , where I want to access internal table t1.

It's not working

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 13 at 06:31 PM

    1. URL - sap/odata/sap/yodata_test_srv/salesorders(vblen = '001')

    -> Here you are passing key (VBELN='001') and hence you are requesting a single record - Hence GET_ENTITY method is invoked.

    2. URL - sap/odata/sap/yodata_test_srv?$filter=(vbeln ge '001' and vbeln le '002')

    -> Here you are explicity specifying a filter which means you want to refine the data retrieved based on condition. - There is a possibility of multiple records which can be returned. - Hence GET_ENTITYSET is invoked.

    3. All OData calls are based on REST protocol and are stateless. This means every call is independent and data stored either in instance or in static attributes in one call cannot be utilized in another call.

    Please read upon the fundamental priniciples and literature on this.

    Add comment
    10|10000 characters needed characters exceeded

    • I assume in that case your requirement would be once all the screens are populated(barring the optional ones - as there may be some optional ones as well) then on the submit click of the last screen you would like to create the business object with all its dependent data like internal tables from other screens. In such sceanrio you can try looking into wizard https://experience.sap.com/fiori-design-web/wizard/. Also if you cannot model your UI using this pattern then you need to locally store all the internal table data in UI5 models and pass the same to backend in single payload on the business object for which deep create will be implemented.