How To Know The Column Name Of The Internal Table

HI ,
        i have an internal table .
f1          f2           f 3         f4            f5  
matnr   mbrsh    mtart     meins       minbe
i want to know the column name which depending on the value i.e . if it is matnr then f1 , if mbrsh it is f2 ..so on
Thanks.

Hi ,
      thanks for your replies . i am elaborating my query .
        I have an internal table with 80 fields i.e.f1,f2,f3......f80 . In the first index i will be having the fieldnames
i.e.matnr , mbrsh , meins , mtart ..... . From second index onwards i will be having the corresponding data  for the field name.  i need to display a particular field in a table control . Here i will be knowing the fieldname. If i can get to know the column name i.e whether f1 or f2 or ... .i Can populate the data into the table control.
Wht i have done is taken a field symbol  and used the following code.
read table i_upload index 1  assigning <lv_upload>.
here i will get the initial first record i.e
F1                                             MATNR
F2                                             MBRSH
F3                                             MTART
F4                                             WERKS
F5                                             LGORT
F6                                             VKORG
F7                                             VTWEG
F8                                             MAKTX
F9                                             MEINS
F10                                             MATKL
F11                                             BISMT
F12                                             BRGEW
F13                                             GEWEI
F14                                             NTGEW
F15                                             GROES
F16                                             KLART
F17                                             CLASS
F18                                             SPART
F19                                             VRKME
F20                                             UMREN
now i want to the field name .
Hope it is clear this time .
Thanks.

