10-25-2007 11:26 AM
Hi,
Please send me example program for transfering data through application server.
ex: open dataset file for output or input.
Thanks
Ali
10-26-2007 2:21 AM
Is this the type of thing you mean? A "real" version would need validations etc, but it should give you the idea of what might be needed.
Jonathan
report zlocal_jc_sdn_extract_to_file.
parameters:
p_fname like rlgrap-filename obligatory.
start-of-selection.
perform create_extract.
*---------------------------------------------------------------------
* form create_extract.
*---------------------------------------------------------------------
form create_extract.
data:
l_text like sy-ucomm,
begin of ls_data,
matnr like makt-matnr,
maktx like makt-maktx,
end of ls_data,
lt_data like ls_data occurs 100.
select matnr maktx into corresponding fields of table lt_data
from makt
where spras = sy-langu.
if lt_data[] is initial.
exit.
endif.
open dataset p_fname for output in text mode. "encoding default.
l_text = 'This is a header'.
transfer l_text to p_fname.
loop at lt_data into ls_data.
transfer ls_data to p_fname.
endloop.
l_text = 'This is a footer'.
transfer l_text to p_fname.
close dataset p_fname.
endform.