on 04-29-2013 11:35 AM
Hi Experts,
i've read a lot about this Topic, but nothing really helped me. so i decided to open another Topic to this Content. my Image is saved via the Services to the object, especially to an order. So it is saved in a SAP database table. with "SO_DOCUMENT_READ_API1" i get the data-table of the Image. this table a concatenate into a xstring. With this i feed the "RSFO_XSTRING_TO_MIME" and get an raw-table for a mime object. Now i use "DP_CREATE_URL" to get an URL for my Image. this URL i give to the image-ui-element. But nothing happens. i don't see the cross, which is shown when an Image can't be displayed, i just see nothing but the Background of the WD-window. Can anyone guid me, what i'm doing wrong? Below is my acutal coding for that:
CALL FUNCTION 'SO_DOCUMENT_READ_API1'
EXPORTING
document_id = lv_document_id
IMPORTING
document_data = ls_doc_data
TABLES
* object_content = lt_object
contents_hex = lt_data
EXCEPTIONS
document_id_not_exist = 1
operation_no_authorization = 2
x_error = 3
OTHERS = 4.
DATA: lv_string TYPE string.
* Datenstrom-Tabelle als Datenstrom konvertieren
LOOP AT lt_data INTO ls_data.
CONCATENATE lv_xstring ls_data-line INTO lv_xstring IN BYTE MODE.
ENDLOOP.
DATA: lt_mime TYPE TABLE OF w3mime,
ls_mime TYPE w3mime,
lv_length TYPE i,
lv_url(256).
lv_length = XSTRLEN( lv_xstring ).
CALL FUNCTION 'RSFO_XSTRING_TO_MIME'
EXPORTING
c_xstring = lv_xstring
i_length = lv_length
TABLES
c_t_mime = lt_mime.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
type = 'IMAGE'
subtype = 'jpg'
* SIZE =
* DATE =
* TIME =
* DESCRIPTION =
* LIFETIME =
* CACHEABLE =
* SEND_DATA_AS_STRING =
* FIELDS_FROM_APP =
TABLES
data = lt_mime
* FIELDS =
* PROPERTIES =
* COLUMNS_TO_STRETCH =
CHANGING
url = lv_url
* EXCEPTIONS
* DP_INVALID_PARAMETER = 1
* DP_ERROR_PUT_TABLE = 2
* DP_ERROR_GENERAL = 3
* OTHERS = 4
.
CLEAR: lv_xstring.
LOOP AT lt_mime INTO ls_mime.
CONCATENATE lv_xstring ls_mime-line INTO lv_xstring IN BYTE MODE.
ENDLOOP.
gv_url = lv_url.
Best Regards,
Mathias
Hey,
no one any idea how to solve this?
regards,
Mathias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey everybody,
I now found the solution on my own and with the help of old scn Topics.
I just have to take the first xstring and bind it to the context. in the view where i want to Show the Image i create the http Response to get an URL in the wddomodifyview and bind the URL to the source of my Image ui element. and now it works! i'm really happy now!
best regards,
Mathias
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.