Similar Messages

  • To read the column names of an internal table

    Hi ,
    I want to read the column/field names of an internal table into another internal table.
    How can this be done?
    Kind Regards,
    hgarsht Rungta

    Hi ,
    you can get the attributes of any internal table into another ..
    check the following code ..
    DATA : it_mara TYPE STANDARD TABLE OF mara  WITH HEADER LINE.
    DATA : it_detail   TYPE abap_compdescr_tab,
               wa_comp TYPE abap_compdescr.
    DATA : ref_descr TYPE REF TO cl_abap_structdescr.
    ref_descr ?= cl_abap_typedescr=>describe_by_data( it_mara ).
    it_detail[] = ref_descr->components .
    loop at it_detail into wa_comp.
    write:/ wa_comp-name .
    endloop.
    Regards,
    Rajesh Kumar

  • How to get the column names of the table into the Dashboard prompt

    how to get the column names of the table into the Dashboard prompt
    Thanks & Regards
    Kishore P

    Hey john,
    My requirement is as follows
    I have created a Rank for Total sales by Region wise i.e RANK(SUM(Dollars By Region)) in a pivot table.
    My pivot table looks like this
    COLUMN SELECTOR: TOTAL US , REGION , DISTRICT , MARKET
    ---------------------------------------------------- JAN 2009          FEB 2009        MAR 2009
    RANK              REGION                  DOLLARS           DOLLARS        DOLLARS DOLLARS
    1 CENTRAL 10 20 30 40
    2 SOUTHERN 10 30 30 70
    3 EASTERN 20 20 20 60
    4 WESTERN 10 20 30 40
    When i select the District in column selector
    Report has to display rank based on Total Sales by District. i.e
    ------------------------------------------------- JAN 2009         FEB 2009       MAR 2009
    RANK             DISTRICT              DOLLARS           DOLLARS        DOLLARS DOLLARS
    for this i need to change the fx of rank i.e RANK(SUM(Dollars By Region)) to RANK(SUM(Dollars By District)) and fx of Region i.e Markets.Region to Markets.District dynamically.
    so , i need to capture column name of the value selected from the column selector and dynamically i need to update the fx 0f RANK & fx of region.
    do you have any solution for this?
    http://rapidshare.com/files/402337112/Presentation1.jpg.html
    Thanks & Regards
    Edited by: Kishore P on Jun 24, 2010 7:24 PM
    Edited by: Kishore P on Jun 24, 2010 7:28 PM

  • How to get the field name of an internal table during runtime?

    How to get the field name of an internal table during runtime?

    Hi  Sudhir,
    Declare and Use Get Cursor Field in Your Prm to get the field Name of the Intenal Table
    Example Code:
        <b>  DATA: v_field(60).                        " Insert this code.
         GET CURSOR FIELD v_field.        " Insert this code.</b>
         <b>CHECK v_field = 'ITAB-KUNNR'.    " Insert this code. (or)
    Write: v_field.</b>
    Regards,
    Ramganesan K.

  • How to know exact column name in following error (oracle9i)

    Hi all,
    Please telll me
    How to know exact column name in following error
    ORA-01401: inserted value too large for column
    Prashant
    null

    If you are running this in your SQL*Plus session then you can easily check it out --
    satyaki>
    satyaki>create table test_sat
      2     as
      3    select empno,ename,job
      4    from emp;
    Table created.
    satyaki>
    satyaki>
    satyaki>desc test_sat;
    Name                                      Null?    Type
    EMPNO                                              NUMBER(4)
    ENAME                                              VARCHAR2(10)
    JOB                                                VARCHAR2(9)
    satyaki>
    satyaki>
    satyaki>
    satyaki>
    satyaki>insert into test_sat values(5555,'Robin','BU');
    1 row created.
    satyaki>
    satyaki>
    satyaki>insert into test_sat values(5555,'Arama Baager Taaja','FR');
    insert into test_sat values(5555,'Arama Baager Taaja','FR')
    ERROR at line 1:
    ORA-01401: inserted value too large for column
    satyaki>insert into test_sat values(55557,'Arama','FR');
    insert into test_sat values(55557,'Arama','FR')
    ERROR at line 1:
    ORA-01438: value larger than specified precision allows for this column
    satyaki>
    satyaki>insert into test_sat values(5555,'Arama','ACCOUNTING');
    insert into test_sat values(5555,'Arama','ACCOUNTING')
    ERROR at line 1:
    ORA-01401: inserted value too large for column
    satyaki>Regards.
    Satyaki De.

  • How to know the column name using the index name for a particular table

    Hi All,
    I have small query regarding, I have index name and table name so by using this how can I know the column name associated with that index of that particular table specific to Oracle9i.
    Thanks
    Sudheer

    select *
    from user_ind_columns -- or all_ind_columns
    where table_name = UPPER('&table_name')
    and index_name = UPPER('&index_name');
    Regards
    Arun
    Gurgaon

  • How to call the column names into the prompt and display values dynamically

    Hi,
    i have a typical requirement where I have to call 3 columns into the AGE Prompt (I know we can use the Column Selector to call the columns) .Below is the Screen Shot.
    !http://i46.tinypic.com/2qjfukh.jpg!
    2nd Requirement)
    The three columns I have are order Date, Ship Date and Entry Date.
    Whenever I click on Orderdate from the Prompt, It should dynamically show its values in the report.
    and When I click on the Ship Date from the Prompt, it should display the corresponding values in the report.
    and so on with the Entry Date.
    Can anybody help me how to acheive this.
    Thanks a ton.

    Ok so then you can use a fake column prompt. Here's one quick approach (nicer and cleaner with LOV tables but I don't if you have any of those).
    - Create a fresh prompt using any column you want.
    - Open the column formula using the fx button and replace the formula with 'abc'.
    - Use "SqL Results" as the "Show" option.
    - SQL:
    select case when 1=0 the Markets.Region else 'Order Date' from Paint.Markets UNION ALL
    select case when 1=0 the Markets.Region else 'Ship Date' from Paint.Markets UNION ALL
    select case when 1=0 the Markets.Region else 'Entry Date' from Paint.Markets
    - Set Variable = Presentation Variable = @{vPresVarSelectedDate}{Order Date}
    - Label = Date
    Then in the request, you change the column formula for the date. I'm going to make it short and just assume you called your time dimension alias(es) like the lowest grain:
    "@{vPresVarSelectedDate}{Order Date}"."@{vPresVarSelectedDate}{Order Date}"
    Cheers,
    C.

  • Rename the Column Name in the Repository

    Hi,
    after creation the Repository and some Answers I want to change the name of some columns in the Repository (Presentation Layer or Busines Layer).
    After changing this column names the answers will not work any more until I replace the columns in answers.
    Has got somebody experience with changing column names in Repository and Catalog without replacing the columns in answers?
    Regards,
    Stefan

    Rename the objects in the Business Model Layer and that would get automatically reflected in Presentation Layer. In order for presentation layer to remain constant just double click on the columns and uncheck the "Use Logical Column Names". This would ensure that your presentation layer is not renamed when you rename the BM.
    Thanks,
    Venkat
    http://oraclebizint.wordpress.com

  • How to add particluar column dynamically to an internal table

    Hi
    How can I add particluar column(s) to an internal table dynamically and then display in an alv.
    for eg:
    There are 5 columns and the 4th column is the <b>period (1 to 12)</b> that has been declared as select-options in the selection screen.
    col1 = bukrs
    col2 = lifnr
    col3 = akont
    <b>col4 = period</b>
    col5 = waers
    so my question is
    if period is in the range from 1 to 3 then the internal table should be
    bukrs  lifnr  akont   <b>period1   period2  period 3</b>  waers. 
    likewise if the period is in the range from 1 to n then internal table should be
    Bukrs  lifnr   akont   <b> period1   period2   period3   period4 .....  periodn  </b> waers.
    Thanks

    Hi,
    First create a global field catalog with all 12 periods ie period1, period2, ....period12.
    Once you have fieldcatalog with all 12 periods
    Then use this code arrive the dynamic field in the fieldcatalog
    data : begin of i_period occurs 0.
    data : period type i.
    data : end of i_period.
    data : v_no type i value 1.
    do.
      i_period-period = v_no.
      v_no = v_no +1.
      if v_no eq 12.
         exit.
      endif.
    enddo.
    " Here arrive the periods that are not belong to selection option period
    delete i_period where period in s_period.
    data : v_fldname like dd03l-fieldname.
    loop at i_period.
      concatenate 'PERIOD' i_period-period into v_fldname.
      condense v_fldname no-gaps.
      read table i_fieldcat with key fieldname = v_fldname.
      if sy-subrc eq 0.
         delete i_fieldcat index sy-tabix.
      endif.
    endloop.
    After this loop your field catalog contains only valid period that equal to selection option period
    aRs

  • How to read the column name of the Table.

    hi
       I have applied sort functionality to the Table columns. It is working fine but I need to read the table column name before sorting ( On which column user trying to sort ).
       Thank you all,
    Rama...

    Hi Alex
       Thank you very much for your valid input.
    But I am facing one problem here. To get sort functionality I added following logic in WDDOMODIFYVIEW method.
      DATA wd_table TYPE REF TO cl_wd_table.
      CHECK first_time = abap_true.
      wd_table ?= view->get_element( 'TABLE_NAME' ).
      wd_this->table_control ?= wd_table->_method_handler.
      wd_this->table_control->set_key_attribute_name( 'COL_NAME1' ).
    here I hard coded first column name(i.e. COL_NAME1). Is it correct?
      and added following code in SORT ACTION of table i.e.
    wd_this->table_control->apply_sorting( ).
    To get column name I am using the method in SORT ACTION of table which you mentioned but always I am getting  COL_NAME1 only....
    Please help me how can I rectify this...
    Thank you
    Rama

  • Should the column name in the not in clause be indexed?

    Hi, Everyone,
    I am having oracle database version 11.0.1.6 on windows server 2003 R2.
    I have a query like this:
    Select * from icm
    where customer_no not in (select customer_no from icm_pre);
    I would like to know whether we should index the customer_no column in icm_pre table too? I have indexed customer_no column in icm.
    Will there be a better performance if i index both the columns in the 2 tables?
    Thanks

    user10636796 wrote:
    | Id  | Operation                      | Name                           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | INSERT STATEMENT               |                                |     1 |   147 |   764   (1)| 00:00:10 |
    |   1 |  LOAD TABLE CONVENTIONAL       | ICM_UPSEL_0_ALL                |       |       |            |          |
    |   2 |   HASH GROUP BY                |                                |     1 |   147 |   764   (1)| 00:00:10 |
    |   3 |    NESTED LOOPS                |                                |       |       |            |          |
    |   4 |     NESTED LOOPS               |                                |     1 |   147 |   763   (1)| 00:00:10 |
    |*  5 |      HASH JOIN RIGHT ANTI NA   |                                |     1 |    78 |   687   (1)| 00:00:09 |
    |   6 |       TABLE ACCESS FULL        | ICM_UPSEL_1_ALL                | 18556 |   235K|    68   (0)| 00:00:01 |
    |*  7 |       TABLE ACCESS FULL        | ICM_UPSEL_MIN_PRDIFF_0         |   223K|    13M|   618   (1)| 00:00:08 |
    |*  8 |      INDEX RANGE SCAN          | PRICE_DIFF_IDX                 |    84 |       |     3   (0)| 00:00:01 |
    |*  9 |     TABLE ACCESS BY INDEX ROWID| ICM_PRE                        |     1 |    69 |    76   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    5 - access("A"."PR_CODE_BBL"="PR_CODE_BBL")
    7 - filter("A"."FLAG"=0 AND "A"."PRICE_DIFF">0 AND "A"."SCORE">=0.5 AND "A"."PRICE_DIFF"<=10)
    8 - access("A"."PRICE_DIFF"="B"."PRICE_DIFF")
    filter("B"."PRICE_DIFF"<=10 AND "B"."PRICE_DIFF">0)
    9 - filter("B"."SCORE">=0.5 AND "B"."FLAG"=0 AND "A"."CUSTOMER_NO"="B"."CUSTOMER_NO" AND
    "A"."PR_CODE_BBL"="B"."PR_CODE_BBL" AND "A"."SCORE"="B"."SCORE")
    How many rows are there in ICM_UPSEL_MIN_PRDIFF_0, how many match the "constant" predicates, is there an efficient way of finding them, how many will be left after you apply the subquery test.
    Ditto for ICM_PRE, and do the figures look like if you apply the subquery to ICM_PRE (which seems possible)
    What's the most precise path for joining the two main tables - and is there a supporting index for that join
    Notice that you have a duplicated predicate in your original query - is the query correct ?
    Notice that the subquery has turned into a "null aware anti join" - so changing the NOT IN to a NOT EXISTS (suggested by another poster) is not logically the same query - do you have a missing constraint (or two) which might help the optimizer find a better path.
    Regards
    Jonathan Lewis

  • Problem Getting the Column name in the BPEL Problem.

    I have created one Variable Assume the name Nptf. I want to get the name of the Variable and Store it in another variable. Is there any possibility to do that.
    Thanks in advance
    Regards
    GSR

    I do not understand your question. How would you identify the variable whose name you want to copy, if not by name?
    Marc

  • Debugging ECC6: how to see the fields name when download internal table?

    When we debug a reprot in ECC6 and save to a local file an internal table, the fields are not appearing only the data,
    Is there a way to download also the table fields name?

    From the new debugger switch to the classic debugger using menu path Debugger->Switch to Classic Debugger. Form the classic debugger you can download internal table data with column name(s).
    Regards,
    Joy.

  • Make the column to row.(internal table)

    hi
    i have an internal table ITAB
    data:begin of itab
            quarters(2),
           end of itab.
       that has contents
    Q1
    Q2
    Q3
    Q4
    I would like to have a ITAB2 like this
    data:begin of itab
            Q1(2),
            Q2(2),
           Q3(2),
           Q4(2)
           end of itab.
    Q1  Q2  Q3 Q4 Q5
    any ideas guys..........
    thanks
    raghu.

    REPORT  z_test.
    Transpose itab1 to itab2.
    TYPES: BEGIN OF ty_1,
    first,
    second,
    third,
    fourth,
    END OF ty_1.
    TYPES: BEGIN OF ty_2,
    first,
    second,
    third,
    END OF ty_2.
    FIELD-SYMBOLS: <fs> TYPE ANY,
                  <fs2> TYPE ANY.
    DATA: itab1 TYPE TABLE OF ty_1 WITH HEADER LINE,
          itab2 TYPE TABLE OF ty_1 WITH HEADER LINE,
          curr_line TYPE sy-tabix.
    itab1-first = '1'.
    itab1-second = '2'.
    itab1-third = '3'.
    itab1-fourth = '4'.
    APPEND itab1.
    itab1-first = '1'.
    itab1-second = '2'.
    itab1-third = '3'.
    itab1-fourth = '4'.
    APPEND itab1.
    itab1-first = '1'.
    itab1-second = '2'.
    itab1-third = '3'.
    itab1-fourth = '4'.
    APPEND itab1.
    LOOP AT itab1.
      CLEAR itab2.
      ASSIGN COMPONENT sy-tabix OF STRUCTURE itab2 TO <fs>.
      curr_line = sy-tabix.
      DO.
        ASSIGN COMPONENT sy-index OF STRUCTURE itab1 TO <fs2>.
        IF sy-subrc NE 0.
          EXIT.
        ENDIF.
        IF curr_line = 1.
          <fs> = <fs2>.
          APPEND itab2.
        ELSE.
          READ TABLE itab2 INDEX sy-index.
          <fs> = <fs2>.
          MODIFY itab2 INDEX sy-index.
        ENDIF.
      ENDDO.
    ENDLOOP.
    LOOP AT itab2.
      WRITE:/ itab2.
    ENDLOOP.
    Please find the above code for the same.
    Regards
    Ramesh.

  • How do you get the column names for a given table from an SQL LocalDB programmatically in Visual Basic.

    Just new to this and unable to find answers

    My solution
        Public Function GetTableColumnNames() As Boolean
            Form1.ListBox1.Items.Clear()
            _MDFFileName = String.Format("{0}.mdf", _DatabaseName)
            _sqlConnectionString = String.Format("Data Source=(LocalDB)\v11.0;AttachDBFileName={1};Initial Catalog={0};Integrated Security=True;", _DatabaseName, Path.Combine(_DatabaseDirectory, _MDFFileName))
            Dim cn As New SqlConnection(_sqlConnectionString)
            'put the table name in brackets in case it has spaces in it
            Dim SQLString As String = "SELECT * FROM [" & _TableName & "]"
            Try
                cn.Open()
                Dim cmd As New SqlCommand(SQLString, cn)
                Dim rdr As SqlDataReader =
                cmd.ExecuteReader(CommandBehavior.KeyInfo)
                Dim tbl As DataTable = rdr.GetSchemaTable
                'This shows all of the information you can access about each column.
                For Each col As DataColumn In tbl.Columns
                    Form1.ListBox1.Items.Add(col.ColumnName)
                    Debug.Print("col name = " & col.ColumnName & ", type = " & col.DataType.ToString)
                Next
                'Get each column.
                For Each row As DataRow In tbl.Rows
                    Form1.ListBox1.Items.Add(row("ColumnName"))
                Next
                rdr.Close()
            Catch
                MessageBox.Show("Error opening the connection to the database.")
            Finally
                cn.Close()
            End Try
            Return _Success
        End Function

Maybe you are looking for

  • Walking   running issue with IOS 8.2

    Hello, It seems that since I installed IOS 8.2 the Walking + Running Distance calculation is not working well. I was averaging 2 to 3 km a day, since the update 0.08km per day! How can I calibrate this correctly. Thank you for some assistance. Philip

  • Switch connected on 802.1x port

    Hi All, can any body tell me what happens when a switch/hub is connected to a 802.1x port which is configured for guest vlan if switch does not receive 802.1x request on that port from switch/hub..all the pcs connected to that port will be part of gu

  • CreateChildSymbol at bottom of DOM?

    When placing a createChildSymbol on the stage, how do I place it at the bottom hierarchy, instead of the default top?

  • Mail using MXTOOLBOX

    I have been using .mac mail for my personal email. My work using MXTOOLBOX for mail. All was fine, until about a 2 months ago, every time mail would try to get my new email, it would freeze my phone for a few minutes. Where once when emails were comi

  • Exit code 7 in After Effects CC installation

    Recently I have had to change my hard disk which was in the partition "L". Now, I have to reinstall After Effects CC and in spite of setting the file allocation in "C", it gives me this error. Any solution? Thanks. I have Windows