Skip to Content
3
Former Member
Jul 03, 2007 at 06:58 PM

GUI_UPLOAD error

193 Views

Hello,

I am trying to load data from excel into internal tables.

*********************************************************************************************

REPORT ZdataFromExcel

data: begin of itable occurs 0,

variable1 type char20,

variable2 type char20,

end of itab.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = 'C:/myfile.xls'

FILETYPE = 'ASC'

TABLES

DATA_TAB = itable

IF SY-SUBRC <> 0.

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

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

ENDIF.

loop at itable.

write: /10 itable-var1, 30 itable-var2.

endloop.

*********************************************************************************************

I am getting error as <u><b>"File is not availiable"</b></u>.

Is there anything I am missing to put, I have checkted that file is there in the folder mentioned into Filename in the Func module ?

Thanks for your help

Pranav