Application Development 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: 

i want image on right side of selection screen and i want image on the left side in the output

sakata007
Newcomer
0 Kudos
241

what is happening here , the image I want on the right side on selection screen is also coming on the right side of the output screen , I even used do 1 times but still no luck , can anyone help me here ?

DATA: docking TYPE REF TO cl_gui_docking_container,

picture_control_1 TYPE REF TO cl_gui_picture,
url(256) TYPE c,
pic_data TYPE TABLE OF w3mime WITH HEADER LINE,
pic_size TYPE i,
lv_sum TYPE i.


SELECTION-SCREEN BEGIN OF BLOCK b1.

PARAMETERS: a(4) DEFAULT '4' .

PARAMETERS: b(4) DEFAULT '5' .


SELECTION-SCREEN END OF BLOCK b1.

At SELECTION-SCREEN.
PERFORM left.


AT SELECTION-SCREEN OUTPUT.

do 1 times .
PERFORM right.
EXIT.
ENDDO.


START-OF-SELECTION.
lv_sum = a + b.
WRITE : / lv_sum.


FORM right .

CREATE OBJECT picture_control_1
EXPORTING
parent = docking.

CHECK sy-subrc = 0.

CALL METHOD picture_control_1->set_3d_border
EXPORTING
border = 0.

CALL METHOD picture_control_1->set_display_mode
EXPORTING
display_mode = cl_gui_picture=>display_mode_stretch.

CALL METHOD picture_control_1->set_position
EXPORTING
height = 35
left = 955
top = 0
width = 120.


IF url IS INITIAL.

ENDIF.

CALL METHOD picture_control_1->load_picture_from_url
EXPORTING
url = 'https://tcblog.protiviti.com/wp-content/uploads/Protiviti-Logo.png'.
exit.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form show_pic1
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*& --> p1 text
*& <-- p2 text
*&---------------------------------------------------------------------*
FORM left .
CREATE OBJECT picture_control_1
EXPORTING
parent = docking.

CHECK sy-subrc = 0.

CALL METHOD picture_control_1->set_3d_border
EXPORTING
border = 0.

CALL METHOD picture_control_1->set_display_mode
EXPORTING
display_mode = cl_gui_picture=>display_mode_stretch.

CALL METHOD picture_control_1->set_position
EXPORTING
height = 35
left = 0
top = 0
width = 120.



IF url IS INITIAL.

ENDIF.

CALL METHOD picture_control_1->load_picture_from_url
EXPORTING
url = 'https://tcblog.protiviti.com/wp-content/uploads/Protiviti-Logo.png'.

ENDFORM.

1 REPLY 1

Sandra_Rossi
Active Contributor
0 Kudos
195

I guess you want to use a docking container, but you don't know how to use it.

The docking container may be added on any side of the main screen (whatever it's the selection screen or the list screen - I don't remember if it's possible for a list screen).

Please search examples in the Web.