cancel
Showing results for 
Search instead for 
Did you mean: 

RFC respond field as file adapter file name

former_member568822
Active Participant
0 Kudos

Hi,

I have a scenario on RFC to file.The receive file name is from the respond of the RFC.

May i know how to set the receiver file adapter file name from respond field of RFC??

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Then on variable substitution for var1 should be payload:MT_CURRENCY,1,ROOT,1,ITEM,1,CURRENCY,1

BR,

Dzmitry

former_member568822
Active Participant
0 Kudos

Hi,

Thanks for reply. I am still getting the same error after follow you variable substitution. I manage to change the file name after change to MT_CURRENCY_INPUT.

Thanks for the help.

Edited by: fcgan on Feb 10, 2009 4:45 AM

Answers (7)

Answers (7)

Former Member
0 Kudos

Hi,

If you could post the structure of your RFC we may know better. Also check the Disable Security Checks field in case you have special characters...

Regards,

Kshitij

former_member568822
Active Participant
0 Kudos

Hi,

This is my rfc

[IMG]http://i39.tinypic.com/30kdlj6.jpg[/IMG]

Former Member
0 Kudos

In Variable substitution you have to use message type instead of data type.

Also i hope that root and item elements exist in your rfc response.

BR,

Dzmitry

Former Member
0 Kudos

Whn you choose Variable substitution, it opens a box in which you can add values.

Give the variable a name like var1

With it give the value payload:root, followed by degree of abstraction..

Please post your sender structure here to clarify the error you are having.

Is there a field called var1 in your xml structure?

it should be looking like

var1 payload: root, 1, <your element>

follow this blog to check if you are doing things right.

/people/sameer.shadab/blog/2005/09/23/an-interesting-usage-of-variable-substitution-in-xi

Regards,

Kshitij

Edited by: Kshitij Sharma on Feb 6, 2009 10:24 AM

Edited by: Kshitij Sharma on Feb 6, 2009 10:26 AM

former_member568822
Active Participant
0 Kudos

Hi,

At the filename field i put : %var1%.xml

Then on variable substitution : var1 payload:DT_CURRENCY,1,ROOT,2,ITEM,3,CURRENCY,4

thanks

Former Member
0 Kudos

So this is exactly the case for you to use variable substitution because you work with RFC.response

Info from sap help site

+If the variable refers to an element in XML schema, add the prefix payload: to the information under Reference. The reference then comprises a pseudo path description in the form of a comma-separated list with the schema namea,na,nameb,nb,....

namea,nameb,... corresponds to the element name and na,nb,... corresponds to the occurrence of the element name at the respective level in the document.

The description begins at the root of the document and ends at the respective element.

To reference the element that is in bold in the example, the following expression is used: payload:root,1,e1,1,e2,2

The parser searches for the first occurrence of the root element at the first level. It then searches for the first occurrence of e1 at the second level and for the second occurrence of e2 at the third level. The content of the last element (u201CExample Valueu201D) is set as the value for a specified variable.

<?xml version="1.0" encoding="UTF-8" ?>

<root>

<dummy>

<e1>

<e2>Data_1</e2>

<f/>

<g attr="abc">text</g>

<e2>Data_2</e2>

</e1>

</dummy>

<e1>

<e2>illegal/value</e2>

<f/>

<g attr="abc">text</g>

<e2 attr="fghij">Example Value</e2>

</e1>

</root>+

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/0f/80243b4a66ae0ce10000000a11402f/frameset.htm

BR,

Dzmitry

former_member568822
Active Participant
0 Kudos

Hi,

This is the document i refer also but im getting error "Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: var1: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: var1"

Any idea??

thanks

Former Member
0 Kudos

Hi,

just check that the RFC response field which you are trying to use in variable substitution, has a value coming in the RFC response........means if it is an optional field in RFC response, then sometime it may happen that no value is coming in it and so the field is not coming in RFC response field.... if this is the case, then you will have to take some other field in RFC response which is always coming so that your variable substitution is okay..........

Regards,

Rajeev Gupta

Edited by: RAJEEV GUPTA on Feb 6, 2009 11:00 AM

Former Member
0 Kudos

Hello,

What is your scenario? RFC(sender)->PI->File or File->RFC(request)->PI->RFC(response)->another file?

BR,

Dzmitry

former_member568822
Active Participant
0 Kudos

Hi,

My scenario is using BPM soap <-> RFC <-> file. I have to use the 1 of the respond field from rfc as file name.

Thanks.

Former Member
0 Kudos

Hello,

You can use variable substitution in receiver file adapter for getting file name from any field of payload or ASMS parameters.

BR,

Dzmitry

former_member568822
Active Participant
0 Kudos

Hi,

Thanks for reply. Currently i am try to use variable substitution from payload. But how do i getting the respond field value??

thanks

MichalKrawczyk
Active Contributor
0 Kudos

hi,

you can set the filename in the mapping from RFC.response to file

using ASMA adapter specific message attributes)

there are many blogs about it

Regards,

Michal Krawczyk

former_member568822
Active Participant
0 Kudos

Hi,

Thanks for respond. May i know how to map the rfc.respond to file name using ASMA?

thanks