Dynamic Table Input Field - Disabled in runtime

Hi,
I have dynamically created a node. The node as a string attribute X.
Then dynamically created a IWDTable to bind to the node.
In the table I have a column, then a tablecelleditor of inputfield.
The inputfield 'value' is binded to node->X attribute info.
inputField.bindValue(attributeInfo).
Then I created a few entries of the node, populating X with some dummy value.
In runtime, my inputfields are disabled, and the dummy values don't appear.
I believe it is something to do with my binding.
Then I replaced the inputfield with a textview. textview text is binded to the node->X
attribute info.
textview.bindText(attributeInfo)
(i.e. exact same attribute info I used for the inputfield)
In runtime I see my textview with the dummy values.
Can anyone point me in the right direction?
Cheers,
Michael.

Hi Guys,
I think to be clear I better include my code here.
I did bind the table to the nodeInfo, and I did bind the textView/inputfield to the particular attribute.
As mentioned before, it does show for the textView, but not for the inputfield.
Create the new node:
          IWDNodeInfo newNode = wdContext.getNodeInfo().getChild("nodeName");
               newNode =
                    wdContext.getNodeInfo().addChild(
                         "nodeName",
                         null,
                         true,
                         true,
                         true,
                         false,
                         false,
                         true,
                         null,
                         null,
                         null);
Create the attribute:
               IWDAttributeInfo detailAttribute =
                    newNode.addAttribute(
                         "xyz",
                         "ddic:com.sap.dictionary.string");
Get the node
                         IWDNode specificNode =
                              wdContext.getChildNode(
                                   "nodeName",
                                   0);
Create the element from the node
                         newElement =
                                   specificNode.createElement();
Set the attribute value:
                              newElement.setAttributeValue(
                                   "xyz",
                                   "1234");
Add the new element:
                              specificNode.addElement(newElement);
Create the table now:
               IWDTable someTable =
                    (IWDTable) view.createElement(
                         IWDTable.class,
                         "TAB_ArticleQty" + articleElement.getArticleId());
               someTable.setEnabled(true);
               someTable.setReadOnly(false);
               someTable.setRowSelectable(true);
               someTable.setFooterVisible(false);
               someTable.setSelectionMode(WDTableSelectionMode.NONE);
               someTable.setVisibleRowCount(-1);
               someTable.bindDataSource(
               specificNode.getNodeInfo());
               TC.addChild(someTable);
