Posted: Mon Sep 10, 2007 7:33 pm Post subject: Using WS_DOWNLOAD
Code:
*** Internal table to be downloaded
data: begin of z_sales occurs 10000,
kunnr like kna1-kunnr, "Customer number
name1 like kna1-name1, "Name
end of z_sales.
data: begin of t_colnames occurs 10,
name(15), "Column names for download
end of t_colnames.
selection-screen begin of block g2 with frame title text-001.
parameters: p_print radiobutton group l1, “View
p_down radiobutton group l1, “Download
p_file like rlgrap-filename default 'C:\'.
selection-screen end of block g2.
*----------------------------------------------------------------------*
* Selection Screen processing *
*----------------------------------------------------------------------*
at selection-screen on p_file.
* If download is checked, but no file name is entered, error
if p_down eq 'X' and p_file eq space.
message e000 with
'Please enter file name for download.'.
endif.
*** Populate Itabs for download
* Column names
move 'Sold-to' to t_colnames-name.
append t_colnames.
move 'Name' to t_colnames-name.
append t_colnames.
* Data
move vbak-kunnr to zsales-kunnr.
move kna1-name1 to zsales-name1.
append zsales.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.