How to pass table parameter from Outsystemss to SAP Remote Functions BAPI

Understood that outsystems can update records using SAP Remote function integration (https://www.outsystems.com/videos/sap-integration/).
However in my case, I need to pass table parameter to SAP Remote functions from outsystems. Please help ! Thanks.

Hi Mike,

There is no "table parameter" in OutSystems. Do you mean a record list?

Yes. Would you advise me how record list parameter can be done as parameter from outsystems to SAP? Thanks.
Mike


Hi Mike,

Let me try to help you. First, what version of OutSystems are you running?

Secondly, what BAPI are you calling? 

When you imported the BAPI a set of structures were created that map the types required to invoke the BAPI.

You must transform the OutSystems List to the data type (those structures) of the input parameters of the BAPI.

Cheers

Hi All, I am also trying to figure this out.... anyone have an idea ?


thanks

Stefan

Stefan Daniels wrote:

Hi All, I am also trying to figure this out.... anyone have an idea ?


thanks

Stefan

Hello Stefan Daniels,

did you consider the last post from André Vieira?

André said: "When you imported the BAPI, a set of structures were created that maps the types required to invoke the BAPI. You must transform the OutSystems List to the data type (those structures) of the input parameters of the BAPI."

If so, can you detail more the issue you are having?

Thanks,

Luiz


Luiz Santos wrote:

Stefan Daniels wrote:

Hi All, I am also trying to figure this out.... anyone have an idea ?


thanks

Stefan

Hello Stefan Daniels,

did you consider the last post from André Vieira?

André said: "When you imported the BAPI, a set of structures were created that maps the types required to invoke the BAPI. You must transform the OutSystems List to the data type (those structures) of the input parameters of the BAPI."

If so, can you detail more the issue you are having?

Thanks,

Luiz


Hi Luiz,


thanks for your reply.
Indeed when I consume the SAP BAPI_MATERIAL_GETLIST remote function , OS generates the structures.

And these can be used to display in a table record widget.

But before the call in the preparation I need to fill in the Matnrselection "table" with

Sign = "I"

Option = "CP"

Low = "*"

in order for the BAPI to return values.
I was able to create a local variable with this structure but not a list to be passed as a table for input in the BAPI.

That is my missing link.

So I guess that I am missing the part of transforming the OS List to the structure of the input parameters?

Do I make any sense ? :-)


Thanks 

Stefan



Stefan Daniels wrote:

Luiz Santos wrote:

Stefan Daniels wrote:

Hi All, I am also trying to figure this out.... anyone have an idea ?


thanks

Stefan

Hello Stefan Daniels,

did you consider the last post from André Vieira?

André said: "When you imported the BAPI, a set of structures were created that maps the types required to invoke the BAPI. You must transform the OutSystems List to the data type (those structures) of the input parameters of the BAPI."

If so, can you detail more the issue you are having?

Thanks,

Luiz


Hi Luiz,


thanks for your reply.
Indeed when I consume the SAP BAPI_MATERIAL_GETLIST remote function , OS generates the structures.

And these can be used to display in a table record widget.

But before the call in the preparation I need to fill in the Matnrselection "table" with

Sign = "I"

Option = "CP"

Low = "*"

in order for the BAPI to return values.
I was able to create a local variable with this structure but not a list to be passed as a table for input in the BAPI.

That is my missing link.

So I guess that I am missing the part of transforming the OS List to the structure of the input parameters?

Do I make any sense ? :-)


Thanks 

Stefan



Hello Stefan Daniels,

I'm not sure if I understood, but it seems to me that you need to add the local variable you just created to a list and assign the list as a parameter to the BAPI.  

You just need to create a List variable of the same type you used for your variable. Then, use ListAppend to add the variable to the list.



Hi Luiz, indeed the conversion to the list was missing, now it works fine !


Thanks a lot !