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: 

image at selection-screen

Former Member
0 Kudos

Hi all...

I had displayed am image at selection-screen.

But the problem is that, the image is been over-lapping on the out-put screen also...

Here is the sample code which I had used

can any one find a solution for this.... Thanks in advance

REPORT z_XXX.

DATA: docking TYPE REF TO cl_gui_docking_container,

picture_control_1 TYPE REF TO cl_gui_picture,

url(256) TYPE c .

DATA: query_table LIKE w3query OCCURS 1 WITH HEADER LINE,

html_table LIKE w3html OCCURS 1,

return_code LIKE w3param-ret_code,

content_type LIKE w3param-cont_type,

content_length LIKE w3param-cont_len,

pic_data LIKE w3mime OCCURS 0,

pic_size TYPE i.

DATA : sum(4) , num1(4) , num2(4).

PARAMETERS: p_dummy(4) DEFAULT '4' .

PARAMETERS: p_dummy1(4) DEFAULT '5' .

AT SELECTION-SCREEN output.

PERFORM show_pic.

**********************************************

START-OF-SELECTION.

data : var1 type i.

var1 = p_dummy1 + p_dummy.

write : / var1.

*&----


*& Form show_pic

*&----


FORM show_pic.

  • DATA: repid LIKE sy-repid.

  • repid = sy-repid.

CREATE OBJECT picture_control_1 EXPORTING parent = docking.

CHECK sy-subrc = 0.

CALL METHOD picture_control_1->set_3d_border

EXPORTING

border = 5.

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 = 25

left = 10

top = 30

width = 40.

IF url IS INITIAL.

REFRESH query_table.

query_table-name = '_OBJECT_ID'.

query_table-value = 'zflight'.

APPEND query_table.

CALL FUNCTION 'WWW_GET_MIME_OBJECT'

TABLES

query_string = query_table

html = html_table

mime = pic_data

CHANGING

return_code = return_code

content_type = content_type

content_length = content_length

EXCEPTIONS

object_not_found = 1

parameter_not_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

ENDIF.

CALL FUNCTION 'DP_CREATE_URL'

EXPORTING

type = 'image'

subtype = cndp_sap_tab_unknown

size = pic_size

lifetime = cndp_lifetime_transaction

TABLES

data = pic_data

CHANGING

url = url

EXCEPTIONS

OTHERS = 1.

ENDIF.

CALL METHOD picture_control_1->load_picture_from_url

EXPORTING

url = url.

ENDFORM. "show_pic

2 REPLIES 2

faisal_altaf2
Active Contributor
0 Kudos

Hi, Kiran

Please test after doing following changes hope will solve out your problem,


  CALL METHOD picture_control_1->set_position
    EXPORTING
      height = 300 " Change Here
      left   = 50 " Change Here
      top    = 50 " Change Here
      width  = 1200. " Change Here

    REFRESH query_table.
    query_table-name = '_OBJECT_ID'.
    query_table-value = 'ENJOYSAP_LOGO'. " Change Here add you Pic name here 
    APPEND query_table.

Please Reply if any Issue,

Best Regards,

Faisal

0 Kudos

Thanks for answering.......

But thats not my problem.

I had been able to display the required image at selection-screen.

But mu issuee is that...

After executing it or after pressing F8 button, the image is again over lapping on the ALV out-put screen.

i.e I am not able to see the out-put coz the iamge is being in front of the displayed out-put