Accesing additional files in the sender adapter

Hi,
I'd like to use this option in the sender file adapter: http://help.sap.com/saphelp_nwpi71/helpdata/en/44/692ab8a4b633eae10000000a1553f6/frameset.htm
--> "In the sender file adapter, you can specify additional files to be included in the XI message as attachments" ... "Additional files are transported unchanged without conversion options"
After testing I'm getting two files in the soap message, which is what I wanted. But how can I get the content of the second file (not the main one).
For example, in a custom module in the file adapter I can get the main payload as this:
public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData)
                                   throws ModuleException {
Message msg = (Message) inputModuleData.getPrincipalData();
I guess that to get the second file it could be something like:
inputModuleData.getSupplementalData("?");
but don't really know what to insert there as a parameter.
Basically I would need to find out a way to access the content of that second file: it could be in a custom module, it could be in a graphical or java mapping...
Thanks!
Edited by: Jorge Lopez on Mar 17, 2009 11:09 AM

Finally I could access that attachment in a Java mapping using this code:
private String getAttachment(TransformationInput in){
     InputAttachments inpAttach = in.getInputAttachments();
     Collection<String> collIDs = inpAttach.getAllContentIds(true);
     Object[] arrayObj = collIDs.toArray();
     getTrace().addInfo("Number of attachments: " + arrayObj.length);
     String idAttachment = (String) arrayObj[0];
     return new String(inpAttach.getAttachment(idAttachment).getContent());
and so getting the attachment in a string.
You also have to set on the flag "Read Attachments" in the Operation Mapping (PI 7.1, old Interface Mapping), so that the ABAP side passes the attachment to the Java runtime.
I'm not sure if it's possible to access the attachment in the sender adapter in a custom module
Edited by: Jorge Lopez on Mar 18, 2009 4:06 PM

Similar Messages

  • Issues with Receive Adapter receiving a file that has not completed uploading while send multiple files on the Send Adapter

    Hello,
    I am only a few weeks old into BizTalk so I am new to this application. 
    The pieces I have for my development environment consists of the following:
    FTP Server ---[SFTP Adapter]---> BizTalk 2013 ---[FILE Adapter]---> Internal Network Share Drive
    I currently configured a simple PassThru, One way Receive/Send in BizTalk where the Receive Port receives a file via SFTP 
    Adapter from our FTP server and the Send Port sends the file via the FILE Adapter to our Internal Network share drive. 
    The setup works great with small files.  However, when I receive a large file on the FTP server, the Send Port sends multiple instances of the file on the FTP server because the Receive Adapter sees that the file is there, but not yet
    fully uploaded.
    Can someone please guide me as to how I can determine when a file is fully uploaded to the FTP server before the Receive Adapter fires?
    Thanks,
    Mitch

    Yap BizTalk does not have control over locking the file during read/write Operation and its the third party which need to take care of this (by rename the file after upload ) .
    If the file size is too large I would suggest to bypass the message box as it has performance bottleneck during peak hours 
    Apart from being repetitive, this is not good advice.  There is no indication that the file is too large or will cause any "performance" issues.
    The concurrency problem can happen with a file of any size.

  • What is the use of additional file(s) in  sender file adapter?

    Hi experts,
    what is the use of  additional files parameter in sender file adapter?
    give me some example.......
    Thanks & Regards
    E.Ravi Chandra Reddy

    Hi,
    please check the below link,
    you can specify additional files to be included in the XI message as attachments.
    http://help.sap.com/saphelp_tm90/helpdata/en/44/692ab8a4b633eae10000000a1553f6/content.htm
    Regards

  • File Content conversion at the sender adapter without Key field

    Hi All,
    I have a requirement ....We are using Message Transform Bean at the sender adapter (we are not going for FCC as we are tranforming a decryption) ..its is a flat file...
    we dnot have a key field for one of the node .....we have total 5 nodes under parent node and one of the node does not have key field ....
    NOTE: I guess we have to do either Java mapping or XSLT ..but not getting proper weblogs with program...
    and not well versed with coding...i got few codes which were either not fulfilling requiremment or they use stream tranformation where it is decaprecated in NWDS and does not allow to compile it properly .
    Can somebody get me a code for Java which uses Abstract tranformation ...which can full fill below requirement
    parent node
                  Node1
                       node 1a
                       node 1b
                  Node 2
                  Node 3
    Input Flat file is in below format
    example:
    Employee Headre Flat files
    Employee Detail Flat Files(this repeates numerous times as much as number of employees)
    Employee  Trailer Flat Files
    Loan Headre Flat files
    Load Detaisl Flat Files (this repeates numerous times as much as number of employees)
    Loan Trailer Flat files
    Assitance much appreciated thanks .
    Regards
    Kiran

    Hi Stefan,
    I will rephrase the question i guess its communication gap...
    1) we have an existing interface in 3.0..we are not copying the same interface to 7.1 as it was not according to standards and they are phasing out that system.
    2) In 3.0 they are reading the Flat files under one record .. the structure is as follows:
    Parent Node
               Node
                   Row
    They are reading all the flat files row by row.
    and even in receiver they are reading in the similar fashion
    3) In the current structure according to the FS we have to create a structure defined by them which is as below
          Employee
              Header
              Details   node 1
                 Details  node 1a
                  Details  node 1b
              Trailer
              Loan Header
              Loan Detail
              Loan Trailer
    Receiver structure is
    Employee
          Node (this will have the receiver fields which is about 30 fields)
    4) We have pulled a sample file from 3.0 for the existing interface as we din get the sample file for existing one in FS and Iam not sure whn are they gonna send it.
    5) In the existing interface payload we have everything matching even the field lengths and postions and even key fields and key fields we got from the FS
    6) problem is we donot have key fields for the Details node 1a and 1b even in FS or the existing payload and we got an update from the FS consultant that we will be receiving these fields but without keyfields...
    see i donot have any problem taking out the details 1a and 1b out of the details header and create the structure ,,,,but the main issue is without key field we will not be able to generate the 1a and 1b nodes or read it in the FCC or MTB (i have to use MTB as we are decryting the file from the sender).
    Or is there any other method apart from java mapping or module development to handle these files

  • Use of Additional Parameters in JDBC Sender Adapter

    Hi -
    Can anybd tell me the Use of "Name, Value" Entries while setting the Additional Parameters in the Sender JDBC Adapter...
    And if is Same for All adapaters...what is the need of Setting Name-value pair in these Adapters?

    Hello Jeet,
    Go through the following link..
    http://help.sap.com/saphelp_nw2004s/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm
    Regards,
    Sumit

  • ADF mobile: how do I upload a file using the rest adapter api

    Hello,
    I want to upload files using the rest adapter. How would I upload files such as pdfs, images (png, jpg ..) etc.. Some code would be appreciated.
    Thanks,

    Thanks Frank,
    The back-end is functioning in the following way (using Jersey and handling input streams):
        @POST
        @Path("/uploadFile")
        @Consumes(MediaType.MULTIPART_FORM_DATA)
        public Response uploadFile(@FormDataParam("file") InputStream uploadedInputStream, @FormDataParam("file") FormDataContentDisposition fileDetail) {
            String uploadedFileLocation = "D:\\temp\\uploadsTest\\" + fileDetail.getFileName();
            // save it (this function reads from the input stream)
            writeToFile(uploadedInputStream, uploadedFileLocation);
            String output = "File uploaded to : " + uploadedFileLocation;
            return Response.status(200).entity(output).build();
         Is there a way to send data over a stream?
         Thanks,

  • How to attach two files in the send mail action

    Hi experts
    I want to attach two files in the send mail action . I tried using ; as a separator but it did not work .
    Regards,
    Antonio R . Rubalcaba

    Thanks Jeremy,  
    Yes I am contemplating the another threat .  I still want to send two files because the two files have very distinct type of information .  The first one is operational and the second one is about statistics .  Of course that I can send both type of inforrmation in only one file . I just want to save time to the end user and let him select what infomation he wants to see .
    Thanks and my best wishes for you and your family ,
    Antonio

  • How can i read only .txt file and skip other files in Mail Sender Adapter ?

    Hi Friends ,
                       <b> I am working on scenario like , I have to read an mail attachement and send the data to R3.</b>
                        It is working fine if only the .txt file comes.
                      <b>Some times ,html files also coming along with that .txt files. That time my Mail adapter fails to read the .txt file.</b>
                       I am using PayLoadSwap Bean and MessageTransformBean to swap and send the attachment as payload .
                         <b>Michal as told to write the Adapter module to skip the files .But i am not ware of the adapter moduel . If any blogs is there for this kind of scenarios please give me the link.</b>
                           Otherwise , please tell me how to write adapter module for Mail  Sender Adapter?
                      How to download the following
                        newest patch of XI ADAPTER FRAMEWORK CORE 3.0
    from SAP Service Marketplace. Open the file with WinZip and extract the following
    SDAs:
    &#61589;&#61472;aii_af_lib.sda, aii_af_svc.sda
    &#61589;&#61472;aii_af_cpa_svc.sda
                        I have searche in servive market place .But i couldn't find that . Can you please provide me the link to download the above .
                      If any other suggestions other than this please let me know.
    Regards.,
    V.Rangarajan

    =P
    Dude, netiquette. Messages like "i need this now! Do it!" are really offensive and no one here is being payed to answer anyone's questions. We're here because we like to contribute to the community.
    Anyway, in your case, just perform some search on how you could filter the files that are attached to the message. The sample module is just an example, you'll have to implement your own. Tips would be to query the filename of the attachments (or maybe content type) and for the ones which are not text, remove them.
    Regards,
    Henrique.

  • Module in the sender Adapter

    Dear all ,
    I have writeen a module in the sender file adapter.
    How do I capture the communication channel name , sender Business sys , party name inside the module

    com.sap.aii.af.service.cpa
    Class Channel
    java.lang.Object
      +--com.sap.aii.af.service.cpa.impl.cache.AbstractCacheItem
            +--com.sap.aii.af.service.cpa.impl.container.CPAObject
                  +--com.sap.aii.af.service.cpa.impl.container.AttributeExtendedCPAObject
                        +--com.sap.aii.af.service.cpa.Channel
    use the methods,
    getChannelName(),        
    getParty() and getService()

  • File content conversion sender adapter

    Hi Friends,
    I am doing File to IDoc scenario.
    I am using File Content Conversion for File Adapter.
    My structure look like this
    MT_File
    HEADER1 1..1
    --header1
    -- header2
    HEADER2 1..1
      --header3
    DETAILS 1..unbounded
    --details1
    --details2
    --details3
    TRAILER1 1..1
      -- trailer1
    TRAILER2 1..1
      -- trailer2
    ----trailer3
    In File Content conversion parameeters..
    Document Name :MT_File
    Document Namespace :urn:test:FileFcctoIdoc
    RecordSet name :
    RecordsetStructure :HEADER1,1,HEADER2,1,DETAILS,*,TRAILER1,1,TRAILER2,1
    RecordSet Structure: Ascending
    RecordSet Per message : *
    Key Field Name :header1,header3,details1,trailer1,trailer3
    ignoreRecordsetName     : true
    HEADER1.fieldNames      :header1,header2
    HEADER1.keyFieldValue      : H1
    HEADER1.fieldFixedLengths  :5,10
    HEADER1.endSeparator   :'nl'
    HEADER2.fieldNames             :header3
    HEADER2.keyFieldValue         : *D
    HEADER2.fieldFixedLengths     :5
    HEADER2.endSeparator         :'nl'
    DETAILS.fieldNames               :details1,details2,details3
    DETAILS.keyFieldValue         : 3
    DETAILS.fieldFixedLengths     :5,5,5
    DETAILS.endSeparator         :'nl'
    TRAILER1.fieldNames               :trailer1
    TRAILER1.keyFieldValue         : *S
    TRAILER1.fieldFixedLengths     :5
    TRAILER1.endSeparator         :'nl'
    TRAILER2.fieldNames               :trailer2,trailer3
    TRAILER2.keyFieldValue         :SE    TRAILER2.fieldFixedLengths    :5,5
    TRAILER2.endSeparator         :'nl'
    File is :
    H1hh1hhhhhhhhh2
    *Ddd*
    Xddd1dddd2dddd3
    Xddd4dddd5dddd6
    Xddd7dddd8dddd9
    *Sss*
    SEKss2
    in RWB, Channel CC_FILE_Sender_FccDemo: Empty document found. Proceed without sending message
    I think the problem is in FCC paramters..
    Could please have a look and correct me
    Regards
    Ram

    Ram,
    The problem which i can see is your key field values in your test file. Remember you should have the key field value in each new line at the same place.
    For example you have given your text file as shown below...
    File Given By You is :
    >H1hh1hhhhhhhhh2
    >*Ddd *
    >Xddd1dddd2dddd3
    >Xddd4dddd5dddd6
    >Xddd7dddd8dddd9
    >*Sss *
    >SEKss2
    Compair the above file with the below one..
    >H1hh1hhhhhhhhh2
    >*Ddd *
    >Xddd1dddd2dddd3
    >Xddd4dddd5dddd3
    >Xddd7dddd8dddd3
    > *Sss *
    >SEKss2
    If you notice, for details I have given key field value 3 in each line & at same place.
    One more thing just use the KeyFieldName only one ( just follow the same blog which I have given, to understand how to use the KeyFieldName )
    e.g.
    Document Name :MT_File
    Document Namespace :urn:test:FileFcctoIdoc
    RecordSet name :
    RecordsetStructure :HEADER1,1,HEADER2,1,DETAILS,*,TRAILER1,1,TRAILER2,1
    RecordSet Structure: Ascending
    RecordSet Per message : *
    Key Field Name : KF
    Regards,
    Sarvesh

  • IMS transactions encoding in the Sender adapter.

    Hello,
    I would like to use the FTP sender to pick up files created as IMS transactions, which are in EBCDIC encoding, I don't know what value to use for the content conversion in the sender CC to decode the binary.

    As it turns out, we are having a completely different problem with the adapter right now, so i can't test these right now.  I will give yo guys points for responding and leave the resolution of this for another time.

  • Read a FIle using a Sender Adapter

    Hi Experts,
    Is there any way to read a file at the external FTP Server without deleting or archiving it. I would not like to use the "Test Mode" processing Mode in the production System(  ) and also i need to schedule this adapter for 3 hours to read the file whenever it is generated  in every morning. This should be done only once ie.. one message to be created.
    We are not using any content conversion.
    In this case , we are not using any mappings but only retrieving the file from the external system.
    -Reynold

    The scheduling of your channels would always help. Use Planning Availability Times to activate the channel at 3 AM and deactivating at 6 AM.
    With the test mode, if you are sure that one file should be picked only once, then keep the poll interval as more that 180 minutes. This would ensure that between 3-6 AM, the file would be picked only once. After that the channel will get deactivated. Next day, refreshed polling will be started.
    Regards,
    Prateek

  • SOAP: "XI.Timeout" module in the sender adapter

    Hi,
          Could you please explain in detail, how to enter the XI.timeout module in the soap sender adapter.
    Regards,
    Vishnu.

    Hi Vishnu,
    The default timeout value for synchronous calls is 5 minutes. You can increase this value by setting parameter XI.Timeout in the module parameter table of the SOAP adapter. The value must be given in milliseconds. For example, value 600000 represents the timeout value of 10 minutes. This parameter is not recognized in systems prior to SP13.
    In the Module tab of the Communication channel you can find Module Parameters can be specified under Module Configuration section.
    Add the XI.Timeout Parameter with some Parameter Value.
    regards
    Ganga

  • I need to obtain the size of file before the send to server

    Hello,
    I need to obtain the size in bytes the a internal table before the send to server, I use the DESCRIBE sentence but is not allowed me to obtain this value, that sentence I need to use.
    Thanks in advance,
    DL

    If you are on release 620, have a look at class CL_ABAP_MEMORY_UTILITES method GET_MEMORY_SIZE_OF_OBJECT. It will tell you how much memory is allocated and how much is actually used. Here is some sample code:
    TABLES: sflight.
    DATA: isflight TYPE TABLE OF sflight.
    SELECT-OPTIONS: carrid FOR sflight-carrid.
    SELECT * FROM sflight INTO TABLE isflight
            WHERE carrid IN carrid.
    DATA: size1 TYPE abap_msize,
          size2 TYPE abap_msize,
          size3 TYPE abap_msize,
          size4 TYPE abap_msize,
          flag1 TYPE char128,
          size5 TYPE abap_msize,
          size6 TYPE abap_msize,
          flag2 TYPE char128,
          flag3 TYPE char128.
    TRY.
      CALL METHOD cl_abap_memory_utilities=>get_memory_size_of_object
        EXPORTING
          object                     = isflight
        IMPORTING
          bound_size_alloc           = size1
          bound_size_used            = size2
          referenced_size_alloc      = size3
          referenced_size_used       = size4
          is_part_of_non_trivial_szk = flag1
          szk_size_alloc             = size5
          szk_size_used              = size6
          low_mem                    = flag2
          is_in_shared_memory        = flag3.
    ENDTRY.
    WRITE: / 'Size of Bound and Allocated Memory:', size1.
    WRITE: / 'Size of Bound and Used Memory:', size2.
    WRITE: / 'Size of Referenced and Allocated Memory:', size3.
    WRITE: / 'Size of Referenced and Used Memory:', size4.
    WRITE: / 'Strongly Connected Component of Object:', flag1.
    WRITE: / 'Size of Allocated Memory of SCC:', size5.
    WRITE: / 'Size of Used Memory of SCC:', size6.
    WRITE: / 'Flag, whether only bound_size_* are filled due to mem.short.:', flag2.
    WRITE: / 'Flag, whether ONJECT is in the shared memory:', flag3.
    If you aren't on 620 or don't need to be that precise, you might try the following:
    DESCRIBE TABLE isflight LINES size1.
    WRITE: / 'Number of Lines:', size1.
    DATA: wa_sflight LIKE LINE OF isflight.
    DESCRIBE FIELD wa_sflight LENGTH size2 IN BYTE MODE.
    WRITE: / 'Size of one Line:', size2.
    size3 = size1 * size2.
    WRITE: / 'Total Size:', size3.
    Please note that the addition IN BYTE MODE only works in 610 and higher. It isn't neccesary before that release. However it is important to get accurate resuls in an Unicode System.

  • Can File Adpater read EBCDIC file on the sender side

    Hi ,
    I Have file to Proxy scenario and on the sender side I have EBCDIC file can file adpater can read it into normal text format can any one suggest me how to encode the file
    Thanks Inadvance
    Byee

    Hi ,
    Since my scenario is File to Proxy I need to send data to Proxy I cant send it in EBCDIC format ..... So I want data to bein normal text format........
    I am looking for it .........
    for EJB do you have any piece of code... that will be helpfull
    Thanks Inadvance....

Maybe you are looking for

  • How to generate a html file from a xml file with the default Firefox look and feel

    Hello Any xml or xsd file are pretty printed with Mozilla firefox. I would like to generate the equivalent html file, in order to introduce it later in a Word document. Do you use a xslt file ? How can I do this ? Best regards

  • How I can access the user folder in Windows 7?

    Hi all. I have the following problem: I am using Windows 7 with Acrobat X and want to include a trusted function in my user folder, but when running on the console app.getPath ("user", "javascript"), I returned the following error : GeneralError: The

  • Result Set - How to retrieve the number of rows in resultset

    harlo....everyone. i m new in this language and would like to ask that how can i store the result into an array or u all hav others ideal to do it......? Hopefully can get answer asap....thanksssss. Below is the source code that i did. Please comment

  • Properties Settings disabled

    I just installed the most recent Adobe updates and now my Acrobat Pro 9.3.1 will not allow any property settings changes on my most recently created PDF files. All of the security and viewing options are grayed out. This is not the case with PDF file

  • Digitally responding to the notification sent by workflow

    Hi, I have a requirement that states that the response to a notification needs to be electronically/digitally signed by the end user. I went through the documentations related to workflows and it states something about a message attribute by the name