‎2007 May 16 3:12 PM
Hi all,
I want to pass the data into application server from an internal table in a fixed text format. Kindly help me.
Thanks in advance,
praveena
‎2007 May 16 3:16 PM
You will have to use OPEN DATASET command for the same.
DATA FNAME(60).
FNAME = '/tmp/myfile'.
OPEN DATASET 'myfile'.
OPEN DATASET FNAME.
loop at itab.
transfer itab to fname.
endloop.
CLOSE DATA FNAME.
Thanks
Aneesh.
‎2007 May 16 3:14 PM
Hi,
Go through the following code
DATA FNAME(60) VALUE 'myfile'. " File name of applicationserver
TYPES: BEGIN OF TY_ITAB,
matnr TYPE matnr.
TYPES: END OF OF TY_ITAB
DATA : ITAB TYPE TABLE OF TY_ITAB.
DATA : WA LIKE LINE OF ITAB.
*Populate ITAB as per ur requirement
OPEN DATASET FNAME FOR OUTPUT IN TEXT MODE.
LOOP AT ITAB INTO WA.
TRANSFER WA TO FNAME.
ENDLOOP.
CLOSE DATASET FNAME.
Regards,
Ranjit Thakur.
<b>Please Mark The Helpful Answer.</b>
‎2007 May 16 3:16 PM
cHECK THIS CODE -
REPORT ZUPLOAD.
tables : pernr.
infotypes : 0002.
data : begin of t_0002 occurs 0,
vorna(20),
nachn(20),
end of t_0002.
parameters : p_file type rlgrap-filename .
start-of-selection.
get pernr.
rp-provide-from-last p0002 space pn-begda pn-endda.
move p0002-vorna to t_0002-vorna.
move p0002-nachn to t_0002-nachn.
append t_0002.
clear t_0002.
end-of-selection.
loop at t_0002.
write : / t_0002.
endloop.
open dataset p_file for output in text mode.
if sy-subrc ne 0.
write : / 'not op'.
endif.
loop at t_0002.
transfer t_0002 to p_file.
endloop.
close dataset p_file.
Regards,
Amit
reward all helpful replies.
‎2007 May 16 3:16 PM
You will have to use OPEN DATASET command for the same.
DATA FNAME(60).
FNAME = '/tmp/myfile'.
OPEN DATASET 'myfile'.
OPEN DATASET FNAME.
loop at itab.
transfer itab to fname.
endloop.
CLOSE DATA FNAME.
Thanks
Aneesh.
‎2007 May 16 3:19 PM
Hi,
Check the following link:
http://sap-img.com/abap/download-and-upload-your-abap-program.htm
Hope this helps.
Reward if helpful.
Regards,
Sipra