cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to return Deep structures from RFC

Aisurya
Participant
0 Kudos

Hi Experts ,

I have an requirement to return the deep structures in output from RFC .

Req : In output i need multiple tables in Gateway. 

I tried in SEGW for mapping multiple tables , but got error message "Only one Output table can be mapped " . 

Please help me in this , to resolve the issue .  

Thanks in Advance .

Aisurya.

Accepted Solutions (0)

Answers (2)

Answers (2)

rahul_pathak78
Explorer
0 Kudos

Hi Aisurya,

Please help me how you resloved this .

Regards,

Rahul Pathak

AshwinDutt
Active Contributor
0 Kudos

Hello Rahul,

U can do that using $expand.

Create Association and Navigation between ur entities with appropriate cardinality.

Please refer below and that is the solution :

Regards,

Ashwin

kammaje_cis
Active Contributor
0 Kudos

HI Aisurya,

That is right. You cannot have more than one table returning from one gateway request. However you have two options.

1. Multiple tables which you want to return have parent child relationship? Ex: Sales Order header and Sales order Items? Then you need to use $expand on a query on the parent entity.

2. You can also use $batch to send multiple requests to the backend, so that you fetch one table for every request. Search in scn for $batch. There are good blogs on it.

Thanks

Krishna

Aisurya
Participant
0 Kudos

Hi Krishna, 

Thanks for quick reply . 

Yes my requirement is like to get the Vendor details on base of Vendor number . 

I have a RFC  when we pass " Vendor no " it returns in Tables

"Vendor Address data" ,  

"Vendor bank data" ,  

"Vendor Accounting data" , 

"Vendor Purchasing data" .

Can the above data in tables will be handled in $expand or $batch method ?

Thanks,

Aisurya.

kammaje_cis
Active Contributor
0 Kudos

Hi Aisurya,

This is how I would approach.

I would create 1+4 entities. One each for four tables and one dummy entity as 'Parent' or 'Left Entity'. Say "Vendor General Data".

Now create Associations and Navigations from "Vendor General Data" to each of other four entities. The right hand cardinality going to be 0...N, so that you get multiple records for each of these four entities.

Go to each entity and implement query by mapping the FM you have. The ""Vendor General Data" can be a dummy implementation to return only the vendor ID. Cal the $expand on "Vendor General Data", mentioning all navigation paths in the $expand clause. You should be done.

Cons with this approach:

Performance can be a huge problem here, since you will be calling the FM once each for each table.

Other suggestion.

Redesign your FM to return one table at a time. This would be the right approach if you are using a custom FM.

Thanks

Krishna

Aisurya
Participant
0 Kudos

Hi Krishna ,  Do you recommend a custom FM from Gateway Side which will internally call the RFC and segregate the data into one.  And we will integrate it in our service , right ?   Thanks, Aisurya.

kammaje_cis
Active Contributor
0 Kudos

Hi Aisurya,

But if each custom FM calls the same Standard FM then you do not achieve anything since you will be calling the standard FM returning all four tables every time. Even with the current standard FM you can achieve my approach. While data source mapping for each of the four entity, you just need to map one of the table and leave other three tables without mapping. But the problem is that for each entity FM call is made and you will not be able to utilize three other tables populated.

My suggestion was, Instead of suppressing three other tables, see if you can just get one table in your custom FM. In that case you save the processing for populating three other tables every time.

Thanks

Krishna