Loop at all the attributes and create the column
The code for the textView has been commented out
The code is now for the input field
                * LOOP AT ALL THE ATTRIBUTES IN THE NODE:
                * CREATE ONE COLUMN FOR EACH ATTRIBUTE
               Iterator allAttributes =
               specificNode.getNodeInfo().iterateAttributes();
               while (allAttributes.hasNext()) {
                    IWDAttributeInfo attrInfo =
                         (IWDAttributeInfo) allAttributes.next();
                    String attrName = attrInfo.getName();
                              // Text View
                              IWDTextView TV_info =
                                   (IWDTextView) view.createElement(
                                        IWDTextView.class,
                                        "TV_AQ_"
                                             + counter
                                             + attrName);
                              TV_info.bindText(attrInfo);
                              COL_qty.setTableCellEditor(TV_info);
                              //input field for the user to enter the value
                              IWDInputField input_Qty =
                                   (IWDInputField) view.createElement(
                                        IWDInputField.class,
                                        "input_Qty"
                                             + counter
                                             + attrName);
                              input_Qty.setEnabled(true);
                              input_Qty.bindValue(attrInfo);
                              input_Qty.setWidth("4");
                              COL_qty.setTableCellEditor(input_Qty);
                         someTab.addColumn(COL_qty);

Similar Messages

  • How to delete Dynamically created input field UI Element

    Hi all,
              I want to delete dynamically created input field and label.
    Is there any method please tell.
    Thanks in advance
    Hemalatha

    Hi,
    In the WDEVENT parameter of the action handler you can find the event id.
    ***Variables
      DATA:
        lv_selected  type string.          "Selected tab value
    ***Structure and internal table for the Events and messages
      DATA:
        lt_events type WDR_EVENT_PARAMETER_LIST,
        ls_events type WDR_EVENT_PARAMETER.
    ***Field symbols
      field-symbols: <fs_value> type any.   "Attribute value in events table
    ***Move the event table to lt_events
      lt_events = wdevent->parameters.
      read table  lt_events into ls_events with key name = 'SAVE'.  "Button Id
      if sy-subrc eq 0.
        assign ls_events-value->* to <fs_value>.
        if sy-subrc eq 0.
          lv_selected  = <fs_value>.
        endif.                 "IF sy-subrc eq 0.
      endif.                 "IF sy-subrc eq 0.
    Regards,
    Lekha.

  • How to get the co-ordinates of a dynamically created input field

    Hello Frn's
    i have created a dynamic text view . but this text view is not appearing at proper position . I want palce it infront of a dynamically created input field . how can i do this ?
    as i am thinking ...i should first of all  get info about the co-ordinates of   dynamaclly creatd input field . and with respect to these co-ordinates ...set the position of  text View .
    Please suggest  your thoughts .
    Thanks and Regards
    Priyank Dixit

    Hi,
    There is no provision in WD for getting screen coordinates and then placing the UI element.
    You to add the UI element to layout editor and based on the layout type it will add the UI element to respective position.
    I would advice not to create dynamic UI elements( instead you can create them statically and then play with visibility status through context binding ). This will be more effective way and less error prone. This is also recommended practice.
    still,For dynamic creation you can refer to following wiki:
    http://wiki.sdn.sap.com/wiki/display/WDABAP/CreatingUIElementsDynamicallyinAbapWebdynpro+Application
    regards
    Manas Dua

  • Dynamic output & input fields in the table control

    HI Guys,
    How can one change the attribute of  input field to output field basically greying of field) dynamically
    based on the some flag. Loop at screen does not work. I need to change the attributes
    of field 'outfiled' and output field display only'.
    Any help is highly appreciated.
    Regards,
    Harsha

    Hi Harsha,
    I generated a table control (ERP 6.2) and somewhere I found the coding like this (the name of the table control is TABLE_CONTROL):
    *&spwizard: output module for tc 'TABLE_CONTROL'. do not change this lin
    *&spwizard: get lines of tablecontrol
    module TABLE_CONTROL_get_lines output.
      g_TABLE_CONTROL_lines = sy-loopc.
    If I do a loop at the screen at this place, I can control the individual input/output for the screen fields (the table fields). In my work area (WA_CONTROL) I can see the actual value of fields. Depending on this, I choose to enable/disable input via:
    loop at screen.
    if wa_control-material <> ' '.
    screen-input = '0'.
    modify screen.
    endif.
    endloop.

  • Dynamic Format Input Field

    Hi,
    I have a table and within an input field. Dependent of a flag I would like to set the format dynamically, concret the decimal places:
    row 1 -> no decimals
    row 2 -> decimals allowed
    row 3 -> no decimals
    row 4 -> no decimals
    row 5 -> decimals allowed
    It would be very usefull, that the conversion starts directly without clicking any button or doing any navigation.
    Thanks
    Best regards
    My actual idea: 2 attributes in context node. At runtime I bind the input field to attribute 1 or attribute 2
    But how?

    Stefan Kagelmacher wrote:
    Thanks for answering,
    >
    > this solution works not fine or I do not understand it correctly. I create a node within my node. This new node has supply function and an attribut "MENGE". But how should I format the value? The value of the input field is not moved in supply funktion, value is empty.
    You have to bind the "menge" to your inputfield . This will trigger a supply function. Supply function has parameters like parent and node.
    Get the values from the Parent attributes.. calculate them and set value for menge field.
    Supply function has template code already generated. You only have to modify them.

  • Sum for Dynamic Fields in a Dynamic Table with Field Symbol

    Hi All,
    I currently have an report which I am looking to update with some totals.  The information is currently output in an ALV which is fed data from a dynamic table defined with a field symbol.  The modification that needs to be applied is a summation per currency code where each of the fields to be summed is a dynamically named field at runtime.  I am now just looking to see if anyone has any recommendations on how to obtain these totals it would be appreciated.  I have no problem doing the leg work in piecing the solution together but am just stuck on which approach I should be investigating here.  I have looked into several options but do to the fact that the totals are for dynamic fields in a dynamic table and it is a field symbol I am having some difficulties thinking of the easiest approach to obtain these totals.
    Below is a simple sample of what the report currently looks like and what we are looking to add.
    ====================================================================================
    As-Is Report:
    DETAILED DATA ALV
    Company Code  |  Plant  |  2006 Total  |  2007 Total  |  2008 Total |  CURRENCY
    0001          |   ABCD  |    1,500     |    1,200     |    1,700    |    USD
    0001          |   BCDE   |    2,300     |    4,100     |    3,600    |    GBP
    0003          |   DBCA  |    3,200     |    1,600     |    6,200    |    USD
    Addition 1:
    TOTALS PER CURRENCY
    Currency                |  2006 Total  |  2007 Total  |  2008 Total |
    USD              |    4,700     |    2,800     |    7,900    |
    GBP                       |    2,300     |    4,100     |    3,600    |
    Addition 2:
    CONVERSIONS TO USD
                                          |  2006 Curr   |  2006 USD    |  2008 Curr   |  2006 USD   |
    USD                       |  4,700 USD   |  4,700 USD   |  7,900 USD  |  7,900 USD  |
    GBP   (1.5GBP/1 USD)    |  2,300 GBP   |  1,150 USD   |  2,300 GBP  |  1,800 USD  |
    ====================================================================================
    Any recommendations will be appreciated.

    Hi,
    We cannot use the key word SUM in the loop at assigning statement.
    The way i see is
    When  you are creating the first dynamic internal table , create one more with  the structure below:
    Currency | 2006 Total | 2007 Total | 2008 Total |
    Then while populating the data into first itab,also move the contents to the second itab using collect statement.

  • Input Field Disabled in WEB UI

    Hi,
    I am new to CRM WEB UI.
    I have created Z Component and in that I have created controller and Views and model.
    I have also added all the views and models to Runtime repository.
    Created buttons for navigation which are working fine...
    I have added some fields in view via view Configuration but all the input fields are coming as disabled when I test the application.

    Hi ,
    Thanks,  S Reddy for this Post , My issue had solved.
    Thanks & Regard.
    Pappu Kumar Mehta.

  • Dynamic table - some fields of different rows in one column

    Hey guys,
    i have the following problem:
    i habe a itab with some data like:
    name | id | date | number
    pete  | 1 | 27.07 |    2
    pete  | 1 | 28.07 |    2
    pete  | 1 | 30.07 |    2
    ann   | 1 | 28.07 |    3
    ann   | 2 | 30.07 |    2
    the user can define a period of time, e.g. 28-29.07
    so my dynamic table will consist of the "hard" columns name and id and the dynamic added columns for every day:
    name | id | 28.07 | 29.07
    that's what i already have!
    so my problem is, that i have to read the data from the itab into the new dynamic table (field-symbol) like:
    name | id | 28.07 | 29.07
    pete   |  1 |    2     |    2
    ann    |  1 |    3     |    -
    i hope you can understand what i want! please give me code sample or a example report!
    many thanks in adance!
    best regards,
    ludwig

    hey Asik, you have understand what i want!
    here is my table:
    http://img181.imageshack.us/my.php?image=wh20080916113004ym8.png
    after the loop, the 4 rows should be in my field-symbol only one row (no sum)!
    but after the loop, there are to many rows! only one row is needed!
    Look at the screenshot:
    http://img185.imageshack.us/my.php?image=wh20080916113547wl0.png
    So the second row at column "tag20080801" should be initial and with the next loop, the next day "tag20080730" should be filled with the number!
    LOOP AT LT_OUT INTO LS_OUT.
      ASSIGN COMPONENT 'RESSOURCEN' OF STRUCTURE <FS_LINE> TO <fs_field>.
      <fs_field> = 'Ressource'.
      ASSIGN COMPONENT 'NAME' OF STRUCTURE <FS_LINE> TO <fs_field>.
      <fs_field> = LS_OUT-name.
      ASSIGN COMPONENT 'PROJEKT' OF STRUCTURE <FS_LINE> TO <fs_field>.
      <fs_field> = LS_OUT-PROJECTID.
      CONCATENATE 'DATE' LS_OUT-DATE INTO LF_DATE_COL.
      ASSIGN COMPONENT LF_DATE_COL OF STRUCTURE <FS_LINE> TO <fs_field>.
      <fs_field> = LS_OUT-COUNT.
      COLLECT <FS_LINE> INTO <FS_TABLE>.
    ENDLOOP.
    the right output data should look like this:
    Ressourcen | Ludwig Heinz | 20080702LHZ  | 4 | 4 | 4 | 1

  • ABAP dynamic tables add fields

    Hi, i have to extend a dynamic table like this:
    FIELD-SYMBOLS: <g_data> TYPE table.
    I have to build a custom structure with all the fields
    of g_data plus some other fixed fields.
    In other words if g_data looks like this
    AUFNR POSNR
    100   10
    200   20
    My structure must be:
    AUFNR POSNR F1  F2
    100   10    23  21
    200   20    234 32
    Thanks in advance.
    Is anybody here who haves some ideas

    Here is a sample program of how to build a dynamic internal table.
    report zrich_0003
           no standard page heading.
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>.
    data: alv_fldcat type slis_t_fieldcat_alv,
          it_fldcat type lvc_t_fcat.
    selection-screen begin of block b1 with frame title text-001.
    parameters: p_check type c.
    selection-screen end of block b1.
    start-of-selection.
      perform build_dyn_itab.
      perform build_report.
      loop at <dyn_table> into <dyn_wa>.
        write:/ <dyn_wa>.
      endloop.
    *  Build_dyn_itab
    form build_dyn_itab.
      data: index(3) type c.
      data: new_table type ref to data,
            new_line  type ref to data,
            wa_it_fldcat type lvc_s_fcat.
      clear wa_it_fldcat.
      wa_it_fldcat-fieldname  = 'AUFNR'.
      wa_it_fldcat-datatype = 'CHAR'.
      wa_it_fldcat-intlen = 12.
      append wa_it_fldcat to it_fldcat .
      clear wa_it_fldcat.
      wa_it_fldcat-fieldname  = 'POSNR'.
      wa_it_fldcat-datatype = 'CHAR'.
      wa_it_fldcat-intlen = 6.
      append wa_it_fldcat to it_fldcat .
    * Create fields
      clear index.
      do 2 times.
        index = sy-index.
        clear wa_it_fldcat.
        concatenate 'Field' index into
                 wa_it_fldcat-fieldname .
        condense  wa_it_fldcat-fieldname no-gaps.
        wa_it_fldcat-datatype = 'CHAR'.
        wa_it_fldcat-intlen = 5.
        append wa_it_fldcat to it_fldcat .
      enddo.
    * Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
                   exporting
                      it_fieldcatalog = it_fldcat
                   importing
                      ep_table        = new_table.
      assign new_table->* to <dyn_table>.
    * Create dynamic work area and assign to FS
      create data new_line like line of <dyn_table>.
      assign new_line->* to <dyn_wa>.
    endform.
    *      Form  build_report
    form build_report.
      data: fieldname(20) type c.
      data: fieldvalue(5) type c.
      data: index(3) type c.
      field-symbols: <fs1>.
      assign component  'AUFNR'  of structure <dyn_wa> to <fs1>.
      <fs1> =  '123456789'.
      assign component  'POSNR'  of structure <dyn_wa> to <fs1>.
      <fs1> =  '000001'.
      do 2 times.
        index = sy-index.
    * Set up fieldname
        concatenate 'FIELD' index into
                 fieldname .
        condense   fieldname  no-gaps.
    * Set up fieldvalue
        concatenate 'FLD' index into
                 fieldvalue.
        condense   fieldvalue no-gaps.
        assign component  fieldname  of structure <dyn_wa> to <fs1>.
        <fs1> =  fieldvalue.
      enddo.
    * Append to the dynamic internal table
      append <dyn_wa> to <dyn_table>.
    endform.
    Regards,
    Rich Heilman
    Message was edited by: Rich Heilman
    I have modified the sample to include your requirement

  • Table Input Field Problem

    Hi All,
    I am facing a problem now where table row height is too big , as in 1 row size is actually a merged of 2 rows, the input field is shifted to the bottom of the cell.  And when you select the row, an asterik is visible at the bottom row, and the input field is shifted up to the top of the cell. I am using customized iterator and cl_crm_ic_inputfield to render the cell. Anyone have this problem before?
    Thanks!
    Cheers,
    cady

    Hi Guys,
    Some additional info i found on this issue. I am using design2003. I realized that the * added meant that its required field. However, upon further checking, when calling method RENDER_DESIGN2003 in class cl_crm_ic_inputfield, it checkes for me->required is not initial, which is kind of odd since the required field has the initial value of 'FALSE'. So , either required = 'TRUE' or 'FALSE', it will always be required field. Anyone encountered such problem before?
    Cheers,
    cady

  • Dynamic table with field type table

    Hi,
    I´m using "cl_alv_table_create=>create_dynamic_table" to create a dynamic table for ALV Grid.
    But...I need to use colors in ALV, then I need to declare a field type LVC_S_SCOL in dynamic table from "cl_alv_table_create=>create_dynamic_table".
    How can I declare this in fieldcat?
    The code:
    Creating dynamic table
    DATA: table_agrup TYPE REF TO data,
            line_agrup  TYPE REF TO data.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog           = t_fieldcat
        IMPORTING
          ep_table                  = table_agrup
        EXCEPTIONS
          generate_subpool_dir_full = 1
          OTHERS                    = 2.
        ASSIGN table_agrup->* TO .
    Printing ALV
      CALL METHOD obj_grid->set_table_for_first_display
        EXPORTING
          is_variant                    = w_variant
          i_save                        = 'A'
          is_layout                     = w_layout
        CHANGING
          it_outtab                     =
          it_fieldcatalog               = t_fieldcat
          it_sort                       = t_sort
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          OTHERS                        = 4.
    Thanks.

    It is not possible with the  METHOD cl_alv_table_create=>create_dynamic_table to include another table inside that newly generated table.
    I have tried to do it with the code and I got the dynamic table created after at the end of the program.
    In the code,
    <DYN_TABLE> has same effect as your <table> variable
    <DYN_WA> has same effect as your <HEADER>
    REPORT  ZTEST_NP_DYNAMIC.
    DATA: DY_TABLE TYPE REF TO DATA,
          DY_LINE  TYPE REF TO DATA.
    FIELD-SYMBOLS: <DYN_TABLE> TYPE STANDARD TABLE,
                   <DYN_WA>,
                   <DYN_FIELD>.
    FIELD-SYMBOLS: <FS> TYPE ANY.
    * To generate the Dyanmic table with the COLOR
    DATA: LS_SOURCE TYPE STRING.
    DATA: LT_SOURCE LIKE STANDARD TABLE OF LS_SOURCE WITH HEADER LINE.
    DATA: L_NAME LIKE SY-REPID.
    DATA: L_MESSAGE(240) TYPE C,
          L_LINE TYPE I,
          L_WORD(72) TYPE C.
    DATA: L_FORM(30) TYPE C VALUE 'TABLE_CREATE'.
    LT_SOURCE = 'REPORT ZTEST_SUBROUTINE_POOL.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'FORM  TABLE_CREATE USING I_FS TYPE ANY.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'DATA: BEGIN OF LT_GENTAB OCCURS 0.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'DATA: BUKRS TYPE BUKRS. '.
    APPEND LT_SOURCE.
    LT_SOURCE = 'DATA: BKTXT TYPE BKTXT. '.
    APPEND LT_SOURCE.
    * you can add your fields here.....
    LT_SOURCE = 'DATA: COLOR TYPE lvc_t_scol. '.
    APPEND LT_SOURCE.
    LT_SOURCE = 'DATA: END OF LT_GENTAB.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'DATA: POINTER TYPE REF TO DATA.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'CREATE DATA POINTER LIKE STANDARD TABLE OF LT_GENTAB.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'I_FS = POINTER.'.
    APPEND LT_SOURCE.
    LT_SOURCE = 'ENDFORM. '.
    APPEND LT_SOURCE.
    L_NAME = 'ZTEST_SUBROUTINE_POOL'.
    CATCH SYSTEM-EXCEPTIONS GENERATE_SUBPOOL_DIR_FULL = 9.
      GENERATE SUBROUTINE POOL LT_SOURCE NAME L_NAME
               MESSAGE L_MESSAGE LINE L_LINE WORD L_WORD.  "#EC CI_GENERATE
    ENDCATCH.
    IF NOT L_MESSAGE IS INITIAL.
      MESSAGE E000(0K) WITH L_MESSAGE L_LINE L_WORD.
    ENDIF.
    ASSIGN DY_TABLE TO <FS>.
    PERFORM (L_FORM) IN PROGRAM (L_NAME) USING <FS>.
    ASSIGN DY_TABLE->* TO <DYN_TABLE>.
    * Create dynamic work area and assign to FS
    CREATE DATA DY_LINE LIKE LINE OF <DYN_TABLE>.
    ASSIGN DY_LINE->* TO <DYN_WA>.
    Write: 'bye'.
    Regards,
    Naimesh Patel

  • Input Field disabled in Web Dynpro Application

    Hi,
    I created an application with three input fields and created the corresponding context. When I start the wd app the input fields are disabled and can not be edited. The property enabled if this fields is true!
    I compared the context with other wd app in my nwds and the only thing I recognize is that in other apps, at every attribute is a litte triangle. This attribute also have one property more - it is called "Input Element".
    So my questions are:
    1. What might be the reason why I can not edit the fields?
    2. How can I configure my attributes to get this triangle?
    I appreciate any comment!
    Regards

    Wow, that was more than fast :-D
    But you are absolutely right, THANKS!!! The input fields are enabled now.
    Do you might also know how I can get this triangle? I have this problem also in an other topic ([How-to Integrate Visual Composer UIs within a CE7.11 BPM Process|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2011e628-b317-2c10-9fa7-952155e10705]). Also see [Video|http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/6065bee4-a317-2c10-4c8c-cfa1c3eac185&overridelayout=true] at minute 06:05
    Regards

  • Table input field.

    I have to create  a table which will take input from user. I have created the context and binded it to the table. At the time of biniding with table i mentioned that these will be input field. But the problem is as the node has no value the table becomes uneditable.I have to give user 5 rows for editing. Can any one tell me the steps of creating this.
    <b>If possible please provide the detail step & Sample code.
    Points will be rewarded.</b>
    Thanks,
    Prosun

    Hi Prosun,
    If you want five empty rows in the beginning Insert 5 empty lines in an Internal table and bind it to the context. You  can see 5 empty rows in ur table.
    Also if u want to add an intial line to ur table when you press add button in the toolbar of ur table.
    Provide a Add button linked wit action add
    In Action :On action add
    DATA: lo_new              TYPE REF TO if_wd_context_element,
            ls_employee         TYPE zemployee,
         lo_node type ref to if_wd_context_node.
    lo_node = wd_context-get_child_node( 'NODENAME' ).
          lo_new ?= lo_node->create_element( ).
      lo_new->set_static_attributes( ls_employee ).
      do_main_node->bind_element( new_item = lo_new
                                  set_initial_elements = abap_false ).
    Regards,
    Ismail.
    Message was edited by:
            Ismail Basha

  • Dynamically bind input field

    Hi all
    I have input field and it already binded context attribute .I am working on enhancement frame work so I can not modify propety of context attribute.My requirement is to create new attribute and bind it with input field dynamically.
    I am able to create context attribute and bind it to input field but it's not working ,can we do it dynamically????
    Pls help
    Regards Reeha

    Hi,
    if you already have a context attribute than you can do this, I just created a test application to create one input field and bind it with a context attribute dynamically.
    my context is like this:
    SUBS_TYPE_NODE   <------node name
    -SUBS_TYPE_VALUE  <----node attribute type string
    under WDDOMODIFYVIEW i did this:
    if first_time = abap_true.
    DATA:
        lr_container TYPE REF TO cl_wd_uielement_container,
       lr_input TYPE REF TO cl_wd_input_field.
    get a pointer to the RootUIElementContainer
        lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' )
        lr_input = cl_wd_input_field=>new_input_field(
        bind_value = 'SUBS_TYPE_NODE.SUBS_TYPE_VALUE'  "notice here how I passed the node and its attribute
        id =   'INPUT_F1'
        view =  view ).
        cl_wd_matrix_data=>new_matrix_data( element = lr_input ).
        lr_container->add_child( lr_input ).
    endif.
    hope this helps...
    AS.

  • Table Input field validation

    Hi Experts
    I have an OIF Application in which I have an Input enabled table and it is mandatory to enter the date range fields. When the user clicks 'SAVE', I have to validate if the start and end dates are entered in each record, and give an error message if blank. I wanted to know if I have to loop through each record and validate manually or if there is a better way?
    Thanks
    Neo

    Hello Neo,
    you can use the utility method CL_WD_DYNAMIC_TOOL=>CHECK_MANDATORY_ATTR_ON_VIEW to check for the mandatory attributes.
    For this you need to set the STATE property of the inputfield (in the table column) to REQUIRED.
    BR, Saravanan

Maybe you are looking for