on 03-17-2015 6:41 AM
I am using Odata service with SAP Netweaver Gatway Serivce builder.
I want to send data item data nested under Header.
I am Getting two different internal table for Header data and Item data by calling RFC method.
Now there is a multiple header and there relevant Item data
I need to send all data as a josn. If there is multiple Header than it should also be send with respective item data
i am using "$expand" for that.but Problem is that $expand is begin called for every Header item and and hence my RFC is also called multiple time as i RFC Calling code written in $expand Method.
I am Getting all data(more than one Header Data and there item data) in first time.
so is there any way i create Json of item data(more then one ) nested under Header data.
i repeating i am having multiple header also.
so my json will be like this
d{
header[0]{
headerDetail1
heqaderDetail2
itemResult{
item[0]
{
itemDetail1
itemDetail2
}
item[1]
{
itemDetail1
itemDetail2
}
item[2]
{
itemDetail1
itemDetail2
}
.
.
.
}
header[1]{
headerDetail1
heqaderDetail2
itemResult{
item[0]
{
itemDetail1
itemDetail2
}
item[1]
{
itemDetail1
itemDetail2
}
item[2]
{
itemDetail1
itemDetail2
}
.
.
.
}
}
.
.
.
}
Hi Zubin,
it seems that you have implemented the method GET_EXPANDED_ENTITY , is that correct ?
This will expand everything beneath one entity (header(x)).
To get all header items including their items you have to implement the method
GET_EXPANDED_ENTITYSET
Best Regards,
Andre
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.