Code: Alles auswählen.
*&---------------------------------------------------------------------*
*& Report Z_GRAF_TEST *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*
REPORT Z_GRAF_TEST .
DATA L_GRAPHIC_XSTR TYPE XSTRING.
DATA:
BEGIN OF ITAB OCCURS 0,
LINE(1) type X,
END OF ITAB.
data i(1) type X.
data k type i.
field-symbols <P> type any.
CALL METHOD CL_SSF_XSF_UTILITIES=>GET_BDS_GRAPHIC_AS_BMP
EXPORTING
P_OBJECT = 'GRAPHICS'
P_NAME = 'IDES_LOGO' "IMAGE NAME - Image name from SE78
P_ID = 'BMAP'
P_BTYPE = 'BMON'
RECEIVING
P_BMP = L_GRAPHIC_XSTR
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
assign L_GRAPHIC_XSTR to <p>.
k = 0.
do.
i = <p>+k.
itab-line = i.
append itab.
if k = XSTRLEN( L_GRAPHIC_XSTR ).exit.endif.
k = k + 1.
enddo.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
EXPORTING
* BIN_FILESIZE =
FILENAME = 'C:\TEMP\GRAPHIC.BMP'
FILETYPE = 'BIN'
* APPEND = SPACE
* WRITE_FIELD_SEPARATOR = SPACE
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = SPACE
* WRITE_LF = 'X'
* COL_SELECT = SPACE
* COL_SELECT_MASK = SPACE
* DAT_MODE = SPACE
* CONFIRM_OVERWRITE = SPACE
* NO_AUTH_CHECK = SPACE
* CODEPAGE = SPACE
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = SPACE
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* IMPORTING
* FILELENGTH =
CHANGING
DATA_TAB = itab[]
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
NOT_SUPPORTED_BY_GUI = 22
ERROR_NO_GUI = 23
others = 24
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.