cancel
Showing results for 
Search instead for 
Did you mean: 

File Upload and download from a central repositiory.

Former Member
0 Kudos

Hi experts,

I have written the following code in webdynpro for abap...But it is giving error as "Access Via Null Object Not possible"

This code runs perfectly fine in abap. I dont know what is the problem in webdynpro .

Code :

data: ifile1 type RCGFILETR-FTAPPL,

ifile3 type RCGFILETR-FTAPPL,

ifile2 type ESEFTAPPL value 'd:\usr\sap\D11\DVEBMGS00\work\TEST1\', "test5.ppt'.

filenam type string,

filenam1 type string,

filenam2 type string.

ifile1 = lv_file_name.

filenam = ifile1.

ifile3 = ifile1.

while ifile1 CS '\'.

split ifile1 at '\' into filenam1 filenam2.

ifile1 = filenam2.

endwhile.

Concatenate ifile2 filenam2 into ifile2.

CALL FUNCTION 'C13Z_FILE_UPLOAD_BINARY'

EXPORTING

i_file_front_end = ifile3

i_file_appl = ifile2

I_FILE_OVERWRITE = 'X' "ESP1_FALSE

  • IMPORTING

  • E_FLG_OPEN_ERROR =

  • E_OS_MESSAGE =

EXCEPTIONS

FE_FILE_NOT_EXISTS = 1

FE_FILE_READ_ERROR = 2

AP_NO_AUTHORITY = 3

AP_FILE_OPEN_ERROR = 4

AP_FILE_EXISTS = 5

OTHERS = 6

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Pls help me...

Thanx,

Pratibha

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

very useful solutions

arjun_thakur
Active Contributor
0 Kudos

Hi Pratibha,

I don't think you are getting the error due to the code which you have written here. You must have written some code that is causing the error. Put a breakpoint in your code and debug your code.

Regards

Arjun