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

File handling issue

Former Member
0 Likes
670

Dear All,

I have 1 test program say ZTEST,

The above prog is sending data to application server. The file path is like 'path /usr/sap/tmp/ZFILE.txt'

I have 2 files,

first file contains data like

1

2

3

Second file contains data like

A

B

C

If I execute the program ZTEST for the first file. The first file data 1 2 3 is sending to file and the file 'path /usr/sap/tmp/ZFILE.txt' is having

1

2

3

If I execute the program ZTEST for second time for the second file. The second file data A B C is sending to file and the file 'path /usr/sap/tmp/ZFILE.txt' is having

A

B

C

If I execute the program ZTEST for first file and second file simultaniously. The first file data 1 2 3 or second file data A B C should send, but it is sending mimatching data to file 'path /usr/sap/tmp/ZFILE.txt' . now file is having mixup data

1

B

3

or

A

2

C

But I want to send the data in the below format.

1

2

3

or

A

B

C

Please let me know if you have any concerns....

Thanks in advance

Kind regards,

M.Rayapureddy

Dear All,

I have 1 test program say ZTEST,

The above prog is sending data to application server. The file path is like 'path /usr/sap/tmp/ZFILE.txt'

I have 2 files,

first file contains data like

1

2

3

Second file contains data like

A

B

C

If I execute the program ZTEST for the first file. The first file data 1 2 3 is sending to file and the file 'path /usr/sap/tmp/ZFILE.txt' is having

1

2

3

If I execute the program ZTEST for second time for the second file. The second file data A B C is sending to file and the file 'path /usr/sap/tmp/ZFILE.txt' is having

A

B

C

If I execute the program ZTEST for first file and second file simultaniously. The first file data 1 2 3 or second file data A B C should send, but it is sending mimatching data to file 'path /usr/sap/tmp/ZFILE.txt' . now file is having mixup data

1

B

3

or

A

2

C

But I want to send the data in the below format.

1

2

3

or

A

B

C

Please let me know if you have any concerns....

Thanks in advance

Kind regards,

M.Rayapureddy

5 REPLIES 5
Read only

JozsefSzikszai
Active Contributor
0 Likes
647

hi Rayapu,

merge the two internal tables into a single one in your program and download to app. server after the merge.

ec

Read only

0 Likes
647

Hi Eric,

Actually I am executing the program simultaniously

Read only

andreas_mann3
Active Contributor
0 Likes
647

hi ,

use command:

opend dataset ... for appending

A.

Read only

Former Member
0 Likes
647

try changing the properties od the dataset at run time using SET DATASET

TYPE-POOLS:

dset.

DATA:

dsn TYPE STRING,

fld TYPE STRING,

attr TYPE dset_attributes.

....

OPEN DATASET dsn IN LEGACY TEXT MODE FOR INPUT.

attr-changeable-indicator-code_page = 'X'.

attr-changeable-code_page = '0100'.

attr-changeable-indicator-repl_char = 'X'.

attr-changeable-repl_char = '*'.

SET DATASET dsn ATTRIBUTES attr-changeable.

READ DATASET dsn INTO fld.

WRITE / fld.

CLOSE DATASET dsn.

Read only

0 Likes
647

Hi Srijith,

Thanks for your prompt reply.

I am not reading the file, sending file to application server.

Open data set DSN in TEXT MODE FOR output.

Thanks and regards,

M.Rayapureddy