on 09-20-2010 4:25 PM
Dear all,
We have a scenario where, we are sending an IDOC from our SAP system via XI to one of our partner using AS2.
We have to manipulate the file name at the receiver end using the dynamic attributes of the AS2 communication channel.
As per the documentation and the following threads
we have done the necessary configuration in the communication channel. The following activites are done
Selected the checkbox "Use dynamic attributes"
Under the Module tab
In Processing sequence added a new entry
Number 1
Module Name : localejbs/Seeburger/solution/as2
Module Type : Local enterprise bean
Module Key : "dynfile"
Under the Module Configuration added the following details
Module key : "dynfile"
Parameter Name : "http://seeburger.com/xi/AS2/dtAS2FileName"
Parameter Value : "DYNFILENAME"
However, I understand that this configuration is incomplete, as somewhere i need to pass the value to the variable "DYNFILENAME".
As per the thred , Mr Srinivas Reddy mentioned 5 steps, however I am not clear about the step 3 & 4.
FYI : What I want to map as the file name is the Parter Profile in the EDIDC40 segment of the idoc and the date+time stamp
Many thanks for the help , in advance
Regards : Bobby Bal
Edited by: Bobby Bal on Sep 20, 2010 9:52 PM
Hi,
Use the below UDF in your mapping..
-
public String FileName(String a,Container container){
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://seeburger.com/xi/AS2","dtSubject");
conf.put(key, a);
}
-
As per your requirement, Use Concatenate function Idoc + Date + Time .
Pass the resultant value to the UDF and pass this to any unused Target node.
IDOC + Time+Date --> UDF --> Target node.
In your receiver AS2 adapter, Click on use dynamic attributes and Subject check boxes.
If you want to use other Dynamic attributes like dtAS2FileName, dtAS2ContentType ..
Simply replace the dtSubject with dtAS2FileName or dtAS2ContentType . No need to use any modules.
Thanks
Deepthi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bobby,
I guess you are looking for the below udf , which you can map in your message mapping.
-
AbstractTrace trace;
java.util.Map map;
trace = container.getTrace();
try{
// To Retrieve the FileName from the AS2 Adapter
map = container.getTransformationParameters();
DynamicConfiguration conf = (DynamicConfiguration) map.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey targetFile = DynamicConfigurationKey.create("http:/"+"/seeburger.com/xi/AS2","dtAS2FileName");
String targetFileName = Docnum + ".txt";
conf.put(targetFile, targetFileName);
}catch(Exception e)
{
trace.addWarning("Error");
}
return "";
-
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.