cancel
Showing results for 
Search instead for 
Did you mean: 

Add images dynamically

Former Member
0 Kudos

Hello eperts,

can any one tell me how to add images dynamically in webdynpro. i had loaded the image in mime,and inside the method wdmodifyview i had written the coding ,

data: lr_image type ref to cl_wd_image.

data: lr_container type ref to cl_wd_transparent_container.

data: lr_flow_data type ref to cl_wd_flow_data.

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

lr_image = cl_wd_image=>new_image( source = 'new.jpg'l view = view ).

lr_flow_data = cl_wd_flow_data=>new_flow_data( element = lr_image ).

lr_container->add_child( lr_image ).

where 'new.jpg' is my mime object name.

what other steps i have to follow to get the image while running.... thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

gill367
Active Contributor
0 Kudos

Nothing else is required.

Are you not getting the image by doing this much.

check the name of the image once again.

Thanks

sarbjeet singh

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,

if you want, you can modify the layout, just using your coding:

lr_container->set_layout_data(lr_flow_data).

In addition, make sure that your JPG is the MIME object of this WD component, otherwise, you should add "WD name" as the prefix of JPG's name..

Best wishes.