Skip to Content
avatar image
Former Member

Passing the Key in $expand Option

Hii,

Here is my ODATA Service link.

http://XXX:XXsap/opu/odata/sap/ZABC_ORDARRY_SRV/ORDDETSet(Userid='XYZ',Type='36')?$expand=ORDpartSet.

The  Scenario:

By Passing the Work Order type as '36'. I will get the  Order details ( ZORDDATA Custom Table ) and Order Part Details ( ZORDPART table)

For a Single Order . there will be multiple parts. So I use the $Expand to get the  Order part details  ( Work type  will be the Key)

Now If  I the User does not pass the Work type (or value as '' or blank) , I wont get any Part details though I will get other order details from  ZORDDATA table.

Now the Requirement  : I need to Fetch the  Order type from ZORDDATA  and Pass it  to ZORDPART and get part details without directly passing the  Work type field in the ODATA Service,

ie,

http://XXX:XXsap/opu/odata/sap/ZABC_ORDARRY_SRV/ORDDETSet(Userid='XYZ',Type=' ')?$expand=ORDpartSet.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Feb 09, 2015 at 11:27 PM

    Hi Shreedhar,

    Can you provide details about your Entity Properties and the association between the entities.

    Also i feel your scenario is more around the passing data and not technical issue, am I right or missing something?

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 10, 2015 at 03:25 AM

    Hi Shreedhar,

    Can you provide details on how did you resolve this issue which will be helpful to other facing the same issue.

    Regards,

    Kedar

    Add comment
    10|10000 characters needed characters exceeded