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.

Similar Messages

  • 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

  • How to delete dynamically created attribute

    Hi,
      I am creating table dynamically according to no of columns. first time its displaying correctly, second time once i changed the no of columns its throwing error message like:
    com.sap.tc.webdynpro.progmodel.context.ContextException: DataNodeInfo(DynamicView.TableNode): duplicate name for attribute name0.
    Everytime before creating table i tried  following commands.
    table.removeAllColumns();
    but still i am getting error.
    Help me out in this....
    Regards
    Suresh KB

    hi suresh
    table.removeAllColumns();
    will remove all the columns from the view.
    but when u create the context attributes they are already existing. So it is giving the duplicate context exception.
    To solve this problem, first delete all the attributes created dynamically. using below code.
    wdcontext.node<urnode>().reset(<b>False</b>).
    it will delete all the attrbutes created at runtime.
    to delete attrbutes created at designtime use.
    wdcontext.node<urnode>().reset(<b>True</b>).
    Regards
    Brahmanandam.A
    collections created at design time will be preserved.  All dynamically
    added nodes and attributes are destroyed from the metadata.<p>
    Calling reset(true) is functionally equivalent to calling reset().<p>

  • How to delete dynamically created nodes?

    Hello Colleagues,
    In our screen we have a push button which adds one node to the context when used. The node is having a few fields which are shown in the UI.
    So as you keep on pressing the button, additional rows will be appended on the screen.
    Now, I have added another button on each of these rows. On clicking of which it should remove the row (the node). So each time you press the button 'Add element', additional rows will be appended, and each row will have a button 'Remove Element'.
    But, the problem I am facing is in the implementation of 'Remove Element'.
    The button 'Remove Element' is mapped to an action. But since there are as many 'Remove Element' buttons as there are rows, how do I identify which node is to be deleted ?
    I have tried with get lead selection etc. but it didnt work.
    Is there any way we can find out which UI element has trigerred the deletion, in the code of 'onactionSOMETHING' ?
    Thanks
    Gagan

    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 delete Thr created functional module dynamically

    Hi All,
    How to delete Thr created functional module dynamically
    Regards,
    Lisa
    Message was edited by:
            Lisa Roy

    Hi,
    You can use the function module RS_FUNCTION_DELETE to do that.
    Make sure you are not deleting any standard FM's.
    Example
          call function 'RS_FUNCTION_DELETE'
               exporting
                    funcname          = 'ZFM_NAME" " Function modue name
                    suppress_popups   = 'X' " TO suppress any pop-ups that come when you delete
               exceptions
                    error_message     = 1
                    cancelled         = 2
                    function_released = 3
                    others            = 4.
    Regards,
    Sesh

  • Creating Input Field inside Docking Container bar

    Hello.
    Does anyone know how I can put an input field inside a docking container object ? Just like it appears in SE80.
    I have created a docking container bar, and in one of those bars i want to put a text field.
    Anyone please ?
    Thank you
    EDIT----
    I found how to do this with cl_gui_container_bar_2 and with dynamic documents.
    Edited by: Ricardo Monteiro on Aug 25, 2010 1:30 PM

    Hi,
    Check Program SAPSIMPLE_TREE_CONTEXT_MEN_DEM and check event node_context_menu_request
    Hope this helps you.
    Thanks,
    Prashanth
    Edited by: Prashanth KR on Jun 2, 2009 7:50 AM

  • How to enable/disable the input fields based on the data entered/user action in the web dynpro abap?

    How to enable/disable the input fields based on the data entered in the web dynpro application abap?  If the user enters data in one input field then only the next input field should be enabled else it should be in disabled state. Please guide.

    Hi,
    Try this code.
    First create a attribute with the name readonly of type wdy_boolean and bind it read_only property of input field of which is you want to enable or disable.
    Next go to Init method.
    Set the readonly value as 'X'.
    DATA lo_el_context TYPE REF TO if_wd_context_element.
         DATA ls_context TYPE wd_this->element_context.
         DATA lv_visible TYPE wd_this->element_context-visible.
    *   get element via lead selection
         lo_el_context = wd_context->get_element( ).
    *   @TODO handle not set lead selection
         IF lo_el_context IS INITIAL.
         ENDIF.
    *   @TODO fill attribute
    *   lv_visible = 1.
    *   set single attribute
         lo_el_context->set_attribute(
           name =  `READONLY`
           value = 'X').
    After that Go to the Action  ENTER.
    First read the input field ( first input field, which is value entered field) , next give a condition
    if input value is not initial  then set the readonly value is '  '.
    DATA lo_nd_input TYPE REF TO if_wd_context_node.
         DATA lo_el_input TYPE REF TO if_wd_context_element.
         DATA ls_input TYPE wd_this->element_input.
         DATA lv_vbeln TYPE wd_this->element_input-vbeln.
    *   navigate from <CONTEXT> to <INPUT> via lead selection
         lo_nd_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
    *   @TODO handle non existant child
    *   IF lo_nd_input IS INITIAL.
    *   ENDIF.
    *   get element via lead selection
         lo_el_input = lo_nd_input->get_element( ).
    *   @TODO handle not set lead selection
         IF lo_el_input IS INITIAL.
         ENDIF.
    *   get single attribute
         lo_el_input->get_attribute(
           EXPORTING
             name =  `VBELN`
           IMPORTING
             value = lv_vbeln ).
    if lv_vbeln IS not INITIAL.
        DATA lo_el_context TYPE REF TO if_wd_context_element.
        DATA ls_context TYPE wd_this->element_context.
        DATA lv_visible TYPE wd_this->element_context-visible.
    *  get element via lead selection
        lo_el_context = wd_context->get_element( ).
    *  @TODO handle not set lead selection
        IF lo_el_context IS INITIAL.
        ENDIF.
    *  @TODO fill attribute
    *  lv_visible = 1.
    *  set single attribute
        lo_el_context->set_attribute(
          name =  `READONLY`
          value = ' ' ).

  • How can we change the input field on a view stop showing zeros

    Hello,
           To make screen look consistent with other character input field. How can we change the input field on the view stop displaying zeros even though the data type is NUMC and data type should not be change?
    Edited by: sap_learner on Mar 25, 2010 5:44 PM
    Edited by: sap_learner on Mar 25, 2010 5:49 PM
    Edited by: sap_learner on Mar 25, 2010 5:55 PM

    hello Manas Dua,
                           Thanks for your help. I am able to resolve my problem.
    My code will help  the future comers to resolve this kind of issues.
    *The code is applied to method WDDOINIT of the default view.
      DATA lo_nd_terms_input    TYPE REF TO if_wd_context_node.
      DATA lo_nd_terms_input_i TYPE REF TO if_wd_context_node_info.
      DATA lv_zeros             TYPE wdy_attribute_format_prop.
      lv_zeros-null_as_blank = 'X'.
      lo_nd_terms_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
      lo_nd_terms_input_i = lo_nd_terms_input->get_node_info( ).
      lo_nd_terms_input_i->set_attribute_format_props(
        EXPORTING
          name              = `ENTER THE ATTRIBUTE NAME`
          format_properties = lv_zeros     ).
    Edited by: sap_learner on Mar 26, 2010 5:02 PM

  • How to delete data from single field in a database table?

    Hi guys,
         Plz suggest me How to delete data from single field in a database table?
    thnks,
    pavan

    hi
    in addition to abv details..chk this:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3aef358411d1829f0000e829fbfe/content.htm
    http://dev.mysql.com/doc/maxdb/en/34/ee7fbd293911d3a97d00a0c9449261/content.htm
    regards,
    madhu

  • How to delete order created against notification

    hi gurus,
    Someone tell me how to delete order created against notification. & also PR created against it.
    Regards,
    Radhika

    Hello
    You can set the deletion flag only when the order is business completed - CLSD status (no open costs remaining on the order). Deletion flag is set to the order when you want to archive the order. Till the order has a CLSD status, the del flag setting in the menu will remain inactive.
    Any open PR created against the order is automatically set to deletion when the order is set to TECO - tech completed status.
    For your scenario:
    If you dont want to use the order and the order is with CRTD status - you can set the 'Do not Execute' flag. It will set the order to CLSD and NCMP (Not completed) status. this will also delete your PR
    In case your order is already released - you will have to set the CLSD status for your purpose
    Regards
    Kartik

  • Dynamically created text field doesn't appear when imported

    Greetings,
    I have 2 issues regarding dynamically created text fields.
    What I'm trying to do is to create a text field inside a swf file,
    then import that swf into another file. The main problem is, the
    text field is created and displayed perfectly when i execute the
    first swf, but when i try to import the whole thing into another
    file, the text is not displayed.
    I have to point out that, when I add "stage" before the
    addChildAt command, the text appears, but I don't want the
    coordinates of the text box depending on it's location on the
    stage.
    The second problem is, I want the scroll buttons to appear if
    the text is longer than the text box, however they appear no matter
    what. I trace the values and they are correct, so I can't really
    understand why they keep appearing.
    Thank you very much for your help.

    The same thing is happening to me and it is starting to get annoying. I too am using Chrome and I think that might just be part of the issue. I am running a Macbook Pro 2010 13". Any insight on this would be helpful. Sorry I don't have a solution, but know that your not alone in dealing eith this issue.

  • ADF 11g + How to capture the value of a dynamically created input text box

    Hi All,
    I have a requirement where, on selection of the value in a drop down, the input text boxes need to get dynamically populated on the JSPX page. I'm able to bring this functionality, and it is working fine.
    But the challenge right now I'm facing is that, how to read/capture the value entered in those dynamic text boxes on submission of the page. Please help me in getting this resolved.
    Below is the code snippet I'm using for this.
    // Clearing the existing input fields in the Panel form
    while (pf100.getChildren().iterator().hasNext()) {
    pf100.getChildren().remove(pf100.getChildren().iterator().next());
    // Creating the new fields based on the number of IP addresses selected
    for (int i = 0; i < iIPAddress; i++) {
    RichInputText pcPreferredDomain = new RichInputText();
    pcPreferredDomain.setLabel("Preferred Domain / Hostname for Desktop PC/ Laptop - " +
    (i + 1));
    pcPreferredDomain.setColumns(40);
    pcPreferredDomain.setId("pcpfdomain" + (i + 1));
    pf100.getChildren().add(pcPreferredDomain);
    Thanks All in Advance,
    Thanks & Regards,
    Dharmathej M

    As per your method, you are creating the RichInputText components as local variables.
    What happens when you are creating them as class level variables in the managed bean, if you do so, you can refer to the values of the UI components in the actionListener/action code for the command button in the managed bean
    sample:
    public class ManagedBean{
    RichInputText [] pcPreferredDomain;
    public ManagedBean(){
    // Clearing the existing input fields in the Panel form
    while (pf100.getChildren().iterator().hasNext()) {
    pf100.getChildren().remove(pf100.getChildren().iterator().next());
    pcPreferredDomain = new RichInputText[iIPAddress];
    // Creating the new fields based on the number of IP addresses selected
    for (int i = 0; i < iIPAddress; i++) {
    pcPreferredDomain[i] = new RichInputText();
    pcPreferredDomain.setLabel("Preferred Domain / Hostname for Desktop PC/ Laptop - " +
    (i + 1));
    pcPreferredDomain.setColumns(40);
    pcPreferredDomain.setId("pcpfdomain" + (i + 1));
    pf100.getChildren().add(pcPreferredDomain);
    Thanks,
    Navaneeth

  • Create input field dynamically

    Hi.
    I need to create always a new input field to page when pushing button. How this can be done? How can I define that a new field is placed under another?
    Something like this?
    javax.faces.component.UIViewRoot root = FacesContext.getCurrentInstance().getViewRoot();
              UIComponent form = root.findComponent("form1");
              HtmlInputText input2 = new HtmlInputText();
              input2.setSize(50);
              form.getChildren().add(input2);
    Message was edited by:
    basti78

    javax.faces.component.UIViewRoot root = FacesContext.getCurrentInstance().getViewRoot();
    UIComponent form = root.findComponent("form1");
    HtmlInputText input2 = new HtmlInputText();
    input2.setSize(50);
    form.getChildren().add(input2);
    I did this in doActionMethod but nothing happened. Is that panelGrid only for layout and it has nothing to do component visibility? Could you pass me an example?
    I also find this kind of example:
    Application application =
    FacesContext.getCurrentInstance().getApplication();
              outputText = (HtmlOutputText)application.createComponent(HtmlOutputText.COMPONENT_TYPE);
              outputText.setValue("test outputText ");
              form.getChildren().add(outputText);
              try {
                   outputText.encodeBegin(FacesContext.getCurrentInstance());
                   outputText.encodeChildren(FacesContext.getCurrentInstance());
                   outputText.encodeEnd(FacesContext.getCurrentInstance());
              } catch (IOException e) {
                   e.printStackTrace();
    null

  • Module pool to create input field dynamically.

    Hi All,
    I have a requirement in module pool programming,
    Where I have one input field,based on the value given in this input I have to get the
    input fields dynamically in the screen.
    Is it possible to achieve this?
    If yes, please do tell me the solution to approach this requirement.
    With Regards,
    S.Asha.

    Hi,
    You can use IMPORT DYNPRO / EXPORT DYNPRO.
    Please check this URL: [Import/Export dynpro not working|Import/Export dynpro not working]
    [EXPORT DYNPRO or GENERATE DYNPRO|EXPORT DYNPRO or GENERATE DYNPRO]
    Cheers,

  • How do I dynamically  create a pdk:text / field?!!!!!!

    I have a form that is to let the user add multiple rows and I need to be able to dynamically create a text filed and assign the attributes maxlength, size, name,property, and also assign the onkeypress a java script function. the following code will get me a text box but none of the attributes work:
    function add_Row(TLBID)
    var tbody = document.getElementById(TLBID).getElementsByTagName("TBODY")[0];
    var row = document.createElement("TR");
    var tlbTD = document.createElement("TD");
    var txtelement = document.createElement("TEXTAREA");
    tlbTD.colSpan = 2;
    txtelement.cols="25";
    txtelement.rows="2";
    txtelement.name="newDCTResponseText";
    tlbTD.appendChild(txtelement);
    var tlbTD2 = document.createElement("TD");
    tlbTD2.valign="bottom";
    var txtelement2 = document.createElement("input");
    txtelement2.type="text";
    txtelement2.maxlength="5";
    txtelement2.size="2";
    txtelement2.name="dctqeBean";
    txtelement2.property="dctScoreTxtBox";
    txtelement2.onkeypress="do_validate()";
    tlbTD2.appendChild(txtelement2);
    row.appendChild(tlbTD);
    row.appendChild(tlbTD2);
    tbody.appendChild(row);
    }

    Hi Ray,
    Thanks for your response. I do not understand the explanation. Maybe it is because I did not explain what I need or maybe becasue I am new to TS. Here's what I'd like to do.
    Have a predefined list of IO names. Like:
    Nest1 
    K23    "DIO96/port0/line1"
    K24    "DIO96/port0/line2"
    Nest2
    K23    "DIO96/port1/line1"
    K24    "DIO96/port1/line2"
    I will have 2 nests(sockets) in my system running batch model. From what I understand I can have 1 sequence defined and TS that will execute 2 threads with 1 socket per thread. In this sequence I somehow need to pass to my VI the value of K23 which is different for socket1 and 2. I was thinking that I can somehow create the Property Name Dynamically. Sort of like that:
    RunState.Sequence.Parameters.GetPropertyObject("Nest%d",RunState.TestSockets.MyIndex+1).K23
    It would give the sequence running for socket 1 the value "DIO96/port0/line1" and "DIO96/port1/line1" for socket 2
    thanks
    J.

Maybe you are looking for

  • War incompabilities with SOA 7 Platform edition?

    Hi, I am beggining to try Sun One App server 7 Platform edition. I developed a small web application to try database connections with pool and without pool. So I created the application in Netbeans to connect to an AS400 and worked OK with Tomcat. Al

  • Question for SM35, this may be a easy question, see who have the answer.

    Hi all, here the question i using session method and create a session in SM35. i have process this session i just create, here if i have process the session CAN i process it again?( on the same session ) mean re process the same session. thanks guanw

  • Found my solution for my long start up. but more questions

    When I first upgraded to 10.5 I had this problem (long start-up times and the long blue screen), did a clean install and all was good. A few days ago it happened again all of a sudden. I did an archive and install, all was good. It did it again today

  • Error in loading report

    Hi to all I have problem with loading report. i have connection to oracle database by third party driver(i made odbc by this driver). when i design my report is not problem and even see preview report by live informations. but when i want to test my

  • IMac G5 Won't Sleep with USB Hard Drive Attached

    I purchased an external USB powered hard drive, connected it, put the computer to sleep, and the computer immediately awoke saying the device was not put away properly. I then unmounted the drive, put the computer to sleep, and got the same message.