09-17-2008 2:24 AM
hi experts,
how can i upload my pictures that located my pc into r/3,and display in my screen program
best regards
zlf
09-17-2008 7:45 AM
09-17-2008 2:49 AM
Hi ... you can see this example DD_ADD_PICTURES and change the imagen 'ENJOYSAP_LOGO' ... but before you can upload a picture by the OAER transaction ... this transaction allows save pictures into the files ... you should enter with parameters:
CLASS NAME = 'PICTURES'
CLASS TYPE = 'OT'
PD: Sry for my bad english
Thanks and Regards.
David Carballido
09-17-2008 8:35 AM
HI David Carballido
THANKS FOR YOUR ANSWER,DD_ADD_PICTURES JUST shows how to display system icon,i think if i wanna use my picture,should i change my picture into system icon,and how
best regards
zlf
09-17-2008 3:08 AM
09-17-2008 7:45 AM
09-17-2008 9:25 AM
HI ALL,
thanks for all of you,my problem has been done,and i just have a doult if a object key can upload more than one pictures and how i can choose the any one in my programe
best regards
zlf
09-17-2008 7:52 AM
first of all uplod picture with transaction
'SMW0'.
Then in screen
Create Custom Contain Area
Use this code for sample
***************************************************************
if init is initial.
CREATE OBJECT CONTAINER
EXPORTING
CONTAINER_NAME = 'CC area name'.
CREATE OBJECT PICTURE
EXPORTING
PARENT = CONTAINER.
DATA QUERY_TABLE LIKE W3QUERY OCCURS 1 WITH HEADER LINE.
DATA HTML_TABLE LIKE W3HTML OCCURS 1.
DATA RETURN_CODE LIKE W3PARAM-RET_CODE.
DATA CONTENT_TYPE LIKE W3PARAM-CONT_TYPE.
DATA CONTENT_LENGTH LIKE W3PARAM-CONT_LEN.
DATA PIC_DATA LIKE W3MIME OCCURS 0.
DATA PIC_SIZE TYPE I.
REFRESH QUERY_TABLE.
QUERY_TABLE-NAME = '_OBJECT_ID'.
query_table-value = 'ENJOYSAP_LOGO'.
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
INVALID_TABLE = 1
PARAMETER_NOT_FOUND = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
PIC_SIZE = CONTENT_LENGTH.
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.
CALL METHOD PICTURE->LOAD_PICTURE_FROM_URL
EXPORTING
URL = URL.
INIT = 'X'.
CALL METHOD CL_GUI_CFW=>FLUSH
EXCEPTIONS
CNTL_SYSTEM_ERROR = 1
CNTL_ERROR = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.