Creating Dynamic UI Elements in Web Dynpro ABAP

Hi,
I want to an application in which the context nodes and the UI Elements for the second screen get created dynamically at run time based on the input on the first screen
First i have used this method :
cl_wd_dynamic_tool=>create_nodeinfo_from_struct()
to  create the dynamic context nodes.
I have checked in debugger and the dynamic context node is getting creates successfully.
I have saved the reference for the context node in DYN_NODE.
Now for creating the dynamic UI Elements corresponding to the attributes of this context node, i call the method :
cl_wd_dynamic_tool=>create_form_from_node(
ui_parent = group_1
node = dyn_node
inputlength = 20 ).
But this thing is dumping.
This is the dump.
The following error text was processed in the system CG7 : Adapter error in &VIEW_ELEMENT_TYPE& "BP_ICLIENT" of view "ZWD_ONLINE_FORMS.FINAL_VIEW": Context binding of property VALUE cannot be resolved: Node FINAL_VIEW.1.BP does not contain any elements
Where BP_ICLIENT is the first attribute of the dynmaic context node BP  created..
Please Help.
Thanks
Shivi

Refer this wiki :
https://wiki.sdn.sap.com/wiki/display/WDABAP/CreatingUIElementsDynamicallyinAbapWebdynpro+Application
More links are available on SDN reg Dynammci UI creations :
Have a look at the documentation for the WDDOMODIFYVIEW section of the phase model:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/d2/8acd409cc4dd50e10000000a1550b0/frameset.htm
There is also the class CL_WD_DYNAMIC_TOOL:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/67/6935425394033be10000000a1550b0/frameset.htm
Also have a look at the example application DEMODYNAMIC.
eLearning on the topic here as well:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/201ddd3b-b4ce-2b10-8883-880ae8147f89
Edited by: Saurav Mago on Oct 26, 2009 12:23 PM

