cancel
Showing results for 
Search instead for 
Did you mean: 

DYNAMIC PROGRAMMING IN WEBDYNPRO ABAP.

Former Member
0 Kudos

Hi Experts,

How to create input field ,drop down ,button and table ui using dynamic programming

when i click on action button data should be displayed in the table this should be done using dynamic programming.

Waiting for Reply.

Thanks & Regards.

kittu

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Krishna,

Paste the below code in the WDDOMODIFYVIEW and it would dynamically create a button with id "BUTTON", text as "Action" & an associated action "ACTION".


METHOD wddomodifyview .  

DATA: lr_container TYPE REF TO cl_wd_uielement_container,

      lr_button TYPE REF TO cl_wd_button.

      CHECK first_time = abap_true.

      lr_container ?= view->get_element( id = 'ROOTUIELEMENTCONTAINER' ).

      cl_wd_matrix_layout=>new_matrix_layout( container = lr_container ).

      lr_button = cl_wd_button=>new_button( id         = 'BUTTON'

                                           text       = 'Action'

                                            on_action  = 'DISPLAY' ).

      cl_wd_matrix_head_data=>new_matrix_head_data( element = lr_button ).

      lr_container->add_child( the_child = lr_button ).

ENDMETHOD.

Now, you need to create an action by name "DISPLAY" under the "Actions" tab of your component.

Accordingly an eventhandler "ONACTIONDISPLAY" will be created where in write the logic to display the fields in the table or ALV.

Regards,

AkkI

former_member184578
Active Contributor
0 Kudos

Hi,

check this e-learning by Thomas sir: [Dynamic Mapping, Binding in WDA|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/201ddd3b-b4ce-2b10-8883-880ae8147f89]

also.,

http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=141263105

check DEMO_DYNAMIC Standard WDA Program

hope this helps u.,

Thanks & Regards,

Kiran

former_member184515
Participant
0 Kudos

Please read it as DEMODYNAMIC is Standard WDA Program in the above reply from Kiran.

Thanks Kiran...

Former Member
0 Kudos

Hi,

Please go through the below link for dynamic UI Programming in Webdynpro ABAP..

http://wiki.sdn.sap.com/wiki/display/WDABAP/CreatingUIElementsDynamicallyinAbapWebdynpro+Application

Regards,

Supriya