cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Directory determination not working through ASMA multi-messaging

Former Member
0 Kudos

Dear Experts,

I have a very common requirement to determine file path dynamically and for that I have used ASMA concept BUT this is not working

- in RWB I am getting the error as "The Adapter Message Property 'Directory' was configured as mandatory element, but was not supplied in the XI Message header"

I did similar kind of ASMA for dymanic filename for different interface and it was working BUT here the only difference it that the message mapping is multi-message mapping so it may happen that I put the UDF in wrong place or missing something else.


- In ID I did the below

1. Activate the ASMA with tick the "Directory" check box and "Fail If Adapter-Specific...." check box

2. Put '*' and also dummy file path into "Target Directory" field in CC

- In ESR I did the below

1. create an UDF with below logic:

String fileDir = "";

DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");

fileDir = var1; <-- input argument in the UDF

conf1.put(key1,fileDir);

return fileDir;

2. I have tried to use this UDF in many places like at root "Messages" level or at "Messages->Message1" level or at message type "Messages->Message1->MT_Message1" (please find the source and target structure)

Thanks & Regards

Ashok

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos
Former Member
0 Kudos

Hello Roshan,

Thanks for the link BUT if you check the details of my post, I did the same thing.

and also in this link - in Receiver CC it was used variable substitution not ASMA

Not really helpful to me...any other suggestion?

Thanks & Regards

Ashok

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

You need to use variable substitution for multi-mapping scenarios unless you are splitting via interface determination (xpath) and not via message mapping.

Hope this helps,

Mark

Former Member
0 Kudos

Thanks Mark,

Yes, I know this one option for dymanic filename and filepath determination.

BUT here the existing structure of the message types are very complex itselt and also the mapping. and I don't want to modify any message type so planned to use ASMA.

If the ASMA will not work for multi-message then it is really painful for me.

Any other suggestion?

Thanks & Regards

Ashok

Former Member
0 Kudos

Hello Mark,

I am trying with variable substitution BUT I do not want to create any extra node in the existing message types.

Is it possible to use Message Type directly instead of Message type field during variable substitution?

That is to say

instead of using

var1          payload:MT_MessageType,1,DT_DataType,1,MATNR,1

is it possible

var1          payload:MT_MessageType,1 or similar like this

Thanks & Regards

Ashok