Similar Messages

  • How to put dynamic search help in web dynpro ABAP.

    Hi,
    I have a table element with two columns in my web dynpro ABAP.Both the columns are F4 helps.
    Based on the value of the first column,the F4 help of second column must change dynamically.Kindly tell me how to do this.
    Thanks & Regards,
    Raji.

    Hi ,
    Use this code to dynamically assign search help and to deactivate search helps.
    data lo_nd_info type if_wd_context_node_info.
    lo_nd_info = lo_nd->get_node_info( ).
    CALL METHOD lo_nd_info->set_attribute_value_help
    EXPORTING
    name = 'ATTR1' " Your attribute Name
    value_help_mode = '121' " Valid value help mode
    value_help = 'Z187442'. " Search help name
    The various possible values that you can pass to value_help_mode are as shown below.
    deactivated 101
    automatic 111
    ddic 121
    ovs 131

  • Dynamic table columns in web dynpro abap

    Hi,
    In my current project I have got a requirement whose solution I am not able to figure out.
    My requirement is this:
    I will have a table containig budget owners name(since its compensation management in HR).There will be a table popin inside this table on the click of the personal number of the budget owner. Now the table popin will have another table with all employees name under that particular budget owner.
    The problem is that the table inside the popin will not be having fixed columns.Actually the columns will be coming from a standard java web dynpro application (say in the form of an internal table).
    My requirement is this how can this be handled?Can we include all the possible columns in the node(which i bind to the child table) and make them visible/invisible during runtime? or create a dynamic node and assign it to the table(but in this case a node needs to be bound to the table during design time,what to bind?)  ?
    Can u please help along with code snippets.
    Thanks and Regards,
    Saikat.

    Thnx for the input.
    I am abke to make the table columns inside the popin visible/invisible.
    I have a tabstrip.Indise one of the tabs is my main table and inside one of the columns is the popin.Inside that a transparent container and finally the table inside that.
    This is the code that worked for me.
    METHOD wddomodifyview .
      DATA lr_root_container TYPE REF TO cl_wd_uielement_container.
      DATA lr_table_popin TYPE REF TO cl_wd_table_popin.
      DATA lr_transparent_container TYPE REF TO cl_wd_transparent_container.
      DATA lr_table TYPE REF TO cl_wd_table.
      DATA lr_table_column TYPE REF TO cl_wd_table_column.
      DATA lr_table_in_table_popin TYPE REF TO cl_wd_table.
      DATA lr_node_header_node TYPE REF TO if_wd_context_node.
      DATA lr_node_item_node TYPE REF TO if_wd_context_node.
      DATA lr_tabstrip TYPE REF TO cl_wd_tabstrip.
      DATA lr_tab TYPE REF TO cl_wd_tab.
      data lr_tc type ref to CL_WD_TRANSPARENT_CONTAINER.
      data lr_table2 type ref to cl_wd_table.
      DATA lr_table2_column TYPE REF TO cl_wd_table_column.
      IF first_time = abap_false.
        lr_root_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
        lr_tabstrip ?= lr_root_container->get_child( id = 'TABSTRIP1' ).        "GETTING THE TABSTRIP
        lr_tab      ?= lr_tabstrip->get_tab( id = 'TAB1' ).        "GETTING THE TAB INSIDE TABSTRIP
        lr_table    ?= lr_tab->GET_CONTENT( ).      "GETTING THE CONTENT(TABLE IN THIS CASE) INSIDE TABSTRIP
        lr_table_column ?= lr_table->get_grouped_column( id = 'TABLE_MAIN_PERNR' ).   "GETTING THE COLUMN INSIDE THE TABLE
        "Table popin
        lr_table_popin ?=  lr_table_column->GET_POPIN( ).   "GETTING THE POPIN INSIDE THE TABLE
        lr_tc  ?= lr_table_popin->GET_CONTENT( ).   "GETTING THE CONTENT(TRANSPARENT CONTAINER IN THIS CASE)INSIDE THE TABLE
        lr_table2 ?= lr_tc->get_child( id = 'TABLE_EMPLOYEE' ).        "GETTING THE EMPLOYEE TABLE INSIDE THE TRANSPARENT CONTAINER
        lr_table2_column ?= lr_table2->get_grouped_column( id = 'TABLE_EMPLOYEE_PERNR' ).   "GETTING THE COLUMN INSIDE THE TABLE
        lr_table2_column->SET_VISIBLE( '02' ).  "SETTING VISIBILITY FOR THE COLUMN
      ENDIF.
    ENDMETHOD.
    But I'm still considering the dynamic node concept.Lets see if this works out or not.If not then I'll have to go for the dynamic node thing.
    Thanks,
    Saikat

  • Modify content of Button Choice UI Element in Web Dynpro ABAP

    Hi experts,
    How can I modify the content of button choice in webdynpro abap ?? ( I want to delete one row  from the list).
    See the attachement below .
    Web dynpro component : /SAPSRM/WDC_DODC_PARTNER
    Cordialy

    Hi,
    please check the method /SAPSRM/CL_CH_WD_DODM_PARTNERS->/SAPSRM/IF_CLL_DODM_PARTNERS~GET_ADD_BUTTON_PARTNERS.
    You should be able to create an enhancement at the end of this method.
    Regards
    Konstantin

  • Disable Technical Information for UI Element in WEB DYNPRO ABAP

    Hi expert,
    I want to disable  Technical Information for UI Element in  my web-dynpro application i am alredy disable  in user setting by parameters WDDISABLEUSERPERSONALIZATION by i want to disbale other two options 1 Display quick help.
                2 More field help.
    KINDLY GIVE ME SUTIABLE SOULATION.
    REGARD'S
    Vikash

    Hi Vikash,
    Check this thread, may be you'll get some clues from here.
    [How to restrict right click to show user setting in WebDynpro ALV?;.
    Regards
    Manas Dua

  • Dynamic Context Mapping in Web Dynpro ABAP

    Hi Experts,
    How can I create two dynamic Context nodes, one in ViewController and the other in Component Controller and finally create a context mapping between them?
    Regards,
    Johan Kriek.

    Hi Johan,
    I found a method IF_WD_CONTEXT_NODE_INFO~ADD_NEW_MAPPED_CHILD_NODE that seems to be the one that I am looking for.
    I do have same idea but i have been trying to give solution by using above method,unfortunately here my server is down.check the below code. i didnt check this code due to server down.
    DATA: lo_nd_purchase_header TYPE REF TO if_wd_context_node,
          lo_el_purchase_header TYPE REF TO if_wd_context_element,
    ls_purchase_header TYPE wd_this->element_purchase_header,
          lo_node_info type ref to if_wd_context_node_info,
          lo_child_node_info type ref to if_wd_context_node_info,
          MAPPING_INFO type WDR_CONTEXT_MAPPING_INFO.
    * navigate from <CONTEXT> to <PURCHASE_HEADER> via lead selection
      lo_nd_purchase_header = wd_context->get_child_node( name = wd_this->wdctx_purchase_header ).
                  CALL METHOD LO_ND_PURCHSE_HEADER->GET_NODE_INFO
                    RECEIVING
                      NODE_INFO = lo_node_info.
           MAPPING_INFO-controller = 'ZWDC_ALV'. "conponent name
           MAPPING_INFO-path = 'PURCHASE_HEADER'. "Controller context node name
          CALL METHOD LO_NODE_INFO->ADD_NEW_MAPPED_CHILD_NODE
            EXPORTING
              CHILD_NAME      = 'PURCHASE_HEADER'
              MAPPING_INFO    =  MAPPING_INFO
    *          IS_STATIC       = ABAP_TRUE
            RECEIVING
              CHILD_NODE_INFO = lo_child_node_info

  • Dynamic ALV columns in Web Dynpro ABAP

    Hello masters:
    Does anybody know how to build an ALV with dynamic columns in a WD4A?
    I know how to make an ALV with a dynamic context node (dynamic DDIC structure), but it isn't the problem. First, I need to validate data entries, and then I will know how many fields I have to show.
    I've been reading about interface IF_WD_CONTEXT_NODE_INFO. I think some of its methods can be useful to me. Can you help me to solve that?
    Thanks.

    Hi Rodrigo,
    There are two ways for it:
    1) Creating an attribute dynamically under the Staticly defined node.
    2) Creating a new node dynamically with your desired columns in it.
    I am explaining the second process, Here it as follows:
    1. Create a WDC, and use the component SALV_WD_TABLE.
    2. Create a node in the context to store the defined strucutre name.
    3. Read the node and set the structure name to that node from which you want to get the columns.
    4. Use this structure name and create a new node dynamically.
    5. Set the data to this dynamically created node.
    6. Set this context node to ALV.
    Here is the sample code:
    To get the strcutre from where you want to fecth the fields.
    tabname_node->get_attribute( Exporting name = 'TABLENAME'
                                  Importing value = tablename ).
    translate tablename to upper case.
    *create sub node named TEST1 of structure (tablename)
    cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
       parent_info = rootnode_info
       node_name = tablename
       structure_name = tablename
       is_multiple = abap_true ).
    DATA: stru_tab type ref to data.
      field-symbols: <tab> type table.*Create Internal Table
    create data stru_tab type table of (tablename).
    assign stru_tab->* to <tab>.*Get table content
    select * from (tablename) into corresponding  fields of table <tab>.*get  instance of new node
    dyn_node = wd_context->get_child_node( name = tablename ).*Bind Internal table to context node.
    dyn_node->bind_table( <tab> ).*instantiate alv component
    data: l_ref_cmp_usage type ref to if_wd_component_usage.l_ref_cmp_usage =   wd_this->wd_cpuse_alv( ).
    if l_ref_cmp_usage->has_active_component( ) is initial.
      l_ref_cmp_usage->create_component( ).
    endif.*pass context node to alv
    data: l_ref_interfacecontroller type ref to iwci_salv_wd_table .
    l_ref_interfacecontroller =   wd_this->wd_cpifc_alv( ).
      l_ref_interfacecontroller->set_data( dyn_node ).
    Hope it helps..
    Good day!
    Regards,
    Shashikanth. D

  • Office UI element in Web Dynpro ABAP

    Hi ,
    I am using Office UI element to display a excel on WDA screen . The excel has some macros .
    I need to send some data of excel to the DB on click of Save .
    How do i read the excel data ? The data is in the format of XSTRING .
    I tried to convert to STring and then Table . But its giving me dump .
    Can anyone Suggest how can i do this ?

    Hi anuradha ,
    I think it is not possible to convert xls file's xtring to a propert string format.
    only .csv fromat file will give you the proper string when converted from xstring to string.
    thanks
    sarbjeet singh

  • Portal dynamic iView from Web Dynpro ABAP?

    I wish to use a "Dynamic iView" from a Web Dynpro ABAP application, but it appears the API is only available in Web Dynpro Java.  Can this feature be used from Web Dynpro ABAP, or can this be accomplished in another way?
    Scenario: I have two iViews on a page, one Web Dynpro ABAP and another iView whose source I want to change dynamically based on something a user clicks in the Web Dynpro ABAP.
    Dynamic iView:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/44/a72c155df77038e10000000a422035/frameset.htm

    So you are suggesting the WDA fires an event to a new WDJ that we would need to create that would in turn use the Dynamic iView service mentioned in that help document?

  • Create portal user using web dynpro abap application

    Dear All,
    I would like to know is it possible to create portal user-id through web dynpro abap application.
    My requirement is
    > I have to create a web dynpro abap application. In the web dynpro abap application I have name email-id and phone number as entry fields.
    > I will click on submit, one unique id will get created. This unique id will be the login id for portal.
    I found how to create portal user using web dynpro java, but i could not find regarding web dynpro abap.
    If it is possible to create the portal users using web dynpro abap pls share the code as well.
    Regards,
    Swapnil Indulkar

    Hi swapnil,
    I think by using BAPi.. BAPI_USER_CREATE1 you can create.
    Please check this...
    Create portal user from webdynpro abap
    Creating user and assigning a group through code
    user administration su01
    How can i get the portal user id from logon ticket in the webdyn 4 ABAP
    Cheers,
    Kris.
    Edited by: kissnas on May 21, 2011 8:47 AM

  • Dynamic radio button in web dynpro abao

    Hi expert,
    I want to dynamic radio button by  web dynpro abap .
    Kindly give me a soulation ASAP.
    Thanks and regard's
    Vikash

    hi,
    method wddomodifyview .
    if first_time eq abap_true.
    data: LR_CONTAINER         type ref to CL_WD_UIELEMENT_CONTAINER,
          LR_RADIOBUTTON1            type ref to CL_WD_RADIOBUTTON,
          LR_RADIOBUTTON2            type ref to CL_WD_RADIOBUTTON,     
          LR_FLOW_DATA         type ref to CL_WD_FLOW_DATA.
    " bind text property will give TEXT that appears next to Radio Button
    CALL METHOD cl_wd_radiobutton=>new_radiobutton
      EXPORTING
       bind_selected_key   =  '01' 
       BIND_TEXT           =  'saurav'
      receiving
        control             = LR_RADIOBUTTON1.
    " bind text property will give TEXT that appears next to Radio Button
    CALL METHOD cl_wd_radiobutton=>new_radiobutton
      EXPORTING
        bind_selected_key   = '02'
       BIND_TEXT           = 'mago'
      receiving
        control             = LR_RADIOBUTTON2.
    LR_FLOW_DATA        =  CL_WD_FLOW_DATA=>NEW_FLOW_DATA( element = LR_RADIOBUTTON1  ).
    LR_FLOW_DATA        =  CL_WD_FLOW_DATA=>NEW_FLOW_DATA( element = LR_RADIOBUTTON2  ).
    LR_CONTAINER ?= view->GET_ELEMENT( 'ROOTUIELEMENTCONTAINER' ).
    LR_CONTAINER->ADD_CHILD( LR_RADIOBUTTON1  ).
    LR_CONTAINER->ADD_CHILD( LR_RADIOBUTTON2  ).
    endif.
    endmethod.
    Thanx.

  • Adobe form to save data using Web Dynpro ABAP

    Hi. I am pretty new to SAP world and trying to learn and work on a task given to me relate to
    creating Adobe offline form using Web Dynpro ABAP same time.
    I have several questions and hopefully, many gurus like you will provide answers.
    I noticed there are many examples creating and using Adobe interactive forms (though not many newer version),
    but I didn't see (at least I didn't find any) any detail example on saving data to an internal table (such as fixed assets, vendor master, etc)
    using interactive form. Is there any detail explanation/example on this?
    I have ask this question in another forum (before I found this forum) but didnu2019t get the answer yet.
    2. When I tried to see graphic layout and modify the layout from Web Dynpro, I can't see the graphic layout.
    All I see is text list of fields/buttons that I created, but can't see section for graphic layout where I can modify layout.
    I am sure I didn't install/configure something correctly.
    Anyone has any idea what I didn't do?
    I have another question, but I will wait till later after I figure out above ones first.
    Thanks for all your help in advance.
    John

    Hi John,
    In the WD4A view, there is a button "Show/Hide Layout Preview".
    Click on that button to be able to see the Layout.
    Note that this button is next to the Pretty Print button.
    regards,
    Reema.

  • Need Treestructure implementation in Web Dynpro abap

    hai all,
    i am trying to create a tree structure in Web dynpro abap ,
    can any one provide the relavent document for the tree structure creation.
    Thanks,
    sreevathsava.G

    ok

  • WD ABAP: Shopping cart in Web Dynpro ABAP

    Hi all,
    I need to create a shopping cart in Web Dynpro ABAP.  How does the concept of shopping cart work?  and what are the steps in doing it?  Thanks for your help.
    Thanks,
    Sravanthi

    hi michael
       Your scenario says that you would like retrieve materials from one table row and then pass them to the sales order bapi to create a sale order.
    if my understanding of your requirement is correct then can give some more information so that it would be easy to provide an example
    regards
    ravi

  • Interactive Form within Web Dynpro ABAP

    Hi,
    I've an Adobe interactive form element within Web Dynpro ABAP view. I've more than one WebDynproActiveX buttons within the Interactive form (like Submit, Cancel, Clear).
    How can I differentiate the user selection within Webdynpro  ? Whether the user selected Submit or Cancel or Clear ? Can we associate any function code for each button ?
    Thanks
    Ravikumar

    Hi Ravi,
    You can take a context attribute lets say "STATUS"(string) in your form context.  For your buttons in the form, in click event set the value. like
    STATUS.rawValue = "1";      (eg Submit)
    STATUS.rawValue = "2";      (eg Cancel)
    And in your submit event read this context attribute and you can use CASE like when 1 , when 2 etc and you can execute your code accordingly.
    it should solve your problem.
    With Regards,
    Ravi.D

Maybe you are looking for

  • Installing updated Master Collection on a new computer

    I started with Master Collection 3 and eventually updated to version 5. I am planning on buying a new computer with Windows 7 (current is Windows XP.) Would I be able to reinstall my Master Collection on the new computer with no problems from Adobe?

  • I have a copy of Final Cut Express 2. Can I get a current upgrade instead of repurchasing the new Final Cut Pro?

    I have a old copy of Final Cut Express 2 that I never installed. Can I get a current upgrade instead of repurchasing the new Final Cut Pro? The Apple Store does not show does not contain purchase information of the old unused Final Cut Express. What

  • Report Builder truncating data

    I have inherited an application that has uses Java and CFR's (built with CF report builder 7) to create PDF files. On one of the reports is a field that an essay goes into. This essay can be up to 10,800 characters long. That length is being controll

  • I went to download an game and it says i need ios 4.3.

    i want to download bulls i 3d darts but it say i need ios 4.3. but i cant find it any where... my ipod version is 4.2.1....can u help me please and thxs

  • Messages not sending!

    Hi Guys, Kinda find this irritate my working day.Occasionally, message is dropped and you see A list of This message wasn't sent to  xxxxfor all your messages and what's most annoying is you can't RESEND!You need to copy and paste back the failed mes