Dynamically deciding the target directory without ESR objects

Hi Experts,
I have come across File to File scenario(NFS) where I have to serve 2 purpose in one scenario using single receiver communication channel as the client have more than 40 plants.
1.     I need to copy the file from source directory to target directory without creating the mapping objects.
2.     based on source file name the target directory path will be the 'target directory + First 4 character of source file name i.e.(Plant name)'.
I am able to achieve the First requirement, can any one tell me how to achieve Second requirement.
Thanks in advance.
Ragards,
Gopi

Hi Inaki Villa/ Anupam Ghosh,
Thanks for your previous reply. I was busy with some other WS related task.
I have gone through the thread which uses java code to dynamically set the Target Directory.
'Dynamic file name for pass-through scenario - Process Integration - SCN Wiki'.
But the mentioned JAR files are not available on our clients PI System (PI 7.0) I tried by importing the required JAR files from other system but it was giving some error. So I decided to go with ABAP Mapping and I am quite successful in setting the target directory. I am able to view the Target Directory and Target File name in 'DynamicConfiguration' in SXMB_MONI.
But it is not over writing the 'Target Directory' path mentioned in Receiver Communication Channel.
Could you please help me in this? Do I need to set anything else?
Regards,
Gopi

Similar Messages

  • Dynamic Config for Target directory

    Hello Experts,
    My interface is from MQ (JMS) to FILE.
    I have one sender and one receiver.
    I have the Lockbox data placed into the single Queue for 2 countries (AU u2013 Australia and NZ u2013 Newzeland)
    Point 1: My PI Interface Picks the lockbox data up from the Queue, then the respective file (dynamically by using dynamic configuration) is being created based on the condition in mapping.
    Here my mapping logic:
    SourceStrucutre                                                       ReceiveStrucutre                          
         Filed1               Filed1
         Filed2               Filed2
    INPUT -
     FIXED VALUES u2026u2026u2026..> UDF1 u2026u2026u2026> ReceiveStrucutre ( root node)
    Expected input values for INPUT: ABC and XYZ (ABC for AU and XYZ for NZ)
    Expected values in FIXED VALUES: ( if ABC -  create file name  FILE1.TXT; if XYZ -  create file name FILE2.TXT)
    The below UDF is mapped to root node of Receiver Structure.
    UDF1 code: ( with single Argument with name : arg)
    DynamicConfiguration conf = (DynamicConfiguration) container
        .getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
    conf.put(key, arg);
    return "";
    the above mentioned logic works fine and am able to generate the file names (FILE1.TXT & FILE2.TXT ) in the target directory ( /tmp/common ) which mentioned in the receiver file adapter.
    Point 2:
    My Requirement is to generate the target directory dynamically based the file name generated..
    Expected Target directory:
    /tmp/AU/FILE1.TXT for the file FILE1.TXT
    /tmp/NZ/FILE2.TXT for the file FILE2.TXT
    I know we can do this by writing another UDF2 (DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Directory"); for the directory and by making ASMA ticked for Directory in communication channel..
    My question is how to map the two UDFs to the same root node of receiver..
    Valuable inputs are much appreciated!!
    Thanks,
    Kumar

    what i mean is have :
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
    and
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Directory");
    conf.put(key, arg)
    conf.put(key1, value for Directory)
    If you are worried on how to map two UDFs to root node then FYI you can map the o/p of the UDFs to any node in your target structure......it wont cause any harm....
    If you say no node is free then you can have two inputs to your UDF and then in the return statement send out the value that you want to pass to the target node (presently you are using return"".......if applying above then you will have return arg2)....
    Regards,
    Abhishek.

  • File to File Interface without ESR objects

    Hello everyone,
    I have a requirement where our business users will  produce the .csv files in one location and we need to move to another location.
    I recon that we can build this File to File interface( usin FCC) without using ESR objects, can any one help me with the procedure since i am new to PI.  
    Thanks in advance

    HI Chandrika ,
    File to File Interface without ESR objects
    this is very simple , you need to create Configuration objs
    1. sender Communication channel and agrrenment
    2. receiver Communication channel and agrrenment
    3. u have to provide dummy service interface names and name space in interface determination,
    4.in receiver determination , we have to provide source and receiuvers bu.components and remaining dummy names.
    thanks,

  • Dynamically change the Binding of a view object

    I want to reuse a panel several times in my application. The VO has one bind parameter (:1). The same panel should be reused several times with different bind variables.
    I found a technical note concerning this issue called: How to Dynamically Change the binding of a View Object to a JClient Panel. This works for JDeveloper 9i but not for JDeveloper 19g. Does anybody know how to dynamically change the binding in JDeveloper 10g

    You may use bindRowSetIterator() and pass in a custom fetched ViewObject or a RowSetIterator to the iterator binding that is displayed in your panel.

  • How to set the target directory from source filename using adaptor module.

    Hi,
    How im using a logical bypass scenario.I have to set the target directory using the sorce filename.There is no chance of using a Java UDF as my scenario does not have a Mapping(as it is a Bypass Scenario).The only option that i got is to use a Adaptor module.Can anyone help  me this.
    Thanks,
    Bhargav

    Hi,
    See this link,
    http://help.sap.com/saphelp_nw04/helpdata/en/e9/61e1407e858031e10000000a1550b0/content.htm
    hope it helps.
    Regards,
    Akshay Jamgaonkar.
    Reward points if find useful.

  • Problem in setting the target directory in communication channel

    hi...
    my idoc 've been send successfully from the sender system and it also reached the receiver system. i conform it by checking the inbounds in IDX5.
    but it is not generating the xml file in the target directory.
    plz help me...

    Hi,
    Check the status of the receiver communication channel in RWB
    Configure Your Receiver File Channel as Following
    http://help.sap.com/saphelp_nw70/helpdata/EN/ae/d03341771b4c0de10000000a1550b0/frameset.htm
    File to File scenario:
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1 - File to File Part 1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2 - File to File Part 2
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/flatFILETOFLATFILE&
    Regards
    Seshagiri

  • Interface without ESR Objects

    Hi Experts,
    I have a requirement to pick up a CSV file from SAP then send it to the receiver system.
    Is this possible without any ESR Objects?
    How can PI pick up the CSV file and then send it to the receiver system with the same FILENAME?
    Thanks in advance.

    Hi Thanks for the reply,
    In Michal's blog, the "The same filename from a sender to a receiver file adapter - SP14" has a message mapping. In my case, i'm not going to use any message mapping.
    Can I still achieve this even without the mapping?
    Regards,

  • How to get the current directory as File object

    Hi guys,
    i want to get the current working directory as a file object.
    plz help me on that if there are any standard methods present for this.

    new File(".");

  • Just bought an Mercedes E350, and my 4s iphone has enough contacts where it can not download 60% of them into the car.  Is there a way to access the iphone directory without downloading the contacts into the car.  Just use the phone memory?

    Just purchased an E350 and there are too many addresses in my iPhone to be saved in the E350 address book.  Is there a way the car can look up the addresses on my phone instead of trying to download them all?  I am checking wtih MB to see if there is a way to increase the capacity on the car for memory, but I doubt it.  I have not tried putting in an SD card, but I doubt the address book on the car would overflow to external memory.

    hi, this thread already deals with the issue:
    How can I prevent getting calls from number that are not in my address book?

  • No .java file found in the target directory of JSP compilation

              There are only .class files. Where are those .java files? I am using WL5.1 SP7.
              

    We had to add the following to our application's web.xml file:
              <!-- keepgenerated initArg to JSPServlet -->
              <context-param>
              <param-name>weblogic.jsp.keepgenerated</param-name>
              <param-value>true</param-value>
              </context-param>
              John J. Feigal Voice (651)766-8787 (main)
              Sr. Technical Consultant (651)766-7249 (direct)
              Ensodex, Inc. Fax (651)766-8792
              4105 N. Lexington Ave., Suite 150 email [email protected]
              Arden Hills, MN 55126 WebSite http://www.ensodex.com
              "Jim Linux" <[email protected]> wrote in message
              news:3a40b129$[email protected]..
              >
              > There are only .class files. Where are those .java files? I am using WL5.1
              SP7.
              

  • File Adapter : Dynamic Target Directory

    Hi EveryBody,
    I have an IDOC to File Scenario in which based on some field value X in IDOC i need to send the file to Different locations under the same FTP Server.
    For Example : if X = 01 then Target folder T1
                            X = 02 then Target folder T2.
    Can somebody help me out on the same.Possibly this can be done by Dynamic Configuration.Can somebody send me some links.
    Regards,
    Zabiulla

    Hi,
    First of all I would suggest to avoid the mail communications for the query.
    Its against the SDN rules.
    please read [Rules of Engagement|/thread/117188 [original link is broken];.
    About Solution, you need not have to go for Dynamic Target Directory
    You can use the Variable substitution concept here.
    In the Target directory pass the %Var1%
    and use Var1 ---> payload:<fieldName>
    Refer to the last part of this link to understand this better,
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    For dynamic configuration you can also refer below link
    Dynamic configuration of Receiver FTP File channel
    Thanks
    Swarup

  • Placing the file in UTF-8 format in Target Directory

    Hi Experts,
    Can any one please tell me how to place a file in Target Directory by PI in UTF-8 format.
    It is a file to file PassThrough (no IR part) scenario and in receiver File Adapter I have used File Encoding as UTF-8
    but still PI is not placing the file in UTF-8 format in the Target Directory.
    Are there any modules by which the files are converted to UTF-8 format.
    Can anyone please help me out.
    Thanks and Regards,
    Prajwal

    Hi,
    Please let me know if I need to change the TransferMode,File Type and FileEncoding in both sender and receiver channel.
    I tried the below settings but still the file is not being placed in UTF-8.
    Sender CHannel:    TransferMode         Text
                                   FileType                  Text
                                   FileEncoding            UTF-8
    Receiver Channel    TransferMode         Binary
                                     FileType                  Text
                                     FileEncoding           tried with UTF-8 once and tried with blank
    Can any one throw some light here.
    Thanks and Regards,
    Prajwal

  • Can the target system in the REF command dynamically be specified?

    Hello all,
    I have a main script which calls additional other scripts in different target systems (according to a defined system landscape). So far so good. Now when I have another system landscape in place, it's very likely that I have to handle other target systems.
    With the REF command I can call these other eCatt scripts but how can I dynamically specify the target system? According to the eCatt team this is not possible. Does anyone of you have an idea how I can have a workaround? Is there a BADI / Userexit etc. which I can use?
    I want to avoid to work with version, because I would duplicate the script. When you maintain one place you also have to remember the other versions you have.
    Kind regards,
    Thomas

    Hi Thomas,
    >Now when I have another system landscape in place, it's very likely that I have to handle other target systems.
    I suggest to keep the target system at the REF command (since that anyway should have a name which qualifies the role of your system instead of system name, e.g. ERP or CRM or SCM ).
    To change the landscape you can exchange what makes up the landscape: your system data container.
    Sample:
    1) SCRIPT "Scenario" call SCRIPT "Create_Order" in system CS1 which is CRM system
    2) SCRIPT "Scenario" call SCRIPT "Check_Replicated_Order" in system ER1 which would be ERP system
    As long as you are about to code the scripts:
    - Have a system data container SD_DEV
    - Define system CRM with rfc-destination to CS1 and ERP with rfc to ER1
    - In your scripts only use the terms ERP and CRM
    -> REF ( Create_Order, CRM ).
    -> REF ( Check_Replicated_Order , ERP ).
    Once you come to test another landscape:
    - Simple copy SDC SD_DEV to SD_TEST_LANDSCAPE1
    - Exchange only the rfc destinations to have ERP and CRM point to new systems
      (don't modify the existing destination, since you will need them still)
    Now start your Script "Scenario" with System data container SD_TEST_LANDSCAPE1 on start screen or even assign the system data container name in Test organizer at test package level.
    This is the way you can switch landscapes very easily. It only requires to use logical target system names from the beginning.
    Hope this helps or at least starts a discussion about it.
    Best regards
    Jens

  • Why do I get Error 42 when I build a RT-exe with numbers in the Target file?

    I can build a RT-exe without numbers in the Target Filename without any problems.
    As soon as I put a number in the Target Filename, lets say startup1.rtexe, I get the following error:
    Fehler 42 ist bei Ordner erstellen in Create Directory Recursive.vi->AB_Destination.lvclass:Create_Destination.vi->AB_Build.lvclass:Create_Destinations.vi->AB_Application.lvclass:Create_Destinations.vi->AB_Build.lvclass:Build.vi->AB_Application.lvclass:Build.vi->AB_RTEXE.lvclass:Build.vi->AB_Engine_Build.vi->AB_Build_Invoke.vi->AB_Build_Invoke.vi.ProxyCaller aufgetreten
    Mögliche Ursachen:
    LabVIEW:  Allgemeiner Fehler.
    C:\Dokumente und Einstellungen\es-enn-extern1\Eigene Dateien\300. Programme\c\ni-rt\startup\startup.rtexe\LabVIEW 2009
    I use LV 2009, and I can't remember having this problem with LV 8.2 or 8.6. This made it a bit hard for me to figure out where the problem might be.
    Now I would like to use numbers in the Filename (e.g. version1.0.rtexe, version1.1.rtexe...). Any ideas how to make this work?
    Solved!
    Go to Solution.

    thanks for the answer Christian
    here is a dummy project where I experience the same problem (LV 2009).
    Message Edited by kein on 12-15-2009 09:01 AM
    Attachments:
    LV Project.zip ‏24 KB

  • Target Directory in File Receiver Adapter

    Experts,
    I am trying for a scenario (File to File) and I am not sure if the target directory is a directory in XI server or my local machine. I used HTML client to send the message to the adapter. Also if any of you could give clear idea about source and target direcory without pointing to any weblog, I would greatly appreciate it. As I have tried every weblog available with a word File in it.
    Thanks
    Thilothama

    Thilothama,
    I've seen your previous posts and you never assigned any points. People in the forum spend their valuable time answering questions.
    I request u to reward the people who have replied to your posts. IF u consider that the replies have helped u , u can assign,
    2 points -- helpful
    6 points -- very helpful
    10 points -- problem solved..
    If u are not able to see the assign point s button refer to this thread...
    Unable to award points
    regards
    Shravan

Maybe you are looking for