Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Doubt in GUI_UPLOAD function

Former Member
0 Likes
541

Hi friends,

CALL FUNCTION 'GUI_UPLOAD '

EXPORTING

FILENAME = FILE

FILETYPE = 'ASC'

*HAS_FIELD_SEPARATOR = 'X'

TABLES

DATA_TAB = ITAB.

In the GUI_UPLOAD function what the filetype should be and has_field_separator should be given what value? What does it mean.How should i prepare the file for example for VA01 transaction if i have a file like this it is not working. What is the problem. I am new to BDC so i need your help on this.

Thanks in Advance.

1 ACCEPTED SOLUTION
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
517

Hi,

File type can be ASC or BIN .

The field separator is "Split columns with TAB during ASCII upload" .

You shoul pass a TAB delimited file to GUI_UPLAOD and it should work fine.

Hope this helps.

Sandeep

4 REPLIES 4
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
518

Hi,

File type can be ASC or BIN .

The field separator is "Split columns with TAB during ASCII upload" .

You shoul pass a TAB delimited file to GUI_UPLAOD and it should work fine.

Hope this helps.

Sandeep

Read only

former_member69765
Contributor
0 Likes
517

The file type can be ASCII or BINARY...

so u can give ASC or BIN.

if you give HAS_FIELD_SEPARATOR = 'X' it will split the file and store in the internal table.

Try uploading a tab delimited file into a internal table with and without this option... you will find the answer ur self.

Read only

Former Member
0 Likes
517

Hi,

CALL FUNCTION 'GUI_UPLOAD '

EXPORTING

FILENAME = <b>Give the file path, where your file is located. Example C:/desktop/filename.txt</b>

FILETYPE = 'ASC'

*HAS_FIELD_SEPARATOR = 'X'

TABLES

DATA_TAB = ITAB.

Try this, If not tell me, I will help you.

Reward Points.

Read only

Former Member
0 Likes
517

try the following.

DATA: begin of ITAB occurs 0,

field1 type char10,

field2 type char10,

end of itab.

data: filename type string value 'C:\TMP.TXT'.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = filename

FILETYPE = 'ASC'

TABLES

DATA_TAB = itab.

loop at itab.

write:/ itab-field1, 20 itab-field2.

endloop.

create a file with tab-delimitations.