Add Dynamic Input field

Hi...Experts am new in ABAP Webdynpro. Actually my application is Add Dynamic Input Field in webdynpro. Already One lable, one Input field is there and I add one more button. When I click that button Dynamically Adding same like existing lable and inputfield.Can anyone tel me how to resolve my problem.

Hi..Yugesh
U will try this,Definitly Ul get Answer.
For Dynamically creating Attribute
DATA : rootnode_info TYPE REF TO if_wd_context_node_info,
dyn_node_info TYPE REF TO if_wd_context_node_info,
dyn_node TYPE REF TO if_wd_context_node.
DATA : dyn_attr_info TYPE wdr_context_attribute_info.
dyn_attr_info-name = 'NAME'. Attribute Name
dyn_attr_info-DEFAULT_VALUE = 'Prakash'. +Iam Setting Default value of attribute,u can change as per ur requirement +
dyn_attr_info-type_name = 'ZDE_NAME' . Data Element(CHAR20) ( Type Of Attribute )
rootnode_info = wd_context->get_node_info( ).
CALL METHOD rootnode_info->add_attribute
EXPORTING
attribute_info = dyn_attr_info.
This will create a attribute at run time...
For Dynamically creating Input Field
DATA lr_container TYPE REF TO cl_wd_uielement_container.
DATA lr_input TYPE REF TO cl_wd_input_field.
DATA lr_table TYPE REF TO cl_wd_table.
DATA lo_nd_sflight TYPE REF TO if_wd_context_node.
DATA lr_button TYPE REF TO cl_wd_button.
DATA lr_grid_data TYPE REF TO cl_wd_grid_data.
DATA lr_flow_data TYPE REF TO cl_wd_flow_data.
DATA lr_matrix TYPE REF TO cl_wd_matrix_head_data.
+Note : Before that change the Layout of ROOTUIELEMENTCONTAINER to MATRIX LAYOUT +
navigate from <CONTEXT> to <SFLIGHT> via lead selection
lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
CALL METHOD cl_wd_input_field=>new_input_field
EXPORTING
bind_value = 'NAME' + attribute which i created above+
id = 'INPUT1'
RECEIVING
control = lr_input.
lr_matrix = cl_wd_matrix_head_data=>new_matrix_head_data( lr_input ).
lr_input->set_layout_data( lr_matrix ).
CALL METHOD lr_container->add_child
EXPORTING
index = 1
the_child = lr_input.
ENDIF.
Code it in WDDOMODIFYVIEW...

