2008 May 13 9:46 AM
Hi All,
how to place a text file in application server, which will be read by my program for processing.
Thx in advance.
2008 May 13 9:48 AM
From outside abap, FTP might be a nice solution.
From inside ABAP see the ABAP HELP on OPEN DATASET, TRANSFER, CLOSE DATASET.
matt
2008 May 13 10:19 AM
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.
2008 May 13 11:58 AM
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.
2008 May 13 9:48 AM
2008 May 13 10:25 AM
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.