LSMW Read/Converted File Name

Hi,
Normally when you specify file, a name will be generated for the read and converted file with different extention. Now, is it possible to have a more dynamic way of naming this file?  My requirement would be to have the read/converted named differently on each load (without changing the name in LSMW config on each run), for eg. lsmw_read_20022009.read and lsmw_read20022009.conv. In this example, the date is the variable and should change base on system date, so the next load on a different will have a different date. I got some ideas from logical/physical file, but I am not sure how and if its applicable. Any ideas?
Thanks!
cady

regarding the LSMW we have lot of tables , if you chnage the file names in table level based on dates it will fick the files form tables
goto se11 and give the /SAPDMC* then press the F4 you will get 48 tables, if its possible to chnage the file names your probelm is solved....

Similar Messages

  • LSMW file read & convert file name

    Guys
    This is pretty hot - any ideas to automate will be helpful.
    Is there a way to programmatically change the default name for the LSMW file read and file convert names?
    For example if read & conv file is
    Plant_Master_Material.lsmw.read & Plant_Master_Material.lsmw.conv,
    I want to programmatically append userid and make the file name look like
    Plant_Master_Material_myid.lsmw.read & Plant_Master_Material_myid.lsmw.conv.
    It can be done manually via step specify file in LSMW, but I want to automate that step.

    Hi Iqbal,
    Its not possible to make it automatically,
    name for the LSMW file read and file convert will as such like this
    PROJECT_SUBPROJECT_OBJECT.lsmw.read & lsmw.conv.
    This can not be changed...if u need it u can have u r userid under u r object name...
    Reward if useful..

  • Can LR Web module converting file name hyphens into underscores be disabled

    Hi,
    I have problems when creating webpages from within LR.
    First I develop the RAW files and converts them to jpegs. Under Lightroom 3 I use the following settings under "Export location":
    Export to: Specific Folder
    Add to This Catalog: ticked
    Existing Files: Choose a new name for the exported file
    This is thus native Lightroom. For existing files the new filenames are generated with a hyphen follwed by a numeric suffix. as follows: for FileName.jpg this would be FileName-2.jpg, FileName-3.jpg.
    Afterwards I use the web module with the TTG Highslide Pro plugin to generate the webpages. For each image on the page there is a link to the original image to download it. It is here where a problem occurs. With the above mentioend naming convention (adding a hypen when files do already exist) there is no problem at all to display the photos nor as a tumbnail, nor in the slideshow.
    When trying to download the high resolution image however a problem occurs. The file can't be found. This is due to the hyperlink pointing to filenames like FileName_2.jpg and FileName_3.jpg. As the image itself is having a hyphen followed by a numeric suffix it can't be found when the link is pointing to that file using an underscore instead.
    So to me that's a little problem as I am not at the steering wheel at any of the two moments where a naming convention is applied; the automatic filename generation at time of export from Lightroom and the change of the hyphen to the underscore when generating the webpage.
    Any Idea how this can be solved? Or having an underscore used by the automatic naming in Lightroom, or using the hyphen (leaving the filename as it is) when generating the webpage with the LR web module.
    I posted that question already at the TTG forum and got the following respnse from Matthew: "Lightroom's Web module converts file name hyphens into underscores. It's not something I have any control over at all."
    Any help would be appreciated.
    Kind regards,
    Patrick

    I have the same problem in that filenames created with (for instance) photographer-place--year_month_day-filename.cr2 are exported by Lightroom 3.4.1 correctly, without change, into jpg versions, but TTG Highslide Gallery Pro (or, rather, Lightroom) forces a conversion eliminating the dashes and replacing them by underscores. TTG states on its website that this is unavoidable in the Lightroom web module, and recommends entering one's wishes in the "File Handling" tab within Lightroom Preferences.
    However, my LR preferences include the standard File Name Generation option "Replace illegal file name characters with: Dashes (-)" so this would indicate that a dash is not regarded by Lightroom as illegal and therefore should be left alone. As is in fact the case on a normal export from a raw cr2 to jpg: no change in Lightroom and therefore no problem. But export via LR via TTG causes an unwanted conversion from dashes to underscores.
    While searching the web I came across this old post http://thephotogeek.com/ttg-web-gallery-client-selections-lightroom/
    which mentions the question as a LR2 bug.
    I then exported a web gallery using LR's standard web template and here too all file names are converted from dashes to underscores, despite what is entered in LR's preferences. So my conclusion is that this remains a LR bug, and no fault of TTG.
    I am delighted with TTG and couldn't do without it, but am still stuck with this issue which shouldn't need to be an issue at all, if only LR would leave things alone.

  • Converting file names from Mac to Windows.

    I am an Apple tech at a university that uses both PCs and Macs. We have found that we run into some problems when transferring a user's data from one platform to the other.
    When transferring lots of files, what do you experienced Mac techs use for safely converting file names from Mac to Windows?
    From Windows to Mac?
    We've tried NameCleaner and ended up with bad results.
    Please let me know if there is something good out there for these conversions.
    ---Timothy

    The problem looks like this:
    1. User wants to switch from Mac to Windows.
    2. We back up the data from his Mac to a server (an X-Serve RAID).
    3. We log into the server from Windows.
    4. We try to pull his data from the server.
    During this data transfer, it quits with an error stating that it can't finish copying the data. I wish I had the exact text, but I don't. It does this repeatedly, and stops on different files from different locations.
    In essence, without "cleaning" the Mac file names, data transfer to Windows cannot successfully complete. It quits on certain Mac file names. In the past, NameCleaner has worked sometimes, but now we have had some issues with NameCleaner (which don't matter in this discussion). The goal is to find a better solution than NameCleaner.

  • When I try importing a CD following message comes up: error occurred whilst converting file " name of fist song on CD" You do not have the privilege to make changes.  Any ideas?  thanks  John.

    When I try importing a CD following message comes up: error occurred whilst converting file " name of fist song on CD" You do not have the privilege to make changes.  Any ideas?  thanks  John.

    Read the part about changing permissions on the iTunes folder in: https://discussions.apple.com/message/11583914

  • SSIS- Reading Of File Name

    Need to perform below steps while loading data into target table from access database file
    Check if file exists in Folder (particular folder say c:\bin\file...)  
    If file does not exist ... exit
    If file exists  read CSV File for Y/N ( CSV file has value y or n only one column one row)
    If CSV value = Y
    Read the file name, up till "."
    Load access data where entry type = AAA and populate an additional column of source type as the FileName before "."
    If CSV value = N
    Read the file name,up till "."
    Load access data where entry type <> AAA and populate an additional column of source type
    as the FileName before "."
    I can understand how to check the value of csv file for y or n
    How can we check the presence of file, read the name uptill '.' store it in variable and populate it as a column value
    Any help or idea on the above
    aak

    Hi aakcse,
    To check whether accdb file exists in the spepcified directory with wildcard in the file name, you can use the following code:
    public void Main()
    // TODO: Add your code here
    string[] files = System.IO.Directory.GetFiles(Dts.Variables["User::vStrFilePath"].Value.ToString(), "*.csv");
    if (files.Length > 0)
    Dts.Variables["User::vBolFileExist"].Value = true;
    foreach (string file in files)
    Dts.Variables["User::vFileName"].Value = Path.GetFileNameWithoutExtension(file);
    else
    Dts.Variables["User::vBolFileExist"].Value = false;
    MessageBox.Show(Dts.Variables["User::vFileName"].Value.ToString());
    Dts.TaskResult = (int)ScriptResults.Success;
    Note: Assuming there is only one .accdb file in the folder, the script above assigns the file name of the .accdb file without extension to the String type SSIS variable User::vFileName.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • How to read a file name and send it a particular reciever

    Hi,
    I have a scenario, where i am receiving a a file and based on the file name i have to decide who is the receiver and send it to that particular receiver.I do not have to do any mapping.
    can someone suggest me how can I achieve this.
    Thanks in advance.

    HI This may help you.Let me know if not.
    Step by Step Guide: XML File 2 XML File Scenario: Part I
    Step by Step Guide: XML File 2 XML File Scenario: Part II
    Converting XML to PDF using XI
    Introduction to simple(File-XI-File)scenario and complete walk through for starters(Part1)
    Introduction to simple (File-XI-File)scenario and complete walk through for starters(Part2)
    "JAVA MAPPING", an alternate way of reading a CSV file
    Dynamic File Name using XI 3.0 SP12 Part - I
    Dynamic file name(XSLT Mapping with Java Enhancement) using XI 3.0 SP12 Part -II
    Push Data to MVC Architectured application using XI
    How to send any data (even binary) through XI, without using the Integration Repository
    XI in the role of a FTP
    The specified item was not found.
    The specified item was not found.
    The specified item was not found.
    The specified item was not found.

  • LSMW - Create Logical File Name so that the physical file name is automatic

    Hello,
    In LSMW, I do not want to create a logical file name for each project.  I would like the logical file name to automatically assign the physical file to the *.lsmw.conv of the project being executed. Is there a way of doing that?  If so, could someone share?
    Regards, Dean.

    not possible to create the logical file name to physical file name automatiically.
    because the logical file name created like  PROJECT name + SUB PROJECT name +OBJECT NAME .*.lsmw.conv
    if you change the object name the file will be change....

  • How to read dynamic file names in RSEINB00?

    Hi, ABAP Gurus,
    actually I'm a PI Consultant. Now I have a scenario to use the report RSEINB00.
    In the Applicaton Server i put ASCII IDocs with the following name convension: <static name>+<time stemple>:
    SAPIDOC20111127-224128-952.txt
    SAPIDOC20111127-224129-115.txt
    I created a new port in WE21 and the Outbound file and Inbound fiel tabs haben the same configration:
    physical directory: /ABC/DEV100/inbound/
    Function module: EDI_PATH_CREATE_DATE_TIME
    Inbound file: SAPIDOC.txt
    To execute the report RSEINB00 I must give the complete file name and port. It is not convenient.
    My target is, with a job to run RSEINB00 once daily to read all files with name "SAPIDOC + <time stemple>" full automatically.
    Is it possible? how to figure it out?
    thanks a lot in advance! <removed by moderator>.
    Regards
    Rene
    Edited by: Thomas Zloch on Nov 29, 2011 5:23 PM

    with the extension of the standard report RSEINB00 i solved this problem. here is some code:
    DATA:
      dir_name  LIKE  epsf-epsdirnam,
      file_mask LIKE  epsf-epsfilnam,
      g_message_fields LIKE edimessage.
    DATA:
      filename LIKE  edi_path-pthnam,
      filename2 LIKE edi_path-pthnam,
      myport TYPE EDIPO-PORT.
    DATA: h_EDIDC     LIKE EDIDC.
    DATA:
      wa TYPE file_table.
    DATA:
      t_dir_list TYPE STANDARD TABLE OF epsfili WITH HEADER LINE,
      itab TYPE table of file_table WITH HEADER LINE.
    *The directoy, where the Markant ASCII IDocs are droped by XI.
    dir_name = '<.../inbound>'.
    *File mask of ASCII IDocs.
    file_mask = 'XYIDOC.'.
    *File port.
    myport = '<Portname>'.
    CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
      EXPORTING
        dir_name               = dir_name
        file_mask              = file_mask
      TABLES
        dir_list               = t_dir_list
      EXCEPTIONS
        invalid_eps_subdir     = 1
        sapgparam_failed       = 2
        build_directory_failed = 3
        no_authorization       = 4
        read_directory_failed  = 5
        too_many_read_errors   = 6
        empty_directory_list   = 7
        OTHERS                 = 8.
    IF sy-subrc <> 0.
      MESSAGE e600(fr) WITH 'No ASCII IDoc exits'.
    ENDIF.
    "BREAK-POINT.
    *The old ASCII IDocs are stored in a dataset and copied with new file name sent_<original name>
    LOOP AT t_dir_list.
      CONCATENATE dir_name '/' t_dir_list-name INTO filename.
      CONCATENATE dir_name '/sent_' t_dir_list-name INTO filename2.
    open dataset filename for input in text mode.
    open dataset filename2 for output in text mode.
    if sy-subrc = 0.
      do.
        read dataset filename into wa.
          if sy-subrc <> 0.
           exit.
          endif.
      transfer wa to filename2.
         append wa to itab.
           enddo.
    endif.
    close dataset filename.
    *loop at itab into wa.
    transfer wa to filename2.
    *endloop.
    close dataset filename2.
      PERFORM inbound_processing USING filename.
    ENDLOOP.
    *&      Form  inbound_processing
    FORM inbound_processing USING filename TYPE edi_path-pthnam.
    do inbound processing from file
      CALL FUNCTION 'IDOC_INBOUND_FROM_FILE'
        EXPORTING
          file_name            = filename
          port                 = myport
        EXCEPTIONS
          file_open_failed     = 1
          marker_to_be_deleted = 2
          read_file_failed     = 3
          idoc_not_stored      = 4
          file_delete_failed   = 5
          marker_modify_failed = 6
          event_create_failed  = 7
          first_record_invalid = 8
          invalid_record       = 9
          OTHERS               = 10.
      IF sy-subrc <> 0.
    fill message fields for exception handling from system fields
        MOVE-CORRESPONDING sy TO g_message_fields.
    error handling using the 3.0 business workflow
        CALL FUNCTION 'IDOC_ERROR_WORKFLOW_START'
          EXPORTING
            docnum                  = 0
            eventcode               = 'EDIM'
            mess                    = g_message_fields
          EXCEPTIONS
            no_entry_in_tede5       = 0
            error_in_start_workflow = 0
            OTHERS                  = 0.
    do not care for exceptions here
        COMMIT WORK.
    append message for RFC
        MESSAGE ID     g_message_fields-msgid
                TYPE   'A'
                NUMBER g_message_fields-msgno
                WITH   g_message_fields-msgv1 g_message_fields-msgv2
                       g_message_fields-msgv3 g_message_fields-msgv4.
      ENDIF.
    ENDFORM.                    "inbound_processing

  • UDF to read a file name and use some of its contents to map fields in target.

    I have a scenario where I need to take the month and year from the file name and map it to suitable fields in the target. Ex - filename_apr2014 from this i should be able to read the month and year and map it. How to do this? I tried the udf -
    public String getFileName(Container container){
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return ourSourceFileName;
    got this error while testing the mapping -
    Runtime exception when processing target-field mapping /ns0:MT_<<>>_Output/I<<>>; root message: Exception:[java.lang.NullPointerException: while trying to invoke the method com.sap.aii.mapping.api.DynamicConfiguration.get(com.sap.aii.mapping.api.DynamicConfigurationKey) of a null object loaded from a local variable at slot 2] in class <<>> method getSourceFileName[com.sap.aii.mappingtool.tf7.rt.Context@5b04fc0f]
    See error logs for details  

    Hi Satish - You declared "conf" twice.
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    UDF -
    String filename    = "";
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","FileName");
    filename = conf.get(key);
    return filename;
    And did you define the variable slot 2 in any of your UDF's?
    The above UDF return the filename and you should handle the sub string later..

  • How to read variable file name into ODI

    Hello everyone,
    I apologize in advance if this has already been answered - I've done searches both on Google and this OTN area and have not found an answer to my query.
    I would like to do the following via ODI:
    1) rename a file in a specific directory
    2) process the file
    2) move the file to a backup directory
    3) rename the file again
    The file name is going to change everytime this process runs, as date is appended to it. I could create a variable with a system date in it and concatenate that into the filename before processing it, but I am not sure when they will run the ODI routine. Therefore, I would prefer to play it safe by doing something like a wildcard search in DOS.
    Example:
    Filename = TestFile12072010.csv
    I would like to:
    1) rename TestFile12072010.csv to TestFile.csv
    2) process the file
    3) move the file to another directory
    4) rename the file to TestFile<processdate>.csv
    I was hoping to do the first step using a DOS command that reads in TestFile*.csv. Note: I would expect there to be only 1 file with this naming convention and file extension in the directory.
    I have tried creating a stored procedure that uses the Operating System type, but it runs without stopping. I have also tried ODIFileCopy and OS Command. Obviously, I am doing something wrong since I am getting errors.
    Any guidance would be much appreciated! :)
    Thanks!
    -OS

    Issue was due to a syntax error. Case closed.
    Thanks!
    -OS

  • How to read the file name....

    Hello all,
    I have a doubt on reading file name.
    I have 10 pdf files in the dir '/d01/tem/'
    I need to get/load those 10 file names using PL/SQL. Meaning I need to get the file names only not the file contents...
    Please help me to achieve this....
    Thanks and Regards,
    Muthu

    There is no public synonym for DBMS_BACKUP_RESTORE, so you need to prefix it with SYS and make sure your user has execute privilege on the package. This will fix call to DBMS_BACKUP_RESTORE, but you have another issue. - fixed tables. Only SYS can read them. You'd have to login as SYSDBA, create a view around x$krbmsft and grant select on it to your user.
    SQL> connect sys as sysdba
    Enter password:
    Connected.
    SQL> grant execute on DBMS_BACKUP_RESTORE to scott;
    Grant succeeded.
    SQL> create view v$krbmsft as select * from x$krbmsft;
    View created.
    SQL> grant select on v$krbmsft to scott;
    Grant succeeded.
    SQL> connect scott
    Enter password:
    Connected.
    SQL> set serveroutput on
    SQL> DECLARE
      2      p_directory VARCHAR2(1024) := 'C:\TEMP';
      3      p_null VARCHAR2(1024);
      4      i number := 1;
      5  BEGIN
      6      SYS.DBMS_BACKUP_RESTORE.searchFiles(p_directory, p_null);
      7      FOR x IN (select fname_krbmsft fname from sys.v$krbmsft) LOOP
      8        DBMS_OUTPUT.PUT_LINE(x.fname);
      9        EXIT WHEN i = 3;
    10        i := i + 1;
    11      END LOOP;
    12  END;
    13  /
    C:\TEMP\acbrd-0050.csv
    C:\TEMP\afiedt.buf
    C:\TEMP\A_3136_4000.log
    PL/SQL procedure successfully completed.
    SQL>SY.

  • How to get the read input file name in bpel process using File Adapter.

    Hi,
    I am reading a .txt file from configured directory using File Adapter.
    I had configured file adapter to read file with naming pattern “SalesOrder.*\.txt”.
    Now I had requirement to access the actual file name in bpel process eg: “SalesOrder123.txt”
    How can I get the file name in bpel process.
    Any help is appreciated.
    Vidya.

    1) create a variable of message type. Click on Browse Message type. Here you select Message Type-->Project WSDL Files -->fileAdapterInboundHeader-->Message Types-->Inboundheader_msg. Then click OK
    2)Next dbl Click on teh receive Activity which is receing your File from teh File Adapter. Go to the Adapter Tab. Click on Browse variable and select the variable that you had just created above.
    This would get the File name in the variable declared

  • Read in file name + path using command line arguments

    Hi guys,
    I am trying to use command line arguments to read in the name of two files. The code below works as long as the files are on the class path.
    public class cmdLineArguments {
         public static void main(String[] args) {
              String xmlFile1 = args[0];
                    String xmlFile2 = args[1];
              System.out.println ("\nXmlFile1: " + args[0] + "\nXmlFile2: " + args[1]);
    }I would like to be able to read files that are not on the class path as well by entering their full path along with their names.
    In other words, It works if I type:
    C:\Documents and Settings\user\workspace\CmdLineArgs\src>java cmdLineArgs file1.xml file2.xmlbut not if I type:
    C:\Documents and Settings\user\workspace\CmdLineArgs\src>java cmdLineArgs c:\Documents and Settings\user\desktop\file1.xml c:\Documents and Settings\user\desktop\file2.xmlWould anyone please explain how I can edit the code to make it work? I guess I could take them both as a String, modify them manually (add a \ to it etc) but is there an easier way to do it? Even a reference to a tutorial, article etc about this would be very much appreciated.
    Also, any idea why a code would compile and run fine in Eclipse but would create an error from command line?
    Thanks a lot.

    You need to learn about cmd.exe which is used to process the command line. The arguments passed to any program is the command line split at white space so your command line arguments of
    c:\Documents and Settings\user\desktop\file1.xml c:\Documents and Settings\user\desktop\file2.xmlis turned into an array of
    "c:\Documents", "and", "Settings\user\desktop\file1.xml", "c:\Documents", "and", "Settings\user\desktop\file2.xml"In other words instead of 2 arguments you actually have 6.
    To get round this the file names need to be quoted
    java cmdLineArgs "c:\Documents and Settings\user\desktop\file1.xml" "c:\Documents and Settings\user\desktop\file2.xml"

  • Read dynamic file name

    Dear Experts,
    I need to read a file from the application server with the file name "static""timestamp".txt, where static is the static file name and timestamp would be added at the end of the file name. Please suggest me a way to read all such files one by one.
    thanks

    Hi
    You need to scan the path in order to get all files stored and then to read it;
    You can use the fm EPS_GET_DIRECTORY_LISTING in order to scan the directory:
    DATA: dir_name  LIKE  epsf-epsdirnam,
          file_mask LIKE  epsf-epsfilnam.
    DATA: filename  TYPE string.
    DATA: t_dir_list TYPE STANDARD TABLE OF epsfili WITH HEADER LINE.
    dir_name  = '<application path name>'.
    file_mask = '<static>*.*'.
    CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
      EXPORTING
        dir_name               = dir_name
        file_mask              = file_mask
      TABLES
        dir_list               = t_dir_list
      EXCEPTIONS
        invalid_eps_subdir     = 1
        sapgparam_failed       = 2
        build_directory_failed = 3
        no_authorization       = 4
        read_directory_failed  = 5
        too_many_read_errors   = 6
        empty_directory_list   = 7
        OTHERS                 = 8.
    IF sy-subrc <> 0.
    ENDIF.
    LOOP AT t_dir_list.
      CONCATENATE dir_name '/' t_dir_list-name INTO filename.
      OPEN DATASET filename FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      CLOSE DATASET filename.
    ENDLOOP.
    Max

Maybe you are looking for

  • Calling report/form from backend trigger

    Could anybody please tell me how to invoke a form or report from a database back-end triggers? Thanks. Sonia.

  • Cannot recover HR user(Oracle10g,winXP)

    Friends , I take 11:05 am (07.04.08) a rman backup using following script : run allocate channel t1 type disk; backup format 'df_%t_%s_%p' (database);} After the backup , Accidently I have deleted HR user And using the following script I cannot recov

  • Canon mx882 won't print label page

    Labels printed ok earlier -- I added one page of labels and now cannot get last pg to print

  • Inconsistent tcp/ip address

    i can't connect to the internet using my comcast modem (on my G4). Comcast says it's a computer problem, maybe a bad ethernet card. Apple says if the ethernet card is bad, it wouldn't work intermittingly. I hate to replace the ethernet card if that i

  • How do I get rid of KeyChain Access?

    I just switched over to Safari from Internet Explorer (since I'm told they're not making any more updates for Mac users). Everytime I try to access a new site, I get a pop-up message saying that Safari wants access to my keychain and to enter a user