Infopackage routine for changing  file name

Hi Everyone,
                           I have to load flat files from application server directories. I get these files from different locations and they are saved in own (location) folders by a script). I would like to run these file from infopackage through process chain. the problem is that these files have changing names. The format is like this
Canada_co3300.csv
I can write a routine is my infopackage but  "co3300" keeps changing as it represents different companies code in that particular location (Canada).
  I have a routine
data: F1 type string value 'D:\usr\sap\FLAT_FILES\Inbound\Cayman\Canada_<b>co3300</b>_',
F2 type string '.csv'.
concatenate f1 f2 into p_filename.
  How can I get a variable <b>co</b>---- in my routine so my infopackage can read the file if <b>co</b> has different value like co2000. Thanks In advance.
Regards,
Asad

Hi Saugata,
                       My flat file name has a naming convention based on company code in application server folder, so I get files with name
                                           Canadaco<b>3000</b>.csv  or
                                           Canadaco<b>2000</b>.csv or
                                           Canadaco<b>4000</b>.csv or something else <b>(co</b> number keeps changing)
So My file name keeps changing all the time. I would like my infopackage to read these files automatically thorugh a routine or logical file name. I have tried both, but donot know how to configure this scenerio thorugh my infopackage. Please give me steps to use that table you mentioned. Thanks .

