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.

Similar Messages

  • 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.

  • How to get the field names of a table

    hi all,
    i need to get all field names of a table. here i dont need any data. i need only field names.
    initially i used this query, select * from tname;
    the problem is if table have 1000 records, all records will be in memory.
    how to get this one.
    regards
    pavan.

    hi all,
    thanks a lot. the query is working.
    initially i given this query
    select column_name from user_tab_columns where table_name='mytable';
    but no rows selected.
    and i tried with this,
    select column_name from user_tab_columns where table_name='MYTABLE';
    this is working fine.
    thanks
    pavan.

  • How to get the field name in the PAI

    Hello All.
    I have to run a FM on one of two fields in the screen.
    I don't want to write two different moudles to these fields like this:
      FIELD scr100-lenum1   MODULE check_lenum1   ON REQUEST.
      FIELD scr100-lenum2   MODULE check_lenum2   ON REQUEST.
    I want write one moudle that i could ask there - > from which field did i came, like this:
      FIELD scr100-lenum1   MODULE check_lenum   ON REQUEST.
      FIELD scr100-lenum2   MODULE check_lenum   ON REQUEST.
    please advice..
    thanks, Barak.

    Use get cursor statement.
    Ex:
    GET CURSOR FIELD wa_field1.
    u will get the filed name in wa_field1.
    Reward points if helpfull.
    Regards,
    Gopi

  • Getting field names of an internal table

    Hi all,
    Does anyone know if exists a statement, function module or method that gets the field names of an internal table ?
    Thanks in advance,
    David

    Hi,
    See this
    REPORT typedescr_test.
    TYPES:
    BEGIN OF my_struct,
    comp_a type i,
    comp_b type f,
    END OF my_struct.
    DATA:
    my_data TYPE my_struct,
    descr_ref TYPE ref to cl_abap_structdescr.
    FIELD-SYMBOLS:
    <comp_wa> TYPE abap_compdescr.
    START-OF-SELECTION.
    descr_ref ?= cl_abap_typedescr=>describe_by_data( my_data ).
    WRITE: / 'Typename :', descr_ref->absolute_name.
    WRITE: / 'Kind :', descr_ref->type_kind.
    WRITE: / 'Length :', descr_ref->length.
    WRITE: / 'Decimals :', descr_ref->decimals.
    WRITE: / 'Struct Kind :', descr_ref->struct_kind.
    WRITE: / 'Components'.
    WRITE: / 'Name Kind Length Decimals'.
    LOOP AT descr_ref->components ASSIGNING <comp_wa>.
    WRITE: / <comp_wa>-name, <comp_wa>-type_kind,
    <comp_wa>-length, <comp_wa>-decimals.
    ENDLOOP.

  • How to get the class name and field name dynamically

    Hi
    I have a class (ex: Contract) the fields (ex : a,b,c) .i need to get the class name and field name dynamically
    ex
    if( validation file for the field Contract.a){
    return contract.a;
    }else if(validation file for the field Contract.b){
    return contract.b;
    how to pass the field name and object dynamically
    Please help me .............
    Thanks in Advance..
    Edited by: 849614 on Aug 11, 2011 6:49 AM

    YoungWinston wrote:
    maheshguruswamy wrote:
    Agreed, but IMO, i still feel its best if there is no tie in between consumer class level details and the database it talks to. A service layer is needed in between them.Sounds like you've done a bit of this before. Me, I've either been a modeller/DBA, doling out data, or a nuts and bolts programmer (and actually more toolmaker than apps, but did a bit of that too).
    Do you know of a good book about the "middle ground" (ie, these service layers)? I understand it empirically, but haven't had a lot of exposure to it.
    Winston
    Edited by: YoungWinston on Aug 11, 2011 10:34 PM
    PS: Apologies. Edited my previous post, presumably while you were composing your reply, when I finally realized what '.filed' meant.Most of my work is in web development, never been a DBA :) . The biggest 'concern' in my shop is 'separation of concerns'. The UI group reports up to a different IT head, the DB group reports up to a different IT head and so on. The looser the coupling between these systems, the lesser the project costs (Integration, QA etc) are. Martin Fowler's books contain good information about separation of concerns in an enterprise environment. The two books which i recommend are
    [url http://www.amazon.com/Patterns-Enterprise-Application-Architecture-Martin/dp/0321127420]Enterprise Application Architecture and
    [url http://www.amazon.com/Enterprise-Integration-Patterns-Designing-Deploying/dp/0321200683/ref=pd_sim_b_1]Enterprise Integration Patterns

  • How to get the session name of a batch input

    hi everybody
    does anybody know how to get the session name of a batch input?
    I have to put the name of the session at the end of my program so that the user can click on the session name to go directly to SM35 to run the batch input when the program ends

    Hi sia,
    1. Table is APQI
    2. field name for session name is GROUPID
    regards,
    amit m.

  • How to get the Text name to pass in the  parameter header in save_text

    Hi,
      I am trying to change the long text of operation for historical order by using the flat file.I am using the save_text to do this.I would like to know how  to get the text name in order to pass the parameter header in save_text.
      I went to the tcode iw62 to get the header information of the long text.300100000009200000001
    i would like to know what this 1000000092 indicates and where is this value updated in the table so that i can link it thru the order no  to get the link and pass it in the text_name.
      can anyone help me out?
    krishnan

    Hi,
    Your query is.
    I went to the tcode iw62 to get the header information of the long text.300100000009200000001
    i would like to know what this 1000000092 indicates
    In above number
    300 - Client
    1000000092 - AUFPL - Routing number of operations in the order (You can fetch this from table HIVG)
    00000001 - APLZL - General counter for order ( You can fetch this from table HIVG).
    BR,
    Vijay

  • How to get the specific name of the workset which is currently selected by the user in sap portal 7.0

    Dear Expert,
    I have one requirement like to read the selected workset name in portal by the current user.I have read two documents regarding how to retrieve the PCD contents (iViews, Pages, Worksets and Roles) and its properties like Created by, Changed by, Last changed by and others using PCD API.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6112ecb7-0a01-0010-ef90-941c70c9e401?overridelayout=true
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/508baf88-9335-2d10-efa6-c6ad61e5fc4b?quicklink=index&overridelayout=true
    But I am not able to understand how to get the specific name of the workset which is currently selected by the user.Can you please help me.
    I am using portal 7.0.
    Thanks & Regards,
    Patralekha

    Hi Expert,
    I found that we can use Interface INavigationHelperService to read Portal Role selected by user at runtime from http://scn.sap.com/thread/52194
    But this class is available in SAP NetWeaver 7.30 Enterprise Portal .
    But in SAP NetWeaver 7.0 Enterprise Portal that interface is not available.
    INavigationService is available there.
    But didn't get any proper discussion on this interface for the same requirement.
    Can you please help me.
    Thanks & Regards,
    Patralekha

  • How to get the VARIANT name in the program

    Hi Guys,
    Can somebody tell me how to get  the VARIANT name in a program.
    I have to perform some code with specific variant only. So I want to check in program which variant has been used to call the program.
    Thanks,

    Hi,
    Variants are stored in table VARI and VARID.
    You can use RS_ALL_VARIANTS_4_1_REPORT to get all the variants for a report program.
    please check out the link below it will be helpful to you
    Re: Programs for a transaction variant
    Hope this helps.
    ashish

  • How to get the field COMPLETION in extract layout

    Hi,
    Does anyone knows How to get the field COMPLETION in extract layout? i have not been able to find it and it is imperative to have it for implementing a new evaluation.
    Thanks a lot for your help.
    CAMILO URIBE

    Hi Neil,
    The following steps describe what we did to get the new evaluation:
    1. Define Attributes and Object Types for Evaluations: here we added a new field for evaluation. The field was COMPLETION (degree of processing in percent), with relevant object "TASK". "No Summarization" was configurated as Rule for Summarization
    2. Define Extract Layouts: here we created a new extract layout for evaluation. The objects and attributes to be used were defined (the field COMPLETION  was defined as attribute).
    3. Assign Extract Layouts to Project Types.
    4. Define Evaluations: the new layout for evaluation were created using the attributes.
    5. Define Severity.
    6. Define Threshold Values. In the new evaluation the field COMPLETION was used in the formula.
    After configurating and testing, we have noticed that the values of field COMPLETION are not taking into account. It does not matter which value it has, evaluation always take 0.
    Thanks for your help,
    CAMILO URIBE

  • How to get the role name in which query is published ?

    Hi Experts,
       Is there any table where i can get the name of the role in which a particular query is published. I know that if i have a role , i can check in pfcg giving that role name and in menu tab i can see all the queries published under that role. But if i know query but not role how to get the role name . Is there any table or functon modules or programs to get the information.
    Thanks & Regards
    Vamsi Kiran

    Check this table
    AGR_HIER

  • 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 function name/ID  of the current page

    HI,
    I searched the forum and google, but it is not clear on how to get the function name of the current page.
    I have 4 functions in my self service A ,B,C,D (seeded page links ) they all have to go to a page called hhhPG. Based on which function user is clicks I have to show the data in hhhPG.
    so my question is how to get the function name ? I mean I need to know if user click on link A , B, C or D link and came to this page.
    I found below in one forum and also there is getfunctionID in pageContext , but I do not know what to pass to getfunctionid("???") to get value.
    FunctionSecurity funcSecurity = pageContext.getFunctionSecurity();
    Or is there a better way of know where user is coming from ? like geturl....
    Please help, I need this ASAP.
    Thank you.

    Use below to find out how the user came into the page
    FunctionSecurity funcSecurity = pageContext.getFunctionSecurity();
    boolean isFunc1 = funcSecurity.testFunction(funcSecurity.getFunction("YOUR_FUNCTION_SHORT_NAME1"));
    boolean isFunc2 = funcSecurity.testFunction(funcSecurity.getFunction("YOUR_FUNCTION_SHORT_NAME2"));
    boolean isFunc3 = funcSecurity.testFunction(funcSecurity.getFunction("YOUR_FUNCTION_SHORT_NAME3"));
    boolean isFunc4 = funcSecurity.testFunction(funcSecurity.getFunction("YOUR_FUNCTION_SHORT_NAME4"));
    So one of them will be true based on the function the user came in.
    Write your logic based on these flags.
    Regards,
    Peddi.

  • In Mac how to get the Full name of a file Programmatically?

    Hi Friends,
             I am doing one Mac application for displaying the contents of a file. I can able to get some information about the file by using this code below...
      NSDictionary *dict=[fileManager attributesOfItemAtPath:myPath error:nil];
    Now I want to get the some other informations also like Full Name, copyRight, version... So Please suggest me how to get the full name of a file Programmaticallly?

    Your question doesn't make sense.
    First off, if you are going to get the attributes of a file, you need its full name before you can do anything. So that's part one taken care of.
    This function returns a dictionary full of typical file information (type, size, mod dates, etc.) as well as some HFS data (creator code, type code) which, I strongly suspect, are not "pulled out of the file" but rather generated on the spot. (See NSFileManager for the full list of attribute keys.)
    The other items you hoped of retrieving are not part of the regular file system. Sure, a Truetype font has a copyright string and a version, but what about an HTML file? A PNG? A text file you just created?
    There simply are no standard functions to retrieve copyright and version.

Maybe you are looking for

  • Planned order to production order conversion in APO

    Hi Gurus, Can you please tell me how i can convert planned order into production order in APO? How that production order will be transfer to ECC? Regards Rajib Pathak

  • Rounding to nearest 5 cents

    Hello experts, At our client, for XXX currency payments, the amount should be rounded to the nearest 5 cents. For example, 100.02 should be rounded down to 100.00 and 100.03 should be rounded up to 100.05. I did the config at OB90, wherein I added th

  • Where can I download a 64bit version of Digital Editions for Windows?

    On the page at http://www.adobe.com/products/digital-editions/download.html I can only find a 32bit version for Windows. Is there a 64bit version available?

  • Where does VCS get passwords from when doing LDAP authentication

    I was wondering, if I were to configure VCS to do LDAP authentication while using an Active Directory as LDAP, which passwords would it be using?   Will it authenticate against domain password or will I need to fill in a separate password attribute (

  • FileReader how to detect EOF

    Hi all, I was going over some sample programs and i ran into a problem with the following program. The problem is that it keeps counting the next character and incrementing instead of ending when the last line in the text file has no linebreak. I gue