Trying to retrieve all the records from the file on desktop

HI All
I have one particular problem. I was given a text file which as 7000 records with length 512 each in a continues string. I Changed begining of each record with comma  in that text and saved it in .csv , when I try to upload the file into my program's internal table.
It is still giving one record. I used
itab_EXTRACT1 declared as
DATA: begin of itab_extract OCCURS 0,
        extract1(512) type c,
      end of itab_extract.
call method cl_gui_frontend_services => gui_upload
    exporting
      filename                = Xfile
    filetype                    = 'ASC'
     has_field_separator     = 'X'
    changing
      data_tab                = itab_EXTRACT1
  exceptions
    others                  = 17.
  Is there a way how to retrieve all the records into the internal table.
Thanks
Ravi

Hi Ravi,
I don't know if this is the correct solution, but I think it will work.
Declare your internal table (itab_extract) with the maximum length which your file will occupy.
Create another internal table (itab) with field (text) length 512.
Populate the internal table itab_extract using GUI_UPLOAD.
Then write this code
l_index = 1.
itab-text = itab_extract-extract1+0(512).
append itab.
do.
n = ( l_index * 512 ) + 1.
itab-text = itab_extract-extract1+n(512).
append itab.
if ( itab-text is initial ).
exit.
endif.
enddo.
Let me know if I miss anything.