Similar Messages

  • UDF for Changing File Name

    Hi Experts,
    I am working on one scenrio, where i am fetching the file name dynamically by adapter module.
    Now, the file name needs to be checked for the following conditions:
    BOOKING_REF_DELIVERYNO_WB.pdf
    BOOKING_REF_DELIVERYNO_BOLCOPY.PDF
    DELIVERYNO_AWB.PDF
    Depending upon the type of file being picked up by PI from the mail box,following needs to be done:
    1.time stamp needs to be added ..
    ex..
    for file SO10162239_123_458_BOLCOPY.pdf--> the file name must be changed to :
    SO10162239_X2100_20101206_123_458_BOLCOPY.pdf.
    Please suggest if this can be done by graphical mapping ?
    Thanks,
    Sushama

    hi,
    I am using following UDF..
    FileName->ParseFile>getNykFilename>concat--
    Current date->                                                                   concat> Trim> FileName
                               concat----
    |
    constatnt[.pdf]--->
    UDF for parse file:
    String[] sarray;
    String regex = "\"";
    String retstring;
    String fname;
    int l= raw.length();
    try {
         sarray = raw.split(regex, 3);
         retstring = sarray[1];
                            fname=sarray[l-1];
            if( fname=="WB")
    raw.concat("_X2100_");
    else if (fname=="BOLCOPY")
    raw.concat("_X2101_");
    else if (fname=="AWB")
    raw.concat("_X2102_");
    } catch (Exception e) {
         retstring = "no_att_name_found.err";
    return retstring;
    UDF for getNykFileName:
    String[] sarray;
    String regex = "[_]";
    String retstring;
    if(!orgName.endsWith(".err")){
    try {
         sarray = orgName.split(regex, 3);
         retstring = sarray[0];
    } catch (Exception e) {
         retstring = "nyk_filename.err";
    return retstring;
    }else{
         return orgName;
    But, its not working..
    Its giving the file name as:
    no_att_name_found.err20101206 for the input file : 801243209_81473641_wb.pdf
    Display queue result for parsefileName:
    "no_att_name_found.err"
    Please suggest.
    Thanks,
    Suahama

  • Framemaker uses $filename for short file name, can we edit this to change appearance? We do not want the short file name of long filename to include the .fm extension can this be removed or modified to make this happen?

    Framemaker uses <$filename> for short file name, can we edit this to change appearance? We do not want the short file name of long filename to include the .fm extension can this be removed or modified to make this happen? In compiling our books it would be helpful to not have this extension appear as it then requires us to create extra files without them.

    See: System Variables

  • Change file name with oreilly servlet

    I am using oreilly servlet package and I want to change the file name to the file I am uploading, is this possible ?
    How ?
    Thanks.
    here I post the servlet code:
    package com.reducativa.sitio.servlets;
    * DemoParserUploadServlet.java
    * Example servlet to handle file uploads using MultipartParser for
    * decoding the incoming multipart/form-data stream
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import com.oreilly.servlet.multipart.*;
    public class DemoParserUploadServlet extends HttpServlet {
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    PrintWriter out = response.getWriter();
    response.setContentType("text/plain");
    out.println("Demo Parser Upload Servlet");
    File dir = new File("f:/");
    if (! dir.isDirectory()) {
    throw new ServletException("Supplied uploadDir " + "f:/ " +
    " is invalid");
    try {
    MultipartParser mp = new MultipartParser(request, 10*1024*1024); // 10MB
    Part part;
    while ((part = mp.readNextPart()) != null) {
    String name = part.getName();
    if (part.isParam()) {
    // it's a parameter part
    ParamPart paramPart = (ParamPart) part;
    String value = paramPart.getStringValue();
    out.println("param; name=" + name + ", value=" + value);
    else if (part.isFile()) {
    // it's a file part
    FilePart filePart = (FilePart) part;
    String fileName = filePart.getFileName();
    if (fileName != null) {
    // the part actually contained a file
    long size = filePart.writeTo(dir);
    out.println("file; name=" + name + "; filename=" + fileName +
    ", filePath=" + filePart.getFilePath() +
    ", content type=" + filePart.getContentType() +
    ", size=" + size);
    else {
    // the field did not contain a file
    out.println("file; name=" + name + "; EMPTY");
    out.flush();
    catch (IOException lEx) {
    this.getServletContext().log("error reading or saving file");
    }

    Hi there,
    I am facing the same problem that you have stated in your Feb 26, 2002 10:28 AM message regarding "change file name with oreilly servlet", I would like to change the file name to include a unique identifier upon upload, did you ever find a solution to your problem?
    Thanks!
    Todd
    [email protected]

  • Ask for the file name when printing on XP x64

    I have just installed my CS3 on Windows XP x64. Installation was successful and all is working fine. But there are few things which are working differently and I can not find any way to fix it.
    One of the problems I have is that I can not have it so that I will be asked for the name of the PDF file created. It simply goes through and allocates name of the file used for printing. It happens for all applications i.e. Word, Excel, InDesign, Corel. In my automatic processes I realy need to be prompted for the file name / location. Is it possible to modify some settings to have it under XP x64 ??? I hope it is.
    Thanks for advise.
    Tony

    I would like to add few details which may help to find the source of the problem.
    When I will select Adobe PDF as a printer, then click on Properties and select
    Prompt for Adobe PDF filename
    in Adobe PDF Output Folder then printing starts and will not progress at all. If I will change the Adobe PDF Output Folder to local it prints OK but is not asking for the file name / destination.
    How I can have it printing and asking for the file name / destination ? Or maybe on XP x64 it is not possible at all ?
    Regards,
    Tony

  • ADE changes file names

    The book I downloaded has each chapter as a seperate .pdf, each with it's own unique filename. ADE has retitled every chapter (.pdf) to the name of the book. Now that all the chapters have the same name, I can't transfer them to my Kobo. How do I change titles or get ADE to stop changing file names?
    Thanks

    Dimitri,
              As usual, thanks for the simple but informative explanation!
              Jason
              "Dimitri Rakitine" <[email protected]> wrote in message news:[email protected]..
              > I think your theory is correct - java classes cannot contain '-' in
              > the name and 45 is ascii decimal for '-'. 46 is '.'.
              >
              > Jason Rosenberg <[email protected]> wrote:
              > > I have been working with using jspc.
              >
              > > I have noticed in a few cases it changes file names.
              >
              > > For instance, when I compile the file: '6-12adrworld_090700.jsp',
              > > it produces: '_6_45_12adrworld_090700.class'
              >
              > > Where does the '_45_' come from? I am trying to work with the
              > > theory that '-' becomes '_45_'....
              >
              > > Also, in another case, I noticed a '_46_' was inserted.
              >
              > > Any ideas? Is this documented anywhere?
              >
              > > Jason
              >
              >
              >
              > --
              > Dimitri
              

  • Documentation for changing Server name

    Hi,
    I'm looking for documentation for changing server name. Ex. from prod1.domainname.com to prod2.domainname.com. We only change the server name, not the server itself.
    Does someone know where I can find it?
    Thanks
    André

    On the server side you need to edit two files:
    1. ORACLE_HOME/network/admin/listener.ora
    depending on the protocols you are accepting connections on, you need to change the value for HOST = <new server name goes here>
    2. ORACLE_HOME/dbs/init<SID>.ora
    You probably haven't specified this parameter, but if you did specify a value for LOCAL_LISTENER, then change it accordingly.
    On the client and server side you need to edit one file
    1. ORACLE_HOME/network/admin/tnsnames.ora
    Find the service names that refer to the databases that live on the server whose name was changed. If TCP is the protocol being used to connect to these databases, then change the HOST = <new server name goes here> accordingly.

  • Variable subsitution for target file names

    Hi All,
    I am using variable subsitution for dynamic file names. I am using the multimapping for multiple files in the target.So i coluld not able to use the dynamic configuration for file names. Now i want to replace all the spaces in the filename to underscore.
    For example
    My payload filed value "file name in the target file".
    Now my filename  "file_name_in_the_target_file".
    How to achieve this using Variable subsitution.
    Regards,
    Ramalakshmi.G

    Use replaceString Function.
    file name
    Constant (" ")               --> replaceString -------> TargetField
    Constant ("_")
    Regards
    Ramesh

  • Is it possible to change file name policy in the JRE cache folder?

    We are getting calls from our clients complaining of slowdowns in loading our Java applet. The reason is a virusscanner. If a virusscanner is in the middle, it can drastically slow down the download process, and therefore cause some high delay before the user can work on the our product as expected.
    On this csutomer's side, it may take up to 10 min (the first time it is ran) instead of 1 min. JRE 1.6 is in use.
    They dont want to exclude from antivirus scan all files from Sun\Java\Deployment\cache folder.
    Question:
    Is it possible to change file name policy in the JRE cache to make it less unique?
    Thanks,
    -Dima

    dgomel wrote:
    We are getting calls from our clients complaining of slowdowns in loading our Java applet. The reason is a virusscanner. If a virusscanner is in the middle, it can drastically slow down the download process, and therefore cause some high delay before the user can work on the our product as expected.
    On this csutomer's side, it may take up to 10 min (the first time it is ran) instead of 1 min. JRE 1.6 is in use.
    They dont want to exclude from antivirus scan all files from Sun\Java\Deployment\cache folder.
    Question:
    Is it possible to change file name policy in the JRE cache to make it less unique?
    I suggest you solve the real problem - big files.
    There are two scenarios
    1. Initial download
    2. Updates.
    The first takes as long as it takes. No way around it.
    The second means that you can't use one jar. Otherwise every single update requires downloading the entire application every time. Multiple jars means only the one that changed is downloaded.

  • HT4972 I am trying to update ipod touch from ios 4.3.2 to ios 6.1.3.  I have it connected to my computer, and the summary in itunes indicates the update is available.  However, when I click "update", it opens Windows Explorer and waits for a file name to

    I am trying to update ipod touch from ios 4.3.2 to ios 6.1.3.  I have it connected to my computer, and the summary in itunes indicates the update is available.  However, when I click "update", it opens Windows Explorer and waits for a file name to open.

    I am not at that computer now, but I did check via windows update & with the check updates menu choice in the itunes program  - neither indicated a newer version of itunes is available. (it is a vista computer).
    The itunes software on the computer displays my ipod & the current ios (4.3.2), and indicates a newer ios is available (6.1.3). When I choose "update", I am taken to Windows Exploer and prompted to choose a file to open. it is as if the "update" button has the incorrect code attached to it.
    The ipod is working, but there are several app I would like to install, but I can't with the current ooperating system.

  • I'm trying to "open"-get to a site--Ichoose Firefox as application; the next screen is another appication and asks for a file name. What do I do? I never get any further.

    I'm trying to get to "www.enoriver.org." A window appears asking me to choose an application--I choose Firefox. Then another window opens titled "Another Application" and asks for a file name at the botto0m of page. I choose Firefox from the list of files, paste it into the bar, hit "enter"--nothing happens. What do I do?

    Hi Leo! If you can stop these down load managers, you will be my hero.
    Dokie!!
    PS I have tried my best to warn members here on the forum, but I haven't got a lot of support so far.
    I have my figers crossed that the new team will get-er-done

  • Sender file adapter - Can I use *.xml for the file name

    Hi Gurus,
    I have some interfaces where I need to pick the file from a directory. The name of the file will have Data<i>time stamp</i> as the naming convention. Can I use *.xml to pick up my files from this directory?
    The help.sap.com documentation says that we can use this naming convention.
    <b>
    &#9679;      File Name
    Specify the name of the file that you want to process. The name can contain placeholders (*, ? (placeholders for exactly one character)) so that you can select a list of files for processing.
    </b>
    I tried using *.xml for my file name in the communication channel, XI is not picking up this file.
    Please let me know if you have the solution.
    Thanks
    Kalyan

    Murthy,
    Thanks for the reply.
    I am using GuildFTP tool as my FTP server. In this tool, all the permissions were given for the file to pick up.
    The status of the file is good.
    Where in the file adapter configuration I have to select 'Read-only'?
    The file adapter is working perfect with the exact name of the file.
    Thanks
    Kalyan

  • When I open up an e-mail attachment a box pops up PRINT TO FILE below that line OUTPUT FILE NAME with an empty line for the file name vs. simply going to my default printer?

    when I open up an e-mail attachment a box pops up PRINT TO FILE below that line OUTPUT FILE NAME with an empty line for the file name vs. simply going to my default printer?

    Make sure that '''''Print to File''''' isn't selected in the native print dialog box ''(see screenshot below)'' middle-right, and make sure your Printer is selected at the top of that dialog box.
    ''I'm a little confused why an email attachment would need to go directly to the printer, but that's what you asked about.''

  • How can i search for multiple file names (images) in bridge?

    Hello everyone!
    Does anyone know how to search for multiple file names in bridge?
    That is to copy & paste something like this: _MG_2152, _MG_2177, _MG_2194, _MG_2195, _MG_2202, _MG_2212, _MG_2219, _MG_2261, _MG_2362, _MG_2401
    Not using several criterias in the search box that is. That takes too long.
    Thanks
    Steffen Rikenberg Photographer
    Oslo, Norway.
    www.steffenrikenberg.no

    Try this add-on [https://addons.mozilla.org/it/firefox/addon/find-all/ Find All]

  • How to programmatically disable prompts for output file names in Acrobat X

    My code to programmatically disable output file names (below) is not working on a Windows 7 64-bit machine using Acrobat Distiller X.  It works perfectly on a Windows XP machine with Acrobat Distiller 8.
    The latest API Reference I was able to find is dated June 2008.  My logic follows this convention.
    I have confirmed that the registry key is updated as specified below.  I have also confirmed that I am able to write to the directory indicated.
    Please provide any suggestions to resolve. 
    Thank You!
    ~Lori
    'Create the Registry Key where Acrobat looks for a file name
            CreateNewRegistryKey HKEY_CURRENT_USER, _
                         "Software\Adobe\Acrobat Distiller\PrinterJobControl"
    'Put the output filename (FilePath) where Acrobat could find it
            SetRegistryValue HKEY_CURRENT_USER, _
                     "Software\Adobe\Acrobat Distiller\PrinterJobControl", _
                     C:\Program Files (x86)\Microsoft Office\Office12\MSACCESS.EXE, _
                     T:\PDF Files\Current Week\NFS_Lori,Test.pdf

    I remember seeing that the problem is thunking. A little more specifically, because it's a 32-bit driver but a 64-bit executable, there's a 32-bit system spooler process which will always show up as the EXE name.

Maybe you are looking for

  • Barcode is not getting printed in Sapscript

    Hi, I want to print the PO as barcode in my Script. I have converted the output to PDF format I have created a character format for this and given C128A as Barcode and used this character format to print the barcode. but the barcode is not geettting

  • Swipe between pages feature is freezing with magic mouse and magic trackpad in Mavericks

    I am experiencing a bug in Mavericks with my Magic trackpad and the Magic mouse. This bug comes and goes and is very sporadic. When it happens I am usually in a browser like Firefox or Safari, or in iPhoto. Anything that uses the Swipe between pages

  • Problem in Web dynpro Java appl deployment

    Hi Experts, We are in the live environment and after successful QA testing, all the applications were deployed through SDM. In SDM log everything shows as deployed successfully. For one where in the web dynpro screen shows exception message as: faile

  • Flat file format for FIM 10.0 dataload

    Hi, We are loading data to BPC 10.0 through FIM 10.0 the data comes in CSV file. The data file currently have is in the below format, Account No |  January  |  Feb   |  Mar  |  Apr |  May - - - - - - Nov | Dec ie first column is the account number an

  • Fullscreen slideshow mystery...

    Hey guys, Is there anyway of making the fullscreen slideshow display behind the master page headerbar? To clarify, when I set a header bar/logo on my master page then go to a child page (with the master applied to it) and activate a fullscreen slides