Skip to Content
0
Former Member
Mar 02, 2009 at 08:49 AM

gui_upload for uploading binary file

4967 Views

Hello All,

I am trying to upload '.jpg' files using gui_upload function.

But something goes wrong and it dumps.

I am new to ABAP.

following is the code i used.

DATA: xline TYPE xstring.

DATA : t_file LIKE TABLE OF xline WITH HEADER LINE.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filetype = 'BIN'

filename = 'C:\Documents and Settings\I046674\Desktop\RawTest\images\Image_1000.jpg'

TABLES

data_tab = t_file.

It dumps in the 'GUI_UPLOAD' function itself.

Saying follownig,

==========================================

Error analysis

The error occurred at a statement in the form

ASSIGN f TO <fs> TYPE t

One of these two cases occurred:

1) Field f is a string, a data reference, an object reference, an

internal table or a structure that contains such a field. With the

TYPE addition, this is not possible.

2) Field f is of type x and field symbol <fs> has a character-type type.

When executing the statement, the length of f is not a multiple of

the length (in bytes) of a Unicode character.

===============================================

Can someone help me on this?

Thanks & Regards,

Abhijit