Industries Training & Education Partnership Developer Center Lines of Business University Alliances Events & Webinars Innovation Login Register Welcome, Guest Activity Communications Actions Browse Web Dynpro ABAP 0 Tweet 1 Describtion : It will provide multiple instance of the UI element having distinct values in the node . On click of Plus button addition of the same ui element in different line , on Click of minus button deletion of UI elements . Create a Multipane UI element , Insert a UI called Transaparent Container . Assign all the UI elements you want to get repeated.Please find the screen shot for UI element used for the example. Bind the data source of multipane to the context node where you will have distinct values . Add the below code in WDDOINIT method so that intially we can see one isntance of the UI element. method WDDOINIT . DATA lo_nd_test_node TYPE REF TO if_wd_context_node. DATA lo_el_test_node TYPE REF TO if_wd_context_element. DATA ls_test_node TYPE wd_this->element_test_node. data lt_test_node type wd_this->elements_test_node. * navigate from <CONTEXT> to <TEST_NODE> via lead selection lo_nd_test_node = wd_context->get_child_node( name = wd_this->wdctx_test_node ). * get element via lead selection lo_el_test_node = lo_nd_test_node->get_element( ). usage of Multipane is web dynpro abap (WDA) Posted by Om Awasthi in Web Dynpro ABAP on May 9, 2012 12:35:34 PM Share Share 0 Like Like usage of Multipane is web dynpro abap (WDA) | SCN http://scn.sap.com/community/web-dynpro-abap/blog/2012/05/09/usage-... 1 of 3 4/30/2014 3:07 PM ** get all declared attributes * lo_el_test_node->get_static_attributes( * IMPORTING * static_attributes = ls_test_node ). ls_test_node-name = '1'. append ls_test_node to lt_test_node . lo_nd_test_node->bind_table( lt_test_node ) . endmethod. Add the below code ONACTIONPOSITIVE method ONACTIONPOSITIVE . DATA lo_nd_test_node TYPE REF TO if_wd_context_node. DATA lo_el_test_node TYPE REF TO if_wd_context_element. DATA ls_test_node TYPE wd_this->element_test_node. data lt_test_node type wd_this->elements_test_node. * navigate from <CONTEXT> to <TEST_NODE> via lead selection lo_nd_test_node = wd_context->get_child_node( name = wd_this->wdctx_test_node ). * get element via lead selection lo_el_test_node = lo_nd_test_node->get_element( ). * get all declared attributes * lo_el_test_node->get_static_attributes( * IMPORTING * static_attributes = ls_test_node ). data : lv_lines type string . lo_nd_test_node->get_Static_attributes_table( IMPORTING table = lt_test_node ) . lv_lines = lines( lt_test_node ). ls_test_node-name = lv_lines + 1. append ls_test_node to lt_test_node . lo_nd_test_node->bind_table( lt_test_node ) . endmethod. Add the below code ONACTIONNEGATIVE method ONACTIONNEGATIVE . DATA lo_nd_test_node TYPE REF TO if_wd_context_node. DATA lo_el_test_node TYPE REF TO if_wd_context_element. DATA ls_test_node TYPE wd_this->element_test_node. data lt_test_node type wd_this->elements_test_node. * navigate from <CONTEXT> to <TEST_NODE> via lead selection lo_nd_test_node = wd_context->get_child_node( name = wd_this->wdctx_test_node ). * get element via lead selection lo_el_test_node = lo_nd_test_node->get_element( ). * get all declared attributes * lo_el_test_node->get_static_attributes( * IMPORTING * static_attributes = ls_test_node ). data : lv_lines type string . lo_nd_test_node->get_Static_attributes_table( IMPORTING table = lt_test_node ) . lv_lines = lines( lt_test_node ). * ls_test_node-name = lv_lines - 1. DELETE lt_test_node where name = lv_lines. * append ls_test_node to lt_test_node . lo_nd_test_node->bind_table( lt_test_node ) . endmethod. Output : 1. For the first run we have the single element which again can be added on click of plus button 2. Once you click on Add button you can add the smiliar line with same or different details but you will nto be allowed to delete the first line as this is first instance . You can add as many as the lines or details you want to add there is no restriction on the same . If the lines incresase more then page then a horizontall scroll will appear . usage of Multipane is web dynpro abap (WDA) | SCN http://scn.sap.com/community/web-dynpro-abap/blog/2012/05/09/usage-... 2 of 3 4/30/2014 3:07 PM Follow SCN Site Index Contact Us SAP Help Portal Privacy Terms of Use Legal Disclosure Copyright Average User Rating (1 rating) 0 Tweet 1 3. On click on button Minus ( - ) the ui element inside the container will get deleted . In my scenario i have deleted the lines twice . 1094 Views Topics: web_dynpro Tags: webdynpro_abap Share Share 0 Like Like There are no comments on this post 0 Comments usage of Multipane is web dynpro abap (WDA) | SCN http://scn.sap.com/community/web-dynpro-abap/blog/2012/05/09/usage-... 3 of 3 4/30/2014 3:07 PM
Python Advanced Programming: The Guide to Learn Python Programming. Reference with Exercises and Samples About Dynamical Programming, Multithreading, Multiprocessing, Debugging, Testing and More