‎2008 Jun 12 9:46 AM
Hi all,
i doveloped one program .
this program will generate output list .
i want to save that list in Application server as it is.
can anycody tell me the process for this.
or
is there any FM for this?
‎2008 Jun 12 9:53 AM
Hi,
If your program generates a list output and you want to place that file in Application server then you need to create a folder (i.e path for application server ) . In that you can create files using OPEN DATASET file_name FOR OUTPUT IN TEXT MODE.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Jun 12, 2008 5:09 PM
‎2008 Jun 12 9:55 AM
Hi,
Adding to the previous reply , use al11 transaction to view the files in application server.
Regards,
Nisrin.
‎2008 Jun 12 10:38 AM
hiiiii,
i understand but we can send internal table .
in my output list i have alv display with list header.
my outputlist will consist the follwong
some derader
no of error rec
no od success rec
job started time
job ended time
now internal table display.
so according to u r mail i can display only internal table
i cont display header details.
i want entaire list in application server
‎2008 Jun 12 10:06 AM
Hi,
You need to follow the following steps.
1.) Open the file using command OPEN DATASAET where you want to write the file in application server.
2.) Once file is opened loop at your internal table and move the data to the applicaation server using command TRANSFER DATASET.
3.) Once all data is transferred close the loop and use command CLOSE DATASET.
Once this is done, you can see your file on application server using tcode AL11.
Hope this answers your questions.
Regards,
Lalit Kabra
‎2008 Jun 12 10:09 AM
‎2008 Jun 12 10:19 AM
f_path2 - application server path name ( /sap/asdf.txt')
t_table - your internal table
open dataset f_path2 for output in text mode encoding default.
if sy-subrc = 0.
loop at t_table into wa_table.
transfer wa_table to f_path2.
endloop.
endif.
‎2008 Jun 12 10:22 AM
hii
you can write & read file on application server by using following code
DATA FNAME(60) VALUE 'myfile.txt'.
OPEN DATASET FNAME FOR OUTPUT in text mode encoding default.
LOOP AT TAB INTO LIN.
TRANSFER LIN TO FNAME.
ENDLOOP.
CLOSE DATASET FNAME.
OPEN DATASET FNAME FOR inPUT in text mode encoding default.
DO.
READ DATASET FNAME INTO LIN.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
WRITE: / LIN-COL1, LIN-COL2.
ENDDO.
CLOSE DATASET FNAME.<REMOVED BY MODERATOR>
thx
twinkal
Edited by: Alvaro Tejada Galindo on Jun 12, 2008 5:10 PM
‎2008 Jun 12 10:22 AM
Hi ,
check this Function module SAP_CONVERT_TO_TXT_FORMAT.
This will help you a lot .
‎2008 Jun 12 11:51 AM
Hi,
The files on application server only hold the data. The other parameters that you are displaying in output like the no.of success records and some header info need not be written into file. Please consult your functional and technical lead to confirm the requirement.
‎2008 Jun 12 12:01 PM
If the list headers are constant.. you can just hard code it.. concatenate it manually using tab operator and write it to the application server at the first time, as first line.
the same filename can be opened in appending mode to transfer the contents of internal table.
Hope this will help!