Hi all,
I am having problem in using this FM. I want to download any file to my local desktop from the file attachment list of an employee in PA20/PA30. I kept on getting Access via 'NULL' object reference not possible error message.
This is how I use it. The filename is obtained through the a pop up box asking user to input a file name with a file path.
CALL FUNCTION 'SO_OBJECT_DOWNLOAD'
EXPORTING
BIN_FILESIZE = 0
DEFAULT_FILENAME = ' '
filetype = 'BIN'
path_and_file = lo_stru_output_param-file_name "C:\Users\sc\Desktop\xyz.pdf
EXTCT = ' '
no_dialog = ' '
CODEPAGE =
IMPORTING
FILELENGTH =
F_CANCELLED =
ACT_FILETYPE =
ACT_FILENAME =
TABLES
objcont = lt_object_cont
EXCEPTIONS
file_write_error = 1
invalid_type = 2
x_error = 3
kpro_error = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.