Posted: Sun Nov 04, 2007 3:18 pm Post subject: Downloading all selected Function groups with all modules
Downloading all selected Function groups with all modules and subroutines in one file. It does not export the automatically generated function modules for table views!
Code:
REPORT ZZENNO01 LINE-SIZE 250. "Rel. 3.1, 4.5
*
********************** HEADER **************
*
* Copyright (c) 1999 by Enno Wulff,
* Hommola & Wulff Unternehmensberatung GmbH
* http://www.hommola-wulff.de
*
* You can use or modify this report for your own work as long
* as you don't try to sell or republish it.
* In no event will the author be liable for indirect, special,
* Incidental, or consequental damages (if any) arising out of
* the use of this report.
*//////////////////////////////////////////////////////////////////////*
TABLES: TFDIR, TRDIR, TLIBG.
SELECT-OPTIONS:
FUNKTGRP FOR TLIBG-AREA,
USER FOR TLIBG-UNAME.
PARAMETERS: DOWNLOAD AS CHECKBOX,
FILENAME LIKE RLGRAP-FILENAME.
DATA: BEGIN OF T OCCURS 500, "Report für DOWNLOAD
LINE(72),
END OF T,
BEGIN OF ALL OCCURS 500, "Report für DOWNLOAD
LINE(72),
END OF ALL,
XTRDIR LIKE TRDIR OCCURS 100 WITH HEADER LINE,
FUNK_MAIN(8),
X_FILENAME LIKE RLGRAP-FILENAME,
ZINCLUDE(8).
START-OF-SELECTION.
SELECT * FROM TLIBG WHERE AREA IN FUNKTGRP.
CONCATENATE 'SAPL' TLIBG-AREA INTO FUNK_MAIN.
SELECT SINGLE * FROM TRDIR WHERE NAME = FUNK_MAIN
AND ( CNAM IN USER OR UNAM IN USER ).
CHECK SY-SUBRC = 0.
APPEND TRDIR TO XTRDIR.
ENDSELECT.
LOOP AT XTRDIR.
TRDIR = XTRDIR.
REFRESH T.
REFRESH ALL.
ALL = '** Funktionsbausteine: **'. APPEND ALL.
SELECT * FROM TFDIR WHERE PNAME = TRDIR-NAME.
CONCATENATE '**' TFDIR-FUNCNAME INTO ALL. APPEND ALL.
ENDSELECT. "TFDIR
READ REPORT TRDIR-NAME INTO T.
LOOP AT T.
IF T(10) CS 'INCLUDE'.
PERFORM DO_EXCLUDE USING T.
ELSE.
ALL = T. APPEND ALL.
ENDIF.
ENDLOOP.
FORMAT COLOR 5.
WRITE: / '*********************'.
WRITE: TRDIR-NAME.
WRITE: '*********************'.
FORMAT COLOR OFF.
DATA: NAME(8),
FALSCHER_ALARM,
ZEILE(72),
BEGIN OF INC OCCURS 500, "Report für DOWNLOAD
LINE(72),
END OF INC.
ZEILE = STRING.
IF ZEILE(1) <> '*'.
IF ZEILE CS 'TABLEFRAME' OR
ZEILE CS 'TABLEPROC' OR
ZEILE CS 'LSVIM'. " OR
* ZEILE CS 'STRUCTURE'.
ALL = ZEILE. APPEND ALL.
IF NOT ZEILE CS 'INCLUDE STRUCTURE'.
ALL = '*=->> Automatisch generiert - Include wird übersprungen'.
APPEND ALL. EXIT.
ENDIF.
ENDIF.
CLEAR FALSCHER_ALARM.
DO.
IF ZEILE(7) = 'INCLUDE'.
EXIT.
ELSEIF ZEILE(1) = '"'.
FALSCHER_ALARM = 'X'. EXIT.
ELSE.
SHIFT ZEILE.
ENDIF.
IF SY-INDEX > 100.
FALSCHER_ALARM = 'X'.
EXIT.
ENDIF.
ENDDO.
IF FALSCHER_ALARM = SPACE.
NAME = ZEILE+8(8).
CONCATENATE '*$*$ Start ofInclude ' NAME INTO ALL
SEPARATED BY SPACE.
APPEND ALL.
REFRESH INC.
READ REPORT NAME INTO INC.
LOOP AT INC.
IF INC CS 'INCLUDE'.
PERFORM DO_EXCLUDE USING INC.
ELSE.
ALL = INC. APPEND ALL.
ENDIF.
ENDLOOP.
CONCATENATE '*$*$ End of Include ' NAME INTO ALL
SEPARATED BY SPACE.
ELSE.
ALL = ZEILE.
ENDIF.
ELSE.
ALL = ZEILE.
ENDIF.
APPEND ALL.
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.