cancel
Showing results for 
Search instead for 
Did you mean: 

Upload file from mobile app

Former Member
0 Kudos

Hi,

We are trying to upload a .XLS or .CSV file from a mobile app.
So far we are exporting the file content as XSTRING from mobile to a custom RFC that calls function SCMS_XSTRING_TO_BINARY to get the binary.

The issue is that the binary_tab doesn't came with binary content, it throws the same xstring data.
We guess it could be the structure type, I have read several post and use the following types without luck:

x255

x

any

solix

solix_tab

sdok_sdat
sdokcntbin

sdokcntascs

Any idea to solve this, or to upload a file from iOS device?

Regards,
Francisco Silva

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi everyone,

Let me tell you how we achieve this. There are two scenarios:

  • One for XSTRING formats (like CSV or PDF) and then call SCMS_XSTRING_TO_BINARY .
  • Another one for STRING base 64 (XLS, XLSX) to be decoded (cl_http_utility=>decode_x_base64) and  then call SCMS_XSTRING_TO_BINARY

To answer the initial question: binary_tab receives the binary, but not in test mode.

Regards,

Francisco Silva

former_member184221
Contributor
0 Kudos

Interesting, thanks for sharing the answer.

Answers (2)

Answers (2)

Former Member
0 Kudos

For a CSV use String not XSTRING, since CSV is basically text no hexadecimal required.

Another thing you can try is to pass the data using a JSON table and create the CVS or the XLS with an ABAP FM. This solution might not be elegant but it should work.

former_member184221
Contributor
0 Kudos

Question - Are you uploading using a SUP table or Netweaver Gateway or some other mobility middleware ?

I note that you could use the CSV format for your data. CSV can be considered XSTRING friendly being more of an Ascii format than a binary format.