Hi expertes,
I'm using a web service to upload files to my application server. With this files, I create document info records but as soon as I try to show the file(original) inside CV02/03 I'm receiving the message file could not be accessed. (see screenshot). Do you have any idea what could cause this problem? I can open the file in al11 as you can see in the screenshot.
Code for file generation:
CONCATENATE '/tmp/' SY-UNAME '.txt' INTO LV_FILENAME. DATA: BINDATA type XSTRING. CALL FUNCTION 'SSFC_BASE64_DECODE' EXPORTING B64DATA = STRING * B64LENG = * B_CHECK = IMPORTING BINDATA = BINDATA EXCEPTIONS SSF_KRN_ERROR = 1 SSF_KRN_NOOP = 2 SSF_KRN_NOMEMORY = 3 SSF_KRN_OPINV = 4 SSF_KRN_INPUT_DATA_ERROR = 5 SSF_KRN_INVALID_PAR = 6 SSF_KRN_INVALID_PARLEN = 7 OTHERS = 8 . IF SY-SUBRC <> 0. * Implement suitable error handling here ENDIF. CALL FUNCTION 'SCMS_XSTRING_TO_BINARY' EXPORTING BUFFER = BINDATA * APPEND_TO_TABLE = ' ' IMPORTING OUTPUT_LENGTH = LV_OUTPUT_LENGTH TABLES BINARY_TAB = LT_SOLIX_TAB . IF NOT LT_SOLIX_TAB IS INITIAL. OPEN DATASET LV_FILENAME FOR OUTPUT IN BINARY MODE. LOOP AT LT_SOLIX_TAB INTO LS_SOLIX. TRANSFER LS_SOLIX TO LV_FILENAME. ENDLOOP. CLOSE DATASET LV_FILENAME. ENDIF.