cancel
Showing results for 
Search instead for 
Did you mean: 

Variable Substitution get Tag Attribute

suwandi_cahyadi
Contributor
0 Kudos

Dear Experts,

Is it possible to get a tab attribute and assign it to a variable substitution?

for example, I have the following payload:

<header>

     <body attr1="filename">

          <data1>xxxx</data1>

     </body>

</header>

is it possible to get the attr1 of the body tag?

according to this thread https://scn.sap.com/thread/1564890, it is not possible. There's actually a workaround in the thread but I don't understand how to fill the standard XI header with dynamic data from the source message.

Thank you,

Suwandi C.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184720
Active Contributor
0 Kudos

Hi Suwandi - Any problem in going for Dynamic configuration?

You can simply write a UDF in the message mapping and assign the file name.

In the receiver channel you just need to select the file name option under "set adapter specific attributes"(advanced settings)

Please refer to the below wiki and check for the section "

Adapter-Specific Message Attributes and Dynamic Configuration"

http://wiki.scn.sap.com/wiki/display/XI/Dynamic+file+name+and+directory+in+Receiver+File+Adapter+-+s...

suwandi_cahyadi
Contributor
0 Kudos

Hi Hareesh,

as what I understand from using Dynamic Configuration and UDF is that the we need an empty field at the target mapping to hold the filename value. Is that correct?

Because in my case, the target file structure has all been filled.

Thank you,

Suwandi C.

Muniyappan
Active Contributor
0 Kudos

Dear Suwandi,

as what I understand from using Dynamic Configuration and UDF is that the we need an empty field at the target mapping to hold the filename value. Is that correct?

you don't need any field in the target to hold the value in the dynamic configuration.

but for variable substitution you need it.

check this. and try yourself.

SAPTechnical.COM - Dynamic File name using ASMA (Adapter Specific Message Attributes) in XI /

Regards,

Muniyappan.

Answers (1)

Answers (1)

javier_alcubilla
Contributor
0 Kudos

Hi Suwandi

Create an intermediate mapping with the same source and target structure.

Then map the source attribute to the target field.

After that continue with your scenario.

At the operation mapping you can add more than one mapping and create the desired sequence

Regards

Javi