Accessing dynamic field names?

I want to be able to create text fields with unique names and
set values in them within a For-loop without having to reference
the field names in the code.
Consider the following code snippet:
this.createTextField("field" + i, this.getNextHighestDepth(),
x1, y1, 250, 20);
It places a text field into a movie clip with name that is a
composite of a literal value and a variable value resulting in
names like field1, field2, etc. My question: Is there anyway to use
a composite field name to access the field properties? For example:
Can I set the text for the field using the same composite name
without having to express it as a literal field name? If I can't
then what is the point of having the composite name capability?

You can drop the last question because the answer to the
prior one(s) is "yes".
this["field"+i].text = "whatever";
the bracket notation causes a string to be evaluated as an
object/instance.

Similar Messages

  • Accessing ArrayCollection Field Names

    Hello, this may sound like a n00b questoin but, I have an array collection which looks like the below:
        public var topFive:ArrayCollection = new ArrayCollection([
             {Month:"GAME_Redemptions"},
             {Month:"TALLINK_Redemptions"},
             {Month:"YvesRocher_Redemptions"},
             {Month:"ETAM_Redemptions"}
    With a loop for example, if I want to access the Value, I would type, topFive[i].month. However, if I want to access the Field name what would be the code. Im assuming it would be something like topFive[i] - but this does not return the desired output.
    Does anyone know how to do this? I wanted to avoid having to put the array into a datagrid and then extracting the values from there.
    Please help!
    Craig

    Thanks for your response, much appreciated. It works perfectly. Do you know how to delete a whole column out of an array coll
    ection?
    e.g.
        private var topFive:ArrayCollection = new ArrayCollection([
                     {Month:"GAME_Redemptions", value:10},
                     {Month:"TALLINK_Redemptions", value:10},
                     {Month:"YvesRocher_Redemptions",value:10},
                     {Month:"ETAM_Redemptions",value:10}
    To
                     {Month:"GAME_Redemptions"},
                     {Month:"TALLINK_Redemptions"},
                     {Month:"YvesRocher_Redemptions"},
                     {Month:"ETAM_Redemptions"}

  • How to access dynamic fields in a field symbol

    hi
    how do i access the dynamic fields created in side a field-symbol....
    wht i mean is i have a table, whose workarea i assign to field symbol. but this table is runtime, altough i have debugged and found the values in this table, I want to accees the field symbol in a generic way.
    say the table has 3 fields now fld1 fld2 and fld3 so i want to access the field symbol <fs> as <fs>-(name) where name can be anything fld1 or fld2 whichever i assign....
    thanks. Let me know if you have any further questions.

    Field symbols are placeholders or symbolic names for other fields. They do not physically reserve space for a field, but point to its contents. A field symbol cam point to any data object. The data object to which a field symbol points is assigned to it after it has been declared in the program.
    Whenever you address a field symbol in a program, you are addressing the field that is assigned to the field symbol. After successful assignment, there is no difference in ABAP whether you reference the field symbol or the field itself. You must assign a field to a field symbol before you can address it in a program.
    Field symbols are similar to de-referenced pointers in the C programming language (that is, pointers to which the content operator * is applied). In ABAP, data references represent a real equivalent to pointers in the sense of variables that contain a memory address and can be used without the contents operator.
    All operations programmed with field symbols are applied to the field assigned to it. A MOVE statement between two field symbols, for example, assigns the contents of the field assigned to another source field symbol to the field assigned to the target field symbol. The field symbols themselves point to the same fields after the MOVE statement as they did before the MOVEstatement.
    You can create field symbols either without or with type specifications. If you do not specify a type, the field symbol inherits all of the technical attributes of the field assigned to it. If you do specify a type, the system checks during the field assignment whether the assigned field matches the type of field symbol.
    Field symbols provide greater flexibility when you address data objects:
    ·        You can assign one field symbol to another, which allows you to address subfields.
    ·        Assignments to field symbols may extend beyond field boundaries. This allows you to address regular sequences of fields in memory efficiently.
    ·        You can also force a field symbol to take different technical properties than those of the field assigned to it (casting).
    The flexibility of field symbols provides elegant solutions to certain problems. On the other hand, it does mean that errors can easily occur. Since fields are not assigned to field symbols until runtime, the effectiveness of syntax and security checks is very limited for operations involving field symbols. This can lead to runtime errors or incorrect data assignments.
    While runtime errors indicate an obvious problem, incorrect data assignments are dangerous because they can be very difficult to detect. For this reason, you should only use field symbols if you cannot achieve the same result using other ABAP statements.
    For example, you may want to process part of a string where the offset and length depend on the contents of the field. You could use field symbols in this case. The MOVE statement (with your own auxiliary variables, if required) is much safer than using field symbols, since it cannot address memory beyond the boundary of a field. However, field symbols may improve performance in some cases.
    To declare a field symbol, use the statement
    FIELD-SYMBOLS  .
    For field symbols, the angle brackets are part of the syntax. They identify field symbols in the program code.
    If you do not specify any additions, the field symbol.
    in a static ASSIGN and:
    ASSIGN (dobj) TO  from the second loop pass onwards.

  • Dynamic field name in an assignment statement

    Greetings,
    Is it possible to make the field name of an assignment dynamic?
    For example if I have two text fields called P1_F1 and P1_F2. Is it possible to
    do something like this?
    declare
    X number := 0;
    begin
    X := 1;
    :P1_F || X   = 'value1';
    X := 2;
    :P1_F || X   = 'value2';
    end;Any suggestions would be appreciated.
    Thanks
    Larry

    Use the <tt>apex_util.set_session_state</tt> API method.

  • Spaces within access db field name

    I am trying to use data which was extracted to a excel file
    then imported into a access database.
    During the import access database used the first roll to be
    the field name and some names has space within.
    When I try to access those field inside CF and i will get a
    error message since the CF won's understand any field names with
    space inside the name.
    Is there a work around? Since change the field name each time
    will take lots of time beacuse the db will be exported every day.
    Thanks

    Is there a work around? Since change the field name each time
    will take
    lots of time because the db will be exported every day.
    Thanks
    Yup, two of 'em even.
    The first is in the SQL language, you can alias the columns
    with the AS
    command. This one is probably preferred by most developers.
    SELECT ['Column With Spaces'] AS NoSpaces
    FROM aTable
    Secondly you can use the array notation ability of ColdFusion
    to
    reference variables with bad names. For queries that would be
    queryName[columnName][row].
    <cfoutput query="aBadQuery">
    #aBadQuery["Column With Spaces"][currentRow]#
    </cfoutput>

  • Dynamic field names in internal operations

    Dear experts,
    I have a period range in selection screen (peri_from and peri_to); I have to work on an internal table (defined like COSP) where I have amount1 amount2...amount16, in other words one field for each period...
    I have to sum up only amounts within the period range as in selection screen...
    How can I do this dynamic summation ?
    Example:
    peri_from = 004
    peri_to = 006
    Then my code must calculate:
    result = amount4 + amount5 + amount6.
    Thanks in advance for any useful suggestion (field symbol ?)
    Bye,
    Roberto

    Hi roberto,
    1. We have to use
       a) field-symbols
       b) dynamic variable name (for field1,field2)
    2. Just as u want.
       (just copy paste)
    3. It will ask
        a) from , to
        b) print the sum
    4.
    report abc.
    DATA : AMOUNT1 TYPE I,
           AMOUNT2 TYPE I,
           AMOUNT3 TYPE I,
           AMOUNT4 TYPE I,
           AMOUNT5 TYPE I.
    DATA : VARNAME(30) TYPE C.
    FIELD-SYMBOLS : <fs>.
    DATA : CTR TYPE I.
    DATA : CTRC(2) TYPE C.
    DATA : TOT TYPE I.
    PARAMETERS : MYFROM TYPE I DEFAULT 2.
    PARAMETERS : MYTO TYPE I DEFAULT 5.
    start of selection
    START-OF-SELECTION.
      AMOUNT1 = 1.
      AMOUNT2 = 2.
      AMOUNT3 = 3.
      AMOUNT4 = 4.
      AMOUNT5 = 5.
      CTR = MYFROM - 1.
      DO.
        CTR = CTR + 1.
        IF CTR > MYTO.
          EXIT.
        ENDIF.
        CTRC = CTR.
        CONCATENATE 'AMOUNT' CTRC INTO VARNAME.
        ASSIGN (VARNAME) TO <FS>.
        TOT = TOT + <FS>.
        WRITE :/ <FS>.
      ENDDO.
    WRITE TOTAL
    WRITE :/ TOT.
    regards,
    amit m.

  • Dynamic field names in ALV (referencing to the month)

    Hi,
    I have 12 fields in my ALV, named Monthly Sales 1, Monthly Sales 2 and so on until Monthly Sales 12.
    Monthly Sales 12 corresponds to the current month and Monthly Sales 1 is the current month minus 11 months (in terms of the month.)
    So the user has requested that instead of Monthly Sales 12, it should display M 06/2007 as the field name.
    Or Monthly Sales 11 should display M 05/2007 and so on.
    How can this be done?
    Please help.
    Points will be awarded and all responses will be greatly appreciated.
    Thanks,
    John

    Hi,
    I have done some coding for this which is as follows:
    TYPE-POOLS : abap, slis.
    DATA : BEGIN OF itab OCCURS 0,
            month1 TYPE char2,
            month2 TYPE char2,
            month3 TYPE char2,
            month4 TYPE char2,
            month5 TYPE char2,
            month6 TYPE char2,
            month7 TYPE char2,
            month8 TYPE char2,
            month9 TYPE char2,
            month10 TYPE char2,
            month11 TYPE char2,
            month12 TYPE char2,
            month13 TYPE char2,
           END OF itab.
    DATA wa LIKE LINE OF itab.
    DATA : it_fieldcat     TYPE     slis_t_fieldcat_alv WITH HEADER LINE.
    DATA : is_layout     TYPE     slis_layout_alv.
    DATA : len TYPE i VALUE 0,
            text TYPE string,
            date TYPE sy-datum,
            index TYPE numc3.
    DATA : ref_table_des TYPE REF TO cl_abap_structdescr.
    DATA : l_t_fields TYPE abap_compdescr_tab.
    DATA : fs_fields  TYPE abap_compdescr.
    *To get the fields of internal table
    ref_table_des ?=
            cl_abap_typedescr=>describe_by_data( wa ).
    APPEND LINES OF ref_table_des->components TO l_t_fields.
    DESCRIBE TABLE l_t_fields LINES len.
    DO len TIMES.
      index = sy-index - 1.
      CLEAR date.
      READ TABLE l_t_fields INTO fs_fields INDEX sy-index.
      CALL FUNCTION 'CCM_GO_BACK_MONTHS'
        EXPORTING
          currdate   = sy-datum
          backmonths = index
        IMPORTING
          newdate    = date.
      CONCATENATE date4(2) date0(4) INTO text SEPARATED BY '/'.
      it_fieldcat-fieldname = fs_fields-name.
      it_fieldcat-tabname = 'ITAB'.
      it_fieldcat-seltext_l = text.
      APPEND it_fieldcat.
    ENDDO.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        it_fieldcat   = it_fieldcat[]
      TABLES
        t_outtab      = itab[]
      EXCEPTIONS
        program_error = 1
        OTHERS        = 2.
    I feel this is bit generic.
    Copy & execute this program.
    Reward if its useful.
    Regards,
    Sail

  • Create dynamic field names

    I'm creating a PDF form using iText which takes information from a webpage which has multiple order entries. On my PDF i need to loop through this list and create individual PdfFormFields. The problem is I do not know how many items are ordered. How can I create different form fields?
    i.e.
    for(int i=0; i<orderVector.size(); i++) {
    PdfFormField qty = text.getTextField();
    // each time it loops i need qty to be a different name like qty1, qty2....
    // how do I accomplish this?
    Thanks for you help.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    How can I create different form fields?You can't dynamically set variable names. But the good news is that you don't
    have to.PdfFormField[] qtyArr = new PdfFormField[orderVector.size()];
    for(int i = 0; i < orderVector.size(); i++) {
        qtyArr[i] = text.getTextField();
    }This creates just the right number of form fields, referred to as qtyArr[0], qtyArr[1], etc.
    Is there some reason why you are using Vector and not ArrayList?

  • Dynamic Column name in a Cursor

    Hello there,
    How can I access data in cursor's field with dynamic fields names, more illustration follows:
    My table has columns named as C1,C2,C3 so on
    defined a cursor cursor_name on that table,
    I need to access the fields by a loop like this:
    OPEN cursor_name;
    Fetch cursor_name into rec;
    for i in 1 .. 10 loop
    if rec.ci = 1Then
    end if;
    end loop
    close cursor_name;
    where rec,ci represents the name of the cursor fields, so that I loop over them,
    how can I implement such an idea,
    thanks in advance
    regards

    Thanks Bily, and user10715047,
    actually the reason behind the need of such an approach, is as following:
    assume that I have table of set of logical conditions, " LOGICAL CONDITIONS" has three columns: ID, Condition_name and the logical_condition, example:
    1, c1,  x = 1
    5, c2,  y = 2
    10, c3, p = 3 where ID is just a sequence to identify the records from each other "primary key"
    assume that I need to provide the possible combination of the result of applying each of the conditions, for example :
    if c1 = 1 ,c2= 0 and c3= 1 then  my result must be 1 ' This according some predefined rulesso that I created table which contains all the possible logical conditions, ( as the max number of logical conditions are known)
    defined as follows : combination( combination_ID, c1, c2, c3, c4, ....cmax, result)
    sample record:
    combination_ID, c1,  c2, c3, .. c max, result
              100,   1,    0,   1, ....., 1, 1in the PL/SQL procedure, I would get all the needed combination, into a cursor, then to optimized the code, I need to access the fields ( which is the Ci) in a loop
    for i in 1..3 loop
    if cursor_rec.ci = 1 then
    Action
    end if;
    end loop;the dynamic name I meant in my first post was this : cursor_rec.ci ,
    so that I can access the cursor's fields without the need to name them one by one, as there could be long sequence of conditions to be checked.
    hope that I made the idea clearer, Any suggestions, please !
    anyway I will give the DBMS_SQL cursors a shot , try if I can use to implement the purpose,
    as I know similar dynamical variable names, is available in Java,
    Regards,

  • Materialized view with dynamic column names !

    hello,
    i need some help , i'm trying ( i got no where so far :) ) to create a materialized
    view that has dynamic field name values , so every time the view is refreshed
    the fields are renamed.
    i have been asked to create a decade summary view and to assign year values to field names,the years should be table columns ( not rows !? ) and thus i should reflect this fact to the column names.
    i know its a wierd request but is there anway to do it ?
    i dunno about it at least,
    Thanks !

    ...or you could define the materialised view neutrally e.g. with columns like YEAR1, YEAR2 etc.
    Then create a dynamically-defined view on top of this view, after it's refreshed, using the relevant years as column names. SELECT year1 AS "1991", year2 AS "1992" etc.
    I still don't see how anybody is going to use these views as they won't know what the "year" columns are called.
    And if the same materialised view is going to have different sets of data each time it's refreshed i.e. different sets of years, are you re-defining the selection criteria each time? If so, why not just define separate views?
    It's a weird world out there...

  • How to dynamicly create a field name AND access it

    All,
    I am trying to build a code block that will access what amounts to a table structure inside a table. I have 38 occurances if a set of 3 fields. (Source system had an internal array/occurs clause that was converted for our ODS into individual fields) I am returning a single row as a row type and have addressability to all fields. What I am trying to avoid is coding my logic block 38 times, 1 for each occurance.
    FOR X IN 1 .. 38 LOOP
    V_CAT_CD_X := 'CAT_'||X||'_CD';
    End Loop;
    The following is the display of the correctly built field:
    --> Loop Cat CD: CAT_1_CD Rec count:1 Loop counter:1
    --> Loop Cat CD: CAT_2_CD Rec count:1 Loop counter:2
    --> Loop Cat CD: CAT_3_CD Rec count:1 Loop counter:3
    --> Loop Cat CD: CAT_4_CD Rec count:1 Loop counter:4
    My problem is that my row cursor PP1 is addressable hardcoding PP1.CAT_1_CD or PP1.CAT_2_CD ect, however I am having problems using my created string to access the field.
    What do I need to do to gain accessability via this method?
    I do have the ability to select the column names from the system tables but even then, I am lacking addressability to my ROW type using the selected field name.
    Thanks
    Greg

    Not sure if this is what you are looking for:
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2  my_cur SYS_REFCURSOR;
      3  v_rec mytest%rowtype;
      4  cursor c1 is select column_name from all_tab_cols where table_name = 'MYTEST';
      5  v_sql_stmt VARCHAR2(1000) := NULL;
      6  BEGIN
      7  v_sql_stmt := 'SELECT ';
      8  FOR I IN c1 LOOP
      9  v_sql_stmt := v_sql_stmt||I.column_name||',';
    10  end loop;
    11  v_sql_stmt := RTRIM(v_sql_stmt,',');
    12  v_sql_stmt := v_sql_stmt||' FROM mytest';
    13  open my_cur for v_sql_stmt;
    14  LOOP
    15  FETCH my_cur INTO v_rec;
    16  EXIT WHEN my_cur%NOTFOUND;
    17  dbms_output.put_line(v_rec.a);
    18  END LOOP;
    19 close my_cur;
    20* end;
    SQL> /
    1
    2
    PL/SQL procedure successfully completed.
    SQL> Edited by: AP on Nov 17, 2010 5:29 AM

  • Create dynamic directory name from form field on Sharepoint

    Trying to save pdf file to sharepoint site using URL; but need to create directory (initially) and filename dynamically. After directory created addtn'l files may populate dir, so need to check for directory exists; if so just copy files to dir based on field name. I'm able to save files to hard-coded location only, based on below.
    How to check and/or create dynamic directory base don field name?
    // folder level JavaScript to allow access to the identity object properties
    trustedIdentity = app.trustedFunction( function (sProperty)
    var iProperty = "";
    app.beginPriv();
    iProperty = identity[sProperty];
    app.endPriv();
    return iProperty;
    // folder level JavaScript to allow Save As population of file name
    mySaveAs = app.trustPropagatorFunction(function(myForm, path)
         app.beginPriv();
         var myForm = event.target;
         return rtn = myForm.saveAs(path);
         app.endPriv();
    myTrustFunct = app.trustedFunction(function(myForm, path)
         app.beginPriv();
         var vTest1 = event.target.xfa.resolveNode("topmostSubform[0].Page1[0].Test1[0]").rawValue.toString();
         var vTest2 = event.target.xfa.resolveNode("topmostSubform[0].Page1[0].Test2[0]").rawValue.toString();
         var vTest3 = event.target.xfa.resolveNode("topmostSubform[0].Page1[0].Test3[0]").rawValue.toString();
         var vTest4 = event.target.xfa.resolveNode("topmostSubform[0].Page1[0].Test4[0]").rawValue.toString();         
         var vpdf_url=location.href;location.href='http://mysite2010.com/documents
         var vPath = "/vpdf_url/" + vTest1 + Test2  + vTest3 + " .pdf";
              //console.println("vPath: " + vPath);
         var retn = mySaveAs(myForm, vPath);
         app.endPriv();
         return retn;

    Acrobat/Reader cannot create a directory. The directory needs to exist before Acrobat/Reader can save a PDF file to that directory.
    You could create a plug-in and use that plug-in to create the directory. The plug-in should also be able to determine if the directory exists or not.
    SharePoint can be tricky because it is not like most web sites. There is a special dash board that helps manage the different parts of SharePoint like list, folders, web parts, documents, etc so you may need to be aware of these features and adjust for them.
    For  folder level functions, I would not use any LiveCycle JavaScript variations. The folder level scripts are shared and accessible by Acrobat forms.

  • Dynamic field access in internal tables

    Hi everyone.
    I woulkd like to know if there is any way to identify the fields of an internal table at runtime. I'm creating a method in a class, and i would like to accept any itab as a paramter and then access the fields of that itab. I currently have the itab passing no problem using field symbols, and i am able to loop at the data, but i am unsure how to get the field names.
    Any suggestions?
    Thanks!

    Hi,
    Check the code below:
    REPORT ZYKTEST3 .
    DATA: d_ref TYPE REF TO data,
    d_ref2 TYPE REF TO data,
    i_alv_cat TYPE TABLE OF lvc_s_fcat,
    ls_alv_cat LIKE LINE OF i_alv_cat.
    TYPES: tabname LIKE dcobjdef-name ,
    fieldname LIKE dcobjdef-name,
    desc LIKE dntab-fieldtext.
    PARAMETER: p_tablen TYPE tabname. -
    > Input table field
    DATA: BEGIN OF itab OCCURS 0.
    INCLUDE STRUCTURE dntab.
    DATA: END OF itab.
    FIELD-SYMBOLS : <f_fs> TYPE table,
    <f_fs1> TYPE table,
    <f_fs2> TYPE ANY,
    <f_fs3> TYPE ANY,
    <f_fs4> type any,
    <f_field> TYPE ANY.
    REFRESH itab.
    CALL FUNCTION 'NAMETAB_GET' -
    > Fetches the fields
    EXPORTING
    langu = sy-langu
    tabname = p_tablen
    TABLES
    nametab = itab
    EXCEPTIONS
    no_texts_found = 1.
    LOOP AT itab .
    ls_alv_cat-fieldname = itab-fieldname.
    ls_alv_cat-ref_table = p_tablen.
    ls_alv_cat-ref_field = itab-fieldname.
    ls_alv_cat-seltext = itab-fieldtext.
    ls_alv_cat-reptext = itab-fieldtext.
    APPEND ls_alv_cat TO i_alv_cat.
    ENDLOOP.
    internal table build
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
    it_fieldcatalog = i_alv_cat
    IMPORTING
    ep_table = d_ref.
    ASSIGN d_ref->* TO <f_fs>. -
    > Dynamic table creation with fields of the table
    DATA: l_field TYPE fieldname,
    l_field1 type fieldname.
    SELECT * FROM (p_tablen) INTO CORRESPONDING FIELDS OF TABLE <f_fs>.
    Fetching of the data from the table
    LOOP AT <f_fs> ASSIGNING <f_fs2>.
    Here u can check the validations and process
    ASSIGN COMPONENT 2 OF STRUCTURE <f_fs2> TO <f_fs3>.
    ASSIGN COMPONENT 3 OF STRUCTURE <f_fs2> TO <f_fs4>.
    IF sy-subrc = 0.
    MOVE <f_fs3> TO l_field.
    MOVE <f_fs4> TO l_field1.
    WRITE:/1 l_field(20),
    22 l_field1(10).
    ENDIF.
    ENDLOOP.
    Regards
    Kannaiah

  • [ Help ] accessing a dynamic field of a dynamic structure.

    Hello Gurus,
    I'm trying to make a dynamic FM, but i'm facing a problem that i'm not able to solve. I'll post my code and explain it.
    DATA: v_table_data TYPE REF TO data.
    FIELD-SYMBOLS: <fs_values> TYPE  ANY TABLE,
                                 <fs_wa_values> TYPE ANY,
                                 <fs_field>.
      DATA: BEGIN OF t_range OCCURS 0,
             sign,
             option(02),
             low TYPE string,
             high TYPE string,
             END OF t_range.
    IF v_pai is INITIAL.
               CREATE DATA v_table_data TYPE TABLE OF (t_hierarquia-tabela). " Here i have a value that is a name of a table.
               ASSIGN v_table_data->* TO <fs_values>.
               CREATE DATA v_table_data LIKE LINE OF <fs_values>. " Here i'm trying to declare a structure.
               ASSIGN v_table_data->* TO <fs_wa_values>.
               MOVE t_hierarquia-pai TO v_pai.
               SELECT (t_hierarquia-ID_PRIMARIO) FROM (t_hierarquia-tabela)
                 INTO CORRESPONDING FIELDS OF TABLE <fs_values>     
                 WHERE (condition).
    *** t_hierarquia-ID_PRIMARIO is a field of t_hierarquia-tabela wich i need to access the value and pass to  t_range-low.
               LOOP AT <fs_values> INTO <fs_wa_values>.
                 ASSIGN (t_hierarquia-ID_PRIMARIO) TO <fs_field>.
                 t_range-option = 'I'.
                 t_range-sign = 'EQ'.
                 t_range-low = <fs_wa_values>-<fs_field>.
                 APPEND t_range.
               ENDLOOP. 
             ENDIF.
    But when i'm trying to activate the code above i'm getting the following error " The data object "<FS_WA_VALUES>" has no structure and therefore no component called "<FS_FIELD>".
    I've already tried a lot of things but i can't solve this problem. May someone help me with this?
    Remembering i need access the field dynamically.
    Regards,
    Rafael
    Moderator Message: Please use the code tags while posting code snippets
    Edited by: Suhas Saha on Jun 28, 2011 6:20 PM

    Rafael_Valim wrote:
    >              ASSIGN COMPONENT t_hierarquia-ID_PRIMARIO OF STRUCTURE <fs_values> TO <fs_field>.
    > But i'm still getting the same error. Any other advice?
    My advice is read the F1 help & Online documentation carefully. Actually this is a FAQ & has been discussed many times in the forums. Your syntax is not correct!
    If all of these fail try [this|http://lmgtfy.com/?q=ASSIGNCOMPONENTABAP].
    BR,
    Suhas
    PS: Spoon feeding is not encouraged in the forums.

  • Accessing dynamically created fields

    Hi,
    I have a html that has an input field on it. Say we enter a number( e.g. 5) and submit the html.
    The html transfers control to 1. jsp which creates input fields based on the number entered. In the above example 5 input(text) fields are created dynamically.
    Once I submit 1.jsp, it transfers control to another 2.jsp.
    In 2.jsp, I need to access the values entered in the 5 fields on 1.jsp.
    request.getparameter() returns value only from the 1st field (out of the 5 fields). How to access the remaining fields ?
    Any help is really appreciated.
    Thanks,

    Thanks a lot. That worked!!!!
    Even the ordering seem to be ok.
    With your other suggestion, I had tried that before but that did not work.
    I created field names as field1,field2..etc on the fly and stored this in a String variable - fileName.
    <% fileName = fileName concatinated with number %>
    <input type = "text" name=fileName > Note: There are no quotes around fileName. So fileName could be fileName1, fileName2 etc
    (I don't think the quotes around name attribute really matters.)
    When I say request.getparameter("fileName") it returned only the 1st fileName. Let me know what youythink.
    Thanks again.

Maybe you are looking for