Skip to Content

Calling Multiple DropDowns from Single EntitySet

Dear All

I have a function modules "ZGET_CUSTOMER" which returns Customer Details, Custom Bank Data and Customer Ship to Party in three different tables while taking customer as input.

I have three drop down boxes on my view having customer detail, banks and shiptoparty.

I want to call above mentioned function module only once in my entityset and want to return data for all three drop downs instead of calling Entityset and same function module three times.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Jan 12 at 06:46 AM

    Hi Adnan

    Did you develop the gateway service for this.. which you will use in you UI5 application ??

    Cheers

    Viplove

    Add comment
    10|10000 characters needed characters exceeded

    • Thanks VIPLOVE

      Very close to my requirement but how to call these expand from UI5 when clicking dropdown box.

      Any example for calling Expand on SAP UI screen, as usually we call entityset e.g. /SOHEADSet

  • Jan 12 at 07:29 AM

    Firstly create one oData service with three entities for the dropdowns.

    Handling the call to function modules is decided in the entity class linked to oData. Now, for the custom function module pass the customer ID and handle the calls to relevant tables and populate at one go.

    Then, populate the entities.

    If any doubt, check on oData forums on calling function module in the most optimal way.

    Regards,

    Sharath

    Add comment
    10|10000 characters needed characters exceeded

    • Not an OData guy. However, since its your custom function module and oData, you must be able to get the data you want without calling it multiple times.

      Change the primary tag of your question to OData.

      Regards,

      Sharath

  • Jan 14 at 10:03 AM

    Hi,

    do it like P P descriped it.
    Create 3 entities and connect CustomerBank and ShipToParty via assosiation with CustomerData. Call the service via $expand to read all three entities in one call.

    https://stackoverflow.com/questions/43255561/sap-ui-model-odata-odatamodel-passing-expand-parameters-in-read

    oModel1.read("/CustomerData", {
        urlParameters: {
            "$expand": "CustomerBank,ShipToParty"
        }
    });
    

    Regards

    Simon

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Adnan,

      if your view is bound to an entry of your root entity, you can bind the dropdown to the navigation property. F. e. if your view is bound to an entry of the root entity CustomerData you can bind your dropdown(s) to CustomerBank or ShipToParty.

      Do you fill the ET_EXPANDED_TEC_CLAUSES (not shure if this is exactly the correct name of the exporting table)? If yes, you can debug a little bit whats happening after the call of GET_EXPANDED_ENTITYSET. Here gateway checks if all requestet expands are listet in this exporting table...

      Regards
      Simon

  • Jan 14 at 07:30 AM

    In this requirement, create the associations and call it as single call from UI using $EXPAND.

    try explore more on $expand features...

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 12 at 06:42 AM

    Any tip

    Add comment
    10|10000 characters needed characters exceeded