04-24-2007 12:54 PM
04-24-2007 12:56 PM
HEllo,
REPORT y_pic_show .
DATA:
docking TYPE REF TO cl_gui_docking_container,
picture_control_1 TYPE REF TO cl_gui_picture,
url(256) TYPE c .
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.
num1 = p_dummy.
num2 = p_dummy1.
sum = num1 + num2.
WRITE : / sum.
*&---------------------------------------------------------------------*
*& 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 = 150
left = 700
top = 10
width = 138.
CALL METHOD picture_control_1->load_picture_from_url
EXPORTING
url = 'd:/subhadip.bmp'.
IF sy-subrc NE 0.
* Fehlerbehandlung
ENDIF.
ENDFORM. "show_pic
Reward if it is useful
Vasanth
04-24-2007 12:56 PM
HEllo,
REPORT y_pic_show .
DATA:
docking TYPE REF TO cl_gui_docking_container,
picture_control_1 TYPE REF TO cl_gui_picture,
url(256) TYPE c .
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.
num1 = p_dummy.
num2 = p_dummy1.
sum = num1 + num2.
WRITE : / sum.
*&---------------------------------------------------------------------*
*& 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 = 150
left = 700
top = 10
width = 138.
CALL METHOD picture_control_1->load_picture_from_url
EXPORTING
url = 'd:/subhadip.bmp'.
IF sy-subrc NE 0.
* Fehlerbehandlung
ENDIF.
ENDFORM. "show_pic
Reward if it is useful
Vasanth
04-24-2007 12:56 PM
04-24-2007 12:58 PM
04-24-2007 1:01 PM
04-24-2007 1:02 PM
Hi Reddy
You can get the logos onli in the Top of page part of the ALV Grid display..
just execute this sample code..
type-pools : slis.
data fs_flight type YCHVIEW_FLUGTERM.
data :
t_flight like standard table
of fs_flight
initial size 0,
t_event_exit type SLIS_T_EVENT_EXIT,
t_list_complementary type SLIS_T_LISTHEADER.
data :
t_events type SLIS_T_EVENT,
t_sort type SLIS_T_SORTINFO_ALV,
w_sort type slis_sortinfo_alv,
w_event type slis_alv_event,
w_carrid type spfli-carrid,
w_exit type SLIS_EVENT_EXIT,
fs_list type SLIS_LISTHEADER.
select *
from YCHVIEW_FLUGTERM
up to 20 rows
into table t_flight.
*Populating the events table.....
w_event-name = 'TOP_OF_PAGE'.
w_event-form = 'TOP_PAGE'.
append w_event to t_events.
** Populating the Event-exit table...
*w_exit-ucomm = '&OUP'.
*w_exit-after = 'X'.
*append w_exit to t_event_exit.
*
*w_exit-ucomm = '&ODN'.
*w_exit-after = 'X'.
*append w_exit to t_event_exit.
* Populating the list complementary table...
fs_list-typ = 'H'.
fs_list-info = 'Flight details'.
append fs_list to t_list_complementary.
call function 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = sy-repid
* I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'STABLE'
I_STRUCTURE_NAME = 'YCHVIEW_FLUGTERM'
* IS_LAYOUT =
* IT_FIELDCAT =
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
IT_EVENTS = t_events
IT_EVENT_EXIT = t_event_exit
tables
t_outtab = t_flight
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
if sy-subrc <> 0.
endif.
form top_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_list_complementary
I_LOGO = 'ENJOYSAP_LOGO' " <--- Logo
* I_END_OF_LIST_GRID =
* I_ALV_FORM =
.
endform.
FORM stable using lw_ucomm type sy-ucomm fs_selfield type slis_selfield.
case lw_ucomm.
when '&OUP'.
sort t_flight descending stable by carrid connid." fldate.
when '&ODN'.
sort t_flight descending stable by carrid connid fldate.
endcase.
endform.
U will get a logo in Top of page.
This program will help you for displaying logo in ALV reports
<b>BCALV_TREE_SIMPLE_DEMO</b>
and also <b>Look at OSS Note 695372.</b>
regards,
Rk