2007 Feb 08 7:31 AM
hi all,
i loaded a picture to a screen,
but because this is my first time i follow the examples and succeed.
my problem is that the picture that had in the example is not the picture that i want to have on the screen.
is anyone can tell me how can i found all pictures that in sap and what data do i need to connect the picture to my screen.
my example use :
QUERY_TABLE-NAME = '_OBJECT_ID'.
QUERY_TABLE-VALUE = 'ENJOYSAP_LOGO'.
APPEND QUERY_TABLE.
CALL FUNCTION 'WWW_GET_MIME_OBJECT'
thanks in advanced'
dana.
hi all,
i loaded a picture to a screen,
but because this is my first time i follow the examples and succeed.
my problem is that the picture that had in the example is not the picture that i want to have on the screen.
is anyone can tell me how can i found all pictures that in sap and what data do i need to connect the picture to my screen.
my example use :
QUERY_TABLE-NAME = '_OBJECT_ID'.
QUERY_TABLE-VALUE = 'ENJOYSAP_LOGO'.
APPEND QUERY_TABLE.
CALL FUNCTION 'WWW_GET_MIME_OBJECT'
thanks in advanced'
dana.
2007 Feb 08 7:36 AM
2007 Feb 08 8:10 AM
Hi,
You can use picture control to attach a picture to your screen.The sample code is below:
The custom container in the screen layout is named as 'CONTAINER'.
REPORT SAMPLE.
DATA: picture type ref to cl_gui_picture,
cont type ref to cl_gui_custom_container.
DATA: I_EVENTS TYPE CNTL_SIMPLE_EVENTS,
WA_EVENTS TYPE CNTL_SIMPLE_EVENT,
OK_CODE TYPE SY-UCOMM,
p_url type cndp_url.
Class click definition.
PUBLIC SECTION.
METHODS: click_handle for event picture_click of cl_gui_picture
importing MOUSE_POS_X MOUSE_POS_Y.
endclass.
DATA: click_variable type ref to click.
class click implementation.
method click_handle.
DATA: X_POS(5),Y_POS(5).
X_POS = MOUSE_POS_X.
Y_POS = MOUSE_POS_Y.
MESSAGE I000(OK) WITH 'Picture Click' X_POS Y_POS.
endmethod.
endclass.
START-OF-SELECTION.
call screen 100.
&----
*& Module STATUS_0100 OUTPUT
&----
text
----
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'GUI'.
SET TITLEBAR 'xxx'.
if cont is initial.
CREATE OBJECT CONT
EXPORTING
CONTAINER_NAME = 'CONTAINER'.
CREATE OBJECT PICTURE
EXPORTING
LIFETIME =
SHELLSTYLE =
PARENT = cont
NAME =
EXCEPTIONS
ERROR = 1
others = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
wa_events-EVENTID = picture->EVENTID_PICTURE_CLICK.
wa_events-APPL_EVENT = 'X'.
append wa_events to i_events.
CALL METHOD PICTURE->SET_REGISTERED_EVENTS
EXPORTING
EVENTS = i_events.
create object click_variable.
set handler click_variable->click_handle for picture.
CALL METHOD PICTURE->SET_3D_BORDER
EXPORTING
BORDER = 1.
CALL FUNCTION 'DP_PUBLISH_WWW_URL'
EXPORTING
OBJID = 'HTMLCNTL_TESTHTM2_SAP_AG'
LIFETIME = cndp_lifetime_transaction
IMPORTING
URL = p_url
.
IF SY-SUBRC = 0.
CALL METHOD PICTURE->LOAD_PICTURE_FROM_URL_ASYNC
EXPORTING
URL = p_url.
ENDIF.
endif.
ENDMODULE. " STATUS_0100 OUTPUT
&----
*& Module USER_COMMAND_0100 INPUT
&----
text
----
MODULE USER_COMMAND_0100 INPUT.
CASE OK_CODE.
WHEN 'BACK'.
LEAVE PROGRAM.
WHEN 'NORMAL'.
CALL METHOD PICTURE->SET_DISPLAY_MODE
EXPORTING
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL.
WHEN 'FIT'.
CALL METHOD PICTURE->SET_DISPLAY_MODE
EXPORTING
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT.
WHEN 'NORMAL_C'.
CALL METHOD PICTURE->SET_DISPLAY_MODE
EXPORTING
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL_CENTER.
WHEN 'FIT_C'.
CALL METHOD PICTURE->SET_DISPLAY_MODE
EXPORTING
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT_CENTER.
WHEN 'STRETCH'.
CALL METHOD PICTURE->SET_DISPLAY_MODE
EXPORTING
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_STRETCH.
WHEN 'CLEAR'.
CALL METHOD PICTURE->CLEAR_PICTURE.
WHEN SPACE.
CALL METHOD PICTURE->LOAD_PICTURE_FROM_URL
EXPORTING
URL = P_URL.
IMPORTING
RESULT = RETURN.
CALL METHOD CL_GUI_CFW=>FLUSH.
endcase.
endmodule.
Also check demo program:<b>RSDEMO_PICTURE_CONTROL</b>
Regards,
Beejal
**Reward if this helps
2007 Feb 08 8:20 AM
thanks for reply.
my question is: i need to connect a picture to my program , but i need all list of pictures that we have in sap-and than i will choose from the list the picture that i want to see in my screen.
is anyone can tell me wich transaction can show me this list?
thanks,
dana.
2007 Feb 08 9:24 AM
Refer this link
1... create a logo using paint shop and save it as tifffile then using RSTXLDMC (is a program name) used to upload logo
2.....create a logo using paint shop and save it as bmpfile then using SE78 you can do this.
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIIMAGE/BCCIIMAGE.pdf
http://www.sap-img.com/human/linking-employee-photos-using-sap-archive-link.htm
See this also
In the transaction OAOR, you should be able to insert your company Logo.
GOTO - OAOR (Business Document Navigator)
Give Class Name - PICTURES Class Type - OT..... then Execute
It will show you the list, then select ENJOYSAP_LOGO.
On that list, you will find one control with a "create" tab.
Click std. doc types.
Select SCREEN and double-click.
It will push FILE selection screen.
Select your company logo (.gif) and press OK.
It will ask for a description- for instance: "company logo".
It will let you know your doc has been stored successfully.
You can find your logo under ENJOYSAP_LOGO->Screen->company logo.
Just run your ALV program, you should find your company logo in place of the EnjoySAP logo.
Message was edited by:
Judith Jessie Selvi
2007 Feb 08 9:44 AM
some of them are stored in SMW0 txn. ('ENJOYSAP_LOGO' is stored there)
SMW0->binary data for webrfc application-> enter object name execute
2007 Feb 11 9:11 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |