Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Hi Folks,

Today I have used this feature ,variable substitution ,in receiver file adapter. Although many of you might have already used it but I
have used this for the first time and found it very useful. So here are few of my  closely knit thoughts on this feature
which may help someone who is not aware of this.

Basically variable substitution can be used by selecting enable the variable substitution checkmark in receiver file adapter communication
channel.

The variable substitution is helpful in cases where your requirement is like If you want to specify variables in the target directory
and file name scheme, they must be enclosed by % characters.

To use variable substitution, enable as shown in the screenshot.

Provide the file name scheme as Customer_ %Var1%.xml where in Var1 is dynamic value taken from the message.

 


Make entries under Variable Name and Reference in the table

The variables can refer to attributes of the message header or elements of the message payload

For referring  elements of the message payload:


Where firstrootnode is first rootnode, numerical 1 indicate it is rootnode1, secondrootnode is the secondroot node belonging to the main node or first node.

The parser searches for the first occurrence of the root element at the first level.

It then searches for the first occurrence of the node at the second level and for the second occurrence of node at the third level.

If the variable refers to an attribute of the message header, add the prefix message: to the name
of the variable under Reference

You can specify the following attributes of the message header:

sender_party, sender_service, receiver_party, receiver_service, interface_name, interface_namespace.

These are standard attributes. To refer party, service, interface, you have to use as above.

For ex: if you want to access
party in the receiver file name, then you define some variable and then ask
that variable to refer to sender_party for sender.

For var1 , you have to write as

To disable the check the adapter performs for the element data, set the Disable Security Checks indicator.

Otherwise, the adapter checks whether the element data contains characters that could lead to security risks
in the file system environment. The check includes the characters “/“, “\“, and “..“.

Hope this provides some information about variable substitution in receiver file adapter.

Thanks,

Regards,

Amarnath

3 Comments
Labels in this area