SAP Adapter - Calling a service from SAP and passing data ba

Hi!

I have created a service in webMethods which is called by an RFC from SAP. The RFC sends in an input and the result is to be passed back to SAP in a table format. I have defined a table in the RFC as well as in the flow service but when I pass the data back(20 entries lets say) I get a table in SAP which has 20 blank lines. Can anybody tell me what is required to pass table data correctly to SAP.

Thanks

Are you using RFC transport and defining a map to associate the FM with the wM service Or are you using Partner Manager?

If you’re using the former approach, you could

Define a FM having the desired signature parameters (including your table parameter). Let’s assume you called it Z_Test_FM

Create an explicit map by using SAP adapter look-up Z_Test_FM and selecting SAP calling IS as map type.
When creating the map, you’ll also be prompted for package, folder and service name

If you go to Developer, you’ll notice that a service was created according to your specifications above.

You’ll also notice that the table parameter was automatically converted to an IData Object having the same structure as your table.

Populate the table parameter with the required return data.
Go to ABAP workbench and create a function module which invoke Z_Test_FM on the RFC destination defined for your webMethods listener.

Hope this helps

Ed