File to file scenrio

Hi
I am doing file to file scenario , i want to find the directory path at receiver dynamically on the basis of sender business service name
for eg if the file is coming from business service X101 then the file should go in folder X101
Any ideas
Regards
Swatantra

Jai,
This code can be used inside the Message Mapping in any UDF or in the Intilization Section of Java Section to get the Sender Business Service and then set it against the filename using the Adapter Specific Identifiers.
All the explanation for this code willbe on these 2 links,
http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
The advantage of using this code is that the configuration remains the same.
But, Vijay would need only one receiver File Communication channel and the Directory name would be used dynamically from the mapping in the run time.
Regards,
Bhavesh

Similar Messages

  • Step by Step Guide Details for RFC to File and File to RFC scenario

    Hi Guru's
    Good day to you. I am tyring to develop some scenarios based on RFC adaptor. so i want to start up with basic scenarios like RFC to File  scenario(Here i just want to pull some data from SAP using RFC and put it in destination folder as an text file) and FILE to RFC scenario (Here i just want to take some data from the file and update into SAP).
    For doing these scenarios i would like to request you people to send me the step by step guide which explains me about the complete steps of configurations required to do the RFC to FILE scenario and FILE to RFC scenario.
    I found some scenarios and i am in confused state. so i request you to please put your experience to help me out.
    thanks in advance.
    Regards
    Raj

    Hi Aaron,
    I don't know your scenario and your ECC and PI versions but I learned how to use ABAP Proxy more than 1 year ago with the following tutorial:
    Edit--> The forum doesn't allow me to post external link, just search "ABAP Proxy Communication Scenario" in google and visit the 1st result
    The way to develop ABAP Proxys has changed a little if your PI is 7.1. In the ECC side, the transaction SPROXY looks much better too if you have a recent version of the ECC.
    Edited by: Marshal on Oct 8, 2009 5:08 PM
    I've found that SDN Document. Maybe the scenario is not the most simple to start with ABAP Proxy but is very well documented and is for PI 7.1. The document also handles the inbound and outbound proxys
    [http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c00ca32e-f991-2b10-f5be-97114bd2b08f&overridelayout=true]
    Edited by: Marshal on Oct 8, 2009 5:22 PM

  • Help needed for file to file communication

    Dear all I am working on file to file adapter in XI 3.0 . I tried to different waysof flat file location C:\ and C:/ I am not soure witch one is currect and any time i am getting NO MESSAGE FOUND ! error in SX_MONI.
    and
    Any one have step by step clear procedure for File to File Adapter SAP XI 3.0.
    Thanking U,
    <b>Murali</b>.

    Hi Murali,
    first we need to uderstand how to do content conversion ( to convert flat files to xml format ) for which u can go through the following links :
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    http://help.sap.com/saphelp_nw04/helpdata/en/89/90fd3f0521c842e10000000a1550b0/frameset.htm
    then file to file scenarios:
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/43/25112ab6140b25e10000000a1553f6/frameset.htm
    Configuring sender file adapter:
    /people/sravya.talanki2/blog/2005/08/16/configuring-generic-sender-file-cc-adapter
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    Configuring receiver file adapter:
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
    going through all the given links you will not have any problems doing a file to file scenario with any constraints.
    Regards,
    abhy

  • Error reading product file driver files

    When attempting apply a large merge patch I receive the following error:
    Screening out files not valid for this installation...
    Determining valid on-site files...
    AutoPatch error:
    The following file is missing:
    /oracle/prodappl/pa/11.5.0/admin/driver/pasb038.drv
    AutoPatch error:
    Error reading product file driver files [complete; make tapes]
    AutoPatch error:
    Error determining valid on-site files
    Any ideas?
    I've tried using options=noprereq option, but that didn't help.

    - Try to restore the file from a backup you have Or just copy it from any other environment.
    - Make sure that you have included all pre-req patches in the merged file.
    I've tried using options=noprereq optionBy this you tell adpatch not to check for pre-req, use 'options=prereq' instead.

  • Now that I'm a paid up supporter Maybe you will fix Firefox and return "Close File" to File on the menu toolbar.

    I just degraded from Firefox 3.6 to 9.0.1 and found that one of the most useful tools is missing. On the Menu toolbar under File, "Close File" has been eliminated. Why? Why do I have to close the site I was looking at and go back to my Firefox home page and start all over? Why was "Close File" eliminated? It was one of the most useful tools in Firefox. I'm hoping I haven't gotten rid of the CD that has 3.6 install on it so I can upgrade to a great version of Firefox.
    Bob -
    ''[Personal information removed by moderator. Please read [[Forum and chat rules and guidelines]], thanks.]''

    Some menu entries in the main menu bar are hidden if you use the mouse and only appear if you use the keyboard to open the menu (Bug 626825).
    You can see the difference if you use Alt+F to open the File menu or other menus like the Edit menu (Alt+E) and Bookmarks menu (Alt+B) and compare that to what you see if you use the mouse to open the menu after you have made the menu bar visible by tapping Alt or by pressing F10.
    Add code to userChrome.css below the default @namespace line.
    *http://kb.mozillazine.org/userChrome.css
    The customization files userChrome.css (interface) and userContent.css (websites) are located in the chrome folder in the user profile folder.
    *http://kb.mozillazine.org/Editing_configuration
    <pre><nowiki>@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    /* Always show menu entries with class="show-only-for-keyboard" */
    #navigator-toolbox menuitem[class="show-only-for-keyboard"]:not([hidden="true"]){ display:-moz-box !important; }
    </nowiki></pre>

  • Deleting the data from logical file/unix file

    Hi all.
        I need to delete the all the data from logical file (application server file/unix file).But I dont want to delete the logical file ( only data in the logical file should be deleted, i.e making file empty)
    Thanks in advance.
    Cheers.
    sami

    Hi Sami,
    Refer thsi document https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/4d7aeb7d-0c01-0010-fa8a-a4a8e8968a93.
    Regards,
    Flavya

  • File to File scenario

    Hi,
    I have a problem in file to file scenario in which the file is not getting transferred from source to target.
    Source communication channel - Transport protocol - NFS  | Process mode : Delete |  The file is picked but not able to delete from the directory.
    Error: File: d:\test\file.txt deleting after processing failed - retry
    The file is not transferred to target is it because of this CC is not able to delete the file. Does windows also have any authorization issue if so how should one check the authorization. I have the admin access of my system.
    Thanks.

    Hi,
    Firstly, Since the scenario works perfectly while using Test mode, so all your design & configuration are OK.
    Now, there can be Two reasons why PI is not able to delete the file and process it (during Delete Mode):
    (The Problem will persists if you use Archive Mode also)
    Prob 1. The directory is write protected or read only
    Prob 2. The file is write protected or read only
    Solution:
    If Unix System
    Soln for Prob 1. - go to the directory structure
    for ex: if directory where file is kept is /staging/Interface/PI/Test/inbox/
    then go to /staging/Interface/PI/Test/ and give command ls -lrt
    It will show the directory names with permisions.
    use chmod 777 inbox and the permissions willl be changed ( drwxrwxrwx )
    Soln for Prob 2. - Get inside  /staging/Interface/PI/Test/inbox/ and give command ls -lrt
    if the file does not have authorizations as (-rwxrwxrwx) give chmod 777 <filename>  and then give command touch <filename>
    If Windows System
    Soln for Prob 1. - Goto the directoty and right click on the folder and deselect the Read Only Checkbox.
    Soln for Prob 2. - Right Click on the file and deselect the Read Only Checkbox
    Try again and the scenario will work surely. Let me know if any issues.
    Regards,
    Souvik
    Edited by: Souvik Chatterjee on Mar 14, 2011 8:14 AM

  • File-RFC-File (without BPM)- Issue

    Hi All,
    I am working on a File-RFC-File (without BPM) scenario in PI 7.1.
    My scenario is having few problems like, its not able to delete the file from the source directory path (for which we have delete permissions) and it is an NFS system and it shows an error in the Sender file CC.
    "Error: com.sap.aii.af.service.cpa.impl.exception.CPAObjectKeyException: Value of key must not be null: ObjectId"
    But it gets processed successfully and provides a written paramter which I could see in MONI, but again doesn't write the file in the target directory. Could you please provide your inputs and let me know if I need to do any additional settings w.r.to PI7.1.
    These are the parameters which I have specified in the Sender File adapter
    Processing sequence
    AF_Modules/RequestResponseBean     Local Enterprise Bean     1
    CallSapAdapter     Local Enterprise Bean     2
    AF_Modules/ResponseOnewayBean Local Enterprise Bean     3
    Module configuration:
    1     PassThrough     true
    3     receiverChannel     <FilereceiverCCname>
    3     receiverService     <Receiver Bus System>
    Regards,
    Nithiyanandam

    Hello,
    Check out in module configuration tab for any "type error" or spell mistakes.
    Check out this thread which might be useful for you :[ File - RFC - File without a BPM - Possible from SP 19.|File - RFC - File without a BPM - Possible from SP 19.]
    regards
    Ramesh

  • Store \ Retrieve files from file system

    Hi to all!
    I would like to implement a solution for storing files uploaded via apex user interface to servers file system. As well I would like this files to be retrievable by apex users. I designed the following solution:
    For upload:
    1. Through file browse item user chooses file to be uploaded
    2. File goes to custom table (as BLOB)
    -- so far i would use apex Upload\Download files tutorial
    3. File(BLOB) would then have to be written to file system to some directory and file id would have to be written to some db table which holds pointers to files on file system
    4. delete file(blob) from custom table (from step 2)
    For download:
    1. user chooses link from some report region(based on table giving file pointers to files residing on file system)
    2. file identified with chosen file pointer is then inserted into blob column of some custom table in db
    3. from custom table with download procedure fie is finally presented to user
    4. delete file(blob) from custom table (from step 2)
    Using apex tutorial for Upload\Download files it is straitforward to get the files from db table or into db table using blobs. But i have not seen any example of using BFILE or migrating files from db to file system and vice versa.
    So some Q arise:
    a) How can I implement step 3 under For upload section above
    b) How can I implement step 2 under For download section above
    c) Is there any way to directly upload file to file system via apex user interface or to directly download file from file system via some report region link column?
    Please help!!!
    Regards Marinero
    Message was edited by:
    marinero

    marinero,
    Here is a procedure that will copy an uploaded file to the file system:
      Procedure BLOB_TO_FILE(p_file_name In Varchar2) Is
        l_out_file    UTL_FILE.file_type;
        l_buffer      Raw(32767);
        l_amount      Binary_Integer := 32767;
        l_pos         Integer := 1;
        l_blob_len    Integer;
        p_data        Blob;
        file_name  Varchar2(256);
      Begin
        For rec In (Select ID
                              From HTMLDB_APPLICATION_FILES
                             Where Name = p_file_name)
        Loop
            Select BLOB_CONTENT, filename Into p_data, file_name From HTMLDB_APPLICATION_FILES Where ID = rec.ID;
            l_blob_len := DBMS_LOB.getlength(p_data);
            l_out_file := UTL_FILE.fopen('UPDOWNFILES_DIR', file_name, 'wb', 32767);
            While l_pos < l_blob_len
            Loop
              DBMS_LOB.Read(p_data, l_amount, l_pos, l_buffer);
              If l_buffer Is Not Null Then
                UTL_FILE.put_raw(l_out_file, l_buffer, True);
              End If;
              l_pos := l_pos + l_amount;
            End Loop;
            UTL_FILE.fclose(l_out_file);
        End Loop;         
      Exception
        When Others Then
          If UTL_FILE.is_open(l_out_file) Then
            UTL_FILE.fclose(l_out_file);
          End If;
      end; And here is a procedure that will download a file directly from the file system:
      Procedure download_my_file(p_file In Number) As
        v_length    Number;
        v_file_name Varchar2(2000);
        Lob_loc     Bfile;
      Begin
        Select file_name
          Into v_file_name
          From UpDownFiles F
         Where File_id = p_file;
        Lob_loc  := bfilename('UPDOWNFILES_DIR', v_file_name);
        v_length := dbms_lob.getlength(Lob_loc);
        owa_util.mime_header('application/octet', False);
        htp.p('Content-length: ' || v_length);
        htp.p('Content-Disposition: attachment; filename="' || SUBSTR(v_file_name, INSTR(v_file_name, '/') + 1) || '"');
        owa_util.http_header_close;
        wpg_docload.download_file(Lob_loc);
      End download_my_file;I could put a sample application on apex.oracle.com, but it wouldn't be able to access the file system on that server.

  • Unable to delete File in file system

    I have built an explorer just like a Windows explorer. I am not able to delete individual files. but the files in a folder can be deleted. How should I proceed?

    Madam, we wouldn't be able to help u unless u tell us in detasil or post ur code...Anyway, Any File can be deleted by Following Procedure.
    File file = new File("<Path to File;FileName>");
    file.delete();
    Please note that the File can either be a Directory or an absolute Individual File
    Cheers,
    Manja

  • Error message: "Can't open file "[File path, file name].key"

    If I attempt to open any Keynote files, I now get this error message.
    "Can't open file "[File path: file name].key"
    To clarify, the text in the square brackets above would be the file path and then the file name.
    The file then will appear on the screen, but is unresponsive to any clicks or menu commands.
    The files will open successfully on other Macs, so they aren't corrupt.
    Also - I've just checked, and opening Keynote and trying to create a new presentation leads to the same problem: All screen menus / buttons are dead - all I can do is drag the window around the screen.
    I've tried to reinstall Keynote, but this hasn't resolved the problem.
    Is there some corrupt preference file (or similar) that I need to get rid of? Is there an easy way to do a complete uninstall of Keynote so I can try another install? Or is this a symptom of something else?
    All ideas gratefully appreciated!
    Message was edited by: Brendan Donlon

    All the issues I describe in my questions around this time re: Keynote were actually symptoms of a soon-to-die laptop. The Hard Disc was corrupting, and Keynote was the first application to be affected.

  • Why var file:File = new File(); is not working in Background Worker?

    Hi All,
    While working on Background Workers for Air for Desktop platform. I am facing a problem.
    I want to unzip a file in the background, which contains 14126 files in it because not using the worker is hanging my system.
    When I am using "new File()" or "File.desktopDirectory.nativePath;" I am getting following error:
    SecurityError: file
    at UnzipWorker/onMainToBack()[C:\Users\red5\Adobe Flash Builder 4.7\Downloader_air\src\UnzipWorker.as:45]
    at flash.system::MessageChannel/internalAddEventListener()
    at flash.system::MessageChannel/addEventListener()
    at UnzipWorker()[C:\Users\red5\Adobe Flash Builder 4.7\Downloader_air\src\UnzipWorker.as:33]
    I am not sure why I am getting above error.
    Someone please help me in this.

    Brijesh,
    Aloha.
    I implemented:
    var worker:Worker = WorkerDomain.current.createWorker( new ThreadByteClass(), true ) ;
    However, my background thread is still running with its Security.sandboxType set to remote, even though my primordial thread is running with Security.sandboxType set to localTrusted.
    Do you know how to resolve this?
    Have a great day.
    Take care,
    Darwin

  • Error accessing file template file not found (error code 2)

    We have 3 admins that work on the website so we use the Check In/ Check Out feature of DW. We all have DW CS6.
    When I update the template I have no problem (I work on a mac). However, if one of the other admins (Windows) tries he gets the following message: Error accessing file template file "C:\filepath\filename.dwt": file not found (error code 2).
    I looked at this thread: Re: Dreamweaver Template not updating pages error code 2? but the only solution offered there is to change the template tag from <!-- InstanceBegin... to <!-- TemplateBegin... If this is the solution, how do you do this?
    When I go to the url of the template http://www.christophorushouse.com.au/Templates/chrv-main-template.dwt it says it's been (re)moved or renamed, but then I have a feeling you can't view/access a template this way. All pages of the website feed of this template.
    Any help would be appreciated.
    Thanks

    We have 3 admins that work on the website so we use the Check In/ Check Out feature of DW. We all have DW CS6.
    When I update the template I have no problem (I work on a mac). However, if one of the other admins (Windows) tries he gets the following message: Error accessing file template file "C:\filepath\filename.dwt": file not found (error code 2).
    I looked at this thread: Re: Dreamweaver Template not updating pages error code 2? but the only solution offered there is to change the template tag from <!-- InstanceBegin... to <!-- TemplateBegin... If this is the solution, how do you do this?
    When I go to the url of the template http://www.christophorushouse.com.au/Templates/chrv-main-template.dwt it says it's been (re)moved or renamed, but then I have a feeling you can't view/access a template this way. All pages of the website feed of this template.
    Any help would be appreciated.
    Thanks

  • I loaded iTunes on a new laptop. I copied and pasted my albums to a 4G stick and down loaded them to the new laptop. Placing them in, Libraries – Music – iTunes and than in Itunes used File – add file to library. So far so good. For what ever reason one o

    I loaded iTunes on a new laptop. I copied and pasted my albums to a 4G stick and down loaded them to the new laptop. Placing them in, Libraries – Music – iTunes and than in Itunes used File – add file to library. So far so good. For what ever reason one of the CDs would not load onto the stick. I got the orginal CD and loaded directly to Itunes. Now when I look in  Libraries – Music – iTunes it’s not there but it is in and plays in iTunes. What should I have done or should I be doing? Thanks.

    It's not a unique situation - happens all the time, smaller hard drives getting filled up.
    It's also easy to fix. I just moved my itunes content to a bigger hard drive.
    First I made a backup of the itunes database file - iTunes Library.itl. Just in case anything went wrong.
    Nothing did go wrong, but I'd have it in case anything DID go wrong. That file holds ratings, playcounts, Date Added, and other metadata.
    Second, in itunes change the preferences > advanced tab to tell itunes to put everything on G:
    Set the itunes folder location to something like G:Media or G:iTunes
    This will affect all FUTURE additions to itunes and not do anything to the existing locations.
    Make sure the checkbox for "Keep itunes organized" is NOT checked. I also left the "Copy files when adding" unchecked.
    Third, to move all the files to G: without itunes losing the paths, run the File > Library > Organize > Consolidate command. This will need to run a while, so be patient as it copies all the files to the new G: location. This does NOT delete the originals. You will have to do that.
    Fourth, make sure everything in itunes is OK and you can play stuff in your library. If you're really cautious you can run a script to check for missing/dead tracks.

  • Hi, We have an application  built using HTMl 5 and Javascript running on IPad2, iOS5.1 Safari 5.1. When we try to download a file(.pvw file) in that application safari throws "Download failed" error. Please suggest what needs to be done.

    Hi,
    We have an application  built using HTMl 5 and Javascript running on IPad2, iOS5.1 Safari 5.1.
    When a file url is clicked instead of asking for Save or Open or Cancel options, the file gets opened on IPad by default.
    Is this default behaviour which cannot be changed or can it be configured to ask user preference?
    When we try to download a file(.pvw file -> a model file) in the above application, safari throws "Download failed" error.
    Please suggest what needs to be done.
    Regards,
    Pramod

    Safari on an iPad in general does not allow downloading of files. That's a safety precaution in the iOS SDK to keep unauthorized content off of iOS devices. Safari will open from the web site file types that it can handle, but direct downloading isn't normal behavior, and I don't believe the behavior can be changed, though you can try asking in the developer forum, either here or the one to which you have access as a member of Apple's iOS developer program.
    Regards.

Maybe you are looking for