on 05-12-2014 6:00 PM
Hi All,
i need help.
I am using java mapping to convert xml file in zip file.
Now i need to set output file name as SiteId_TimeStamp.zip.
Site id is comping in xml file.
How can i do this?
I tried many thing but didnt get the solution..
As their is no message mapping so I am unable to use ASMA.
Please help.
Have you tried Variable Substitution?
https://help.sap.com/saphelp_nwpi71/helpdata/en/44/6a316af5a23672e10000000a114a6b/frameset.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pooja,
You can use variable substitution;
If you want to use a java mapping, you can use then ASMA!. Check this wiki: Dynamic file name for pass-through scenario - Process Integration - SCN Wiki
You can develop an adapter module too and don't make any mapping development. You can follow the example developed by Amit Srivastava in this document , obviously your problem is different but you can use it like a starting point.
Regards.
Message was edited by: Iñaki Vila
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Osman,
After including the code also i am getting this error in receiver channel
Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but was not supplied in the XI Message header.
What should i do?
>>>I am using java mapping to convert xml file in zip file
Why don't you use payloadzip bean?
>>>How can i do this?
Please check the below wiki..
Sample Code - Dynamic Configuration in Java and ABAP Mapping - Process Integration - SCN Wiki
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you check the wiki? You just need to add the code into you java mapping..
Map mapParameters = (Map) transformationInput.getInputHeader().getAll();
// a) Set Output File name
mapParameters.put(DynamicConfigurationKey.create(
"http://sap.com/xi/XI/Dynamic"
,
StreamTransformationConstants.DYNAMIC_CONFIGURATION),
""
);
DynamicConfiguration conf = (DynamicConfiguration) mapParameters.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create(
"http://sap.com/xi/XI/System/File"
,
"FileName"
);
//Depending on your requirement edit this logic. Here, NewDynamicName + CurrentDate will be output file name.
DateFormat dateFormat =
new
SimpleDateFormat(
"yyyyMMdd"
);
conf.put(key, (
"NewDynamicName_"
+ dateFormat.format(
new
Date())) +
".pdf"
);
Hi Hareesh,
I am getting this error in receiver channl:
Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but was not supplied in the XI Message header
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.