How to get the field id of an UserField

Hello,
in my AddOn i add an UserField to the table "OCRD". Later i have to change this field. I tried to initiate the UserField object with the method "GetByKey". This method needs two parameters:
- TableName as string : "OCRD"
- FieldID as integer : ???
How can i get the FieldID of my created UserField?
King regards
Christian Niehaves

Hello Christian,
you can either use a recordset, to query the table CUFD, where all the userfields are stored. Using the table name (tableID), and the filed name (AliasID), you can have the FieldID
an other solution is going thru the collection of userfield of your table
dim i as integer
For i=0 to MyUserTable.UserFields.fields.count-1
    if MyUserTable.UserFields.fields.tem(i).Name = YourFieldName then
      'i has the value you need
    end if
next
HTH
Sebastien

Similar Messages

  • 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 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 get the field's type in the database with jdbc?

    How to get the one filed's type(varchar,int,long...etc) with jdbc??
    Can u help me??
    It's best that giving a sample code..

    Thx for your reply,BheegaChicken! But i use it with
    oracle9i jdbc..It doesn't return to my the fields
    type correctly..
    This is problem is caused by oracle jdbc??
    Can u tell me??It depends on the driver classes you are using... some of them don't have an implementation for those methods and you won''t get anything useful. Check the driver documentation.
    ***Annie***

  • How to get the field of customer PO no

    I cannot get the field of customer PO no in 2LIS_11_VAHDR and 2LIS_11_VAITM , please give me a hand to tell me where to get it or how to do can get the customer PO no which in sales order overview,thanks

    Hi Jeff
    please refer SAP approved doc for data source enhancement..
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/302d4b15-5847-2a10-93bb-9c45d9f06b16
    hope this works and if still issue persists try searching in SDN for documents relating to datasource enhancement , sure u will get a lot of it.
    Thanks
    Manesh

  • How to get the field type from the database dictionary in screen painter

    hi,
    I wanted to create a new input field that input field should have the data element from the structure that i have created. How to get the data field type from the database dictionary in the screen painter

    hi
    good
    there is two kinds of evernt
    PROCESS ON HELP-REQUEST
    PROCESS ON VALUE-REQUEST.
    which ll help you to give two types of help one is f1 help and another one is f4 help
    go through this link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/47/e07f622b9911d2954f0000e8353423/content.htm
    thanks
    mrutyun

  • How to get the field texts from abap dictionary into screen Text fields

    Hi SapAll.
    here i have got to modify one zscreen by adding 1 more field,when i added one field in teh screen by just writng the code in program as SELECT-OPTIONS ilart FOR CAUFVD-ILART.
    but iam unable to get the field text for the text field from teh table CAUFVD.
    CAN ANY BODY HELP ME IN THIS.
    regards.
    varma

    Hi Varma,
    Even if you want to personalise the Text also you can do without checking the DICTREF checkbox. Dirctly you can give the text in the Text elements by using the Menu GOTO -> Text Elemetns -> Selection Texts.
    Regards
    Thiru

  • How to get the field in table.

    hi Guru,
    My Requirment is I hava table ZSample.
    Field:
    1.Name
    2.Age
    3.Class
    4.Country.
    Is it possible to get the field . Bye Coding.
    And i want store it in a StringTable.
    Regards
    Vivekananthan.S

    Hello,
    You can use ABAP RTTS for that.
    Follow the examplo below:
    DATA: itab TYPE TABLE OF sflight.
    DATA: ref_table        TYPE REF TO cl_abap_tabledescr,
          ref_struct        TYPE REF TO cl_abap_structdescr,
          fields_table     TYPE abap_compdescr_tab.
    FIELD-SYMBOLS: <field> LIKE LINE OF fields_table.
    ref_table  ?= cl_abap_tabledescr=>describe_by_data( itab ).
    ref_struct ?= ref_tb->get_table_line_type( ).
    fields_table[] = ref_struct->components.
    LOOP AT fields_table ASSIGNING <field>.
      WRITE: / <field>-name.
    ENDLOOP.
    The reference variable to CL_ABAP_TABLEDESCR describes the table . You have to cast from CL_ABAP_TYPEDESCR in order to have the reference variable ref_tb accessing both CL_ABAP_TABLEDESCR and CL_ABAP_TYPEDESCR.
    After this, you need to identify the line of this table, you do so using a reference for CL_ABAP_STRUCTDESCR. Again, cast is needed here CL_ABAPTYPEDESCR reference is
    returned from GET_TABLE_LINE_TYPE( ) method. By this way you will have access to the
    table where the fieldnames you need are described.
    After that, you can use as a common internal table.
    I've done this on WebAS 6.20, maybe in SAP 4.6 (and below) these classes won't be available.
    Also, there's an eLearning on SDN about generic programming.
    Regards,
    Eduardo

  • 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 row name of database from a form?

    Hello experts,
    I am newer in OIM and developments with the API's.
    I have this environment,
    one resource that have the attribute department
    relationship with the database row
    UD_RESOURCE1_DEPARTMENT and other resource with the same attribute in, UD_RESOURCE2_DEPARTMENT
    I am programing one java class that put values in the
    form field through the table name, sample,
    UD_RESOURCE_DEPARTMENT.
    I let some code:
    # Hash table with the value of Department
    myMap.put("UD_RESOURCE_DEPARTMENT", value);
    # and save in the resource form
    tcFormInstanceOperationsIntf tcform = (tcFormInstanceOperationsIntf)tcUtilityFactory.getUtility(dataProvider,"Thor.API.Operations.tcFormInstanceOperationsIntf");
    tcform.setProcessFormData(Long.parseLong(formKey), myMap);
    But this solution implies know the name of the field in the database and not is a global solution.
    I am interesting in know how I can obtain the name of the
    row field of the database for the atribute. Does anybody know how to obtain the row field name of database from an IT Resource or through the field name of the form?
    Is this the correct way to store data in a form?
    Thanks in advanced.

    Hi,
    Thank you.
    I have seen this function in the OTN help, but how can i get the index number. My requirment is when saving the data, I need to save both the value and the element name into the database,
    Also it is tabular block, more than one rows
    Thanks again

  • How to get the field

    Hi SAP GURUS,
    I m working in SAP  CRM5.0. when i m going to t code BUSB I m seeing the screen field and data base field. In field name (DATA BASE) I m getting 302 fields those r available in BP Screen. But in BP screen their r 2 fields (NAME_FIRST AND MC_NAME1). I m nt able to see  the NAME_FIRST field in BUSB t code but MC_NAME1 is available  How they r related.
    Thnx
    Chinu

    answeded

  • 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

  • How to get the fields in a display variant

    Hello gurus,
    I have created variants for an ALV display that I can select on my selection. This works fine.
    Now I need to know during the execution of the program what are the fields that have been selected in the display variant so that I can export the selected fields in an excel sheet that I send by mail. The file is currently being sent with all the possible fields .
    Is there a module function that allows the program to know which field is present in the display variant?
    Thanks,
    Parvez

    Hi,
    Try these:     REUSE_ALV_VARIANT_DEFAULT_GET.
         REUSE_ALV_VARIANT_F4.
    .also see the link for more Details:
    http://www.abapcode.info/2008/09/selecting-variants-for-initial-alv-list.html.
    Hope it helps.
    Regards,
    Rahul

  • How to get the total no.of fields count in TFS

    How to check this:
    You can define no more than 1,024 work item fields in the same team project collection, and you can set no more than 1,024 fields to
    reportable in all team project collections.
    I have created some new fields in my customized process template. How to get the field count to check this validation. Do we have any command for this since witadmin listfields does not give the total count info.
    Thanks
    Divya

    Hi Divya, 
    Thanks for your post.
    Try to get fields count in collection using below code snippet:
    TfsTeamProjectCollection tfs =
    new
    TfsTeamProjectCollection(new
    Uri("collectionURL"));
    tfs.EnsureAuthenticated();
    WorkItemStore workitemstore = tfs.GetService<WorkItemStore>();
    FieldDefinitionCollection fields = workitemstore.FieldDefinitions;
    // get fields count in this collection
    Console.WriteLine(fields.Count);
    //get each field name
    foreach(FieldDefinition
    field in fields)
    Console.WriteLine(field.Name);
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to determine the field size

    I am going to make a multiplatform application that hopefully
    will run on linux and windows 2000.If the os is 2000, then I will use
    vb.net/aspx else I'll use java servlets. I make the connection
    to the web server ( through HTTP) not directly to database server.
    So, the resultset will be stored in the String object. The columns
    will be separated by delimeter. Our problem is how to determine
    the size and type of the fields of mssql,oracle and postgres database
    so that we can include it in the String object.
    Ex.
    String sResultSet=new String();
    ResultSet rs=statement.executeQuery(sSQL);
    while(rs.next()){
    sResultset=sResultSet + rs.getString(field1) + "||" + rs.getString(field2) + "||";
    vertical bars acts as delimeter
    supposedly this is the code:
    sResultset=sResultSet + rs.getString(field1) +"_" + rs.getFieldType() + "_"+
    rs.getFieldSize() + "||" + rs.getString(field2) +"_" + rs.getFieldType() + "_"+
    rs.getFieldSize() + "||";
    supposedly this is the code if rs.getFieldType() and rs.getFieldSize() methods are existing
    Anyone can give me an idea how to get the field type and field size of the database?
    thanks in advance

    Yes, but I dont know how to do it.
    Can you give me an example of using it.
    Thanks in advance

Maybe you are looking for

  • External Drives not on Desktop

    I have a Power Mac G4 running on 10.5.7. 2 days ago, when I powered up, one of my Lacie drives (firewire) and my ipod (USB) no longer appeared on the desktop. They are both still interfacing, because the Lacie powers up and the ipod goes into charge

  • Add artwork to playlists or playlist folders?

    Doing so seems irrelevant in iTunes, but on my iPhone (and I presume iPods), when selecting a playlist artwork is displayed. The artwork seems to default to the first song in the playlist. But I want unique art to appear for a given playlist. I came

  • Ps3 to imac 21,5

    I want to use my imac screen for ps3. I have an "belkin mini displayport to hdmi converter". I searched on the internet and found out I had to do something with command + f2 or something but i doesn't work. Is it possible to do this and how? I think

  • Standby Database Switchover Question

    I have a Primary and a physical standby database. I have tested switchover and failover to a point. I can't get my client applications to navigate to the "new" primary DB after switchover or failover. I assume it may be something to do with my tnsnam

  • PayPal Credit Negative Balance?

    Got a statement in the mail with a negative balance saying do not pay this and my account was closed. I called the number on the statement and asked what was going on. The rep. said paypal credit owes me money and they will be sending a check?  Has a