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

ParameterTypeDescriptionRequired
BUFFERXSTRINGInput byte stringYes
APPEND_TO_TABLECAppend to existing table content—

Exporting parameters

ParameterTypeDescription
OUTPUT_LENGTHILength of the data in bytes

Tables parameters

ParameterTypeDescriptionRequired
BINARY_TAB—Binary tableYes

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.

Request a custom report