* This simple program will give you a brief idea how to download
* a bunch of custom reports to your desktop
*--------------------------------------------------------*
REPORT ztest.
parameters: p_file type rlgrap-filename.
DATA: it_data TYPE TABLE OF string WITH HEADER LINE,
prog TYPE c LENGTH 30,
itab TYPE TABLE OF string,
v_lines TYPE i.
TYPES: BEGIN OF ty_name,
objname TYPE tadir-obj_name,
END OF ty_name.
DATA: it_name TYPE TABLE OF ty_name WITH HEADER LINE.
*at selection screen on value-request for p_file.
start-of-selection.
SELECT obj_name FROM tadir INTO TABLE it_name
WHERE object = 'PROG'
AND obj_name LIKE 'Z%'.
LOOP AT it_name.
prog = it_name-objname.
READ REPORT prog INTO itab.
describe table itab lines v_lines.
IF sy-subrc = 0.
*---this is to identify the program from another with this gap
APPEND LINES OF itab FROM 1 TO v_lines TO it_data.
append '*************************************************************' to it_data.
do 3 times.
append '' to it_data.
enddo.
REFRESH itab.
clear v_lines.
ENDIF.
ENDLOOP.
data: l_file type string.
l_file = p_file.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_file
tables
data_tab = it_data .
ALSO READ:
- Download SAP Data In XML Format.
- Download SAPScript Output To PDF File.
- Download Data From Application Server Files To Presentation Server Using FM C13Z_APPL_TO_FRONT_END.
- Creating A Directory On Presentation Server Using FM GUI_CREATE_DIRECTORY.
- Removing A Directory From Presentation Server Using FM GUI_REMOVE_DIRECTORY.
RETURN TO MAIN INDEX:
- Sample Programs On Uploading & Downloading Files.
- Sample Programs On HR ABAP.
- Sample Report Programs On ALV List/ Grid Display.
- Sample Programs On Selection Screen.
- Sample Programs On BDC.
.....Back To MAIN INDEX.
No comments:
Post a Comment