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: 

Placing a file in Application server

Former Member
0 Kudos
146

Hi All,

how to place a text file in application server, which will be read by my program for processing.

Thx in advance.

5 REPLIES 5

matt
Active Contributor
0 Kudos
114

From outside abap, FTP might be a nice solution.

From inside ABAP see the ABAP HELP on OPEN DATASET, TRANSFER, CLOSE DATASET.

matt

Former Member
0 Kudos
114

Thx for nice solution, if i use FTP, to write a file do i need URL, login and password to write in a required location. i just want to test the program, it has to upload the file from application server.

how can i place my file on it.

matt
Active Contributor
0 Kudos
114

You can write a program in ABAP using the commands I suggested to put the file onto the appserver. If you're going to transfer it outside of ABAP, then you'll need access to the app server file system - through FTP or whatever method. And for that access, you'll probably just have to ask your basis team to provide it.

Former Member
0 Kudos
114

transaction CG3Z

Former Member
0 Kudos
114

open dataset p_input in text mode encoding default for input.

if sy-subrc <> 0.

message e000 with 'Error on input file read'.

endif.

do.

read dataset p_input into l_line.

if sy-subrc <> 0.

exit.

endif.

split l_line at c_pipe

into i_input-partner

i_input-sorg

i_input-dist

i_input-div

v_junk_data.

append i_input.

enddo.

close dataset p_input.

if i_input[] is initial.

message e000 with 'Input file empty pls check'.

endif.

use above code for your requirement.

Regards,

madan.