Skip to Content
avatar image
Former Member

File adapter Sender Attachment xlsx

Hi Friends,

I have the next integration FTP--> PI-->PROXY SAP

I need Attachment file xlsx from ftp to PROXY.

How I must do this integration on File Sender CC for attachment the xlsx file ?

Help Me Friends.


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Dec 23, 2016 at 06:08 PM


    The xlsx file can be picked as an attachment only if u mention it under "Additional File" section , so you need two files one the main payload which is picked and another xlsx.

    In Case if u have just xlsx file alone then pick the file as a mainpayload then in mapping use java mapping to make the incoming mainpayload as attachment to outgoing payload.

    A bit of code is as below.

          GlobalContainer globalContainer = container.getGlobalContainer();
          MappingTrace trace=container.getTrace();
          OutputAttachments outputAttachments = globalContainer.getOutputAttachments();
          Attachment outputAttachment;
          String contentType="application/xml";//<could be changed>
          DynamicConfiguration conf = ( (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key =DynamicConfigurationKey.create("","FileName");
          String fileName = (conf.get(key));
          trace.addInfo("filename used for attachment "+ fileName);
          outputAttachment = outputAttachments.create(fileName,contentType,convertedInput);
    catch(UnsupportedEncodingException e) {
    throw new StreamTransformationException(e.getMessage());
          return "";



    Add comment
    10|10000 characters needed characters exceeded