Skip to Content

Renaming of file : Mail to file sceanrio

Hello everyone,

BW would be sending the attachment of MAIL in .XLS format. i need to remane this file at runtime and post it in FTP server.

So, i am planning to write a unix script and deploy it in FTP server.

Can anyone tell me if there is any other easier option other than this.

Regards,

Ravi

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Feb 01, 2012 at 11:43 AM

    Hello Ravi,

    Use Dyanic Configuration to rename your file. With this you can create a file name of your choice and write it to the FTP server.

    regards,

    Younus

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2012 at 11:46 AM

    Dear Ravi

    Are you placing the file directly to the FTP server (it is a bypass scenario)?

    If that is the case then OS command is the best option.

    Alternatively you can try writing an adapter module in the receiver file adapter just to rename the file (never tried though)

    If mapping is involved then you can always use dynamic configuration to rename the file and have to enable ASMA in the adapter.

    Sourabh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2012 at 12:14 PM

    Can anyone tell me if there is any other easier option other than this.

    Dynamic Configuration is the simple way for changing name :

    step1:

    you have to write one udf for dynamic conf in msg mapping leval

    udf:

    String DynamicConfig(String a, Container container) throws StreamTransformationException{

    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 "";

    step2:ID

    in receiver file comm.cahn, enable ASMA properties .

    enable check box -> file name and use asma

    Add a comment
    10|10000 characters needed characters exceeded

    • Thanks everyone for giving your inputs.

      My requirement is that customer will be sending 23 reports with different names and i have to give them naming convention based on the name of the attachment.

      So, now can i modify the UDF to accommodate this requirement, if ia musing Dynamic configuration.

      Regards,

      Ravi

  • Posted on Feb 01, 2012 at 11:47 AM

    Unix scripts should be your last option.

    I recommend using dynamic configuration and ASMA to modify the file name.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.