Similar Messages

  • The logic board on my MacBook Pro has failed. How do I retrieve all my data from the hard drive?

    The logic board on my MacBook Pro has failed. How do I retrieve all my data from the hard drive?

    Remove the drive and put it in an external enclosure. Backup the drive completely. Repartition and format the drive. Replace the drive into the computer. Take the computer in for the logicboard replacement.

  • I'm got replacement 5c, how do I retrieve all my info from the cloud?

    i had to get a replacement due to dropping my orginal 5c, I was able to retrieve all my info from the clould from an older model 4c , however I haven't been able retrieve all my info from the original 5c how can I can retrieve it to my current replacement from the cloud?

    Hello vejames,
    Thanks for using Apple Support Communities.
    If you need to restore your replaced iPhone from either an iTunes or iCloud backup then you can follow the directions in the article below to help walk you through the process.
    Back up and restore your iPhone, iPad, or iPod touch using iCloud or iTunes - Apple Support
    Cheers,
    Alex H.

  • For reasons best left unsaid, in a recent rebuild of my iMac andTime Capsule, I lost all my photos. I do however currently have them on my iPad. Is it possible to retrieve all my photos from the iPad back to iPhotos (now Photos) on my iMac?

    For reasons best left unsaid, in a recent rebuild of my iMac and Time Capsule, I lost all my photos. I do however have them all currently on my iPad. Is it possible to retrieve my photos from the iPad back to iPhotos (now Photos) on my iMac?

    have the photos on the iPad been taken with the iPad camera or imported using the camera connection kit?
    Or have they been synced to the iPad with iTunes?
    You can download any photos to your mac by connecting the iPad by USB to to your Mac and import to Phots, but this way only photos from the Camera Roll will be imported.  If your photos have been synced with iTunes, you can only mail them to your mac.
    See:  iOS: Syncing photos using iTunes
    You can't reimport pictures synced from your computer to your device back to your computer. You can only import pictures taken by your device, or saved to it, from your device to your computer. If you need to retrieve synced photos from your device, email the photos from the device to yourself. Then download the photos from the emails to your computer.

  • Algorithm to retrieve link of records from the database efficiently

    Hi,
    I have some records in database related to supply chain.
    e.g. N1 supplies item I1 to Node N2 is represented as N1 I1 N2.
    Now I want to find all parent nodes or say chain of nodes supplying to particular node in an efficient way.
    Currently I am using recursion but for each recursion 1 query fires & performance drops considerably. Can you suggest me the efficient way to do it?
    Regards,
    Veena

    depending on how large the dataset in the database is, you could just select all the data from the database in one go, add it all to a collection and perform you analysis on the collection. This would save a considerable amount of time as database roundtrips are expensive.
    If you dataset from the database is too large to fit in memory in one go you could select data in say rows of 1000 at a time and/or use a local disk cache instead of a remote DB query every time.

  • Not able to copy all the record from the table?

    Hi All,
    I have a table Table_1 with 5 crores of data. I have created the same table structure Table_2 like Table_1 and trying to insert the entire data from Table_1 to Table_2 by use of the below code:
    CREATE OR REPLACE PROCEDURE insert_prc (limit_in IN PLS_INTEGER)
    IS
        cursor cur_insert
        IS
        SELECT  *
        FROM    Table_1;
        type tabtype_insert IS TABLE OF cur_insert%ROWTYPE INDEX BY PLS_INTEGER;
        v_tabtype_insert   tabtype_insert;
        v_limit_rows    NUMBER := 1000;
        v_start    PLS_INTEGER;
        v_end      PLS_INTEGER;
        v_update_count  NUMBER;
        v_bulk_errors   NUMBER;   
    begin
        DBMS_SESSION.free_unused_user_memory;
        show_pga_memory (limit_in || ' - BEFORE');
        v_start := DBMS_UTILITY.get_cpu_time;
        BEGIN
            open cur_insert;
            LOOP
                FETCH cur_insert BULK COLLECT INTO v_tabtype_insert LIMIT v_limit_rows;
                FORALL i IN 1..v_tabtype_insert.COUNT SAVE EXCEPTIONS
                INSERT INTO  Table_2
                VALUES v_tabtype_insert(i);
                EXIT WHEN v_tabtype_insert.COUNT < v_limit_rows;
                COMMIT;
            END LOOP;
            CLOSE cur_insert;
        EXCEPTION
        WHEN OTHERS
        THEN
            v_update_count := 0;
            v_bulk_errors := SQL%BULK_EXCEPTIONS.COUNT;
            dbms_output.put_line('Number of INSERT statements that failed : ' ||v_bulk_errors);
            dbms_output.put_line('*******************************************************************************************************************');
            /*FOR i IN 1..v_bulk_errors
            LOOP
                dbms_output.put_line('An Error ' || i || ' was occured '|| SQL%BULK_EXCEPTIONS(i).ERROR_INDEX ||
                                    ' during update of Actuator Model: '|| v_tabtype_mtl_items(SQL%BULK_EXCEPTIONS(i).ERROR_INDEX) ||
                                    ' . Oracle error : '|| SQLERRM(-SQL%BULK_EXCEPTIONS(i).ERROR_CODE));
            END LOOP;   */
            dbms_output.put_line('*******************************************************************************************************************');
        END; 
          v_end := DBMS_UTILITY.get_cpu_time;
          DBMS_OUTPUT.put_line (   'Elapsed CPU time for limit of '
                                || limit_in
                                || ' = '
                                || TO_CHAR (v_end - v_start)/100
          show_pga_memory (limit_in || ' - AFTER');
    end insert_prc;
    CREATE OR REPLACE PROCEDURE APPS.show_pga_memory (
       context_in   IN   VARCHAR2 DEFAULT NULL
    SELECT privileges required on:
       SYS.v_$session
       SYS.v_$sesstat
       SYS.v_$statname
    Here are the statements you should run:
    GRANT SELECT ON SYS.v_$session TO schema;
    GRANT SELECT ON SYS.v_$sesstat TO schema;
    GRANT SELECT ON SYS.v_$statname TO schema;
    IS
       l_memory   NUMBER;
    BEGIN
       SELECT st.VALUE
         INTO l_memory
         FROM SYS.v_$session se, SYS.v_$sesstat st, SYS.v_$statname nm
        WHERE se.audsid = USERENV ('SESSIONID')
          AND st.statistic# = nm.statistic#
          AND se.SID = st.SID
          AND nm.NAME = 'session pga memory';
       dbms_output.put_line(CASE
                                   WHEN context_in IS NULL
                                      THEN NULL
                                   ELSE context_in || ' - '
                                END
                             || 'PGA memory used in session = '
                             || TO_CHAR (l_memory)
    END show_pga_memory;
    /From the above procedure i am able to insert only some 5000000 data. Remaining 4 crores data is not inserted. But the program says it is completed sucessfully.
    Note: Table_2 is the partitioned table and Table_1 is non partitioned table.
    Can anyone please what is the problem on above code?
    Thanks

    user212310 wrote:
    -- Using BULK COLLECTS and FORALL's will consume more resources.Ya i will agree that. That's what i am using LIMIT clause passing value as 1000. It means PL/SQL will reuse the same 1000 elements in the collection each time the data is fetched and thus also reuse the same memory. Even if my table grows in size, the PGA consumption will remain stable.Limit or not, your process will consume more resources (and take longer) than the one i showed you. AND it's many many many more lines of code (harder to maintain, etc...).
    user212310 wrote:
    -- If you don't have a reason (aside from misguided understandings as to which is more performant) to use BULK COLLECTS and FORALL's then you should go with the direct INSERT INTO SELECT * method.The reason i am using BULK COLLECT is to reduce the execution time of the procedure.
    Please let me know if i misunderstood something.
    ThanksYes, you have.
    Please read this
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:760210800346068768

  • I have an older Ipod and don't remember my old apple ID and password so I created a new ID. How do I retrieve all my music from the old ID

    I have an older IPod that I am starting to use again now that I have a functioning computer. Problem is I don't remember my old apple ID and want to import my library. And if I can't do that If I start to download music on my new ID will it wipe out what I already have on my IPod ?

    Launch iTunes on your computer.
    From the menu bar click Store / Authorize This Computer
    Connect the iPod.
    From the iTunes File menu click: Transfer Purchases From ...

  • Please help me! display the record from the database.

    Hi, all, please help me with the following question. I run my code on the web, the record display on the screen, but when I run again, even I did not put any data into the "memo form", the system display the previous record again which I do not need to post again. Could you please tell me how to correct the code?
    <%@ page language="java" contentType="text/html; charset=Shift_JIS" %>
    <%@ page import="beanYama.*,java.sql.*,java.util.*,java.text.*" %>
    <HTML>
    <HEAD>
    <TITLE>Form Example</TITLE>
    </HEAD>
    <BODY BGCOLOR="#ffffcc">
         <%!      String userid="";
              String memo_create_day="";
              String memo="";     
         %>
         <% if (request.getParameter("userid")==null && request.getParameter("memo_create_day") == null
              && request.getParameter("memo") == null) { %>    
         <LEFT>
         <H2>���`�� �� ����</H2>
         <FORM METHOD="GET" ACTION="memocorrect.jsp">
         <P>
              ���`��1��: <input type="text" name="userid" size=26>
         <P>
              ����: <input type="text" name="memo_create_day" size=26>
         <P>     
              ����: <input type="text" name="memo" size=100>
         <P>
              <input type="submit" value="Submit">
         </FORM>
         </LEFT>
         <% } else { %>  
    <%
    userid = request.getParameter("userid");
    memo_create_day= request.getParameter("memo_create_day");
    memo= request.getParameter("memo");
    %>
    <% } %>
    <%
         boolean proceed = false;
              if(userid != null && memo_create_day != null && memo != null)
                        proceed = true;
         Class.forName("org.gjt.mm.mysql.Driver");
         Connection conn=DriverManager.getConnection("jdbc:mysql://localhost/progress?user=ntjs&password=ntjs&useUnicode=true&characterEncoding=Shift_JIS");
         String sql = "insert into zhangmemo (userid,memo_create_day,memo) values (?, ?, ?)";
         PreparedStatement stmt = conn.prepareStatement(sql);
         if (proceed) {
         stmt.setString(1, userid);
         stmt.setString(2, memo_create_day);
         stmt.setString(3, memo);
         stmt.executeUpdate();
         if (userid==null && memo_create_day==null && memo==null) {
         out.println("<b>Please enter your memo</b>" + "</b>&nbsp"+"<b> </b>");
         stmt.close();
         conn.close();
         else {
         Statement stmt1=conn.createStatement();
         ResultSet rsq=stmt1.executeQuery("SELECT userid AS userid1, memo_create_day AS memo_create_day1, memo AS memo1 FROM zhangmemo");
         while(rsq.next()){
         out.println("<b>���`��:" + rsq.getString("userid1")+ "</b>&nbsp"+"<b> </b>");
         out.println("<b>����:" + rsq.getString("memo_create_day1")+ "</b>&nbsp"+"<b> </b>");
         out.println("<b>����:" + rsq.getString("memo1")+ "</b>&nbsp"+"<b> </b>");
         stmt.close();
         stmt1.close();
         conn.close();
    %>
    </BODY>
    </HTML>
    Thanks a lot!
    Nina

    1. Please learn JSP Coding standards. Your code is a mess.
    2. It may be because you are setting your String variables to "" empty string which is not the same as null. Try doing the following...
    <HTML>
    <HEAD>
    <TITLE>Form Example</TITLE>
    </HEAD>
    <BODY BGCOLOR="#ffffcc">
    <%
      String userid = request.getParameter("userid");
      String memo_create_day = request.getParameter("memo_create_day");
      String memo = request.getParameter("memo");
    %>
    <% if userid == null && memo_create_day == null
    && memo == null) { %>
    <LEFT>
    <H2>���`�� �� ����</H2>
    <FORM METHOD="GET" ACTION="memocorrect.jsp">
    <P>
    ���`��1��: <input type="text" name="userid" size=26>
    <P>
    ����: <input type="text" name="memo_create_day" size=26>
    <P>
    ����: <input type="text" name="memo" size=100>
    <P>
    <input type="submit" value="Submit">
    </FORM>
    </LEFT>
    <%
    boolean proceed = false;
    if(userid != null && memo_create_day != null && memo != null)
    proceed = true;
    Class.forName("org.gjt.mm.mysql.Driver");
    Connection conn=DriverManager.getConnection("jdbc:mysql://localhost/progress?user=ntjs&password=ntjs&useUnicode=true&characterEncoding=Shift_JIS");
    String sql = "insert into zhangmemo (userid,memo_create_day,memo) values (?, ?, ?)";
    PreparedStatement stmt = conn.prepareStatement(sql);
    if (proceed) {
    stmt.setString(1, userid);
    stmt.setString(2, memo_create_day);
    stmt.setString(3, memo);
    stmt.executeUpdate();
    if (userid==null && memo_create_day==null && memo==null) {
    out.println("<b>Please enter your memo</b>" + "</b> "+"<b> </b>");
    stmt.close();
    conn.close();
    else {
    Statement stmt1=conn.createStatement();
    ResultSet rsq=stmt1.executeQuery("SELECT userid AS userid1, memo_create_day AS memo_create_day1, memo AS memo1 FROM zhangmemo");
    while(rsq.next()){
    out.println("<b>���`��:" + rsq.getString("userid1")+ "</b> "+"<b> </b>");
    out.println("<b>����:" + rsq.getString("memo_create_day1")+ "</b> "+"<b> </b>");
    out.println("<b>����:" + rsq.getString("memo1")+ "</b> "+"<b> </b>");
    stmt.close();
    stmt1.close();
    conn.close();
    %>
    </BODY>
    </HTML>

  • Insert the record from XML file to Tables.

    Hi guys,
    I ill be getting the XML file from FRONT-END.It ill be stored one permanent location(Directory).I need to Insert the data to the corresponding table.Anybody knows Pls give some suggestion for this.......
    Regards....
    GKM

    Using the Oracle XML DB Webdav are is one method as it acts like a file system, but essentially get's the documents directly into the database so they can be queried through the resouce_view.
    Other methods involve reading the file as if it's a CLOB and then using XMLTYPE constructor to change that CLOB to an XMLTYPE which can then be stored as that datatype in the database or processed as you need.
    The best place to look is over in the XML DB forum, which has it's own FAQ detailing various best practices for all sort of XML stuff, including reading XML files and shredding them into relational tables etc.
    {thread:id=410714}
    Edited by: BluShadow on 18-Jan-2012 08:53
    corrected link

  • Just need the record from the right (many) table with the max value for the Record on the left (one) side table

    SELECT
      ADHOC.ATS_ESH.Entry_Num
      ,ADHOC.ATS_ESH.Importer
      ,ADHOC.ATS_ESH.Version AS [ATS_ESH Version]
      ,ADHOC.ATS_ESL.Version AS [ATS_ESL Version]
    FROM
      ADHOC.ATS_ESH
      INNER JOIN ADHOC.ATS_ESL
        ON ADHOC.ATS_ESH.Customs_Entry_Num = ADHOC.ATS_ESL.Customs_Entry_Num
    I just need to see the MAXIMUM version number in the ESL table for each Entry_Num in the ESH table. ESH is the one side, ESL is the MANY side.

    Do you understand what this query is doing? Did you check the blogs I pointed you to?
    The query I provided gets the latest ESL version for each custom number. So, if max ESL version is higher than ESH version, it's just a coincidence. If you only want to see rows where versions do not match, just add an extra where condition, e.g.
    SELECT * FROM cte WHERE Rn = 1
    AND  [ATS_ESH
    Version] <>  [ATS_ESL
    Version]
    BTW, what is the type of these version
    columns and what kind of data in them? If they are character columns, sorting them in DESC order will not necessary return the latest version. Can you show some samples of the data in these two columns?
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • Adding a record from the database to radiobutton

    hi everyone
    i am trying to retrive the records from the ms Access database and add it to the radiobuttons.
    i did retrieve the data from the database and added it to the table and then added it to the radiobutton but the view of it is not clear.
    if anyone can give suggestions on it , it will be helpful
    thank you

    Can you elaborate on "but the view of it is not clear." ? Does it mean it looks blur on your monitor?? or it has been trying to hide at the corner of your screen??

  • Is there any way to name the records from a data merge?

    I have a spreadsheet, that has all the names for the images I'm using for a data merge. What I want to do is name the resulting records after the filenames in one of the columns in the spreadsheet. Is there anyway to do this? Or is there some other way to individually name the records from a data merge? I don't have any scripting prowess, so I can't really mess with that. Any help is greatly appreciated! Thanks!

    You merge it along with the others, just like any field. ID cannot do the naming for you during the merge, but most spreadsheets have lots of logic capabilities that should allow you to extract a name for the record from the filename in the column of your choice. The only reason ID knows to find the image instead of writing the filename is that you've used a special name for the field.

  • Picking the records from IT2011.....

    Hi All,
    I am writing the report as per the clients requirement. for this i am using the IT 0007, 2010, 2011. Here i am using the LDB PNP for this report. i have declared  as below.
    INFOTYPES: 0007, 2010,2011.
    The infotypes are filling with the records which are existing in the infotype. Here even old data is also filling in the infotypes that means data other than the selected date from the selection screen.
    To avoide this i have written provide statement as follows.
    provide * from P2011  between pn-begda and pn-endda.
    but i did not get any data from the above statement. My requirement is i need to fetch the records from the IT2011 for the entered date. can anybody tell how to fetch the records from the time infotypes for entered date.
    Thanks & Regards,
    Giri.

    Hi..
    I suggest to use PNPCE LDB and use input as other perion option for selection screen
    and you will get all the recordes valid during the period which you give and the recordes will coming in to the tables 0007, 2010,2011.and just you can read or loop the table.
    TABLES : pernr.
    INFOTYPES: 0001,
               0007,
               2011,
               2010 .
    NODES:  peras.
    TYPES : BEGIN OF ty_final,
           pernr TYPE persno,
           ename  TYPE emnam,
            PBTXT TYPE PBTXT,
            BTRTX TYPE BTRTX,
            END OF ty_final.
    DATA : it_final TYPE TABLE OF ty_final,
           wa_final TYPE ty_final.
    DATA go_table         TYPE REF TO cl_salv_table.
    START-OF-SELECTION.
    GET peras.
      SORT p0001 BY endda DESCENDING.
      READ TABLE p0001 INDEX 1.
      wa_final-pernr = p0001-pernr.
      wa_final-ename  = p0001-ename .
      CALL FUNCTION 'HRWPC_RFC_WERKS_TEXT_GET'
        EXPORTING
          werks      = p0001-werks
        IMPORTING
          werks_text = wa_final-PBTXT.
      CALL FUNCTION 'HRWPC_RFC_BTRTL_TEXT_GET'
        EXPORTING
          werks      = p0001-werks
          btrtl      = p0001-btrtl
        IMPORTING
          btrtl_text = wa_final-BTRTX.
    loop at p2010.
    endloop.
      APPEND wa_final TO it_final.
      CLEAR wa_final.
    END-OF-SELECTION.
      CALL METHOD cl_salv_table=>factory
        IMPORTING
          r_salv_table = go_table
        CHANGING
          t_table      = it_final.
      go_table->display( ).

  • How to handle the failed records from the table when using DB Adapter

    Hi,
    I am reading some records from table using DB Adapter inside my synchronous BPEL process. Say like reading 100 records from table in between after successful reading of 90 records an error occured in 91st record due some various reasons(like DB down, Connection interrupted etc.). Then how to handle this situation, whether i have to read all the records from the begining and is there any option to continue from where it stopped reading.
    Can please anybody help me out in the regard?
    Thanks in advance
    Regards,
    Aejaz

    we had the same requirement some time ago and had two option:
    1. ask the R/3 development team add a deletion indicator in the table (and thus not actually deleting the record). this deletion indicator could then be used like for any other standard datasource
    this option was however refused, due to huge data volume after a while
    2. at the end of the load we copied the ZTABLE1 to ZTABLE2. then in the begin of the load (day after) we compare the data of table1 to table2. entries available in table2 but not in table1 are deleted, and we put a 'D'. in deletion indicator; as we only keep the deleted entries for one day, the volume of the new table is acceptable.
    M.

  • Deleting records from the Custom Objects

    Hello all,
    We want to delete all records from a custom object and as there is no 'Batch Delete' functionality on it, we are thinking of other ways to delete all the records. One of the possibilities is to delete all the records by hand, which will be very time consuming, but this might become the best option. Another option is to use webservices to delete the records, but to do so, you will have to write a kind of program that will query for the records and then deletes them. Does anyone have another option or does anyone have written such a tool that I can use to delete the records from the Custom Object?
    Kind regards,
    Niels Rekers

    Hi, To my knowledge WS is the way to do it. We are a system integrator and can help you out in doing this by providing a WS program. If interested you can write to [email protected]
    -- Venky CRMIT

Maybe you are looking for

  • Safari 4.0.3 update will not install

    On my PPC G5 2.1 Ghz I tried to install and receive message: The update "Safari" can't be saved. A networking error has occurred: Cannot open file (-3001). make sure you can connect to the internet and try again. I use a Verizon Fios router that uses

  • CreateMedia.exe finished with error code 80091007

    Hi, We are having the following error message "CreateMedia.exe finished with error code 80091007" when creating a USB off-line Media to image Windows 7. This only occurs if we include driver packages into the task sequence. We have no issue creating

  • How to view presentation in portrait mode?

    I just bought Keynote for iOS, to present some of my app mockups, but was sadly surprised to learn that I can't rotate a presentation from landscape to portrait mode. My canvas is 640x960. Anyone know if Apple is aware of this, or if there is a worka

  • Problem install vmware workstation

    I have problem to install vmware workstation, my log is Gtk-Message: Failed to load module "canberra-gtk-module": libcanberra-gtk-module.so:

  • I have a question mark over my iPhoto icon.

    I can't find it when I search my apps or trash. I have a MacOSX 10.5.8 and no original discs from installation. I also can't seem to get the Mac App store to run maybe because my Mac is too old? Not sure what to do and I am scared I have lost all my