on 05-14-2014 9:40 PM
Hi All,
Scenario: PROXY to FILE
Msg_Type
---->Row
---------->Field1
---------->Field2
---------->Field3
In messge mapping I concatinated filename with currentdate and again concatinated to file extension and mapped to UDF to the target node (Msg_Type)
UDF:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
conf.put(key,a);
return "";
In operation mapping mapping program I included Java Class from Imported Archive along with message mapping.
ImportedArchive for zipping the file.
In Receiver Communication Channel I used both content conversion and ASMA. Does this work? any other solution for dynamic date along with zipping.
I tried before Module configuration for content conversion and zipping but unable to get dynamic filename with current date (FileName_CurrentDate.zip)
Would Variable Substitution help in this situation?
Please suggest me which method would be better for me to proceed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naveen, We had the same problem before. As a workaround, we just created the zip file in the ABAP side instead of doing it in PI. So now, PI is receiving a proxy message with attachment - the zip file as the attachment. We also have 1 field in the proxy message which contains the filename. I used dynamic configuration in the message mapping to set the FileName based on the value of the filename field, enabled ASMA File Name in the channel and used PayloadSwapBean module (keyName and keyValue) parameters. The result is a zip file with dynamic name. Hope this helps. Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naveen,
I think you cant pass a value to the Zip file name in a payloadzipbean parameter. May be if you change the file name before with asma parameter and to zip later, could you share your configuration?, what is your output?.
However you can run a OS command to rename the file with the file name taken of the dynamic configuration parameter as this wiki pointed Dynamic file name and directory in Receiver File Adapter - summary of possibilities - Process Integr...
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naveen,
Yes, FCC and ASMA both works together. I have done this in many scenarios.
I am not clear of your requirement, but if you want to zip target file and add timestamp to that file, then you can use following link to use PayloadZip Bean -
Adding PayloadZipBean in the Module Processor - SAP NetWeaver Process Integration - SAP Library
For adding current date you can use UDF and use ASMA attributes , both will work together.
Regards,
Somil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.