on 07-10-2008 3:29 AM
Hi,
I have scenario File to Mail adapter. How can i read filename from Adapter-Specific Message Attributes
in java mapping.
Thank you and Best regards
Fernand
Hello Fernand,
Are u using DOM or SAX parser?
In any case just put the Dynamic config code in the execute function or the other option is to define it as a private functionand call it in the execute,My personal advice would be the former.
Just put this code in ur java mapping
As fellow sdn ers have mentioned there is no need of the container method,just initialise the set param method and use it in the dynamice config code as follows
public class YourClass implements StreamTransformation
{
private Map map;
public void setParameter(Map param)
{
map = param;
}
public void execute(InputStream in, OutputStream out) throws StreamTransformationException
{
{
DynamicConfiguration conf =(DynamicConfiguration) map.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey KEY_FILENAME =DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
// read value
File = conf.get(KEY_FILENAME);
..........................
}
Now just call File in the mapping program,
Should help u out
Regards,
Tauseef
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank You Mohd Tauseef.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Fernand Lesmana
Java Mapping of Adapter-Specific Message Attributes
http://help.sap.com/saphelp_nw04/helpdata/en/43/09b16006526e72e10000000a422035/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/43/09b16006526e72e10000000a422035/frameset.htm
As you would see in the example shown in the link...you donot require a container object in case of java mapping(that is required when you are using the user defined functions)...
reward points if helpfull
regards
kummari
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.