cancel
Showing results for 
Search instead for 
Did you mean: 

GW Function Import: pass parameter table (e.g. multiple parameters of same type)

Former Member
0 Kudos

Hello GW experts,

we have defined a Function Import "CreatePOWithReference" with a parameter "Reference" which contains a string with information about a reference document which shall be used to create a new Purchase Order (PO):

Now I would like to pass not only a single reference but multiple reference all of the same type "Reference".

I tried calling the function import with two references like this:

/sap/opu/odata/sap/ZMP_ODATA_PO_SRV/CreatePOWithReference?Reference='123'&Reference='456'

But in method "/IWBEP/IF_MGW_APPL_SRV_RUNTIME~EXECUTE_ACTION" my parameter table "IT_PARAMETER" only contains 1 single record:

How can I achieve that the table "IT_PARAMETER" contains two records (Reference='123' and Reference='456')?

Thanks and best regards,

Oliver

PS: As there can be any number of references, it is not an option to create several parameters "Reference1", "Reference2", "Reference3" and so on... .

Accepted Solutions (0)

Answers (3)

Answers (3)

SyambabuAllu
Contributor
0 Kudos

Yes,

Exactly what Sreehari and Ashwin said it's correct you can not pass as a multiple value at one time..so that you can perform batch or create deep entity method you have to implement.

Thanks,

Syam

AshwinDutt
Active Contributor
0 Kudos

Hello Thomas,

In my opinion, i do not think you can pass same property multiple times as you are trying now. I really doubt if GW supports this and IT_PARAMETER has only one Reference ( which is sent 1st i.e., 123 ) as you have already shared values read at runtime.. As per my understanding it is the correct behavior of GW where only one reference number - 123 is present in IT_PARAMETER table.

Other standard way of accomplishing your business case would be implementing CREATE operation and operate it on BATCH.

Regards,

Ashwin

sreehari_vpillai
Active Contributor
0 Kudos

Hi Oliver,

In my knowledge, function import can not accept multi line items . You can implement a deep entityset and map the internal table fields.

Sreehari