‎2005 Jun 03 8:10 AM
Hi All,
I have to extract data from SAP and to dump them in Application Server.The dumped files then will be extracted by middleware.
Can someone tell me what is the convenient way to dumping data in Application server.
Thx. in advance.
‎2005 Jun 03 9:31 AM
Hi Subrato,
You have the OPEN DATASET, TRANSFER, and CLOSE DATASET commands for this.
Normally, you would build up an internal table with the exact structure of your file, and then loop through it, TRANSFERing each record to the file.
Hope that helps.
Brad
‎2005 Jun 03 8:39 AM
‎2005 Jun 03 9:31 AM
Hi Subrato,
You have the OPEN DATASET, TRANSFER, and CLOSE DATASET commands for this.
Normally, you would build up an internal table with the exact structure of your file, and then loop through it, TRANSFERing each record to the file.
Hope that helps.
Brad
‎2005 Jun 03 1:52 PM
Hi Subrato
Just as an example to Brad's recommendation.
DATA gv_dsn(30) TYPE c .
gv_dsn = '/usr/test.txt',
OPEN DATASET gv_dsn FOR OUTPUT .
LOOP AT gt_data .
TRANSFER gt_data TO gv_dsn .
ENDLOOP .
CLOSE DATASET gv_dsn .You can use this to upload a file from frontend:
DATA gt_data TYPE TABLE OF text1000 WITH HEADER LINE .
DATA gv_dsn(30) TYPE c .
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = p_fname "Path for the frontend file"
filetype = 'BIN'
TABLES
data_tab = gt_data
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
OTHERS = 6 .
gv_dsn = '/usr/test.doc',
OPEN DATASET gv_dsn FOR OUTPUT .
LOOP AT gt_data .
TRANSFER gt_data TO gv_dsn .
ENDLOOP .
CLOSE DATASET gv_dsn .Regards
*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>
‎2005 Jun 06 7:19 AM