cancel
Showing results for 
Search instead for 
Did you mean: 

oData associations problems

SamSun
Product and Topic Expert
Product and Topic Expert
0 Kudos

I met a problem when created oData service

Comment.xsodata

service {

   "BCX_RESSOURCEPLANNING"."COMMENT" as "Comment"navigates ("Comment_Resources" as "Resources" from principal);

   "BCX_RESSOURCEPLANNING"."RESOURCES" as "Resources"  with ("USERID", "FIRSTNAME", "LASTNAME");

   association "Comment_Resources"

  principal "Comment"("CREATOR") multiplicity "1" dependent "Resources"("USERID") multiplicity "1";

}

url: https://server/comment.xsodata/Comment?$format=json

problem : the association info could not display in the same view.

       association info:

   

How to display them in the same view.Just like

{

    CMTID: "304215",

    CMT_TYPE: "T",

    TEXT: "Test for odata write",

    CREATED: "20140703150811",

    CREATOR: "I304185",

    Resources: {

      __deferred: {

        uri: "https://ls5005.wdf.sap.corp/ResourcePlanning/services/comment.xsodata/Comment(304215L)/Resources"

       },

       USERID: "I304185",

       LASTNAME: "Sun",

       FIRSTNAME: "Sam"

     }

}

Thank you for your help.

View Entire Topic
sreehari_vpillai
Active Contributor
0 Kudos

Hi Sam,

Try the below.

https://server/comment.xsodata/Comment?$expand=Resources&$format=json


and let me know if it worked

Regards

Sreehari

SamSun
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Sreehari,

It works.Thank you so much

Cheers,

Sam

sreehari_vpillai
Active Contributor
0 Kudos