cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Filename in Fileadapter

Former Member
0 Kudos

Hi all,

I like to use the new feature (SP15) of the "Adapter Specific Message Properties" but with out success. I have read Michaels Blog "XI: The same filename from a sender to a receiver file adapter - SP14" but it give me not a clue how to use these properties during the normal receiver configuration and also the manual is not very clear about it. I have set a Variable with "FileName message:FileName" (I have tried also "message:File_Name") Than I have used this filename Variable in the field "Filename Schema" like %FileName%. But I allways got this error: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: Unknown message header category 'FileName' for variable 'FileName'.

What have I missed out here?

Thankx

Manfred Schmidt-Voigt

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

you don't have to set any variables

just set the filename in the mapping

ans set Adapter Specific Message Properties

in the receiver channel

thst's all

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

Former Member
0 Kudos

Hi,

I have no mapping in this flow. Its just to transport files from one end to the other and have the monitoring features from SAP-XI.

So, do I need a mapping just to receive the filename on the receiver adapter side?

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

I believe so but It can be a java or abap mapping

that will just take the whole xml as input and pass it back

but inside you'll just have to create dynamicconfig parameter filename (you can do it in java or abap)

or you can try doing this in an adapter module (on the file adapter receiver side)

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

Former Member
0 Kudos

Hello Manfred,

if you configure the sender channel to set an adapter-specific message attribute for the file name and configure the receiver to use it, there is no need to use a mapping or the File Adapter's variable substitution feature.

Regards,

Thilo

Former Member
0 Kudos

Hi all,

the problem is solved! You realy don't need a mapping. The attributes are written into the messageheader and can be seen on the integrationserver in the SOAP Header as a part: "DynamicConfiguration".

Our problem here was that we moved our SLD from a machine with SP12 to a new installed machine with SP15 and imported all Scenarios also to this new machine. This fully import of the old SLD + Objects must have something overwritten of the new features. After reimporting of the SAP-BASIS 640 (SP14) Objects into the repository we could use theese new features now.

Thank you for all your willingnes to help...

Manfred Schmidt-Voigt

Former Member
0 Kudos

Hello,

We are facing the same issue

you have mentioned that you solved the issue , without any need for mapping

If so, how were you able to access the filename in reciever adapter

Please guide us on this

Regards

Answers (3)

Answers (3)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Manfred,

Consider this eg where i am going to use say my interface name as my file name.

I have entered %var%.xml as my filename in the filename Scheme field.

under variable name substituion,

var message:interface_name

In your case,

filename message:filename is not a valid thing.

the only valid parameters allowed with message are,

sender_party,

sender_service,

receiver_party,

receiver_service,

interface_name,

interface_namespace,

Just try out using any of these values and it will work.

regards,

bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Manfred,

The dynamic filename generation concept is as follows.

In your filename field. just give a variable with % symbols. (eg: %file% ).

Now, under the option Variable Name Substitution, you can give how the value has to be created.

It can be your interface name, sender service name, etc or it can be some value dynamically from your payload.

For the former, your give

message:interface_name ,etc

and for the payload part you give,

Payload: "your element root which u wanna acecss"

Just check this link out,

http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm

And read the contents under variable substitution and it will help you understand the concepts better.

If you have any clarifications, do get back,

Regards,

Bhavesh

Former Member
0 Kudos

Sorry, but if you look into my question, you can see that I have done all that.

1) I have checked in sender and receiver Adapter the "Adapter specific Message properties" and the checkbox for the File Name

2) I have used the Variable Substitution with "Filename message:FileName"

3) I have used this variable to form a filename

So, What have I done wrong??

Former Member
0 Kudos

Hi Manfred,

Did you

1.Enable the variable substitution and define your variable "FileName"

1.check the box,Adapter specific Message properties which automatically checks File name in the Communication channel

Cheers,

Rashmi