Similar Messages

  • How to add an input field in the web UI of CRM 2007

    Hi everybody.
    I want add an Input field in the Web UI Screen. How it is possible.
    I want get the information with detailed descriptions if possible with screen shorts.
    What type of methods it will be generated and what are the code we entered in those methods.
    Take according to any example. But with detailed description.
    I am new for the CRM 2007. So, please give the screen shorts with proper data.
    Not only adding the field. If any data i entered in the adding field then that will be stored in the tables otherwise no use by adding the field.
    So, Can anybody please send a proper information according to this.
    Here another one How to Add our own table (Ztable) field in the Web UI Screen.
    How to add the same field in the BOL.
    Please expalin about those concepts with full of screen shorts messages.
    Thank You.
    Regards,
    Krishna.

    If you want to add extra standard fields (like one you mentioned), you can use Component Workbench and Copy the configuration and create your own configuration and make the "Available Fields" appear there.
    If the standrd field is not available, you can Add Context Node using wizard and make it visible.
    If its a custom field (a new one); you will have to use EEWB and add the fields and then make it visible in the UI using Component Workbench.
    Regards,
    Alin

  • Modify HREIC_VP to add new input fields

    Hi All,
    I need to add new custom input fields to the EEContact2Search.htm view of the HREIC_VP bsp application. Can anyone help me on how to do this?
    Thanks.

    Hi,
    You can have multiple options.
    Either you create a custom web part for new form and add your logic accordingly.
    Another option is to create the custom form using SharePoint designer 2013 and add your JavaScript Code to add the controls dynamically.
    Use InfoPath to create the custom form
    Some of the useful links are as follows
    https://support.office.com/en-us/article/Customize-a-SharePoint-list-form-c1f9283d-f704-4bbe-a8aa-827425ab31ae?ui=en-US&rs=en-US&ad=US
    http://community.bamboosolutions.com/blogs/sharepoint-2013/archive/2012/09/20/how-to-create-custom-forms-using-sharepoint-designer-2013.aspx
    Please don't forget to mark it answered, if your problem resolved or helpful.

  • F4 Help for a dynamic input field( class CL_DD_INPUT_ELEMENT)

    Hi all,
    I am programming a dynamic document which has several input fields on it. I want to program F4 helps for these fields, does anyone have an idea how I can do that?
    I have the idea to program a button(class CL_DD_BUTTON_ELEMENT) next to the input field and manually program an F4 help in the event handler of the button. But I do not know how I can handle pattern entries with '*' etc. in the input field. Is there a function module which could give me an F4 list(F4IF_INT_TABLE_VALUE_REQUEST could not be used, because it needs a dynpro field as a return field, which we do not have in this case).
    Kind Regards,
    Sükrü

    hi
    good
    SELECTION-SCREEN DYNAMIC SELECTIONS FOR NODE|TABLE node.
    allows you to define further nodes for dynamic selections. If the node has type T, you can use TABLE instead of NODE. The user can then decide at runtime the components of the node for which he or she wants to enter selections. Dynamic selections require special handling in the database program
    F4 HELP->
    AT SELECTION SCREEN ON VALUE REQUEST FOR P_SACHA.
        PERFORM VALUES_SACHA.
    THANKS
    MRUTYUN^

  • Interactive form -Dynamic input fields

    Hi,
    I am working with an interactive form.
    After Userinputs a InputField1 it should populate Inputfield2 dynamically.
    Lets Say if I enter a 01/01/2009 in input field1, second input field should be a week after date 01/07/2009.
    How do we handle this ?
    rgds
    Vara

    Hi,
    Select the InputField1 and goto Script Editor and select the Event type: "Change" and Language as "FormCalc" and in editor write the below code:
    InputField2.rawValue = Num2Date(IsoDate2Num($.rawValue)+7,"DD/MM/YYYY")
    Based on your requirement change the display pattern of both the date fields in the object pallette.
    Note: Make both the fields as Date/Time Fields and not TextFields.
    Regards
    Pradeep Goli

  • Dynamic input fields

    I need to dynamically generate the input fields based on the results returned from the query. How do I name each input fields differently.
    Eg:-)
    Say I have 5 rows returned from EMP table. I need to generate 5 input fields to change their names??
    How does the XSL script looks like??
    null

    First one - javascript good.
    Second one - take user to another page.
    [JavaBean and Servlet are not interchangable, JSP and Servlet are]

  • Dynamic Input field creation - issue with bindValue in loop

    Hello,
    I am creating context node elements at runtime. My node looks like this -
    LocalNode
      Question
      Answer
    for(int i;i<wdContext.nodeLocalNode.size();i++)
    wdContext.nodeLocalNode().setLeadSelection(i);
      IWDTextView TV1 = (IWDTextView)view.createElement(IWDTextView.class,"TV"+i);
      TV1.setText(wdContext.currentLocalNodeElement().getQuestion());
       mainGrp.addChild(TV1);
       IWDInputField IP1 = (IWDInputField)view.createElement(IWDInputField.class,"TE"+i);                             
      IP1.bindValue("LocalNode.Answer");
       IP1.setValue(wdContext..currentLocalNodeElement().getAnswer());
       mainGrp.addChild(IP1);
    Please note: Question column is the textView and Answer column is the input field
    The output should be as follows-
    Question               Answer
    Header                  None
    How Many             7
    Comments             Maybe valid
    Do you agree        Yes
    Although the text view displays correctly, the input field only shows the last record value and the output currently displays as follows-
    Question               Answer
    Header                   Yes
    How Many             Yes
    Comments              Yes
    Do you agree         Yes
    What am I doing wrong here?
    How can I bind the corresponding values to the input field in a loop?
    Regards,
    Nisha

    Hi,
    Could you please provide the code .
    Regards,
    Sunil.

  • Add a input field

    *Hi all experts*
    *i want to know the procedure of adding a new input field for Maintain field status for field selection string*
    *in funds managements define field selection string*
    *regards*
    *archana*

    Hi Hao,
    Please download these files for which you need marketplace login id.
    Development Guide
    https://websmp210.sap-ag.de/~sapdownload/011000358700000469462006E/
    Tutorial
    https://websmp206.sap-ag.de/~sapdownload/011000358700006120622006E/
    Regards,
    Arshid

  • How to add dynamic jquery fields into DB

    I am using the script from: http://www.coldfusionjedi.com/index.cfm/2009/2/19/Using-jQuery-to-add-form-fields to dynamically add fields to a form.  I am having trouble actually inserting the fields into a DB.  It seems that the field name is the same each time so they just get combined into one variable.  For instance, if field 1 is "John" and they add another person and his name is "Frank" field1 becomes, "John, Frank".
    I have a few more fields then that, so I am unsure how to proceed.  Anyone have any ideas or code samples that have worked for them?  Essentially I am trying to loop through the form and insert each additional field seperately.
    Any ideas?
    Thanks a ton

    Thanks for the help!  I am still stuck as to exactly how this will be done. My form is as follows:
    Type:
    Price:
    Unite:
    Name:
    and users can add another product etc so there will be more fields for each additional product (which all seem to get truncated as a comma seperated list in the form value)
    Here is what I have so far, after the form is submitted:
    <cfloop item="key" collection="#form#">
    <cfquery name="insertnote">
    INSERT INTO Deals (type, price, unit, name) VALUES ('#form.type#', #form.price#, '#form.unit#', '#form.name#'  )
      </cfquery>
    </cfloop>
    I honestly don't use loops like this very often so I apologize for having a lack of understanding.  I know you mentioned making them nested loops but I dont' know how to do it and have it successfully insert the appropriate data.  Everytime I try it doesnt come out right.

  • How to add a input field for personal ID in My Account - Personal Data

    Hi,
    I am new for B2C shop development. Now I have to add a ID number in Personal Data of My Account in B2C shop. This field is in the assignmemnt block of Identification Number, but it seems not easy to add this field in B2C shop JSP page.
    Gurus, would you please give any guide? Thanks!
    BR,
    Hao

    Hi Hao,
    Please download these files for which you need marketplace login id.
    Development Guide
    https://websmp210.sap-ag.de/~sapdownload/011000358700000469462006E/
    Tutorial
    https://websmp206.sap-ag.de/~sapdownload/011000358700006120622006E/
    Regards,
    Arshid

  • Add new input field in vendor master

    Hi all,
    I need to add a couple of <b>new columns</b> to the "Alternative payee" screen in the vendor master (screen <b>SAPMF02K 1130</b>). Is this possible?
    Can I use a BADI, or maybe an enhancement/user exit?
    Thanks for all your replies, answers will be rewarded.
    - Mari Virik

    Hi
    It depends on which release you're using.
    If your release is greater than 4.6C, you can enhance it by BADI (go to Vendor Customizing:  the node Master Record).  Here you can develop a BADI in order to create a new TAB to change/display your Z-FIELDS.
    If your release is 4.6c or lower one I believe you need to change the std program or you can try to use the BTE for Additional Components)
    Max

  • Dynamic input fields for Doc Props in Batch Mode; Acrobat Pro 9

    I'm using Acrobat Pro 9.  I'm looking for a way for Acrobat to automatically fill/replace the Title and Subject fields of the document properties with the file name of the PDF it is processing during batch mode.  Currently I have this step set to interactive and must type the name in for each file as it is processed.  Is there a script I can use? A macro? Heck! A Hack? It would literally take weeks off of my monotonous work load as the file names are long and there are thousnds of them to be processed.
    Thanks,
    Photonogon

    If you want the file name with the path, you could add the following JavaScript:
    title = path;
    subject = path;
    If you just want the file name:
    var filename = path.split("/").pop();
    title = filename;
    subject = filename;

  • How to Add Input Field in IC Webclient

    Dear Experts,
           I want to add one Input field in Interaction Center Webclient(IC Webclient).Is it Possible?If Possible Kindly Send me the Step by step Procedure.
    It is Urgent Requirement.Please Help me.
    Helpful Answers Will be rewarded.
    Regards,
    Ashok.

    Dear Albert,
      I have read the Blog "IC Web Client - Modifying View Layout - I".I am realy Impressed.I got the similar kind of requirement from my Client.In this Blog they are not clearly Explained about Adding the functionality for that Input Field.
         could you Please Explain me about how to add the functionality For that input Field.It is Very Urgent.Please Help me.
    Thanks & Regards,
    Ashok.

  • How To add dynamic field using struts?

    Hi All,
    I new to the struts. I wanted to add dynamic form field .

    Why do so many people ask struts questions here? It's an Apache project and it has a mailing list. Why not go directly to the source? [http://struts.apache.org/]
    Kaj

  • Can we do input field readonly and it will takes data only from F4

    Hi  experts,
    I want user only fill data in inputfield by F4, not manualy , can we do somwthing for that.
    Thanks & Regards
    Prashant Gupta

    Hi Prashanth,
       We can handle your requirement. I will give one example and it is working.   
        Address -  Node
         Firtst_Name-    Node  attribute    and this attribute will have DDIC search help.
       Create Input field 'FIRSTNAME' for this attribute in screen with transparent container  'TC' and bind the above context to the UI element.  Now this UI element is Context is 'ADDRESS.FIRSTNAME'.
    Now add the below code in MODIFYVIEW hook method.The below code will add search help with read only input field but for display mode again you have to disable the search help for this field. i have not written code for that.
      DATA: lo_first_name       TYPE REF TO cl_wd_input_field,
            lo_first_name_new   TYPE REF TO cl_wd_input_field,         " New input field
            lo_transp_cont      TYPE REF TO cl_wd_transparent_container. " TC container
            lo_new_container    TYPE REF TO cl_wd_transparent_container.
      DATA: lv_bound_value      TYPE string,
            lv_read_only        TYPE wdy_boolean.
       IF iv_first_time EQ abap_true.
    lo_first_name_input ?= io_view->get_element( id = 'FIRST_NAME' ).
    lo_first_name_input->set_width( '0' ).
    lv_bound_value = lo_first_name_input->bound_value( ).  "ADDRESS.FIRST_NAME"
        Create new dynamic Input Field
          CALL METHOD cl_wd_input_field=>new_input_field
            EXPORTING
              bind_value = lv_bound_value     
              id         = 'FIRST_NAME_NEW'
              read_only  = abap_true
              view       = io_view
            RECEIVING
              control    = lo_first_name_new.
        Create new dynamic Transparent Container
          CALL METHOD cl_wd_transparent_container=>new_transparent_container
            EXPORTING
              id      = 'TC_NEW'    " New container
              view    = io_view
            RECEIVING
              control = lo_new_container.
          " I used flow layout thats why i am using the flow layout
          cl_wd_flow_layout=>new_flow_layout( container = lo_new_container ).
          cl_wd_matrix_data=>new_matrix_data( element = lo_new_container ).
      " Get old field container
       lo_transp_cont ?= io_view->get_element( id = 'TC' ). 
       IF NOT lo_transp_cont IS INITIAL.
        "Using a new Transparent Container both Fields for FIRST_NAME are shown as only one Field
            cl_wd_flow_data=>new_flow_data( element     = lo_first_name_new ).
            lo_new_container->add_child( the_child = lo_first_name_new ).
            " remove the child means old FIRT_NAME
            lo_first_name ?= lo_transp_cont->remove_child( id = 'FIRST_NAME' ).
            cl_wd_flow_data=>new_flow_data( element = lo_first_name ).
            lo_new_container->add_child( the_child = lo_first_name ).
          lo_transp_cont->add_child( index      = 2
                                     the_child  = lo_new_container ).
       ENDIF.
    endif.
    Regards,
    Devi

Maybe you are looking for