cancel
Showing results for 
Search instead for 
Did you mean: 

How to RFC with both import- and export-parameters?

Former Member
0 Kudos

Hello,

we are at a point where we want to use a ERP-RFC witch hast some import- and export-parameters.

The import-parameters coming from a stream, shoud be transported to ERP and the results shoud be published in a nother stream.

Lets take the RFC "stfc_string" for example:

CALL FUNCTION 'STFC_STRING' "

EXPORTING

     question = " string

  IMPORTING

  myanswer = " string

  . " STFC_STRING

We already managed export a static value to ERP with a import-adapter and publish the export-parameter to a stream. That works fine.

(..\adapter\rfc\example\polling_import\..)

mapping.xml:

<rfc name="STFC_STRING">
   <input>
   <import>
   <parameter name="QUESTION">How are you</parameter>
   </import>
   </input>
   <mapping>
   <export>
   <fieldMapping name="MYANSWER" espField="MYANSWER"/>
   </export>
   </mapping>

    </rfc>

And to export a dynamic value from a stream to ERP with a output-adapter.

(..\adapter\rfc\example\output\..)

So how can we use a value from a stream, export it to a ERP-RFC and get the export-parameters from this RFC in ESP?

like:

                          

stream1      ->    ERP    ->    stream2

              import            export

I hope you can help me a bit.

With kind regards

Matthias

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Matthias,

What you are describing cannot be done over a single RFC, as the data flow between the stream and RFC adapter is only one-way, for output adapter it is from the stream to adapter. The export parameters it receives from an RFC does not percolate back to the stream.

You can try break it up into two RFCs such that an output adapter would push data from stream1 to the ERP, and have the result stored in ERP. Then have an input adapter invoke another RFC to retrieve the result from ERP to stream2.

Answers (1)

Answers (1)

JWootton
Advisor
Advisor
0 Kudos

Hi Matthias,

It would be interesting to get a better idea of what you are trying to do here.  What's the use case?

Jeff