CA
Function module
Used the same way in S/4HANA
SCMS_XSTRING_TO_BINARY Convert XSTRING to Binary Table
Converts a byte string (XSTRING) into an internal table of binary lines and returns the length of the data. It is needed whenever binary content such as a PDF, Excel file or image must be passed to APIs that expect a table, for example GUI_DOWNLOAD, e-mail attachments or archive functions. Keep OUTPUT_LENGTH and pass it on as the file size, because the last table line is padded; SCMS_BINARY_TO_XSTRING does the reverse.
- Function group
- SCMS_CONV
- Remote-enabled (RFC)
- No
- Type
- Function module
Importing parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| BUFFER | XSTRING | Input byte string | Yes |
| APPEND_TO_TABLE | C | Append to existing table content | — |
Exporting parameters
| Parameter | Type | Description |
|---|---|---|
| OUTPUT_LENGTH | I | Length of the data in bytes |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| BINARY_TAB | — | Binary table | Yes |
Call template (ABAP)
A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = lv_buffer
IMPORTING
output_length = lv_output_length
TABLES
binary_tab = lt_binary_tab.Can't find the report you need?
We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.