cancel
Showing results for 
Search instead for 
Did you mean: 

PI File Adapter variable substitution

Former Member
0 Kudos

Hi everybody,

I do have the following message:

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

<ns:MT_FileIn_Budget xmlns:ns="urn:rlp.de:test:budgeting">

<BudgetRecord>

<Monat>Pa</Monat>

<Jahr>b_Lie</Jahr>

.................

................. etc.

I want to extract the "Monat" variable in the Receiver File Adapter as a substitution variable in the "Advanced" Tab in the

Receiver File Adapter configuration.

I have the following value in the Substitution table :

var1 payload:BudgetRecord,1,Monat,1

(and then use var1 in the filename)

If I use Header Mapping instead , everythings works.

Any ideas? something misspelled?

cheers hs

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Holger,

I've done this more with IDocs, but in those we have to identify the root (message type). Does this work?

var1 payload:MT_FileIn_Budget,1,BudgetRecord,1,Monat,1

holger_stumm2
Active Contributor
0 Kudos

@Mike

@abhishek

Works fine, Mike was by 50 seconds faster. Thanks for all your help

cheers hs

Answers (2)

Answers (2)

former_member200962
Active Contributor
0 Kudos

You missed the Message Type name:

payload:MT_FileIn_Budget ,1,BudgetRecord,1,Monat,1

Then in the File channel have the proper syntax.

Regards,

Abhishek.

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

why do you want to use the variable substitution and not ASMA (adapter specific message attributes)?

ASMA is a lot better (supported by many adapters and easy to debug - as you see it in dynamicconfig section of PI message)

way of doing those things

try it and it will work for sure - leave variable substitution for those who did not upgrade to SP14 of xi 3.0 ...

Regards,

Michal Krawczyk

holger_stumm2
Active Contributor
0 Kudos

Hi Michael,

maybe you can clarify a better solution for my problem:

The reason why I am using variable substitution is, that I am not using graphical mapping here.

I am using a XSLT style sheet translation (PI 7.11) as a mapping step.

I need to set the file name depending on the operation mapping.

For every specific situation (about 10) , there is one OM. This OM (XSLT, no SAP Graphical Mapping) should set a specfic filename. for every specific situation there is an integration scenario with the specific OM.

The Business Component with one comm channel should only be there once (we don't want 10 communication channels)

Do you have a recommendation ?

thx

hs

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

a simple one - add message mapping to your operation mapping like this:

source - XSLT target

target - XSLT target

and just set inside the filename ASMA

(map all to all nodes with the use of map all button)

that's the easiest way - 3-5 mins per each OM of dev

Regards,

Michal Krawczyk

former_member200962
Active Contributor
holger_stumm2
Active Contributor
0 Kudos

Wow -

thanks for all the input. I will give it a try.

cheers

hs