Need to determine directory name where file is to be posted dynamically

Hi Experts,
In my Idoc to file scenario implementation, I need to put the file generated after mapping in a directory (via FTP) but the determination of the directory is dynamic and based on one of the fields in the incoming idoc.
I mean the Idoc which comes from the SAP system has a field which gives the store number (length 4) like S001, S002 etc. Now based on this store number I have to determine the folder in which that file has to be posted, folder like STORES001, STORES002 etc. which is already there in the file server.
Hence I have to read that field in idoc and apend it to "STORE" and put that in the target directory field of the communication channel. Can you please help me in achieving this step by step.
The receiver is the same file system just the folder/directory where the file has to be put is different.
Please help.
Thanks and regards,
Yash

Hi Pavani,
I tried following your solution but I am facing a problem. I have created different communication cahnnel for different folders and also different receiver agreement with each communication channel. but how will i give the condition in interface determination?
normally we can give conditions in Receiver Determination but here that wont work because we will ahve only one interface determination.
Can you please explain you detials in more detials so that i can implement it? If you want you can mail me at [email protected]
waiting for your reply.
Yash

Similar Messages

  • Terminal Command, how to set defaults write, make application(s) use directory path where file last saved?

    Does anyone know whether there's a terminal command to make all applications remember/use the last directory/path where I last saved a file?
    For example, let's say there are (10) ten PDF's on a website, and I want to use Preview.app to open and save each file to the same directory.
    Problem is, after each time I save a file, Preview.app doesn't automatically remember/use the last directory where I saved my file(s).
    Forcing me to navigate back to the same directory after each time I save a file; super-annoying.
    But, for some reason, when saving images from the web, Firefox remembers the last directory where I saved the file (jpeg).
    So I'm hoping there's some way, possibly a terminal command to set/force all applications (including Preview.app) to remember/use the directory/path where file(s) were last-saved.
    Anyone?

    Get the third-party utility Default Folder X 4.4.9.

  • How to get the directory name where the class resides

    I have following directory structure.
    c:\one\two\three\four\five\Test.java
    package name for Test.java is four.five
    When I run, four.five.Test, I want to get the compelte path name where currently the Test.class is running i.e. "c:\one\two\three\four\five\"
    so that if I move four.five.Test.java into some different directory structure, I should always get the complete path name.
    Thanks In Advance
    Sachin

    package x.y;
    import java.io.File;
    public class Test {
        public static void main(String[] args) {
            System.out.println(new File(Test.class.getResource("").getFile()).getAbsolutePath());
    }

  • How do I get the directory name from my program?

    Hi,
    I want to indentify the directory name where my executable is running from the program.
    Is there any API similar to GetCurrentDirectory in Windows.
    Thanks,
    Ram

    I think you may be looking for the getcwd(3C) call.
    That call will get you the current working directory
    for your process. See the man page for details (man
    getcwd).
    Alan
    Sun Developer Technical Support
    http://www.sun.com/developers/support

  • Determine Target directory from Source file names with out mapping

    Hi All,
    I have a requirement to determine the Target Directories from the Source file names.
    File Sender Adapter - XI - File Receiver Adapter
    In this scenario I am not doing any mapping. Source File directory contain 3 files. These file should go to 3 directories in the Target Server.
    Please help me how can meet this requirement
    Thanks in advance
    Kevin

    Hi Kevin,
    if you can separate the files by name. have 3 sender communication channels each picking up one of the files (you do this by making the regex in the file name mutually exclusive) and then send them all to the target system using the same comm. channel.
    regards,
    Horia

  • SharePoint 2010, Visual Studio 2010, Packaging a solution - The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

    Hi,
    I have a solution that used to contain one SharePoint 2010 project. The project is named along the following lines:
    <Company>.<Product>.SharePoint - let's call it Project1 for future reference. It contains a number of features which have been named according
    to their purpose, some are reasonably long and the paths fairly deep. As far as I am concerned we are using sensible namespaces and these reflect our company policy of "doing things properly".
    I first encountered the following error message when packaging the aforementioned SharePoint project into a wsp:
    "The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters."
    I went through a great deal of pain in trying to rename the project, shorten feature names and namespaces etc... until I got it working. I then went about gradually
    renaming everything until eventually I had what I started with, and it all worked. So I was none the wiser...not ideal, but I needed to get on and had tight delivery timelines.
    Recently we wanted to add another SharePoint project so that we could move some of our core functinality out into a separate SharePoint solution - e.g. custom workflow
    error logging. So we created another project in Visual Studio called:
    <Company>.<Product>.SharePoint.<Subsystem> - let's call it Project2 for future reference
    And this is when the error has come back and bitten me! The scenario is now as follows:
    1. project1 packages and deploys successfully with long feature names and deep paths.
    2. project2 does not package and has no features in it at all. The project2 name is 13 characters longer than project1
    I am convinced this is a bug with Visual Studio and/or the Package MSBuild target. Why? Let me explain my findings so far:
    1. By doing the following I can get project2 to package
    In Visual Studio 2010 show all files of project2, delete the obj, bin, pkg, pkgobj folders.
    Clean the solution
    Shut down Visual Studio 2010
    Open Visual Studio 2010
    Rebuild the solution
    Package the project2
    et voila the package is generated!
    This demonstrates that the package error message is in fact inaccurate and that it can create the package, it just needs a little help, since Visual Studio seems to
    no longer be hanging onto something.
    Clearly this is fine for a small time project, but try doing this in an environment where we use Continuous Integration, Unit Testing and automatic deployment of SharePoint
    solutions on a Build Server using automated builds.
    2. I have created another project3 which has a ludicrously long name, this packages fine and also has no features contained within it.
    3. I have looked at the length of the path under the pkg folder for project1 and it is large in comparison to the one that is generated for project2, that is when it
    does successfully package using the method outlined in 1. above. This is strange since project1 packages and project2 does not.
    4. If I attempt to add project2 to my command line build using MSBuild then it fails to package and when I then open up Visual Studio and attempt to package project2
    from the Visual Studio UI then it fails with the path too long error message, until I go through the steps outlined in 1. above to get it to package.
    5. DebugView shows nothing useful during the build and packaging of the project.
    6. The error seems to occur in
    CreateSharePointProjectService target called at line 365 of
    Microsoft.VisualStudio.SharePoint.targetsCurrently I am at a loss to work out why this is happening? My next task is to delete
    project2 completely and recreate it and introduce it into my Visual Studio solution.
    Microsoft, can you confirm whether this is a known issue and whether others have encountered this issue? Is it resolved in a hotfix?
    Anybody else, can you confirm whether you have come up with a solution to this issue? When I mean a solution I mean one that does not mean that I have to rename my namespaces,
    project etc... and is actually workable in a meaningful Visual Studio solution.

    Hi
    Yes, I thought I had fixed this my moving my solution from the usual documents  to
    c:\v2010\projectsOverflow\DetailedProjectTimeline
    This builds ok, but when I come to package I get the lovely error:
    Error 2 The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. C:\VS2010\ProjectsOverflow\DetailedProjectTimeline\VisualDetailedProjectTimelineWebPart\Features\Feature1\Feature1.feature VisualDetailedProjectTimeline
    Now, the error seems to be related to 
    Can anyone suggest what might be causing this. Probably some path in an XML file somewhere. Here is my prime suspect!
    <metaData>
    <type name="VisualDetailedProjectTimelineWebPart.VisualProjectTimelineWebPart.VisualProjectTimeline, $SharePoint.Project.AssemblyFullName$" />
    <importErrorMessage>$Resources:core,ImportErrorMessage;</importErrorMessage>
    </metaData>
    <data>
    <properties>
    <property name="Title" type="string">VisualProjectTimelineWebPart</property>
    <property name="Description" type="string">My Visual WebPart</property>
    </properties>
    </data>
    </webPart>
    </webParts>
    .... Unless I can solve this I will have to remove the project and recreate but with simple paths. Tho I will be none the wiser if I come across this again.
    Daniel

  • Get-ChildItem : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

    Hi, Im trying to get the whole path in my server, so i tried that with this following code
    Get-ChildItem $sourceFolder  -Recurse | ?{$_.PsIsContainer} |Get-Acl
    But then, it showed me somtehing like this :
    Get-ChildItem : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
     I tried to find the solver everywhere and mostly they propose to change the path name, which is impossible, since I am working with my company server, and those folder have already there before i start to work here, then the other ask me to use robocopy,
    but all of the trick just dont work
    is there any way to solve this problem? thanks

    There is no simple solution to this. And it is not a limitation of powershell itself, but of the underlying NTFS file system.
    If the problem is that a folder with a name longer than 248 exists anywhere within your directory structure, you are hooped.
    If the problem is that some fully qualified path names exceed 260 characters, then, in those cases, the solution already given is to create a psdrive partway up the path from the drive letter or server/share root of the path. Unfortunately, the output produced
    will be relative to that psdrive and not to what is specified as the $sourcefolder.
    unless you already know where those problematic paths are, you might consider trying to trap those errors and have your script figure out where it needs to create psdrives. You might then be able to calculate the equivalent path for each file or folder and
    output that. the programming effort would be simpler to just created a psdrive for each folder encountered, however I expect that would be very inefficient.
    Al Dunbar -- remember to 'mark or propose as answer' or 'vote as helpful' as appropriate.

  • Insert a directory path and file name option

    I built a program that runs three tasks when a voltage triggers the data acquisition. I would like now to insert an option/control for two issues: selection of the directory where the data will be saved, and selection of the file name. How can I do this such that after I press 'start' I should be asked which is the directory where I want the data to be saved and then what is the file name?
    Another option would be the following: After I press 'Start' I will have a control where I can write or browse for the folder where I want to save the data; then I have another controller where I write the new file name. So in this case I should not be prompted except the case when I am trying to use the same file name.
    Where should I con
    nect this new subvi in my loop - before the tasksand before the trigger, or after the tasks and before the trigger?
    Thank you.

    Programming with LabVIEW might be fun but it is quite time consuming�
    OK, here is what I want to do.
    I have to monitor a machining process. I have to record cutting forces, power consumed, vibrations, and temperature. From each of these sensors I get a voltage as output and I used �Measurement and automation� and NI-DAQmx to program my tasks (I have LabVIEW Express running in Windows XP).
    The triggering of DAQ is generated by the input of a 4.5V DC when the CNC program starts; the stop occurs when CNC program ends and the output voltage becomes 0V. I have finished all the connections and now I have to build the vi.
    The �small picture� could be described this way:
    I want to record the parameters and save them in files that I could process later using specific vi.
    The �big picture� would be the following:
    I would like to build a stand alone program that will do the following: when I run the program [ i. e. double-click the shortcut (or the file)] a panel should come up in the center of the screen � in this panel I would like to be able to select what process am I going to investigate: grinding, turning, milling, drilling, tapping etc.
    Once I selected what process I am going to investigate, the front panel of a vi should come up � In this panel I should be able to select what parameters I am going to record: forces, power, vibrations, and temperature. On the front panel I should be able to see the waveform of the acquired data. A start/stop button and a led green/red for each parameter should show me the status of the acquisition (green is on, red is off). The start/stop button should allow me to �manually� start or stop the program at any time. Additionally, on the front panel I should also have icons with a choice for directory (folder) path, file name, and comments regarding the experiment. The date and time should be recorded in the file that is saved. There should be an option (check box or selection icon) for saving the data in binary or ASCII format.
    Similar to any program, the front panel should have a toolbar containing File, Operate and Help options. The File option should contain �Clear graphs�, �Setup DAQ� and �Exit� and the Operate option should contain: Use digital alarm, Use digital trigger, and Write data to disk with the option to be selected or deselected. The main front panel should close when I select File -> Exit.
    The File -> Setup DAQ selection should bring up another front panel in which I should be able to see the acquisition control panel (device, channels to get, buffer size, units � English or metric) and the calibration factors (for the tasks, including triggering voltage) including sampling rate.
    Well, that�s almost all. I understand I cannot do this all at once. Unfortunately, I have a very close due date in getting the system up and ready. I am hoping that I could get some help setting up a simple program and I could develop the rest step by step later...
    Can anybody help me with this program? I have attached a first attempt that would allow automatic triggering and stopping as well as displaying of forces, power and acceleration.
    Thank you in advance.
    Radu
    Attachments:
    Acq_Graph_Voltage-Int_Clk-Dig_Start_Ref_TRIAL1.vi ‏201 KB

  • Where to define third party logical system name in file to idoc scenario

    Hi Friends,
      I am shalini shah.
    I have one doubt, where I can define the logical system name in File to Idoc scenario.
    I created Logical system for R/3 system in SALE t.code, but where to define the Third party logical system ,
    In SALE or any where.
    Please give me solution.
    Warm Regards,
    Shalini Shah

    Hi Shalini,
    You need to create Business system in SLD and import the business system in ID.Then u will start with the configuration.
    Just refer the below link for configurations with step by step solution.
    File To IDOC - Part1 (SLD and Design):
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/11/fileToIDOC&
    File To IDOC - Part2 (Configuration):
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/11/fileToIDOC-Part2+(Configuration)&
    File To IDOC - Part3 (Steps required in XI and R3):
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/11/fileToIDOC-Part3(StepsrequiredinXIandR3)&
    Thnx
    Chirag

  • XI File Adapter: Sender and the use of wildcards in the directory name

    Hi,
    Quick question for you XI guru's.  I have a requirement to <b>read</b> files from an ftp server that live in separate directories like:
    /dir1/subdir1/in/
    /dir1/subdir2/in/
    /dir1/subdir3/in/
    I want to setup the communication channel so that it does something like:
    /dir1/*/in
    Normally I would specify the other directories in the advanced tab however there could be potentially 1000's of subdir's so I want to use a wildcard.  Is it possible to do this with a directory name?
    I have read this link and it seems to only indicate using wildcards in the filename.
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm

    Hi,
    I think.. try as below
    It is better to use OS script to read the said three directories.
    bcz you know three directories. so you can use OS script file and that file can be configured in Ftp adapter.
    OS Command from FTP
    Please see the below links
    /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
    OS Command on FTP
    OS command line script - Need help
    FTP - Run OS Command before file processing
    /people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi - Call UNIX Shell Script
    Chilla

  • File Name and Target Directory name issue in FTP CC

    Hi All ,
    I am using following code to assing file name and directory name in UDF. I don;t want these parameters to be part of my target structure. Since i have created these files names in UDF, what are the values do i need to mention in FTP CC's "File access Parameter" which are mandatory fiels in CC ?
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create(u201Chttp://sap.com/xi/XI/System/Fileu201D,u201CFileNameu201D);
    String myFileName =biz +".dat";
    conf.put(key, myFileName);
    //Similar code for direcotry
    Thanks for your support.
    MK

    Hi,
    in ID in receiver file comm channel, just tick the option of Adapter Specific messge attributes and in it tick FileName and DirectoryName.............
    the filename and directory you give in comm channel will be treated as dummy and the values will be taken from your UDF.......
    Regards,
    Rajeev Gupta

  • Dynamic File, Directory names - File2File Scenario

    We donot have message mapping in our Scenario  ( Ftp file 2 Ftp file scenario ) where we like to change filename, directory before writing file on the target ftp server. Basically Dynamic configuration has to be manipulated based on  file name pattern. How can we change Dynamic configuration variables without message mapping step.
    Thanks

    Bhavesh, Aamir,
    I am not as learned as you all are...However i have one doubt...
    Can you tell me how..you would use variable substitution  or any of the other features besides the dynamic Config bean...to make a decision..with this logic.
    If(filename.equals(a)){
    String dir = /usr/sap;
    else if(filename.equals(b)){
    String dir = /usr/pas;
    Can someone please enlighten me as this is a problem i have had before and had to do a workaround on...
    Regards
    Ravi Raman

  • Reading from file where file name is not exactly known.

    Hi,
    I have to read a file using utl_file. But the file name is not exactly known.
    The file name would be of the syntax uplldr_XXXX.CSV , where XXXX can be any thing like 1234. so file name would be uplldr_1234.csv in that location.
    How can I search the file in the specified location and process the file with name begins with 'uplldr_' .
    Hope I am clear to express my needs.
    regds,
    ajoy

    Hi,
    Yes I have to use in PLSQL UTL_FILE.
    i.e.
    utl_file.fopen(v_file_path,v_file_name, 'r');
    and v_file_name is the name of file similar to name of 'uplldr_XXXX.csv', stored in the path v_file_path. Considering there is only one file in the specified path.
    Regds,
    ajoy

  • Pass export file/directory name in Web Engine plug-in

    I use a custom Lightroom web engine plug-in that I use to publish my website (5000+ pages).  Here is an example of an output section:
    http://www.johnkane.com/2010-03-01-MuirWoods/index.html.
    I use Dreamweaver to synchronize all the assets such as menus and links, including the plug-in files (Lua pages).  Each web gallery is published to its own folder in my website.  It works great except that every time I publish/republish a web gallery, I have to scroll and identify the directory in the Export / Save Web Gallery dialog box (or type the file (directory) name in for an initial export/publish).
    I have created a panel text box and variable (metadata.directoryPermalink.value) that can contain the directory name.  By storing this directory permalink along with the web gallery, I hope to ensure that each gallery is always published to its correct directory...
    ... except I don't know how to pass this variable to the export dialog box (as "File name" which actually is the directory name all the gallery files are exported to.
    Do I specify this in the manifest?  I don't see references in either the manifest or galleryInfo files... or in the sdk LrWebViewFactory section.  Perhaps I've missed it?
    Any help appreciated!
    Thanks,
    jk

    Hi,
    I haven't tried to write a web engine so don't know the answer off the top of my head. A quick glance at the SDK guide and the two SDK samples didn't give me any hints at the answer.
    Before I nudge one of the gallery developers to see if they know the answer I need to confirm one thing. Can you please confirm you have a file in the same directory as your manifest using the name "myfunctions.lua", and that your require statement looks something like this:
      require "myfunctions"
    (Thie filename should be considered case sensitive).
    I know its an obvious question but I need to ask before I ask one of the others for assistance.
    Matt
    UPDATE: It might also be worth having a look at Sean's 3 post series on web galleries, which is the only other resource I can recall re building web galleries.
    Added additional resource re web gallery development

  • Need to select a directory name.

    I need a dialog that will allow me look through my computer and select a directory name only. The file name is automatically generated, I figured this part out.

    Thanks for your answers, but I already found how to use a "File Dialog Function" from looking at other postings. But I guess it's not working the way I am expecting.
    I attached a constant to the select mode input and set it to "existing dir" mode 3. Then attached a start path control to the start path.
    Now when the dialog opens to select a "directory", I can only select a file. The directory information is in the total file path but I really don't want to select on a file. I need to select a directory and have this information show up. I don't want to see a file name in the final selection.
    Any more information?

Maybe you are looking for