Documente Academic
Documente Profesional
Documente Cultură
in SAP
June 2, 2014December 16, 2014 File upload & download, SAP Netweaver gateway
Lets assume that we are redefining method CREATE_STREAM of our extended Data Provider
Class. We are importing structure which contains mime type and content of the file as XSTRING.
This structure is IS_MEDIA_RESOURCE with type TY_S_MEDIA_RESOURCE.
Before we start, if you want to know what is XSTRING, you can take a look at my other article.
1
2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
With successful implementation, file can be transferred from a web client through an OData
service into SAP office.
1
2
3
ls_record-filename = iv_filename.
ls_record-content = iv_content.
INSERT INTO files VALUES ls_record.