04-01-2016 7:58 AM
Hi Experts,
I'm working on FIORI RFC's.
I'm new to DMS/Content server.
Requirement-
at the time of uploading image/pdf, it's saved in DMS/content server- Document number generated, now they are asking for viewing the images/pdf in fiori/UI5 level.
please provide suggestions/info how to write this code in RFCs.
i'm confusing in we need to send XSTRING/URL--> if URL how to generate from DMS. please explain clearly.
Thanks for advance.
Shankar B
04-05-2016 9:43 AM
Hi,
Please follow below steps:
In ODATA service implementation:
METHOD /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_STREAM.
DATA: ls_stream TYPE ty_s_media_resource,
ls_upld TYPE zzupload.
READ TABLE it_key_tab ASSIGNING FIELD-SYMBOL(<fs_key>) INDEX 1.
DATA: lv_filename TYPE char30.
lv_filename = <fs_key>-value.
SELECT SINGLE * FROM zzupload INTO ls_upld WHERE filename = lv_filename.
IF ls_upld IS NOT INITIAL.
ls_stream-value = ls_upld-value.
ls_stream-mime_type = ls_upld-mimetype.
copy_data_to_ref( EXPORTING is_data = ls_stream
CHANGING cr_data = er_stream ).
ENDIF.
ENDMETHOD.
"Please modify as per your requirement.
Regards,
Mahesh Deora