To read the data given in inbound lagacy input file

Hi Experts,
My requirement is that i have got a input inbound lagacy file that has around 31 fields that are separted by space now i have to read those values using open data set and read data set in a internal table.
each field in legacy input file is being mapped with sap technical field and the internal table has to be populated by taking the data given in the input file.
Please provide with sample code or useful link to get the internal table populated using dataset method.
satisfactory answers would be rewarded.
thanks,
Naveen

Hi Naveen,
Declare ur File name.
pa_file  LIKE rlgrap-filename OBLIGATORY.
ATA : BEGIN OF t_file OCCURS 0,
       data(1000) TYPE c,
       END   OF t_file.
From Application Server
  OPEN DATASET pa_file FOR INPUT IN TEXT MODE.
  IF sy-subrc = 0.
Reading the flat file from the application server.
perform read operation.
    DO.
    READ DATASET pa_file INTO t_file.
   split t_file by spaces and move to ur internal table.
    IF sy-subrc EQ 0.
      APPEND to internal table (ur structure).
    ELSE.
      EXIT.
    ENDIF.
  ENDDO.
    CLOSE DATASET pa_file.
Regards,
Manoj.

Similar Messages

  • How to read the date and time information of a file by labview

    how to read the date and time information of a file by labview? for example, created time and modified time.
    Solved!
    Go to Solution.

    if you need to know the last modification date of file:-
    "Functions->File I/O->Advanced File Functions->File/Directory Info.vi"
    This vi returns the value of file's last modification date. This is returned as U32 number. To see it in MM/DD/YY format you must create the indicator, right-click on it and select "Format & Precision" item from drop-down menu. Then select "Time and Date" format there.
    Thanks as kudos only

  • How to read the data from an internal table,when column names are known

    Hi All
    I have a specific requirement. I got an internal table with many fields (let it be my_tab).  Some of the fieldnames (column names in internal table my_tab) are stored in separate internal table(let it be my_fields).
    I need to store/read data corresponding to the fields (whose name is stored in my_fields) from my_tab.
    I am able to build dynamic table (referred by field-symbol) with respect to the given field names in my_fields.
    But i am unable to read the data corresponding to the fieldnames from my_tab.
    Please provide  me some pointer in this regard.
    Regards
    Swetabh Shukla

    HI All
    Thanks for the prompt response. I got solution for my question. Please check below thread. For quick reponse i posted my question in one more category. Thanks to all of you.
    How to read internal table w.r.t. fieldnames stored in other table

  • PCI6534 not reading the data correctly

    Hi,
    I am using PCI6534 to read the digital data from out of ADC. I am using port 2 as the input port and PFI3 as the external trigger ( given to the clock of the ADC). I am not able read the data properly ( missing the first few bits of data).

    Hi,
    I am using PCI6534 to read the digital data from out of ADC. I am using port 2 as the input port and PFI3 as the external trigger ( given to the clock of the ADC). I am not able read the data properly ( missing the first few bits of data).

  • I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?

    I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?
    Attachments:
    try2.txt ‏2 KB
    read_array.vi ‏21 KB

    The problem is in the delimiters in your text file. By default, Read From Spreadsheet File.vi expects a tab delimited file. You can specify a delimiter (like a space), but Read From Spreadsheet File.vi has a problem with repeated delimiters: if you specify a single space as a delimiter and Read From Spreadsheet File.vi finds two spaces back-to-back, it stops reading that line. Your file (as I got it from your earlier post) is delimited by 4 spaces.
    Here are some of your choices to fix your problem.
    1. Change the source file to a tab delimited file. Your VI will then run as is.
    2. Change the source file to be delimited by a single space (rather than 4), then wire a string constant containing one space to the delimiter input of Read From Spreadsheet File.vi.
    3. Wire a string constant containing 4 spaces to the delimiter input of Read From Spreadsheet File.vi. Then your text file will run as is.
    Depending on where your text file comes from (see more comments below), I'd vote for choice 1: a tab delimited text file. It's the most common text output of spreadsheet programs.
    Comments for choices 1 and 2: Where does the text file come from? Is it automatically generated or manually generated? Will it be generated multiple times or just once? If it's manually generated or generated just once, you can use any text editor to change 4 spaces to a tab or to a single space. Note: if you want to change it to a tab delimited file, you can't enter a tab directly into a box in the search & replace dialog of many programs like notepad, but you can do a cut and paste. Before you start your search and replace (just in the text window of the editor), press tab. A tab character will be entered. Press Shift-LeftArrow (not Backspace) to highlight the tab character. Press Ctrl-X to cut the tab character. Start your search and replace (Ctrl-H in notepad in Windows 2000). Click into the Find What box. Enter four spaces. Click into the Replace With box. Press Ctrl-V to paste the tab character. And another thing: older versions of notepad don't have search and replace. Use any editor or word processor that does.

  • FCP error message: Unable to read the data on your source tape!

    Hey,
    So I have been editing on the MacPro now for over a year and I have never seen this message before...the message reads:
    _*"Capture encountered a problem reading the data on your source tape. This could be due to a problem with the tape."*_
    Has anyone got this message and could help me out please? I need to edit these tapes A.S.A.P.
    Thank You,
    Erick

    why would it start a month later giving me problems instead of when it was updated?
    That is a good point. Anything change since the time it worked to when it didn't? How about trying another firewire cable. Those can go south without notice, might cause this.
    Shane

  • How to read the data in excel sheet

    Dear sir,
    How to read the data in excel sheet when i recieve a data serial communication... ie i have store a data in excel such that
    Cell A       Cell B
       A           Apple 
       B           Ball
       C           Cat
       D           Doll
    when i recieve A from serial communication i have to display Apple, and when i recieve B i have to display Ball and so on.. 

    Hi, 
    I would recommend you to have a look at the VI attached. It makes use of a VI named 'Read from Spreadsheet' to read the row and column data from the tab delimited excel file. The read data is then searched for the Alphabet specified and finally returns you the corresponding string. The test file used to validate the operation of the VI is also attached. 
    Trust this would help you solve the issue. 
    Regards, 
    Sagar G Yadav | Application Engineer | National Instruments
    Attachments:
    read_from_excel.vi ‏10 KB
    Book1.txt ‏1 KB

  • How to read the data from Excel file and Store in XML file using java

    Hi All,
    I got a problem with Excel file.
    My problem is how to read the data from Excel file and Store in XML file using java excel api.
    For getting the data from Excel file what are all the steps i need to follow to get the correct result.
    Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
    Thanks & Regards,
    Sreenu,
    [email protected],
    india,

    If you want someone to do your work, please have the courtesy to provide payment.
    http://www.rentacoder.com

  • ITunes cannot read the data on my iPod touch

    Just three weeks or so ago, I was able to use iTunes without any problems to put a few songs on my iPod Touch 2nd Gen. Recently, however, whenever I try to connect my iPod to iTunes via USB, I get an error message that says something along the lines of: "iTunes cannot read the data on xxx's iPod Touch. Go to the Summary tab and choose Restore to restore this iPod to it's original factory settings.". I don't know why it says this since my iPod is functioning normally. My iPod shows up on the left hand side of the iTunes window as "iPod" instead of "xxx's iPod Touch" like it used to. The only options I have are Check for Update (disabled) and Restore. Is there any way to fix this without restoring my iPod? And if I have to restore, can I do so without losing (or having to re-transfer) any of my data that hasn't been or can't be backed up? Please help and thanks in advance!
    P.S. My iPod is in its genuine state: it hasn't been jailbroken or anything like that.

    Unfortunately, I've already tried that. Also, here is a list of other things I've tried, but have taken no effect:
    -Recharging, Restarting, Resetting, and Reconnecting my iPod Touch to my computer
    -Restarting my computer
    -Reinstalling iTunes
    -Reinstalling all iTunes, Apple, and iPod USB drivers
    -Updating the same drivers (but no updates were found)
    -Using a different USB port
    -Connecting to a different computer (doesn't work on my Toshiba laptop either, which is running the same OS and the same version of iTunes as my PC)
    My backup plan was to copy the new songs to my iPod by pasting them through Windows Explorer. My iPod shows up as a portable device under My Computer - as always - but the only thing I can access is a folder full of the photos on my iPod. I think this is normal, but I can't do what I want to do! Do you (or anyone else) have any other good ideas? Remember, I really don't want to do a restore unless I absolutely have to.

  • How to read the data from a column that is in clob data type (but XMLdata)

    Hi ,
    I have a table XYZ which has a column RESPONSE_XML in clob datatype format.we can convert it to XMLTYPE(RESPONSE_XML) to read the data in XML format.
    Now this is the DynamicXML schema file. Here I want to see all the COMMONNAME, ResourceDescribedby_VALUE into column_A, ResourceDescribedby_ResourceSpecCharacteristic_Name tags into column_B
    How can I do that .. any suggestions please ..
    Here is a sample XML:
    <?xml version="1.0" encoding="WINDOWS-1252" ?>
    _- <soap:Body>
    - <SearchResourceResponse xmlns="http://www.google.com/google.xsd">
    - <MessageElements xmlns:tns="http://www.www.google.com/google.xsd" xmlns="">
    <MessageStatus>SUCCESS</MessageStatus>
    - <MessageAddressing>
    <from>gmail</from>
    <to>Gmail SOAPTester</to>
    <messageId>1234</messageId>
    <action>SearchResource</action>
    <transactionId>OR</transactionId>
    <ServiceName>SearchResource</ServiceName>
    <ServiceVersion>1.1</ServiceVersion>
    </MessageAddressing>
    </MessageElements>
    -<SearchResponseDetails xmlns:tns="http://www.www.google.com/google.xsd" xmlns="">
    - <SubNetwork>
    - <Pipe xsi:type="icl:Trail" xmlns:icl="http://www.www.google.com/google.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <CommonName>318-223-4675</CommonName>
    <objectID>91535716980514105329</objectID>
    <SourceSystem>MARS</SourceSystem>
    - *<ResourceDescribedBy> <value>RDSSLA</value>* *<ResourceSpecCharacteristic> <name>*CentralOfficeCode</name>   </ResourceSpecCharacteristic>
    </ResourceDescribedBy>
    - <ResourceRelationship>
    - <Resource xsi:type="icl:Trail">
    - <ResourceDescribedBy> <value>001</value> - <ResourceSpecCharacteristic> <name>AssignLocationExternalFormat</name> </ResourceSpecCharacteristic>
    </ResourceDescribedBy>
    - <ResourceDescribedBy> <value>001</value> - <ResourceSpecCharacteristic> <name>PairVerticalExternalFormat</name> </ResourceSpecCharacteristic>
    </ResourceDescribedBy>
    - <ResourceDescribedBy> <value>001</value> - <ResourceSpecCharacteristic> <name>PairVerticalInternalFormat</name> </ResourceSpecCharacteristic>
    </ResourceDescribedBy>
    - <ResourceDescribedBy> <value>+</value> - <ResourceSpecCharacteristic> <name>PairVerticalSign</name> </ResourceSpecCharacteristic>
    </ResourceDescribedBy>
    - <ResourceDescribedBy> <value>RDSSLA</value> - <ResourceSpecCharacteristic> <name>CentralOfficeCode</name> </ResourceSpecCharacteristic>
    </ResourceDescribedBy>
    - <ResourceDescribedBy> <value>B</value>- <ResourceSpecCharacteristic> <name>EntityType</name> </ResourceSpecCharacteristic>
    </ResourceDescribedBy>
    - <ResourceType>FeederCircuit</ResourceType>
    - <LogicalPhysicalResource>
    - <PhysicalResource xsi:type="icl:PhysicalConnector">
    <usageState>S</usageState>
    - <ResourceDescribedBy> <value>25.392</value> - <ResourceSpecCharacteristic> <name>CableLength</name> </ResourceSpecCharacteristic>
    </ResourceDescribedBy>
    </PhysicalResource>
    </LogicalPhysicalResource>
    - <TerminationPoint xsi:type="icl:TrailTerminationPoint">
    <CommonName>1000/34A</CommonName>
    - </Resource>
    </ResourceRelationship>
    <lrStatus>W</lrStatus>
    </Pipe>
    </SubNetwork>
    </SearchResponseDetails>

    you don't appear to have posted valid XML, so I can't reproduce using your example, but you will need to look at something like this:
    select xtab.common_name
      from your_table yt
          ,xmltable('/SearchResourceResponse'
              passing xmltype(yt.response_xml)
              columns
                  common_name varchar2(20) path 'SearchResponseDetails/CommonName'
          ) xtab
    ;

  • How can I read the data type of a field in an MS Access database

    I need to be able to determine if a field in an Access database is of a certain data type, and if it isn't, to change it to what it should be.
    I can't seem to find any way of reading the data type of any field in any table - can anyone give me a metod of getting this info?
    Thanks
    ..Bob

    Does <cfdbinfo> work for Access DBs?
    You might be better off asking this on a MS Access forum.  It's more of an Access issue than a CF one.
    Adam

  • Regarding reading the data from spool

    Hi Experts,
    How can i read the data from spool?
    I need to read the data from the spool and should display on the screen?
    Is there any FM to read the data from spool?
    Sruthi.

    hi please use this..
    CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
        EXPORTING
          rqident              = v_spool
        TABLES
          buffer               = it_spool
        EXCEPTIONS
          no_such_job          = 1
          not_abap_list        = 2
          job_contains_no_data = 3
          selection_empty      = 4
          no_permission        = 5
          can_not_access       = 6
          read_error           = 7

  • Error reading the data from the remote cube

    Hi all,
    When we try to get the data for remote cube from LISTCUBE, we are getting the following msg.
    1) Messages for DataSource 9AUPA_DP_HK_01 from source system AD1CLNT100
    2) 224(/SAPAPO/TSM): No planning version selected
    3) Errors have occurred while extracting data from DataSource 9AUPA_DP_HK_01
    4) Error reading the data of InfoProvider UICHKRMTC.
    Any Inputs?

    Hi,
    Check whether the sourcesystem is responding.
    And also in the error mesg: 224(/SAPAPO/TSM): No planning version selected
    It seems you have not selected any planning version. Give any planning version in the listcube selection screen and execute.
    Regards,
    Ravi Kanth

  • Regarding reading the data from the files without using Stremas

    hai to all of u...
    here i have a problem where i have to read the data from the files without using any streams.
    please guide me how to do this one,if possible by giving with an example
    Thanks & Regard
    M.Ramakrishna

    Simply put, you can't.
    By why do you need to?

  • Reading the data from BLOB column

    HI,
    I have a table with following structure
    Test_Mail(Attachment BLOB,Attachmentname varchar2(255),FileSize number)
    The data in the table is like
    Attachment|Attachmentname|FileSize
    BLOB|test.txt|1236
    I wants to read the data from the BLOB attachment in to new file.
    can any one help me in doing this with plsql??
    Thanks in advance,
    Balaji tk.
    Edited by: Balaji.tk on Jan 9, 2011 9:28 PM

    May be something like this ?
    DECLARE
       l_file       UTL_FILE.FILE_TYPE;
       l_buffer     RAW (32767);
       l_amount     BINARY_INTEGER     := 32767;
       l_pos        INTEGER            := 1;
       l_blob       BLOB;
       l_blob_len   INTEGER;
    BEGIN
    -- Open the destination file.
       l_file := UTL_FILE.FOPEN ('TEST_DIR', v_attachment_name, 'wb');
       --This v_attachment_name can be selected from your table.
    -- Get LOB locator
    FOR rec IN (
    SELECT attachment   l_blob
          FROM test_mail
         --Your where condition to find the row.      
       --AND ROWNUM =1
    LOOP
       l_blob_len := DBMS_LOB.getlength (rec.l_blob);
    -- Read chunks of the BLOB and write them to the file
    -- until complete.
       WHILE l_pos < l_blob_len
       LOOP
          DBMS_LOB.READ (rec.l_blob, l_amount, l_pos, l_buffer);
          UTL_FILE.put_raw (l_file, l_buffer, FALSE);
          l_pos := l_pos + l_amount;
       END LOOP;
      commit;
    END LOOP;
    -- Close the file.
       UTL_FILE.FCLOSE (l_file);
    EXCEPTION
       WHEN OTHERS
       THEN
    -- Close the file if something goes wrong.
          IF UTL_FILE.IS_OPEN (l_file)
          THEN
             UTL_FILE.FCLOSE (l_file);
          END IF;
          RAISE;
    END;

Maybe you are looking for

  • Delivery date in Third party sales order

    Hi, If a sales order is created on 15th of October with TAS item category, system is proposing the delivery date as 22nd October. PR was released on 20th of Oct after backward scheduling and the plnd delivey time is 1 and GR time is 1 and the 18 & 19

  • Ethernet disk and corrupted files

    Hi to all, I´ve recently bought a LaCie Ethernet MiniDisk and I copied some files in it, but when I copy them back to the G5 HD, I have found that the OS tell me that they are UNIX files and I can´t open them with any aplication. How can I link this

  • Character font import in After Effects CS5

    Hello, Would anybody happen to know how can I import a character font (BellGothic_Blk_BT), so I can use it when working with titles in After Effects CS5? Thank you Giannis

  • How to straighten multiple images without cropping?

    Hi, I have several archived documents that I would like to straighten, about 1000. I have photoshop elements 8 at home, and photoshop cs5 at work. When I use the straighten and crop feature in photoshop cs5, it crops it far too short and I lose text.

  • IPhone 4 to iPhone 4S FaceTime freezes iOS 5.0.1

    I've got a iPhone 4 with 5.0.1 and one of my friend has a iPhone 4S 5.0.1 when we facetime after a couple of minutes the picture just freezes? When I facetime with my other friend with an iPhone 4 4.3.3 its perfectly normal? HELP Thanks