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

Similar Messages

  • How to convert rows of internal table to columns of another internal table?

    Hi,
    Experts,
    test_data.xls:
    one two three four five
    one two three four
    one two three
    one two
    one
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        FILENAME                      = 'c:/test_data.xls'
        I_BEGIN_COL                   = '1'
        I_BEGIN_ROW                   = '1'
        I_END_COL                     = '10'
        I_END_ROW                     = '10'
      TABLES
        INTERN                        = it_tab
    EXCEPTIONS
       INCONSISTENT_PARAMETERS       = 1
       UPLOAD_OLE                    = 2
       OTHERS                        = 3
    output:
    0001 0001 one
    0001 0002 two
    0001 0003 three
    0001 0004 four
    0001 0005 five
    0002 0001 one
    0002 0002 two
    0002 0003 three
    0002 0004 four
    0003 0001 one
    0003 0002 two
    0003 0003 three
    0004 0001 one
    0004 0002 two
    0005 0001 one
    but i want this format:
      one two three four five
    one two three four
    one two three
    one two
    one
    i don't want this type of output display i want to display in ABAP report as in file format how can i achieve this post some ideas on it.
    Thank U,
    Shabeer ahmed.

    Hi,
    Use this piece of code :
    parameters:  p_flname type rlgrap-filename.
      data:
             li_filecontent  type standard table of alsmex_tabline ,
             lwa_filecontent type  alsmex_tabline ,
             lv_begin_col    type i value 1,
             lv_begin_row    type i value 1,
             lv_end_col      type i value 17,
             lv_end_row      type i value 65000,
             li_fieldlist    type lvc_t_fcat,
             li_data         type ref to data,
             dy_line         type ref to data.
      field-symbols:<dyntable> type standard table,
                    <fs_data> type ref to data,
                    <fs_1>,
                    <dyn_wa>,
                    <dyn_field>.
    *Transfer excel file contents to internal table
      call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        exporting
          filename                = p_flname
          i_begin_col             = lv_begin_col
          i_begin_row             = lv_begin_row
          i_end_col               = lv_end_col
          i_end_row               = lv_end_row
        tables
          intern                  = li_filecontent
        exceptions
          inconsistent_parameters = 1
          upload_ole              = 2
          error_message           = 3
          others                  = 4.
      if sy-subrc = 0.
    *Creating the list of fields in the table
        perform f_create_tab_field tables li_fieldlist using 'BUKRS'      4 .
        perform f_create_tab_field tables li_fieldlist using 'ZPOC_KUNNR' 10 .
        perform f_create_tab_field tables li_fieldlist using 'RANL'       13.
        perform f_create_tab_field tables li_fieldlist using 'ZPEDAT'     10 .
        perform f_create_tab_field tables li_fieldlist using 'KWERT'      15 .
        perform f_create_tab_field tables li_fieldlist using 'BONUS'      2 .
        perform f_create_tab_field tables li_fieldlist using 'WAERS'      5 .
        perform f_create_tab_field tables li_fieldlist using 'ZVAL'       15 .
        perform f_create_tab_field tables li_fieldlist using 'ZQTY'       15 .
        perform f_create_tab_field tables li_fieldlist using 'KMEIN'      3 .
        assign li_data to <fs_data>.
    *CREATING INTERNAL TABLE TO store data
        call method cl_alv_table_create=>create_dynamic_table
          exporting
            it_fieldcatalog           = li_fieldlist
          importing
            ep_table                  = <fs_data>
          exceptions
            generate_subpool_dir_full = 1
            others                    = 2.
        if sy-subrc = 0.
          assign <fs_data>->* to <fs_1>.
          assign <fs_1> to <dyntable>.
    Create dynamic work area and assign to FS
          create data dy_line like line of <dyntable>.   " creating a line type of the table just created above
          assign dy_line->* to <dyn_wa>.                 " creating the work area with reference to the line type
          loop at li_filecontent into lwa_filecontent.
            assign component  lwa_filecontent-col     "accessing corresponding field in the field catalog
                of structure <dyn_wa> to <dyn_field>. "and assigning this field to a field symbol
            if sy-subrc = 0.
              <dyn_field> = lwa_filecontent-value.     " filling value for this field
            endif.
            at end of row.
              append  <dyn_wa> to <dyntable>.
              clear <dyn_wa>.
            endat.
            clear lwa_filecontent.
          endloop.
          i_input_file[] =  <dyntable>.
        endif.
      elseif sy-subrc <> 0.
        message s027 display like c_error with text-001.
        stop.
      endif.
    form f_create_tab_field  tables   p_li_fieldlist structure lvc_s_fcat
                         using    p_fname
                                  p_lenght.
      data:lwa_fieldlist   type lvc_s_fcat.
      lwa_fieldlist-fieldname = p_fname.
      lwa_fieldlist-intlen = p_lenght.
      append lwa_fieldlist to  p_li_fieldlist.
      clear lwa_fieldlist.
    endform.                    " F_CREATE_TAB_FIELD
    Regards,
    Dev.

  • Fill dynamic internal table with data from another dynamic table

    Hi,
    I have a huge dynamic table with a few columns and need to fill another dynamic table with some of the columns, that are also existing in the other one. I first know at runtime, which fields the smaller table contains.
    Until now, I did it that way:
      LOOP AT <it_tab_structure> ASSIGNING <wa_tab_structure>.
        LOOP AT lt_comp_full INTO ls_comp_full.
          ASSIGN COMPONENT ls_comp_full-name OF STRUCTURE <structure> TO <column>.
          ASSIGN COMPONENT ls_comp_full-name OF STRUCTURE <wa_tab_structure> TO <value>.
          <column> = <value>.
        ENDLOOP.
        APPEND <structure> TO <table>.
      ENDLOOP.
    lt_comp_full contains the columns of the second table, that have to be filled.
    This is taking a very long time, as there can be a lot of columns in the source table and the source table contains at least 100000 records.
    Is there therefore any way to fill the other table faster?
    Thank you & best regards,
    Michael

    Hey Sharath,
    thank you for your answer! Unfortunately I don't have a 7.4 system here, but your example pointed out, that I can also use move-corresponding from one structure to the other, which I thought, was not possible. I'm trying out, if this makes it faster now.
    I'll let you all know, if this made the deal.
    Thank you & best regards,
    Michael & Arne

  • Column values in table equal column names in other table (unpivot? cross apply?)

    2 tables:
    CREATE TABLE Requirement
     reqID int IDENTITY(1,1) PRIMARY KEY,
     req_result_id numeric(10,0) NOT NULL,
     description varchar(200),
     heading varchar(100),
     GO
    INSERT INTO Requirement VALUES (5296,'Cold pack','HH19_5');
    INSERT INTO Requirement VALUES (5296,'Band-Aids','HH19_6');
    INSERT INTO Requirement VALUES (5296,'First aid cream','HH19_7');
    INSERT INTO Requirement VALUES (5296,'Tape','HH19_8');
    INSERT INTO Requirement VALUES (5296,'Gloves','HH19_9);
    INSERT INTO Requirement VALUES (5296,'Bandages','HH19_10');
    INSERT INTO Requirement VALUES (5296,'Hand sanitizer','HH19_11');
    INSERT INTO Requirement VALUES (5296,'Scissors','HH19_12');
    INSERT INTO Requirement VALUES (5296,'Poison control information','HH19_13');
    INSERT INTO Requirement VALUES (5296,'Name','HH02');
    GO
    CREATE TABLE Response
     respID int IDENTITY(1,1) PRIMARY KEY,
    req_result_id numeric(10,0) NOT NULL,
     HH02 varchar(200),
     HH19_5 varchar(20),
     HH19_6 varchar(20),
     HH19_7 varchar(20),
     HH19_8 varchar(20),
     HH19_9 varchar(20),
     HH19_10 varchar(20),
     HH19_11 varchar(20),
     HH19_12 varchar(20),
     HH19_13 varchar(20),
     GO
    INSERT INTO Response VALUES (33,'Mary',7,8,9,10,11,12,13,14,15);
    INSERT INTO Response VALUES (35,'Barbara',7,8,9,10,11,12,13,14,15);
    INSERT INTO Response VALUES (144,'Melissa',7,8,9,10,11,12,13,14,15);
    INSERT INTO Response VALUES (146,'Missy',7,8,9,10,11,12,13,14,15);
    INSERT INTO Response VALUES (5296,'Pamela',7,8,9,10,11,12,13,14,15);
    GO
    Result:
    description
    heading
    response
    Name
    HH02
    Pamela
    Bandages
    HH19_10
    12
    Hand sanitizer
    HH19_11
    13
    Scissors
    HH19_12
    14
    Poison control information
    HH19_13
    15
    Cold pack
    HH19_5
    7
    Band-Aids
    HH19_6
    8
    First aid cream
    HH19_7
    9
    Tape
    HH19_8
    10
    Gloves
    HH19_9
    11
    For now, I'm using where req_result_id = 5296. Only one row from the Response table is selected.
    I'm playing with unpivot and cross apply. I might use two CTE's but am not yet sure how to join them. I would just like to see what others here suggest.
    I only need help with T-SQL - not table design.
    Let me know if you need more info or if I need to reformat the expected output to make it legible.
    Thanks for any suggestions.

    CREATE TABLE Requirement
    reqID int IDENTITY(1,1) PRIMARY KEY,
    req_result_id numeric(10,0) NOT NULL,
    description varchar(200),
    heading varchar(100),
    GO
    INSERT INTO Requirement VALUES (5296,'Cold pack','HH19_5');
    INSERT INTO Requirement VALUES (5296,'Band-Aids','HH19_6');
    INSERT INTO Requirement VALUES (5296,'First aid cream','HH19_7');
    INSERT INTO Requirement VALUES (5296,'Tape','HH19_8');
    INSERT INTO Requirement VALUES (5296,'Gloves','HH19_9');
    INSERT INTO Requirement VALUES (5296,'Bandages','HH19_10');
    INSERT INTO Requirement VALUES (5296,'Hand sanitizer','HH19_11');
    INSERT INTO Requirement VALUES (5296,'Scissors','HH19_12');
    INSERT INTO Requirement VALUES (5296,'Poison control information','HH19_13');
    INSERT INTO Requirement VALUES (5296,'Name','HH02');
    GO
    CREATE TABLE Response
    respID int IDENTITY(1,1) PRIMARY KEY,
    req_result_id numeric(10,0) NOT NULL,
    HH02 varchar(200),
    HH19_5 varchar(20),
    HH19_6 varchar(20),
    HH19_7 varchar(20),
    HH19_8 varchar(20),
    HH19_9 varchar(20),
    HH19_10 varchar(20),
    HH19_11 varchar(20),
    HH19_12 varchar(20),
    HH19_13 varchar(20),
    GO
    INSERT INTO Response VALUES (33,'Mary',7,8,9,10,11,12,13,14,15);
    INSERT INTO Response VALUES (35,'Barbara',7,8,9,10,11,12,13,14,15);
    INSERT INTO Response VALUES (144,'Melissa',7,8,9,10,11,12,13,14,15);
    INSERT INTO Response VALUES (146,'Missy',7,8,9,10,11,12,13,14,15);
    INSERT INTO Response VALUES (5296,'Pamela',7,8,9,10,11,12,13,14,15);
    GO
    ;with mycte as (
    select respID,req_result_id,response,heading from Response
    cross apply (values
    ([HH19_5],'HH19_5')
    ,([HH19_6],'HH19_6')
    ,([HH19_7],'HH19_7')
    ,([HH19_8],'HH19_8')
    ,([HH19_9],'HH19_9')
    ,([HH19_10],'HH19_10')
    ,([HH19_11],'HH19_11')
    ,([HH19_12],'HH19_12')
    ,([HH19_13],'HH19_13')
    ,([HH02],'HH02') ) d(response,heading)
    WHERE req_result_id=5296 )
    select description,r.heading,response from Requirement r
    inner join mycte m on r.req_result_id=m.req_result_id and r.heading=m.heading
    Order by Case When len(r.heading)=4 then 1 Else 2 END, Len(Replace(r.heading,'HH19_','')) desc
    drop table Requirement,Response

  • Sql join on two tables where column like another column

    hi all,
    been trying to get the results from a join between two tables where one column is like another one.
    table1 (nameA) examples: black2, green1
    table2 (nameB) example: black2.location.uk.com, green1.location.uk.com
    so for example I want to match all those in table1 with black2 to the column in table2 that begins with black2 and so on if you see what im trying to get at!
    my sql so far:
    select * from  schema.table1 a
    join schema.table2 b
    on a.nameA like concat('%', b.nameB, '%'); but it errors:
    ORA-00909: invalid number of arguments
    00909. 00000 - "invalid number of arguments"
    Any help or advice would be greatly appreciated, thankyou!

    Either of these should do it...
    select * from  schema.table1 a
    join schema.table2 b on a.nameA like '%'||b.nameB||'%';or
    select * from  schema.table1 a
    join schema.table2 b on instr(b.nameB,a.nameA) > 0

  • Declaring a variable to be of a type of a table's column in another schema

    Hi,
    Can anyone please explain why is the below procedure not working, but the same is working when written in a declare begin block:
    --exception:Compilation errors for PROCEDURE BOOK_STG.TEST
    Error: PLS-00201: identifier 'BOOK.POLICY_METHOD' must be declared
    CREATE OR REPLACE PROCEDURE test(out_test VARCHAR2) IS
    test_it book.policy_method.policy_type%TYPE;
    BEGIN
    SELECT policy_type INTO test_it FROM book.policy_method WHERE rownum < 2;
    out_test := test_it;
    dbms_output.put_line(out_test);
    END;
    --below block is working:
    declare
    test book.policy_method.policy_type%TYPE;
    BEGIN
    SELECT policy_type INTO test FROM book.policy_method WHERE rownum < 2;
    dbms_output.put_line(test);
    END;

    user13491035 wrote:
    Hi,
    Can anyone please explain why is the below procedure not working, but the same is working when written in a declare begin block:
    --exception:Compilation errors for PROCEDURE BOOK_STG.TEST
    Error: PLS-00201: identifier 'BOOK.POLICY_METHOD' must be declared
    CREATE OR REPLACE PROCEDURE test(out_test VARCHAR2) IS
    test_it book.policy_method.policy_type%TYPE;
    BEGIN
    SELECT policy_type INTO test_it FROM book.policy_method WHERE rownum < 2;
    out_test := test_it;
    dbms_output.put_line(out_test);
    END;
    --below block is working:
    declare
    test book.policy_method.policy_type%TYPE;
    BEGIN
    SELECT policy_type INTO test FROM book.policy_method WHERE rownum < 2;
    dbms_output.put_line(test);
    END;Check how the GRANT for the object BOOK.POLICY_METHOD is given for the current user. If it is through a ROLE then you cannot use it inside a SP. To use an OBJECT inside a SP you need Grant given directly.

  • How do I read from one table and write to another identical table?

    I am very new to Oracle. I am trying to do something that should be very simple.
    I am trying to read from one table in SQL and then write to another
    Identically formatted table. I keep getting various errors. Could someone please
    post some vey simple code that will work so that I can play around with it?
    Any help would be greatly appreciated.
    Thanks,
    Ron

    Thanks, but I must be missing something.
    I have two tables, SONGLIST and SETLIST.
    The second line by itself works just fine on either table.
    Here is the code I used following your seggestion, along with it's error message.
    Hope you can help. Thanks again...
    INSERT INTO SETLIST
    SELECT TITLE FROM SONGLIST WHERE ROTATION <> 'X'
    ORA-00947: not enough values

  • Can I create a new table using strcuture of another existing table ????

    hello all -
    If I need to create table as the duplicate table for another table. I donot need data from that table, as I am going to populate date later on.
    So all need is the structure, constraints of the table to create a new table.
    create table new_temp as
    select * from old_temp;
    above command creates a table with the data, what if I donot want the data, only the defination.
    Any help woud really appreciated.
    Thanks
    Rama

    but create table as select..
    CAN'T create constraint on new table it copy only data
    not constraint
    so create new table with structure as well as
    constraint use
    SELECT dbms_metadata.get_ddl('TABLE','EMP') FROM DUAL;
    only in 9i
    kuljeet pal singh

  • To convert the row of an internal table into columns

    Hi ,
    I want to use the rows of a single column internal table itab1
    to form another internal table itab2 with column names same as the rows of itab1 .
    How is this possible?
    Regards,
    Harshit Rungta

    Hi,
    Check the link..[Convert Rows of internal table to Columns|http://docs.google.com/Doc?id=dfv2hmgs_5d6bcxqgp&hl=en]

  • Moving columns of an internal table to rows of an another internal table.

    Hi
    i have an internal table with 20 fields for single record .Now i need to move the 20 fields
    (of similar length) of single record into internal table with those 20 fields as 20 records i.e i need to make rows of first internal table into columns of second internal table.
    hope iam clear.

    HI Deepthi,
    Try with this Logic...
    IF NOT ITAB[] IS INITIAL.
          LOOP AT ITAB FROM 7.
            ITAB2-FIELD1 = ITAB-FIELD1.
            ITAB2-FIELD2 = ITAB-FIELD2.
            APPEND : ITAB2.
            CLEAR : ITAB2.
          ENDLOOP.
          DO 27 TIMES.
            CASE CNT.
              WHEN '1'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD6.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD6.
              WHEN '2'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD7.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD7.
              WHEN '3'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD8.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD8.
              WHEN '4'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD9.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD9.
              WHEN '5'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD10.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD10.
              WHEN '6'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD11.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD11.
              WHEN '7'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD12.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD12.
              WHEN '8'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD13.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD13.
              WHEN '9'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD14.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD14.
              WHEN '10'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD15.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD15.
              WHEN '11'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD16.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD16.
              WHEN '12'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD17.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD17.
              WHEN '13'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD18.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD18.
              WHEN '14'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD19.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD19.
              WHEN '15'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD20.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD20.
              WHEN '16'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD21.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD21.
              WHEN '17'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD22.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD22.
              WHEN '18'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD23.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD23.
              WHEN '19'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD24.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD24.
              WHEN '20'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD25.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD25.
              WHEN '21'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD26.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD26.
              WHEN '22'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD27.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD27.
              WHEN '23'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD28.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD28.
              WHEN '24'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD29.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD29.
              WHEN '25'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD30.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD30.
              WHEN '26'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD31.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD31.
              WHEN '27'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD32.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD32.
              WHEN '28'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD33.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD33.
              WHEN '29'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD34.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD34.
              WHEN '30'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD35.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD35.
              WHEN '31'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD36.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD36.
              WHEN '32'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD37.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD37.
              WHEN '33'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD38.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD38.
              WHEN '34'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD39.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD39.
              WHEN '35'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD40.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD40.
              WHEN '36'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD41.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD41.
              WHEN '37'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD42.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD42.
              WHEN '38'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD43.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD43.
              WHEN '39'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD44.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD44.
              WHEN '40'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD45.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD45.
              WHEN '41'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD46.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD46.
              WHEN '42'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD47.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD47.
              WHEN '43'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD48.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD48.
              WHEN '44'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD49.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD49.
              WHEN '45'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD50.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD50.
              WHEN '46'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD51.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD51.
              WHEN '47'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD52.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD52.
              WHEN '48'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD53.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD53.
              WHEN '49'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD54.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD54.
              WHEN '50'.
                READ TABLE ITAB INDEX 4.
                ITAB3-FIELD1 = ITAB-FIELD55.
                READ TABLE ITAB INDEX 5.
                ITAB3-FIELD2 = ITAB-FIELD55.
            ENDCASE.
            APPEND ITAB3.
            CLEAR ITAB3.
            CNT = CNT + 1.
          ENDDO.
        ENDIF.
      ENDIF.
    Regards,
    Santosh

  • What is the maximum number of columns allowed on a table?

    What is the maximum number of columns that a table can have? I have a research team that wants to have 140,000 columns on one table and 2000 rows.
    What would be the best way to input (SQL*Loader?) that data on this table and retrieve data from this table? The highest number of columns that I have implemented on a table was 500.
    Any feedback would be greatly appreciated.
    Thanks. ;-)

    Holy cow 140,000 columns and 2000 rows!! I think you are going to have to tell someone to come up with a better design because that doesn't sound like a relational table. Besides, I found this in the Oracle 8.1.7 Reference Manual:
    "The absolute maximum number of columns in a table is 1000. However, when you create an object table (or a relational table with columns of object, nested table, varray, or REF type), Oracle maps the columns of the user-defined types to relational columns, creating in effect "hidden columns" that count toward the 1000-column limit. For details on how Oracle calculates the total number of columns in such a table, please refer to Oracle8i Administrator's Guide."

  • Weblogic LLR tables RECORDSTR column size issues

    Hi ,
    We have configured the LLR (Last logging resource to emulate 2 Phase commit XA ) non XA datasouce in our weblogic 10.3.5 domain and I see that weblogic internally creates WL_LLR_<servername> tables in the schema confgured with that LLR datasouce per managed server.
    But during some transactions commit we are facing an error stating that RECORDSTR column size (which is default 1000 Bytes) is too small for the COMMIT RECORD. It works fine when we increased the RECORDSTR column to 2000 bytes . But the issue is what is the criteria to increase the column size , our application have a large global transactions and will 2000 bytes will be enough to hold that.
    So my question is what actually gets stored within the LLR tables for a transaction , transaction logs or COMMIT record ? , what does COMMIT RECORD actually mean?
    Is there a way to specify the table and column length of LLR Tables during creation of LLR data sources itself.

    Maybe this can shed some light on things: http://docs.oracle.com/cd/E21764_01/web.1111/e13737/transactions.htm#i1145819

  • How to find the new tables and columns in a schema

    hi..good morning to all...
    I have a schema ABC which owns some objects.
    Now some days before I have made another schema XYZ which was a replica of ABC schema.
    between these days some new tables, new columns in the existing tables(with or without default value), comments on the columns are being added in the new schema i.e XYZ schema.
    Now I have to find the extra things which are present in the new schema. I need to find the new tables, new columns in hte existing tables, their default values and descriptions of those.
    Can u plss help me how can I find it?
    I am guessing that I have to write a SQL query with a minus clause but I am not able to write it and also dont know where should I execute it.
    plss help. thanks in advance.

    And moreover, when I am executing the query to get the desired result, then it is throwing "illegal use of long datatype" error and pointing to the b.data_default area of my query..
    select a.table_name, a.column_name, b.data_default, a.comments from all_col_comments a, dba_tab_columns b
    where a.TABLE_NAME=b.TABLE_NAME
    and a.OWNER=b.OWNER
    and a.OWNER=XYZ
    minus
    select c.table_name, c.column_name, d.data_default, c.comments from all_col_comments c, dba_tab_columns d
    where c.TABLE_NAME=d.TABLE_NAME
    and c.OWNER=d.OWNER
    and c.OWNER='ABC'
    order by 1, 2;
    plss help...

  • How to refer to fact table to update the same fact table

    Here is my scenario. Fact table is having measures basic_sal, Tax, net_sal with dimension key to employee dimension.
    I neet to update the net_sal = basic_sal - tax in fact table.
    I tried to do a map with fact_table as source and also target. but after deploying the map, it's not updating the net_sal to the existing rows. It's inserting the new rows with dimension key and net_sal columns. so now fact table is having the double the existing rows.
    Thanks,
    Srini.

    Ola Srini,
    We have some experience that updating a table while using that same table as source often takes a lot of time... Specially when the table contains a lot of data (which is mostly the case with fact tables).
    You can use two solutions. Expand the mapping u use to fill the fact table... The calculations looks not that complex to me... But I could be wrong.
    Other solution is to create a temp table where you store all sal types. You could load the fact table from this temp table. Disadvantage of this solution is maintenance of the temp table...
    Regards,
    Moscowic

  • CONVERT ROWS INTO COLUMNS IN INTERNAL TABLE

    Hi Experts,
    I want to convert rows into coloumns in final internal table.
    How to do that one. Can any one help me its very urgent.
    Regards,
    PBS.

    hi,
    Find the below code for changing rows into colums.
    data: begin of itab1 occurs 0,
    fld,
    end of itab1.
    data: begin of itab2 occurs 0,
    fld1,
    fld2,
    fld3,
    end of itab2.
    itab1-fld = 1.
    append itab1.
    itab1-fld = 2.
    append itab1.
    itab1-fld = 3.
    append itab1.
    read table itab1 index 1.
    if sy-subrc eq 0.
    itab2-fld1 = itab1-fld.
    endif.
    read table itab1 index 2.
    if sy-subrc eq 0.
    itab2-fld2 = itab1-fld.
    endif.
    read table itab1 index 3.
    if sy-subrc eq 0.
    itab2-fld3 = itab1-fld.
    endif.
    append itab2.
    loop at itab1.
    write:/ itab1.
    endloop.
    loop at itab2.
    write:/ itab2.
    endloop.
    refer the below link for further information
    internal table rows to columns
    in the final display list how can i change rows to columns and vice versa

Maybe you are looking for

  • New User Question:  How do I enable comments in Reader when this option is greyed out on my menu?

    I cannot figure out what I am missing here.  I have a PDF Portfolio completed and now want to E-Mail for Review.  But this option is greyed out on my Comment Menu dropdown list.  What to do?  Thanks!

  • Infoset not being generated - SQ02

    Hello Experts, I have made simple code modification to an infoset created with SQ02, but the changes are not getting applied. This infoset is used in a Z Query, which is assigned to a transaction code. So I have, infoset zinfo query zmmquery Transact

  • Login failing

    I can log into OTN just fine. When I try to download something (Oracle Application Express) and I click on accept, I'm prompted for the userid/login box. Even though, I'm already logged in. My userid/password that I used a to get in now fails. I've b

  • Clob Max Size?

    Hi, I have a BLOB uploaded in the database and tried to convert it into a CLOB. However if the file is over 32K, the CLOB cannot get the rest of the info. Any suggestions? Thanks. Here's the function I used to convert the BLOB to CLOB. function conve

  • Telephone handset speaker / reception not working properly

    I have had my Q10 for under two months and recently the phone speaker on the handset not the speaker phone has extremely poor quality sound.  Almost as if reception is horible with interference.   The phone itself works well in speaker mode or over b