Posted: Sat Nov 17, 2007 7:15 pm Post subject: Download ABAP/4 source code and TEXTPOOL to the desktop
Code:
REPORT ZZBGS106 MESSAGE-ID Z1.
*----------------------------------------------------------------------*
* Description: Utillity used for downloading abap/4 source code and *
* text elements to the desktop using ws_download. *
* Is useful as backup or for transporting to another site.*
* You must run this program in foreground/online due to *
* the use of ws_download throug the SAPGUI. *
* *
* Implementing The program is client independent. *
* *
* Authoriza. No Authorization check. *
* *
* Submitting: Run by SA38, SE38. *
* *
* Parametre: You can use generic values when filling the parameters *
* except for the Path. *
* *
* Customizing: No need for customization. *
* *
* Change of You only need to do the syntax check at releasechanges. *
* release: *
* *
* R/3 Release: Developed and tested in R/3 Release: *
* 2.2F *
* 3.0D *
* *
* Programmer: Benny G. Sørensen, BGS-Consulting *
* Date: Nov 1996. *
* *
* Version 1
*-------------------------------Corrections----------------------------*
* Date Userid Correction Text *
* 11.11.1996 BGS :::::::::::::: Start of development *
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
* Tables *
*----------------------------------------------------------------------*
TABLES: TRDIR "Application Masterdata
.
*----------------------------------------------------------------------*
* Parameters *
*----------------------------------------------------------------------*
SELECT-OPTIONS: REPO FOR TRDIR-NAME.
PARAMETERS: PATH(60) TYPE C DEFAULT 'C:\SAP\'.
*----------------------------------------------------------------------*
* Work Variables and internal tables *
*----------------------------------------------------------------------*
DATA: BEGIN OF TABSOURCE OCCURS 10
,SOURCE(72) TYPE C
,END OF TABSOURCE.
DATA: BEGIN OF TABTEXT OCCURS 50
,TAB LIKE TEXTPOOL
,END OF TABTEXT.
DATA: BEGIN OF TABRDIR OCCURS 100
,RDIR LIKE TRDIR
,END OF TABRDIR.
DATA: FILENAME LIKE RLGRAP-FILENAME
,MODE TYPE C VALUE ' '
,RDIRROWS TYPE I
,SOURCEROWS TYPE I
,RC TYPE I
,LENGTH TYPE I
.
FIELD-SYMBOLS: <P> .
*----------------------------------------------------------------------*
* Constants *
*----------------------------------------------------------------------*
DATA: OK TYPE I VALUE 0
,FAIL TYPE I VALUE 1.
*----------------------------------------------------------------------*
* EVENT: validate users entries on the selection screen *
*----------------------------------------------------------------------*
AT SELECTION-SCREEN.
DATA: I TYPE I.
DESCRIBE TABLE REPO LINES I.
IF I <= 0.
SET CURSOR FIELD REPO.
MESSAGE E065 WITH TEXT-101.
ENDIF.
*----------------------------------------------------------------------*
* EVENT: Start-Of-Selection *
*----------------------------------------------------------------------*
START-OF-SELECTION.
* Set slash at the end of path if not speciefied by user
CONDENSE PATH NO-GAPS.
LENGTH = STRLEN( PATH ) .
SUBTRACT 1 FROM LENGTH.
ASSIGN PATH+LENGTH(1) TO <P>.
IF <P> <> '\'.
ADD 1 TO LENGTH.
ASSIGN PATH+LENGTH TO <P>.
<P> = '\'.
ENDIF.
SELECT * FROM TRDIR INTO TABLE TABRDIR WHERE NAME IN REPO.
DESCRIBE TABLE TABRDIR LINES RDIRROWS.
CHECK RDIRROWS > 0.
* For every selected program:
LOOP AT TABRDIR.
MOVE TABRDIR TO TRDIR.
PERFORM DOWNLOAD_SOURCE USING RC.
CHECK RC = OK.
PERFORM DOWNLOAD_TEXTPOOL USING RC.
ENDLOOP.
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.