Application Development 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: 

writting in a file

Former Member
0 Kudos

Hi Gurus,

In 1st pgm, im processing some records and writing that into a file named ‘plant’ in sapia directory.In the 2nd pgm im processing some records and I need to write these records to the same file named ‘plant’ in sapia directory, without over writing the previous record… can I do this? If possible please give me the steps and coading…

1 ACCEPTED SOLUTION

amit_khare
Active Contributor
0 Kudos

Use Open Dataset in APPEND mode. Check Help for open Dataset with F!.

Regards,

Amit

Reward all helpful replies.

4 REPLIES 4

amit_khare
Active Contributor
0 Kudos

Use Open Dataset in APPEND mode. Check Help for open Dataset with F!.

Regards,

Amit

Reward all helpful replies.

Former Member
0 Kudos

OPEN DATASET... FOR APPENDING tries to open the file in 'append' mode. If the file is already open, the system moves to the end of the file. When you open a file using FOR APPENDING, attempting to read the file sets SY-SUBRC to 4. The system display the end of the file.

reward if useful.

Former Member
0 Kudos

HI,

OPEN DATASET pa_path FOR APPENDING IN TEXT MODE ENCODING DEFAULT.

in local:

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = p_va_file

write_field_separator = ca_x

<b> append = 'X'</b>

TABLES

data_tab = i_export

EXCEPTIONS

file_write_error = 1

no_batch = 2

gui_refuse_filetransfer = 3

invalid_type = 4

no_authority = 5

unknown_error = 6

header_not_allowed = 7

separator_not_allowed = 8

filesize_not_allowed = 9

header_too_long = 10

dp_error_create = 11

dp_error_send = 12

dp_error_write = 13

unknown_dp_error = 14

access_denied = 15

dp_out_of_memory = 16

disk_full = 17

dp_timeout = 18

file_not_found = 19

dataprovider_exception = 20

control_flush_error = 21

OTHERS = 22.

rgs

Former Member
0 Kudos

OPEN DATASET ,....... FOR APPENDING.

*REWARD IF SOLVED*