Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

HTML BUTTON in module pool screen.

0 Likes
2,208

Hi,

I have a requirement to create a push button ( bigger push button ) along with Image on it in my custom screen . Can any one help me in this ??

5 REPLIES 5
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,314

Create an image (CL_GUI_PICTURE) in a customer container,

  • Fill it with a method like  LOAD_PICTURE_FROM_SAP_ICONS, LOAD_PICTURE_FROM_URL_ASYNC or LOAD_PICTURE_FROM_URL.
  • React to click handling an vent like CONTROL_CLICK

Regards,

Raymond

Read only

0 Likes
1,314

Thanks for your reply .

Can you please sample complete code .

Read only

0 Likes
1,314

Sample and complete in the same sentence, kind of Oxymoron. Which method did confuse you?

Did you look at the sample SAP_PICTURE_DEMO_ICON as written in the provided online

documentation link?

Regards,

Raymond

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,314

Please search the forum for the CL_GUI_HTML_VIEWER control class, and for custom container (element of dynpros) to contain the control. See also the demo programs RSDEMO_HTML_VIEWER and SAPHTML_EVENTS_DEMO.

Read only

retired_member
Product and Topic Expert
Product and Topic Expert
0 Likes
1,314

You can create a custom container of the desired size on your dynpro screen and connect CL_ABAP_BROWSER to this container using parameter CONTAINER of method SHOW_HTML.

To show your "button" html you pass a string containing your picture formatted as a link. The href should be something like

<A href=sapevent:"..."><img ...></A>


You can react on event SAPEVENT of that class then.


The documented CL_ABAP_BROWSER wraps the original GUI Control classes.


For a demo see program DEMO_HTML_BROWSER.


On how to handle pictures (saving them in a transportable way in the MIME repository), see .