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'
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 = ' '
objcont = lt_object_cont
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.