Read dynamic file format

I have a requirement wherein , the source is in the form of .txt files containing data.As per the definition, it is fixed-width file.
The first field in the data is 'Type'.Based on the value in this field,the file format has to be defined.
Please help on how to implement this.

Hi Priyanka,
We understand that based on the Column value of "Type" the rest of the file columns will vary. Now my question to you is "does all the files have the same number of columns(total count of columns in the file) or will they vary???".
Regards,
Naveen

Similar Messages

  • Reading Dynamic Files using File port

    Hello All,
    We have a requirement in our project where we have to use File Port to pick a set of IDOC Flat files from a given directory. The File Port only allows us to pick a file with a specific given name and does not allow us to pull file with a pattern for .eg. We  can pull a file abcd.txt but cannot pull something like abc.txt. Our requirement is to pull abc.txt using the File Port.
    If anyone has any idea about this, or any past experience with File Port in this regard, then please respond at the earliest.
    We have created the file port with follwoing parameters:
    Unchecked the Unicode Format System Setting
    For the Inbound File:
    Function Module: EDI_PATH_CREATE_CLIENT_DOCNUM
    Directory is: A valid directory path
    File Name: abcd.txt
    Thanks in advance.
    Abinash

    If the xml files are all in the same directory (not in any directory structure relative to the parent directory), you can do something like this.
    - create a bpel process to read the zip files as it comes into the directory]
    - Have a file adapter inbound for the receive
    - Call windows .bat command within the bpel process to run an unzip command on that directory
    - Have another bpel process that reads *.xml files and this will get kicked off.
    There are so many ways of solving this: like having a cron job to unzip the files coming in etc. But, if you have a directory structure for these XML files and if the structure is dynamic, it is difficult to configure the file adapter for that.

  • Can Elements 7 read CS4 file formats  ?

    If CS4 has been used to capture HD and develop in-progress sequences (with basic video and audio transitions) and thus Premiere Pro project files *.prproj can they be imported/read by Elements 7 for further work (e.g. on another computer by someone else)?
    For basic video editing tasks, if CS4 formats can be imported/read in Elements 7 are there any specific aspects that may get lost or cause issues (and what are these)?
    And can I assume that the reverse, importing/reading Elements 7 file formats in CS4 is possible and fully transferable.
    Windows XP SP3
    2GB RAM

    Unfortunately, my tests between PrP and PrE were for earlier version:
    PrP2 & PrE4.
    What I found was that PrP2 could Open PrE4 Projects, with only a few glitches. PrE4 yielded an error, "This Project was Done in PrP2. Use That Program to Open This File."
    These were simple Projects, with only a few Titles, Transitions and very limited Effects. There were no Themes, etc. used.
    In PrP2, there were a few things that did not translate from PrE4. One Tilte had animation and text on a Path. These did not come in.
    The PrP2 Project was even less involved, but nothing would Import.
    As Steve says, the Assets will translate well between the two NLE's, but editing work will possibly be limited in one direction, but nothing will Import in the other.
    Good luck,
    Hunt

  • Adobe Reader print file format?

    What is the file format of files pritned from Adobe Reader?

    As mentioned above, every now and then people will see a normal sized dialoge box.  Here are two examples:
    and:
    Regards.

  • 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

  • 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

  • How to read XML file format

    Presently calling a webservice to search for customer which generates a XML file. Requirement is to check the XML file format in case of success move to next step and in case of error exit from the application.
    The file generated can have multiple formats as per input supplied.
    Please advise how the file format can be checked.
    Thanks
    anya

    hi anya,
    Try to use FM IDOC_XML_FROM_FILE.
    or check the below code
    data: temp_str type string.
    concatenate '>' cl_abap_char_utilities=>cr_lf '<'><' in XML_STRING with temp_str.
    xml_string is the straing variable to hold the xml .
    now use xml_string to show it in texteditor.
    -Thanks
    Saurabh Goel

  • Reading ACE file format?

    Anyone know of open-source or commercial Java source code or libraries to read ACE-format files? (http://www.winace.com/). They do have a freely available DLL that'll read them... but that means integrating. Hmm.
    Thoughts? Thanks,
    dwh

    Anyone know of open-source or commercial Java source
    code or libraries to read ACE-format files?
    (http://www.winace.com/). They do have a freely
    y available DLL that'll read them... but that means
    integrating. Hmm.
    Well 'ol boy it looks as if you are in for a spot of JNI. Perhaps one could find a library to read ACE format files but that site declares that their files are in a proprietary format that is not compatible with the ACE format.
    "Please note:Although the compression used in both ACE Compressions Libraries offers the same performance regarding compression speed and ratio as the retail version of WinAce, the archive format used in these two Libraries is not fully compatible with the standard ACE format. "
    So tally-ho and off to native methods. Good luck chap.

  • GSE reader / dataplugin / file format specification?

    Hello colleagues,
    I need to read seismological datafiles stored in GSE format (version 1.0, 2.0, 2.1, ...). I could not locate a dataplugin. I also downloaded a number of GSE specification explanatory PDFs, but am still unable to comprehend it (so many parameters, per-channel header, .,..).
    Anyone having it, or at least having usable specification PDF?
    Thanks in advance,
    R

    Hello,
    I am not really familiazired with GSE files can you attached the file and give more information about it. Maybe that way i can help you.
    Randy @Rscd27@

  • Are photoshop file format plug-ins supported by the InDesign SDK?

    If not, is it possible to read new file formats into InDesign? Thanks,
    Rob

    I'm trying to import NITF image files. I already have a photoshop file format plugin that can read these images and was hoping that it could (somehow) be used to import images into InDesign as well. It appears as if this is definitely NOT possible.
    My use case is that I'd like to read a NITF image into Photoshop. The images I deal with are typically single channel 16 bit images. I'd like to then use Photoshop to process the image (e.g., brighten certain parts of the histogram and/or crop the image). I'd then like an easy way to get the image into InDesign. My initial thought was to use a function that could just pass it over, but it appears as if that is not possible.
    It looks like I'll either have to figure out if cutting/pasting is acceptable and, if not, save the image to disk and re-read it. Next I must find answers to these questions:
    a) Does the InDesign's SDK API provide the ability add to the list of supported image types that can be imported?
    b) Does InDesign's SDK API provide the ability to create new document save types?
    c) Does it make any sense to use a 16 bit/channel image in InDesign? I notice that it can read a 16 bit tiff file, but there doesn't appear to be any photoshop like controls to adjust the visible dynamic range.
    Thank you all for your help!
    Rob

  • Problem While reading a file in text mode from Unix in ECC 5.0

    Hi Experts,
    I am working on Unicode Upgrade project of ECC5.0.
    Here i got a problem with reading a file format which it does successfully in 4.6 and not in ECC5.0
    My file format was as follows:
    *4 000001862004060300000010###/#######L##########G/##########G/########
    It was successfully converting corresponding field values in 4.6:
    *4
    00000186
    2004
    06
    03
    00000010
    25
    0
    4
    0
    54.75
    0
    54.75
    0.00
    While i am getting some problem in ECC5.0 during conversion of the above line:
    *4 000001862004060300000010###/#######L##########G/##########G/########
    it was consider in the same # values.
    I have used the following statement to open and read dataset.
    OPEN DATASET i_dsn IN LEGACY TEXT MODE FOR INPUT.
    READ DATASET i_dsn INTO pos_rec.
    Thanks for your help.
    Regards,
    Gopinath Addepalli.

    Hi
          You might be facing this problem because of uni code. So while opening or reading the file, there is a statement call ENCODING. Use that option and keep the code page which you want. Then the problem may be solved.
    Thanks & Regards.
    Harish.

  • Not reading Canon Files both RAW ( CR2) and JPEG

    I have been a long time user of Lightroom, now have LR 3.4 installed. No serious problems so far and I love using it. For a computer set up, I use a one year old Apple desktop with Lion installed. My problem is that this past week, my LR 3.4 will not read my Canon files, both CR2 and JPEG format. I have tried two different cameras ( 5d Mark ii and 7D ) two different card readers and several different memory cards. LR sees the files, starts to upload them and then on concluding its routine says it cannot read the file format. I am patching together a solution by importing the files through iphoto, exporting them to a file in my LR hierarchy file and then importing them into LR.
    Clearly, this is not good. Has anyone had a similar problem? Can anyone offer a solution?
    Thanks
    Tom 

    You might get more help in the Lightroom forum than here in the Photoshop forum.

  • MT940 File Format

    Hi,
    I am currently working on SAP XI and have been asked to create an interface which converts a file in MT940 format to IDOC.
    I have read on line this SAP R3 can actually read the MT940 format directly and there is no need to do any conversions on it.
    Can anyone confirm this for me? Or if not is there any other way of reading this file format in?
    Thanks

    Yes it does support MT940 format. As an example check program RFEBKA00 or transaction FF_5 for upload of electronic bank statement. One of the recognized formats in MT940 there in the drop down.
    Thanks and regards
    Kedar

  • Dynamic File Name as source file format

    Hi Experts,
    I have to load daily Excel Workbook to HANA.
    Files will come to shared Folder in BODS Job Server in the format 'FILE_NAME_<DAYMONYYYY>'.xlsx format.
    Everyday the file name will be appended with System Date Format.
    Example: 'FILE_NAME_17JUL2014.xlsx', 'FILE_NAME_18AUG2014.xlsx' etc.
    I tried to achieve it by creating a substitution parameter and using it to dynamically define file name.
    But I am not able to define the parameter correctly. (screenshot attached).
    Please advise where I am doing wrong.  Is there any better way to achieve it.
    Thanks,

    Hi Bala,
    Thanks for your suggestion.
    For a test I have created
    1. A Flat File named "FLAT_FILE_2014.txt".
    2. A Global Variable $G_FILE_NAME as varchar(18) and value 'FLAT_FILE_'||Year(sysdate())||'.txt'.
    3. Used it in the File Name for File Format.
    Below is the result:
    When I hard-code the file name as "FLAT_FILE_2014.txt", I am getting the data Preview.
    But When I am using global variable $G_FILE_NAME, I am not getting the data Preview.
    Please check attached "C.png"
    Please suggest.
    Thanks,
    Krishnendu.

  • Error while opening pdf in reader in windows 8:Can't open this file. There's a problem with file format

    I have a problem with a pdf file which does not open with reader in windows 8 but it opens properly with adobe pdf reader. All other pdf can be opened in reader.But when i open a pdf(see this link for pdf for which i got error http://incometaxsoft.com/temp/Form.pdf)
    it gives error as "Can't open this file. There's a problem with file format".
    The same file opens properly in adobe pdf reader.You can check the pdf file which i have mentioned in the link above.But the reader which comes with windows 8 can open some other pdf in the same PC.What may be the error causing this??

    This has turned out to be an enormous issue for me as I sell PDF files as ebooks. I have done a fair amount of investigating this for my system.
    My files have to be compatible not just across readers but across operating systems.
    To date, I have over 200 PDFs that have functioned flawlessly across Mac, PC (Windows 7 and below), Android, iPhone/iPad, Linux.
    I personally test my PDFs using a variety of readers and PDF editors including
    PDF XChange (my favorite)
    Foxit (runner up for me and I recommend for most people)
    Adobe (the bloated monster)
    Nitro 9 (great for moving graphical elements around)
    ABBYY
    And the Nuance PDF Create toolsets
    Those are off the top of my head. There are a bunch on Android that I test with too.
    I am running the Windows 10 Pro Tech Preview and I have this same problem so I know it isn't fixed yet in any kind of pre-release way (-sigh-)
    Here is what I've learned for my situation
    The PDFs I created using NUANCE'S PDF CREATE PROFESSIONAL VERSION 8
    all fail using the built-in Windows 8/10 PDF reader.
    When I look at the PDF properties for these Nuance created files, the underlying engine used to write them is called "ImageToPDF". Using ABBYY it indicates their own engine as does everyone else that I've tried. It is easy for you to check to see
    what created your PDF by doing a "Control D" (look at the document properties). Perhaps there's a common engine causing issues.
    If I use the exact same source files to create a PDF using any of my other tools I have no issues. I checked the PDF versions made by the tools and they are all set to 1.5.
    A customer mentioned being able to convert them in a way they worked by saving them without having to do any kind of extraction, but I have not been able to duplicate that. Perhaps he did a "print" which seems like it could work.
    In summary, the workaround everyone is talking about, using an alternate reader, of course works. But not everyone wants to change.
     The culprit I have found is my Nuance PDF Creation tools that are using the ImageToPDF engine.
    I hope it gets FIXED as I really don't want to have to regenerate all of my PDF files.

Maybe you are looking for