cancel
Showing results for 
Search instead for 
Did you mean: 

Gateway Service with Table and Field as input

0 Kudos

Hello Folks,

I have a RFC which has:

1 importing parameter : a field

1 table parameter : a table with 2 fields(multiple entries).

I need to consume this RFC in my service.

I am very much confused so as how to pass the table as an input to my servie query.

My service is constrained by the FM design and I cannot provide a code-based implementation to encapsulate the FM,so have to go this way only.

I have gone through many posts so as how to pass Tables(not range tables as input).

But I am not able to understand (both $batch and normally) how to implement them.

UI will send me the data in the form of a table and I need to pass it in the query input.

So I basically will not know how many records can be there in the table.The only thing I might know is they will be date values.

Please help if anyone has any input on this.


Thanks In Advance.

Accepted Solutions (1)

Accepted Solutions (1)

former_member185414
Active Contributor
0 Kudos

You have to ask UI to send data in JSON format to backend. Sample - https://blogs.sap.com/2017/12/13/odata-working-with-json-data-in-backend/

0 Kudos

Hello Ankit,

OK but then how should I design the service in my scenario ??

Thanks In Advance

former_member185414
Active Contributor
0 Kudos

You can have a string property which will take the table data in JSON format from UI and then parse the same JSON string in backend to convert it to an internal table.

0 Kudos

Thanks.

Got it.

Answers (0)