05-17-2006 4:41 AM
How can I upload a picture and save it in a customer table?
Is it possible to browse for the image and then after selecting it, display it on the screen?
05-17-2006 4:50 AM
Hi,
You can use transaction SMWO- binary data-> F8->Execute->New.
The object name should be stored in Table.
And you can retrieve the IMAGE through object name using this FM :
CHECK l_url IS INITIAL.
REFRESH query_table.
query_table-name = '_OBJECT_ID'.
query_table-value = l_illustno.
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.
pic_size = content_length.
ENDIF.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
type = 'image'
subtype = 'X-UNKNOWN'
size = pic_size
lifetime = 'T'
TABLES
data = pic_data
CHANGING
url = l_url
EXCEPTIONS
OTHERS = 1.
CHECK NOT l_url IS INITIAL.
CALL METHOD pict1->load_picture_from_url
EXPORTING
url = l_url
EXCEPTIONS
error = 1
OTHERS = 2.
Best regards,
Prashant
05-17-2006 5:33 AM
Hi adrian,
You can use tcode DWDM and then select controls -> picture control -> screen display
here you will get all the picture related queries answered
Regards
Sumit Bhutani
Ps reward points if helpful