2006 Jul 25 8:31 AM
Hi,
Is there any function module to write an internal table to <b>Application Server file</b>?
Regards,
Madhu
HI Madhu,
There is no such Function modules to pass the data from Internal table to Appliation server, you need to use the Datasets to pass the data.
open dataset <<b>dataset name</b>> for output in text mode encoding default.
loop at itab.
<b>transfer itab to <dataset name>.</b>
endloop.
close dataset <dataset name>.but the other way, you can use a Function module to get the data from the Application server to internal table
Thanks
Sudheer
2006 Jul 25 8:33 AM
Hi
You can try FM WS_DOWNLOAD to download an internal table to Application server. You may also try WS_EXCEL to download internal table to an excel file.
Please assign points if its helpful.
Thanx
2006 Jul 25 8:33 AM
Hi,
There is no direct function module.
You will have to use OPEN DATASET statement.
Regards,
Shashank
2006 Jul 25 8:34 AM
Hi,
U need to write a below program :
open dataset <dataset name> for output in text mode encoding default.
loop at itab.
transfer itab to <dataset name>.
endloop.
close dataset <dataset name>.
Sreedhar
2006 Jul 25 8:34 AM
Hi Bhat,
You can use Open Dataset Statement in tOutput Mode and then Use Transfer Statement to Write the Datas into the Application Server.
Prashanth
2006 Jul 25 8:37 AM
HI Madhu,
There is no such Function modules to pass the data from Internal table to Appliation server, you need to use the Datasets to pass the data.
open dataset <<b>dataset name</b>> for output in text mode encoding default.
loop at itab.
<b>transfer itab to <dataset name>.</b>
endloop.
close dataset <dataset name>.but the other way, you can use a Function module to get the data from the Application server to internal table
Thanks
Sudheer
2006 Jul 25 8:46 AM
<b>
REPORT test.
*--Internal table & Work area Declaration
DATA : t_data TYPE STANDARD TABLE OF t000,
wa_data TYPE t000.
DATA : w_message(100) TYPE c.
*--Application Server File path from user
PARAMETERS : p_file TYPE rlgrap-filename.
START-OF-SELECTION.
*--Get data into the Internal table t_data
SELECT * FROM t000 INTO TABLE t_data .
*--- Create the application server file path
OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT MESSAGE w_message.
*--- Display error messages if any.
IF sy-subrc NE 0.
MESSAGE w_message TYPE 'E'.
EXIT.
ELSE.
*---Data is downloaded to the application server file path
LOOP AT t_data INTO wa_data.
TRANSFER wa_data TO p_file.
ENDLOOP.
ENDIF.
*--Close the Application server file (Mandatory).
CLOSE DATASET p_file.
IF sy-subrc NE 0.
MESSAGE 'Error closing the File' TYPE 'E'.
EXIT.
ELSEIF sy-subrc IS INITIAL.
WRITE : 'File saved in the location' , p_file.
ENDIF.</b>
2006 Jul 25 9:31 AM
Hi,
There is no such Function module to pass the data from Internal table to Appliation server, you have to use the Datasets statement as follows-
u can press F1 n see the various other options,
open dataset <dataset name> for output in text mode.
loop at itab.
transfer itab to <dataset name>.
endloop.
Hope this helps,
Regards,
Seema.
close dataset <dataset name>.
2006 Jul 25 10:21 AM
hi,
there are some upload & download function modules,
UPLOAD
WS_UPLOAD
GUI_UPLOAD
DOWNLOAD
WS_DOWNLOAD
GUI_DOWNLOAD
check out,
best of luck,
regards,
kcc
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |