cancel
Showing results for 
Search instead for 
Did you mean: 

Does FCC and ASMA work together?...

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thanks everyone for the replies

The problem solved.

The solution is:

I used Module Configuration for content conversion and zipping. Used ASMA for dynamic filename with currentdate.

Test result:

Answers (4)

Answers (4)

Former Member
0 Kudos

Is it possible for same Dynamic name for the file inside the zip folder?

markbernabe
Active Participant
0 Kudos

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

iaki_vila
Active Contributor
0 Kudos

Hi Mark,

Great solution, but if Naveen hasn't the payload zipped at beginning in the proxy call i think he cant apply your solution, am i wrong?

Regards.

markbernabe
Active Participant
0 Kudos

Hi Inaki, I agree. He can consider this if he can afford to have the file zipped first before reaching PI. Since we can manage that, we're able to move forward with this solution. Mark

iaki_vila
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Thank you Vila,

Do you mean that I should use ASMA along with content conversion in Module Configuration and Zipbean?

Operation Mapping:

I guess zipping of file is happening in first before FCC.

iaki_vila
Active Contributor
0 Kudos

Hi Naveen,

have you tried to set payloadzipbean like the last module in the module processor?

Regards.

somil_gulati
Explorer
0 Kudos

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

Former Member
0 Kudos

thank you Somil,

My requirement is Receiver fixed lenght file. File should be zipped and should have dynamic Dynamic Name+Current date (FileName_CurrentDate.zip), timestamp not required.

Former Member
0 Kudos

Hi Naveen,

Once the file has been placed on the file server. Try to zip it using the OS command after processing option in the communication channel.

Hope this helps...

Regards,