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: 

Usage of logical name, logical path name, physical name of a file

Former Member
0 Kudos

Hi all,

I have to write to a file on the application server. I had been given the logical name, logical path name and physical name. Suggest how to use these parameters and get the path where to store the file.

Thanks & Regards,

Kasinath.

1 REPLY 1

gopi_narendra
Active Contributor
0 Kudos
  • Open Dataset

catch system-exceptions DATASET_CANT_OPEN = 8.

open dataset UNIX_FILE for output in text mode encoding default.

endcatch.

  • Write to Dataset

loop at IT_STR into IS_STR.

catch system-exceptions DATASET_NOT_OPEN = 0 .

transfer IS_STR-STR to UNIX_FILE.

endcatch.

endloop.

if SY-SUBRC eq 0.

message S138(ZSM) with 'Data Downloaded to Unix File'.

endif.

  • Close Dataset

close dataset UNIX_FILE.

Regards

- Gopi