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

read local file

Former Member
0 Likes
616

Hi all

How can I read contents of text file (from local directory)?

Actully there are two lines (300 chars each ) in side text file.

I just want to display on screen...

could any one please help...

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
591

DATA: BEGIN OF wa_itab OCCURS 0,

line TYPE string.

DATA: END OF wa_itab .

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = file "File Location

TABLES

data_tab = wa_itab

EXCEPTIONS

file_open_error = 1

file_read_error = 2

no_batch = 3

gui_refuse_filetransfer = 4

invalid_type = 5

no_authority = 6

unknown_error = 7

bad_data_format = 8

header_not_allowed = 9

separator_not_allowed = 10

header_too_long = 11

unknown_dp_error = 12

access_denied = 13

dp_out_of_memory = 14

disk_full = 15

dp_timeout = 16

OTHERS = 17.

DATA: BEGIN OF wa_itab OCCURS 0,

line TYPE string.

DATA: END OF wa_itab .

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = file "File Location

TABLES

data_tab = wa_itab

EXCEPTIONS

file_open_error = 1

file_read_error = 2

no_batch = 3

gui_refuse_filetransfer = 4

invalid_type = 5

no_authority = 6

unknown_error = 7

bad_data_format = 8

header_not_allowed = 9

separator_not_allowed = 10

header_too_long = 11

unknown_dp_error = 12

access_denied = 13

dp_out_of_memory = 14

disk_full = 15

dp_timeout = 16

OTHERS = 17.

3 REPLIES 3
Read only

Former Member
0 Likes
592

DATA: BEGIN OF wa_itab OCCURS 0,

line TYPE string.

DATA: END OF wa_itab .

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = file "File Location

TABLES

data_tab = wa_itab

EXCEPTIONS

file_open_error = 1

file_read_error = 2

no_batch = 3

gui_refuse_filetransfer = 4

invalid_type = 5

no_authority = 6

unknown_error = 7

bad_data_format = 8

header_not_allowed = 9

separator_not_allowed = 10

header_too_long = 11

unknown_dp_error = 12

access_denied = 13

dp_out_of_memory = 14

disk_full = 15

dp_timeout = 16

OTHERS = 17.

Read only

Former Member
0 Likes
591

Hi,

use FM Gui_DOWNLOAD

if helpful reward some points.

with regards,

Leo Ierardi.

Read only

Former Member
0 Likes
591

Hi,

Use Gui_ upload to load the data from presentation server.

Reward if helpful.