Merging of multiple rows in an internal table as a single record

Hi All,
I have an internal table which has the following columns:
text, date, time, user.
it stores notes in the internal table.
The problem is...when I save a note with multiple lines and spaces it saves each line of the note as a row in the internal table.
Thus i get more no. of rows in the internal table compare to the no. of rows!
I need to store each notes as single row in the internal table.
Please advise how to approach this?
Helpful answers will be rewarded.
Thanks & Regards,
Anshumita.

You can create a deep internal table. You can declare one Column as an internal table and store the NOTES in that Internal table for each row.
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm
you can check the example in the link
regards,
abhishek

Similar Messages

  • Insert multiple rows into a same table from a single record

    Hi All,
    I need to insert multiple rows into a same table from a single record. Here is what I am trying to do and I need your expertise. I am using Oracle 11g
    DataFile
    1,"1001,2001,3001,4001"
    2,"1002,2002,3002,4002"
    The data needs to be loaded as
    Field1      Field2
    1               1001
    1               2001
    1               3001
    1               4001
    2               1002
    2               2002
    2               3002
    2               4002
    Thanks

    You could use SQL*Loader to load the data into a staging table with a varray column, then use a SQL insert statement to distribute it to the destination table, as demonstrated below.
    SCOTT@orcl> host type test.dat
    1,"1001,2001,3001,4001"
    2,"1002,2002,3002,4002"
    SCOTT@orcl> host type test.ctl
    load data
    infile test.dat
    into table staging
    fields terminated by ','
    ( field1
    , numbers varray enclosed by '"' and '"' (x))
    SCOTT@orcl> create table staging
      2    (field1  number,
      3     numbers sys.odcinumberlist)
      4  /
    Table created.
    SCOTT@orcl> host sqlldr scott/tiger control=test.ctl log=test.log
    SQL*Loader: Release 11.2.0.1.0 - Production on Wed Dec 18 21:48:09 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Commit point reached - logical record count 2
    SCOTT@orcl> column numbers format a60
    SCOTT@orcl> select * from staging
      2  /
        FIELD1 NUMBERS
             1 ODCINUMBERLIST(1001, 2001, 3001, 4001)
             2 ODCINUMBERLIST(1002, 2002, 3002, 4002)
    2 rows selected.
    SCOTT@orcl> create table destination
      2    (field1  number,
      3     field2  number)
      4  /
    Table created.
    SCOTT@orcl> insert into destination
      2  select s.field1, t.column_value
      3  from   staging s, table (s.numbers) t
      4  /
    8 rows created.
    SCOTT@orcl> select * from destination
      2  /
        FIELD1     FIELD2
             1       1001
             1       2001
             1       3001
             1       4001
             2       1002
             2       2002
             2       3002
             2       4002
    8 rows selected.

  • Delete rows dynmically from internal table

    Hi Gurus,
    I have got an problem. I have an internal table itab.
    Case 1. It has got some 10 rows. I want to delete rows between those two rows containing same field value of a Field 'X'. Here same value of that field could come on 1st and 7th row. Then mean, I need to delete 2nd to 6th row.
    It could come in 4th and 10th row. Then I need to delete 5th to 9th row.
    Case 2. It has got some 20 rows. Now same I want to delete rows between those two rows containing same field value of a Field 'X'. Here again, same value of that field could come on 1st and 17th row. Mean I will delete 2nd to 16th row. It could come in 7th and 19th row. Then I need to delete 8th to 18th row.

    Hi Vaibhav
    Please find the code, I hope it helps
    DATA: BEGIN OF itab OCCURS 10,
          val,
          END OF itab.
    DATA: jtab LIKE itab OCCURS 0 WITH HEADER LINE,
          l_ind1 TYPE i,
          l_ind2 TYPE i,
          l_lines TYPE i,
          l_flg.
    itab-val = 'a'.
    append itab.
    itab-val = 'b'.
    append itab.
    itab-val = 'c'.
    append itab.
    itab-val = 'd'.
    append itab.
    itab-val = 'e'.
    append itab.
    itab-val = 'f'.
    append itab.
    itab-val = 'c'.
    append itab.
    itab-val = 'g'.
    append itab.
    itab-val = 'c'.
    append itab.
    itab-val = 'h'.
    append itab.
    jtab[] = itab[].
    DESCRIBE TABLE itab[] LINES l_lines.
    LOOP AT itab.
    MOVE sy-tabix to l_ind1.
    l_ind2  = l_ind1 + 1.
    LOOP AT jtab FROM l_ind2 to l_lines WHERE val eq itab-val.
      l_ind1 = l_ind2.
      l_ind2 = sy-tabix.
      l_flg = 'X'.
      exit.
    ENDLOOP.
    IF l_flg eq 'X'.
      exit.
    ENDIF.
    ENDLOOP.
    delete itab FROM l_ind1 to l_ind2.
    LOOP AT itab.
      WRITE: /2 itab-val.
    ENDLOOP.
    Still if you want to apply this multiple values, create another internal table and store the values which have been deleted already. So before you going to delete them again you can check from these new internal table.
    Please let me know, if any issues still exists.
    Regards
    Praveen

  • Hide multiple rows in a dynamic table based on the row value.

    Hi,
    I need to hide multiple rows in a dynamic table based on the specific value of that row.
    I cant find the right expression to do that.
    please help

    Go to the Row Properties, and in the Visibility tab, you have "Show or hide based on an expression". You can use this to write an expression that resolves to true if the row should be hidden, false otherwise.
    Additionally, in the Matrix properties you should take a look at the filters section, perhaps you can achieve what you wish to achieve through there by removing the unnecessary rows instead of just hiding them.
    It's only so much I can help you with the limited information. If you require further help, please provide us with more information such as what data are you displaying, what's the criteria to hiding rows, etc...
    Regards
    Andrew Borg Cardona

  • SWAP COLUMNS AND ROW IN AN INTERNAL TABLE to display in ALV

    Hi ,
    I want to swap all the rows in an internal table with the column of the internal table to display it horizontally in ALV grid.
    e.g
    1     2   3  (field names)
    A    P   X
    B    Q   Y
    C    R    Z
    should look like :
    D       A   B     C
    E      P   Q    R
    F       X    Y    Z
    Where D , E, F in first column is already apended in new table.
    Or else is there a way to rotate the ALV grid so that it can display rows as columns & columns as rows.
    regards

    hi,
    i have an internal table which is like
    f1  f2 f3  f4 (column header)
    A  1  2   3
    B  4  5   6
    C  7  8   9
    the values in o/p table should be
    A B C  ( column header)
    1  4 7 
    2  5 8
    3  6 9
    Please help!!

  • How to process a block for each row in an internal table....

    Hi experts....
    In po approval workflow the scenario is like this.... for each po there may be more than one approver. approvers list i am maintaining in the ztable. list of approvers(no of approvers) is decided by the po value. I have collected these approvers into internal table. now i have to process a block ( approving or rejecting the po... )in the workflow for each row in the internal table.
    how can i do this. based on the decision of the 1st approver  approves the po then it should go to next approver in the internal table...otherwise end the workflow.....
    Please help me......

    i have created an internal table in the workflow container in which i am getting the list of approvers....
    how can i loop the internal table in the workflow...?
    how can i know the index of the loop in the workflow.....(will sy-index work here....? so that i can use loop until step in the main workflow to call the subworkflow..so that if sy-index is greater than no of entires in the itab then i can come out of the loop)

  • Read MULTIPLE idocs data with all sgmn to my internal table in a single

    Dear SAP Folks!
    I have a question, I know to read SINGLE idoc data with all segments, we have FM IDOC_READ_COMPLETELY but my requirement is to Read MULTIPLE idocs data with all segments to my internal table in a single shot without keeping this FM in loop! since it is performance issue, at a time i may want to read 1000 idocs data!
    Could anyone please let me know is there any way to get this, keeping mind of performance and any other FM?
    Best Regards,
    Srini

    Hi,
    I know idoc numbers and i can write a select Query to DB table EDID4 to get all segments data to my internal table. But i am looking for FM to do this. because i have too many number of idocs and each idoc is having many segments(I am thinking in performance point of view!) The FM IDOC_READ_COMPLETELY can accept only ONE IDOC number as import parameters at a time to get segment data. in similar way do we have any other FM? or other way? except select query to EDID4 table?
    Best Regards,
    Srini

  • Read first row of the internal table

    Dear All,
    Please let me know how to read the first row of the internal table?
    I used following read statement but it is not working
    READ TABLE t_cdhdr INDEX 1.

    Hi,
    i think you are not reading an internal table
    according to your code i think you are reading a type
    which may be declared as types...
    types are declared just for reference
    eg
    types: begin of t_cdhdr .
    include strucuture  cdhdr .
    types: end of t_cdhdr .
    types: t_it_cdhdr type standard table of t_cdhdr.
    data: git_t_cdhdr  type t_it_cdhdr.
    data: gwa_t_cdhdr type t_cdhdr.
    now have to fill the iternal table
    and
    read table git_t_cdhdr into gwa_t_cdhdr index 1.
    reward points if helpful
    thanks & regards,
    venkatesh

  • No. of  Rows in an internal table

    Dear Friends,
    Please let me know which ABAP System Field shall give me the no. of rows in an internal table. If it is sy-dbcnt kindly provide an example on how to use it in a program.
    Regards,
    Alok.

    Hi Alok,
    Use the Describe Statement.
    Sample Program :
    *TABLES ZVIJIRANK.
    *DATA : BEGIN OF IT OCCURS 10.
    *INCLUDE STRUCTURE zvijirank.
    *DATA : END OF IT.
    *data : lines1(4) type n,
          knd type c,
           n type i.
    *select * from zvijirank into table it.
    **describe table zvijirank lines lines1. -
    > Describe statement is only used for Internal Tables.....
    *write : / 'BEFORE DESENDING'.
    *LOOP AT IT.
    *WRITE : / IT-REG_NO , IT-NAME.
    *ENDLOOP.
    *ULINE.
    *describe table it lines lines1. "-----> To find No Of lines
    Write : lines1.
    Thanks.
    Message was edited by:
            Viji

  • Create an internal table with the rows of another internal table.

    Hi I want to know if posible to create an internal table structure with the  rows of another internal table?
    ex.
    If in i_tab column A has this values: row 1 = first, row 2 = second, row 3 = third.
    Now I want that the structure of my internal table be: first, second, third

    Hi,
    If you do this way then what will be the difference between the two table anyway?? First internal table has the same structure irrespective of which row you select. and you are going to store the data from each row to the rows of the second internal table. In that case, the structure of the internal table is the same as first table. and it would have same rows.
    Am I missing something here? or you want to declare the internal table with each field being the structure of the first table? In this case you'd have to do a dynamic declaration of data as the first table can have any no of rows then the second table would have any no of fields in the structure.
    Now if you know that your first internal table is going to have a fixed no of rows eg 3 rows then it becomes simple. Do the following then
    Data: begin of second_table occurs 0,
    first type <first_table type>,
    second type <first_table type>,
    third type <first_table type>,
    end of second_table.
    Regards
    Prasenjit

  • Count rows in an internal table

    Anybody how knows how I can count rows in my internal table?

    Hi,
    Data: lines like sy-tabix.
    DESCRIBE TABLE ITAB LINES LINES.
    where itab is your internal table.
    This will work out.
    Please award sutiable points .
    Regards,
    Irfan

  • Delete row in an internal table

    Hi,
    with key1 and key2 how do I delete a row in an internal table itab?
    I want to do something like (but dont succeed) this:
    DELETE itab WHERE x = key1 AND y = key2
    thanks in advance

    Hi Baran,
    Please try like this.
    DELETE TABLE itab WITH TABLE KEY x = key1
                                     y = key2.
    Regards,
    Ferry Lianto

  • CONVERTING ROWS OF AN INTERNAL TABLE TO COLUMNS OF ANOTHER INTERNAL TABLE

    Hi,
    I hv an internal table itab as below with 3 columns.
      name           age         place
      sandeep       24           delhi
      ajay             22           bangalore
      abhishek      25           mumbai
    internal table itab can have any number of rows.
    from this internal table i want to make another internale table itab_new as
    sandeep     ajay            abhishek
    24              22                 25
    delhi          bangalore       mumbai
    thanks

    Hi,
    Check this example:
    data:p_temp(30)  TYPE c value 'ztmp_projectreport'.
    *data declaration
    DATA: it_tab TYPE filetable,
          gd_subrc TYPE i,
          answer TYPE c.
    TYPES: BEGIN OF t_abapcode,
      row(72) TYPE c,
    END OF t_abapcode.
    DATA: it_abapcode TYPE STANDARD TABLE OF t_abapcode INITIAL SIZE 0.
    data:it_prps like prps occurs 0 with header line.
    data:colum(20) type c.
    data:ncol type i.
    data:ccol type c.
    select * into corresponding fields of table
      it_prps from prps where
    append 'report ztmp_projectreport' to it_abapcode.
    append 'data:begin of it_prps2,' to it_abapcode.
    ncol = 1.
    loop at it_prps.
      ccol = ncol.
      concatenate 'colum' ccol '(20)' into colum.
      concatenate colum 'type c,' into it_abapcode.
      add 1 to ncol. 
    endloop.
    append 'data:end of it_prps2.' to it_abapcode.
    'All your code here to fill the internal table and alv grid
    'End of all your code
    INSERT REPORT p_temp FROM it_abapcode.
          SUBMIT (p_temp) AND RETURN.
          DELETE REPORT p_temp.
    Please provide points

  • Load multiple rows of data in table

    hi i want to load multiple rows of data into table from flat file.
    i have oracle 10g enterprise edition, and can not find and envok
    sqlldr. edit command only does one line at a time.
    help please.

    thank you i got sqlldr.
    new problem
    i have created a control file customers.ctl
    LOAD DATA
    INFILE 'C:\ADD_CUST.TXT'
    INTO TABLE CUSTOMERS
    (CUSTOMER_NUMBER,LAST,FIRST,STREET,CITY,STATE,ZIP_CODE,BALANCE,CREDIT_LIMIT,SLSREP_NUMBER)
    and i have data to be loaded into the table in ADD_CUST.txt file.
    this is one line of data there are 9 similer lines.
    '124','ADAMS','SALLY','481 OAK','LANSING','MI','49224',818.75,1000,'03'
    now when i run sqlldr from cmd line below is the message i get.
    SQL*Loader: Release 10.2.0.1.0 - Production on Wed Feb 13 21:04:08 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    C:\>SQLLDR hr/hr control=CUSTOMERS.CTL log=customers.log
    SQL*Loader: Release 10.2.0.1.0 - Production on Wed Feb 13 22:10:19 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Commit point reached - logical record count 9
    Commit point reached - logical record count 10
    C:\>
    please help

  • Internal Table with 22 Million Records

    Hello,
    I am faced with the problem of working with an internal table which has 22 million records and it keeps growing. The following code has been written in an APD. I have tried every possible way to optimize the coding using Sorted/Hashed Tables but it ends in a dump as a result of insufficient memory.
    Any tips on how I can optimize my coding? I have attached the Short-Dump.
    Thanks,
    SD
      DATA: ls_source TYPE y_source_fields,
            ls_target TYPE y_target_fields.
      DATA: it_source_tmp TYPE yt_source_fields,
            et_target_tmp TYPE yt_target_fields.
      TYPES: BEGIN OF IT_TAB1,
              BPARTNER TYPE /BI0/OIBPARTNER,
              DATEBIRTH TYPE /BI0/OIDATEBIRTH,
              ALTER TYPE /GKV/BW01_ALTER,
              ALTERSGRUPPE TYPE /GKV/BW01_ALTERGR,
              END OF IT_TAB1.
      DATA: IT_XX_TAB1 TYPE SORTED TABLE OF IT_TAB1
            WITH NON-UNIQUE KEY BPARTNER,
            WA_XX_TAB1 TYPE IT_TAB1.
      it_source_tmp[] = it_source[].
      SORT it_source_tmp BY /B99/S_BWPKKD ASCENDING.
      DELETE ADJACENT DUPLICATES FROM it_source_tmp
                            COMPARING /B99/S_BWPKKD.
      SELECT BPARTNER
              DATEBIRTH
        FROM /B99/ABW00GO0600
        INTO TABLE IT_XX_TAB1
        FOR ALL ENTRIES IN it_source_tmp
        WHERE BPARTNER = it_source_tmp-/B99/S_BWPKKD.
      LOOP AT it_source INTO ls_source.
        READ TABLE IT_XX_TAB1
          INTO WA_XX_TAB1
          WITH TABLE KEY BPARTNER = ls_source-/B99/S_BWPKKD.
        IF sy-subrc = 0.
          ls_target-DATEBIRTH = WA_XX_TAB1-DATEBIRTH.
        ENDIF.
        MOVE-CORRESPONDING ls_source TO ls_target.
        APPEND ls_target TO et_target.
        CLEAR ls_target.
      ENDLOOP.

    Hi SD,
    Please put the select querry in below condition marked in bold.
    IF it_source_tmp[]  IS NOT INTIAL.
      SELECT BPARTNER
              DATEBIRTH
        FROM /B99/ABW00GO0600
        INTO TABLE IT_XX_TAB1
        FOR ALL ENTRIES IN it_source_tmp
        WHERE BPARTNER = it_source_tmp-/B99/S_BWPKKD.
    ENDIF.
    This will solve your performance issue. Here when internal table it_source_tmp have no records, that time it was fetchin all the records from the database.Now after this conditio it will not select anyrecords if the table contains no records.
    Regards,
    Pravin

Maybe you are looking for

  • Indesign Crashes when exporting PDF

    Hi, We are experiencing an issue when exporting an .indd file as .pdf. The process gets as far as a certain page (8 out of 13) and then crashes when reading a pdf image from that page. It does one of two things - it crashes or displays an 'out of mem

  • XSL stylesheet transformation of RSS feeds

    Does Safari support XSL transformation of RSS feeds? Or does it always override XSL with its own RSS reader format? Details below: I'm starting to mass-produce RSS feeds for our organization. We just want one file for each purpose which can be univer

  • Flash content flashing and crashing mac

    Hello, Since the latest FF and Flash update (37 and 17) I can't watch any videos or flash content - like (annoying ad) banners. Everything literally FLASHES. Like a strobe light. Then videos get stuck, the cursor jumps/freezes, sound stutters and eve

  • Iphone doesnt sync with itunes anymore

    itunes doesnt sync with iphone anymore

  • URL Pattern problem

    Hi I deployed an ear which has a web module with contextroot '/test'. It has a jsp whose url-pattern is mapped to /testjsp. From a html form i'm calling this jsp and the action attribute is /test/testjsp. But the error is resource not found /test/ser