2023 Sep 28 7:28 AM
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.
2023 Sep 28 3:00 PM
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.