Dynamic configuration with a target ZIP file

Hi,
I have an scenario file to file. Source is a ZIP file, so CC is a FILE NFS Binary.
XI acts as a FTP mover and there aren't  message mapping nor Integration directory definition .
Target and source filename it's the same.
But target directory must be defined dinamically.
For example.
Source file :   filename_x1234.zip
Target file :   directory x1234, filename filename_x1234.zip
Is that possible?
Thanks, in advance
Carme

>
Indira Deivasigamani wrote:
> Hi,
>
> It is not possible to specify the directories dynamically.
>
> Thanks,
> Indira D
Of course it is!
For the target directory, at least.
Just use Dynamic Configuration (as for the filename) and fill the proper value in the mapping (UDF, f.ex.) or custom module. The technical name is "Directory" and the namespace is "http://sap.com/xi/XI/System/File", as described in http://help.sap.com/saphelp_nw70/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm.
Regards,
Henrique.

Similar Messages

  • Dynamic Configuration - Set Directory Path for File Receiver Adapter

    Hi Experts,
    I have a question regarding the dynamic configuration for the file adapter. Is it possible to set a directory path without a message mapping for the file receiver adapter? the problem is that I want to import a pdf document. this pdf document I want to store in a dynamic directory (depending on the filename). so I have to read the filename out of the dynamic configuration and generate (depending on the filename) a directory for this file. Is that possible without a message mapping? I cannot make a message mapping because the file has the pdf format and should not get changed.
    best regards
    Christopher Kühn

    Hi Gaurav,
    I use the ASMA (respectively the filename) for the sender adapter. After the pdf was imported into XI this filename is in the ASMA.
    But what then??? How can I get this filename with the help of the variable substitution? and if I have this filename I have to change this filename a bit to generate the name / path of the directory.
    Please explain it to me detailled
    Thanks and regards
    christopher

  • Problem with Java and Zip Files

    Hello there everyone. I have a problem with trying to zip up directories with empty folders in them. They zip fine with my code, but according to winzip, the number of files in the archive is incorrect. It's supposed to have a total of 288 files in it, but when it's zipped up, it only says 284. I mention specifically the "empty directories" note because the zipping works fine without empty folders.
    Below is the code for the zip method:
    public static void zip(File[] list, File zipfile, File zipRoot)
         throws IOException {
          if (!zipfile.exists()) {
                   zipfile.createNewFile();
              else if (!zipfile.isFile()) {
                   throw new IOException("The zip file, " + zipfile.getAbsolutePath()
                             + " is not a file.");
              if (list.length == 0) {
                  LOG.error("The list of files to zip up is empty.");
              for (int i = 0; i < list.length; i++) {
                   if (!list.exists()) {
                        throw new IOException("The file or directory, " + list[i].getAbsolutePath()
                                  + " does not exist.");
              FileOutputStream fos = new FileOutputStream(zipfile);
              ZipOutputStream zos = new ZipOutputStream(fos);
              for (int i = 0; i < list.length; i++) {
                   if (LOG.isDebugEnabled())
                        LOG.debug(i + ": " + list[i].getName());
                   String entryName = getRelativeName(list[i], zipRoot);
                   if (list[i].isDirectory()){
                        if (list[i].listFiles().length == 0){
                             ZipEntry entry = new ZipEntry(entryName + "/");
                             zos.putNextEntry(entry);
                   else {
                        ZipEntry ze = new ZipEntry(entryName);
                        zos.putNextEntry(ze);
                        byte[] buffer = new byte[8096];
                        FileInputStream fis = new FileInputStream(list[i]);
                        int read = 0;
                        read = fis.read(buffer);
                        if (LOG.isDebugEnabled())
                        LOG.debug("\tFound " + read + " bytes.");
                        if (read == -1){
                             //empty file, but add it for preservation.
                             //zos.write(buffer,0,0);
                        while (read != -1) {
                             zos.write(buffer, 0, read);
                             read = fis.read(buffer);
                        fis.close();
                        zos.closeEntry();
              zos.close();
    The files look like they're there, but I need the system to be able to determine the number correctly. 
    Here's the interesting thing:  It zips the files, and then when I use the size() method for zip files in java, it says 284 files.  But when I unzip, it says 288 again.  It's like there's files missing when compressed, but when decompressed, they return.  Note that the files are actually there.  If I open the archive in a third party app such as Winzip AND Winrar AND IZarc, they all show 288 files.  Any idea what would make the number of files appear incorrectly in a zip file when zipped by java with the code above?  Thanks in advance.
    - Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I figured out the problem. When zipping files in windows using winzip, it doesn't explicitly count folders as a "file/folder" as a file in itself. It will create the folders for files to go in, but the folder itself will not be 'counted' when you query the info of the file itself. You have more control of the zip file in java, and can count the folder as a file or not.

  • Send email with password protected zip file attachment

    Hi Experts,
    The requirement is to zip a password protected excel file and send the zipfile through email. There is no middleware(PI) involved. The program has to be run in background mode. It is possible to create a password protected excel file using OLE method, but it will not work in background mode.
    Also it is possible to place the zip file in application server, but I am not able to give password for this file.
    Any help would be greatly appreciated.
    Regards,
    Renjith Nair

    Hi,
    You have to write a customer adapter module to handle this requirement.
    Zip/Unzip can be done using the payloadzipbean standard module:
    http://help.sap.com/saphelp_nw04/helpdata/en/45/da9358a1772e97e10000000a155369/content.htm
    /people/stefan.grube/blog/2007/02/20/working-with-the-payloadzipbean-module-of-the-xi-adapter-framework
    Is encoding an option instead of password for you:
    /people/farooq.farooqui3/blog/2008/09/24/sap-xipi-encode-outgoing-payload-using-adapter-module

  • Download problems with grid control zip file

    Hello,
    Does anyone have any insight as to why I am having problems fully downloading the first zip file for linux? I was able to download file 2 and file 3 completely without any problems but the first file always stops at around 600 MB.
    I have tried three different computers.
    Thanks in advance.
    A/A

    Downloaded about 1 month ago without any problem. If it fails again, let me know. I can test it again.

  • Problem with creating a ZIP file

    I have a program that uses java.util.zip to zip all the files in a user's directory (aproximately 7 files totalling 2 MB). When the files are extracted later using WinZip or a similar tool, the files appear to be the same (same file size & date), but they can not be opened by the program that uses them. When I use a binary diff tool to compare the before zip and after zip files, it shows about 20 random bytes that have changed. Anybody else seen this occur?
    Thanks

    Hi,
    I am successfull in putting all the files of a
    directory in a newly created ZIP file. But if my
    directory has a sub-directory, it's not workin....m
    not able to zip it properly. I mean, my program is
    doin it withour error but when i try to open it using
    WinZip...it's giving me an error sayin as not a proper
    archive...
    Do anyone have faced this problem??
    GauzYou need to call the following functions of ZipOutputStream after completing zipping in your code ?
         objZipOutputStream.finish();
         objZipOutputStream.close();Also for every file being zipped, you should to call
    objZipOutputStream.closeEntry()to close that zipEntry.
    Hope this helps.

  • I am having trouble with downloading a zip file. When I do, it gives me the error message (filename) could not be opened, because an unknown error occurred.

    (filename) could not be opened, because an unknown error occurred.
    Try saving to disk first and then opening the file.

    *kb.mozillazine.org/Unable_to_save_or_download_files
    *https://support.mozilla.org/en-US/kb/cant-download-or-save-files

  • Dynamic Configuration for two file adapters communication channels

    Hello Experts!!!!!!
         In one of the interface in my landscape, I am using two file adapters for creating two files with different names and at two different destination on F.T.P.
    However the receiver service for both the communication channel are same.
    In message mapping I am using multi mapping to create two files out a single message.
    Now i have a requirement of changing file path and file name using dynamic configuration for both the comm channel.
    When i doing dynamic coniguration for both the comm. channel. My interface is creating two files but with same name and on same destination which is set for second communication channel through dynamic configuration.
    Here, I guess the second dynamic configuration is over writing the first dynamic configuration and hence creating two files with same name and at same destination.    
    Please suggest, if separate dynamic configuration for separate communication channel of same receiver service can be done?
    Thanks & Regards,
    Amol

    Thanks for your prompt responses!!!!!
        Is there any way, By which in dynamic configuration I can find out the communication channel name and then change its parameter.
    I mean if iam using say comm. channel A and B.
    Then in dynamic configuration for A, I will first take communication channel A by calling it and then change its path/file name.
    and then do samething for comm. channel B in its dynamic conf.
    Regards,
    Amol

  • How to read ZIP files(having PDFs,Image) using MQ Series link for R/3

    Hi,
    1)Is it possible to transfer a zip file (having an image or pdf) using IDocs in SAP 4.6C using MQ Series link for R/?
    Scenario: "MQ Series link for R/3" converts Business-Reports from a third-party software,into SAP IDocs.Each Business-Report contains one XML file and one ZIP file.
    2)Being on ABAP side,do I have to worry about how the zip file would be converted into IDocs?
    Detailed descrption:
    This scenario requires integration of a non-SAP software which talks in XML with SAP R/3(4.6C).The customer has decided to go with 'MQ Series link for R/3' (which integrates any non-SAP application running on IBM MQ Series to R/3,by converting data(in any format) into IDocs).He is not ready to go for XI.
    The Problem area is a functionality which requires the non-SAP software to send XML file along with an attached Zip file.So,XML document,basically,has a 'zippedFile' XML element having actual file in XML keyword 'file'.
    This XML document ideally, should be converted by the subsystem(MQSeries link for R/3) into IDocs i.e. into a stream which could be stored in a table on R/3 side and later, sent back to the non-SAP software through MQ Series link to be converted into zip-file again with corresponding pdfs,images.I want someone who has worked in a similar scenario to confirm this.

    Hi,
    I have a feeling I have posted this question in the wrong forum or maybe I will let you decide this.Any help would be appreciated (even the right forum name).
    My scenario requires integration of a non-SAP software which talks in XML with SAP R/3(4.6C).The customer has decided to go with 'MQ Series link for R/3' (which integrates any non-SAP application running on IBM MQ Series to R/3,by converting data(in any format) into IDocs).He is not ready to go for XI.
    The Problem area is a functionality which requires the non-SAP software to send XML file along with an attached Zip file.So,XML document,basically,has a 'zippedFile' XML element having actual file in XML keyword 'file'.
    This XML document ideally, should be converted by the subsystem(MQSeries link for R/3) into IDocs i.e. into a stream which could be stored in a table on R/3 side and later, sent back to the non-SAP software through MQ Series link to be converted into zip-file again with corresponding pdfs,images.I wanted someone who has worked in a similar scenario to confirm this.

  • How do I read a zipped file I have received in my mail?

    Hi
    I have received a zipped word file in the mail but cannot open it. Can I fix this?
    J

    You need an app that's capable of reading zipped files to open the attachment in and then unzip it e.g. GoodReader (not sure whether it deals with password protected zip files)

  • Why do i get a decompression failed notice for downloading zip files

    I'm trying to download my marks for my class and they were posted in a .zip file. however in the downloads box it's telling me that 'decompression failed' and when I try opening it it cannot be opened because it 'is still being downloaded'. I used to be able to open the files, but I don't know what I did.
    I'm new to macs, so it's challenging for me to figure out what the exact problem is, and then to find the solution.
    Thanks for your time!

    Greetings,
    This may be an issue with the specific Zip file you are trying to open (in which case contact your teacher to have them emailed to you separately).
    Make your own Zip file by clicking on any document (like a picture) on the desktop and then go to File > Compress.  Try opening the resulting Zip file and see if it works.  If it works then whatever is going on is with that particular Zip file.  Make sure you are giving the file long enough to download.

  • Error in unpack zip files!

    Hi all,
    I m preparing instalation for e business suite 12 and I was downloads
    12 (30 Gb 41 pcs of appx 1 Gb each) and when I was unpack this
    *zip files, from stage directory into startup appdb etc some of this files
    from unzip were send "ERROR IN UNZIP" (Just one or two from 40)
    Did I continue with installation or again download this files?
    If I continue with this installation with this demage zip files does
    e bussines suite will work in basic state for demonstration purposes?
    Thanks
    Gordan

    Check the file which RapidWiz fails to extract, are you able to unzip it manually? If not, then I suggest you re-download the file and start the installation all over again. The installation will not be successfull if you have any damaged files.

  • Zip files broken - Can't open, getting error

    I am no longer able to unzip my zip files.  It was working one day and broken the next.  The zip file icons no longer have a zipper, they simply show as a blank sheet.  When I double click to open/extract, I receive this message:
    The document “mydocument.zip” could not be opened. The file isn’t in the correct format.  The document “AmazonS3HowToFull.zip” could not be opened. The file isn’t in the correct format.
    This is happening with all my zip files.  New and old.  I have tried reinstalling UnRarX with no luck.
    It would seem that zip files are no longer associated with the appropriate app.  I don't know if there was a default unzip app on the Macbook.
    There is nothing I can put my finger on that I have done recently or differently that would have caused this change.
    I'm running OSx Lion 10.7.4.
    Thanks for any help you can give!
    Doug

    Thank you for trying to help. But I have tried to download the Program MPEG Streamclip as you said but unfortunately it need Quicktime too, the Readme said that there were another program I could use too called Quicktime Alternative. So I tried to uninstall the real Quicktime and install the alternative instead. But either the program MPEG Streamclip can't see that I have removed Quicktime or that I have removed the old one.
    Every time I put an .avi file into the program it can only convert about 1:30min of the movie and that is only with the sound no movie, and if I put one of the .MPG (that Itunes can't convert) in an error box pops up and says:
    *The Apple QuickTime 6 MPEG-2 Playback Component is not installed...*
    Please uninstall QuickTime completely. Then install QuickTime Alternative (1.61 or later), making sure the "Extra QuickTime plugins checkbox is enable.
    Alternatively, if you have Apple QuicktTime and you don't want to uninstall it, you can buy MPEG-2 Playback Component from Apple Computer.
    I think this is a bit sad cause I just bought the new Ipod Touch and I can't put the movies I like the most.
    Hope someone can help me...
    But thanks for the time you used to try to help me QuickTimeKirk

  • Getting access to encrypted zip files

    hey folks!
    has anyone of you successfully decrypted a password-protected zip file with pure java code?
    if so, please give me some advice or maby some sample code that I can figure out how it works.
    thanks

    sorry, I think I didn't express myself the right way.
    the problem is the following:
    a zip file is created with winzip and is also encrypted with it. this zip file is the input for the tool that I write. my tool should now be able to decrypt and uncompress all the encrypted files in the zip file.
    as far as I know winzip uses different encryption algorithms, so I have no idea where to start.
    I have already read about this bouncy castle stuff but didn't bring my any further

  • Creating zip files in pl/sql.

    I'm using code posted on this forum to create zip file in pl/sql. Works greate for combing multiple files into one archive. That's until I have to add a zip file.
    Here's my test:
    drop table t1;
    create table t1 (file_name varchar2(100), file_blob blob);
    declare
    v_new_blob blob;
    v_file_name varchar2(100);
    v_buffer_raw raw(1000);
    v_length integer;
    b_zipped_blob BLOB;
    zip_files zz_zip.file_list;
    t_file blob;
    begin
         dbms_lob.createtemporary(v_new_blob,true);
         v_buffer_raw := UTL_RAW.cast_to_raw('AAAA');
         v_length := UTL_RAW.length(v_buffer_raw);
         dbms_lob.writeappend(v_new_blob, v_length, v_buffer_raw);
         insert into t1 values ('tmp\FileA.txt',v_new_blob);                         
         dbms_lob.freetemporary(v_new_blob);
         dbms_lob.createtemporary(v_new_blob,true);
         v_buffer_raw := UTL_RAW.cast_to_raw('BBBBBBBBB');
         v_length := UTL_RAW.length(v_buffer_raw);
         dbms_lob.writeappend(v_new_blob, v_length, v_buffer_raw);
         insert into t1 values ('tmp\FileB.txt',v_new_blob);                         
         dbms_lob.freetemporary(v_new_blob);
         dbms_lob.createtemporary(v_new_blob,true);
         v_buffer_raw := UTL_RAW.cast_to_raw('CCCCCCCCCCCCC');
         v_length := UTL_RAW.length(v_buffer_raw);
         dbms_lob.writeappend(v_new_blob, v_length, v_buffer_raw);
         insert into t1 values ('tmp\FileC.txt',v_new_blob);                         
         dbms_lob.freetemporary(v_new_blob);
         dbms_lob.createtemporary(v_new_blob,true);
         v_buffer_raw := UTL_RAW.cast_to_raw('DDDDDDDDDDDDDDDDDDDDDDDDDD');
         v_length := UTL_RAW.length(v_buffer_raw);
         dbms_lob.writeappend(v_new_blob, v_length, v_buffer_raw);
         insert into t1 values ('tmp\FileD.txt',v_new_blob);                         
         dbms_lob.freetemporary(v_new_blob);     
         commit;
         select file_name, file_blob into v_file_name, v_new_blob
              from t1 where file_name = 'tmp\FileA.txt';
         zz_zip.add1file(b_zipped_blob, v_file_name, v_new_blob);
         select file_name, file_blob into v_file_name, v_new_blob
              from t1 where file_name = 'tmp\FileB.txt';
         zz_zip.add1file(b_zipped_blob, v_file_name, v_new_blob);     
         select file_name, file_blob into v_file_name, v_new_blob
              from t1 where file_name = 'tmp\FileC.txt';
         zz_zip.add1file(b_zipped_blob, v_file_name, v_new_blob);     
         zz_zip.finish_zip(b_zipped_blob);
         zip_files := zz_zip.get_file_list( b_zipped_blob );
         for i in zip_files.first() .. zip_files.last
         loop
              dbms_output.put_line( zip_files( i ) );
         end loop;
         dbms_output.put_line('--');      
         -- Output
         FileA.txt
         FileB.txt
         FileC.txt
         -- Save zip in t1
         insert into t1 values ('ZipZZ.zip',b_zipped_blob);
         commit;     
         -- Create new zip file and add ZipZZ.zip and FileD.txt
         b_zipped_blob := null;
         select file_name, file_blob into v_file_name, v_new_blob
              from t1 where file_name = 'ZipZZ.zip';
         zz_zip.add1file(b_zipped_blob, v_file_name, v_new_blob);     
         select file_name, file_blob into v_file_name, v_new_blob
              from t1 where file_name = 'tmp\FileD.txt';
         zz_zip.add1file(b_zipped_blob, v_file_name, v_new_blob);     
         zz_zip.finish_zip(b_zipped_blob);
         zip_files := zz_zip.get_file_list( b_zipped_blob );
         for i in zip_files.first() .. zip_files.last
         loop
              dbms_output.put_line( zip_files( i ) );
         end loop;
         dbms_output.put_line('--');      
         /* output
         ZipZZ.zip
         tmp\FileD.txt
         -- save ZipXX.zip
         insert into t1 values ('ZipXX.zip',b_zipped_blob);
         commit;     
    end;
    --Test with other zip files.
    insert into t1 values ('File1.zip',null);
    commit;
    -- I've created a small zip file File1.zip using Winzip. It contains only 1 small text file File1.txt
    -- I use toad to insert into blob column.
    declare
    v_new_blob blob;
    v_file_name varchar2(100);
    v_buffer_raw raw(1000);
    v_length integer;
    b_zipped_blob BLOB;
    zip_files zz_zip.file_list;
    t_file blob;
    begin
         select file_name, file_blob into v_file_name, v_new_blob
              from t1 where file_name = 'File1.zip';
         dbms_output.put_line('Blob length: '||dbms_lob.getlength(v_new_blob));
         zz_zip.add1file(b_zipped_blob, v_file_name, v_new_blob);     
         zz_zip.finish_zip(b_zipped_blob);
         zip_files := zz_zip.get_file_list( b_zipped_blob );
         for i in zip_files.first() .. zip_files.last
         loop
              dbms_output.put_line( zip_files( i ) );
         end loop;
         dbms_output.put_line('--');
         -- save new file as Zip1.zip
         insert into t1 values ('ZipFF.zip',b_zipped_blob);
         commit;     
    end;      
         Output
         Blob length: 1855
         File1.zip
         File1.txt
    Now, new zip file contains both File1.zip and File.txt.
    My expected result was just File1.zip
    Thanks.

    Your first example looks like I would expect (or do I miss something?).
    Your second example is strange, but it I can't reproduce it. If I zip a zipfile with my package it contains only the zipfile:
    declare
      my_zip blob;
      new_zip blob;
      zip_files as_zip.file_list;
      function file2blob(
        p_dir in varchar2
      , p_file_name in varchar2
        return blob
      is
        file_lob bfile;
        file_blob blob;
      begin
        file_lob := bfilename( p_dir
                             , p_file_name
        dbms_lob.open( file_lob
                     , dbms_lob.file_readonly
        dbms_lob.createtemporary( file_blob
                                , true
        dbms_lob.loadfromfile( file_blob
                             , file_lob
                             , dbms_lob.lobmaxsize
        dbms_lob.close( file_lob );
        return file_blob;
      exception
        when others
        then
          if dbms_lob.isopen( file_lob ) = 1
          then
            dbms_lob.close( file_lob );
          end if;
          if dbms_lob.istemporary( file_blob ) = 1
          then
            dbms_lob.freetemporary( file_blob );
          end if;
          raise;
      end;
    begin
      my_zip := file2blob( 'MY_DIR', 'as_fop.zip' );
      dbms_output.put_line('zip file to start with');
      zip_files := as_zip.get_file_list( my_zip );
      for i in zip_files.first() .. zip_files.last
      loop
        dbms_output.put_line( zip_files( i ) );
      end loop;
      dbms_output.put_line('--');
    --  now create a new zip file containing the existing zip file as_fop.zip
      as_zip.add1file( new_zip, 'as_fop.zip', my_zip );
      as_zip.finish_zip( new_zip );
    --  see what's in the new zip
      dbms_output.put_line('zip file containing a zipfile');
      zip_files := as_zip.get_file_list( new_zip );
      for i in zip_files.first() .. zip_files.last
      loop
        dbms_output.put_line( zip_files( i ) );
      end loop;
      dbms_output.put_line('--');
    end;
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    zip file to start with
    as_fop.sql
    zip file containing a zipfile
    as_fop.zip
    PL/SQL procedure successfully completed.
    ANTON@XE>Anton

Maybe you are looking for

  • Unable to see the gl balances in FS10N

    Hi, I am unable to see the gl balances in FS10n for the periods that were having the balances. I have activated the new GL and amounts that are posted only after activating the new GL are comming. What should I do to see the gL balances for all the p

  • Disable auto-complete but keep a dropdown list of suggestions

    I'd like the behavior that if I type something into the awesome bar and press enter, I search for exactly what was typed, and nothing more. However, I like having the drop-down list of autocompletable suggestions to be selected explicitly be me, via

  • Problem after updating to ios 6.1

    Hi, I updated my iPhone 4 to ios 6.1 and lost all my contacts, text messages and most importantly my photos. I did the backup just before upgrading and now when I restore it back, it turns out to be like a new phone.How to get back photos and text me

  • Help: why a value of 100 from R3 becomes *0.0 on BW query?

    When running a query, find most of the values in a column are *0.0.  Check the corresponding field value on R3, find the values should be 100, why 100 on R3 shows *0.0 on BW query? Thanks

  • Web Service API sample code

    Howdy All, I am trying to work through the iTunes U Admin's guide directions on how to upload content using the Web Service API. I have completed everything through step 2, (I believe it is page 48 in the current guide), Request an Upload URL from iT