on 04-23-2008 10:11 AM
I need to use the SHeaderSUBJECT's value in the receiver file adapter's variable substitution.
This is a Mail to File scenario without design part where the attachment file name comes in the subject of the mail.
I see the below in the dynamicconfiguration section. How can i retrive the value from dynamicconfiguration section to the filename.
<SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
.
.
<SAP:Record namespace="http://sap.com/xi/XI/System/Mail" name="SHeaderSUBJECT">PlainAttachment.txt</SAP:Record>
.
.
</SAP:DynamicConfiguration>
Points will be rewarded.
Hi Sarvanan -
You have to do the following things in order to achieve this. try doing the following :
In the Receiver File Adapter Go to the tab Module and do the following
- Add an Adapter Module DynamicConfigurationBean as the first in the sequence. Assign a module key "1" to it.
- Now in the Module configuration add 2 parameter name, one as "key.0" with value as "write http://sap.com/xi/XI/System/Mail SHeaderSUBJECT" and another paratemer name as "value.0" with value as "message.interface"
Go to the Parameters tab,
- Enable the variable substitution, write variable name as "sheadersubject" with reference as "message:interface_name".
- Use the scheme as "%sheadersubject%" in the file scheme name.
This should give you the desired aouput as PlainAttachment.txt in your case.
Regards.
Jeet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
these two blogs may solve your problem:
/people/michal.krawczyk2/blog/2006/10/09/xi-dynamic-configuration-in-adapter-modules--one-step-further
/people/francesco.bersani/blog/2007/03/27/rename-attachment-adapter-module
reward point if useful
regards,
ujjwal kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try to use sthg like this in a UDF :
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().getStreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create(http://sap.com/xi/XI/System/Mail,SHeaderSUBJECT);
String value = conf.get(key);
or in a JAVA mapping :
DynamicConfiguration dynConf = (DynamicConfiguration) param.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey dynKey = DynamicConfigurationKey.create((http://sap.com/xi/XI/System/Mail,SHeaderSUBJECT);
String keyValue = dynConf.get(dynKey);
param is the map object from the execute() method of your mapping ...
Hope this helps
Chris
Edited by: Christophe PFERTZEL on Apr 23, 2008 11:34 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, but I do not understand your "I'm not using the design part ..." statement ? What kind of mapping object are you dealing with (or where do you want to get the key value) ? The above samples can be used either in UDF in graphical mapping tool, or in a JAVA mapping ... It could also be used in XSLT if needed
Chris
Hi Christophe,
We can impelment the scenario with IR part.
It is possible.
All you do is you gave a some random names for Message Interfaces and namespaces in ID while define Collabaration profiles and Agreements.
Once you activate it will deployed into the server just like normal scenarios where in you design objects in IR and use them in ID.
However we cannt assign a mapping program for this case as no mapping exist in the IR part for the given message interfaces. since we have not defined anything in IR.
Thanks
Gujjeti
Hi,
Upon thinking I came up with the following solution.
I guess it should work.
Write an adapter module and use dynamic configuration logic to read the name from mail attachement after that set the FileName attribute of FilleAdapter(again using Dynamic Configuration Logic)
Deploy this module into J2EE engine and use it in your sender Mail adapter in appropriate sequence under modules TAB.
Before you can develop a module check into the help documentation for Mail Adapter and its default module and possiblities.
Execute the scenario. If it works please let me know.
Thanks,
Gujjeti
Hi Gujjeti,
Thanks a lot for helping understand this "IRless" concept ! But now I've another question : what is the purpose (or benefit etc) of such design ? As I've never seen this explained in any SAP documentation, I'd be interested in learning more about it
Cheers
Chris
Edited by: Christophe PFERTZEL on Apr 23, 2008 9:56 PM
Hi Christophe,
This concept I have read long back.
Credit goes to this blogger from SAP "William Li".
[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/4383] [original link is broken] [original link is broken] [original link is broken];
Read the blog, you will find lots of intresting information apart from what I explained.
Thanks
Gujjeti
Edited by: Praveen Gujjeti on Apr 23, 2008 10:23 PM
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.