REPORT Z_FIND_TRANSPORT
NO STANDARD PAGE HEADING
LINE-SIZE 80
LINE-COUNT 65(1).
*----------------------------------------------------------------------*
* System : Basis Date : xx/xx/xxxx *
* Author : SAG08 *
* Company: xxxxxxxxx *
* Title : Search for Corrections and Transports by Object *
*----------------------------------------------------------------------*
* Report Type: Standard Report *
* Function : *
*----------------------------------------------------------------------*
* Reference - *
* Transport - - *
*----------------------------------------------------------------------*
* Changes : *
* Ver Date Author Description *
* --- ---------- ---------------- -------------------------------------
* Vnn dd/mm/yyyy x xxxxxxxx xxxxxxxxxxx *
*----------------------------------------------------------------------*
* 1.0 10/19/1999 sag08 created *
* *
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
* Tables *
*----------------------------------------------------------------------*
TABLES: E071.
*----------------------------------------------------------------------*
* Parameters / Select-Options *
*----------------------------------------------------------------------*
PARAMETERS: P_OBJNM LIKE E071-OBJ_NAME OBLIGATORY .
*----------------------------------------------------------------------*
* Structures *
*----------------------------------------------------------------------*
DATA: BEGIN OF BDCDATA OCCURS 1.
INCLUDE STRUCTURE BDCDATA.
DATA: END OF BDCDATA.
DATA: BEGIN OF I_E071 OCCURS 1.
INCLUDE STRUCTURE E071.
DATA: END OF I_E071.
*----------------------------------------------------------------------*
* Variables *
*----------------------------------------------------------------------*
DATA: V_LIN(8) TYPE N.
*----------------------------------------------------------------------*
* TOP OF PAGE EVENT *
*----------------------------------------------------------------------*
TOP-OF-PAGE.
*----------------------------------------------------------------------*
* Main Program *
*----------------------------------------------------------------------*
START-OF-SELECTION.
*
PERFORM GET_DATA.
*
END-OF-SELECTION.
*&---------------------------------------------------------------------*
*& Form GET_DATA
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM GET_DATA.
*
CLEAR I_E071. REFRESH I_E071.
MOVE '%' TO P_OBJNM+119(1).
CONDENSE P_OBJNM NO-GAPS.
SELECT * FROM E071 APPENDING CORRESPONDING FIELDS OF
TABLE I_E071 WHERE OBJ_NAME LIKE P_OBJNM.
DESCRIBE TABLE I_E071 LINES V_LIN.
IF V_LIN NE 0.
PERFORM OUTPUT_DATA.
ELSE.
MESSAGE ID 'MM' TYPE 'I' NUMBER '899' WITH
'No Transports'
'or Corrections'
'exist for this'
'object name'.
ENDIF.
*
ENDFORM. " GET_DATA
*&---------------------------------------------------------------------*
*& Form FILL_SE01
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM FILL_SE09.
PERFORM DYNPRO USING:
'X' 'RDDM0002' '0100',
' ' 'BDC_OKCODE' 'SNGL'.
*
PERFORM DYNPRO USING:
'X' 'SAPLSTRH' '1200',
' ' 'GV_1200_TRKORR' I_E071-TRKORR,
' ' 'BDC_OKCODE' '/00'.
*
ENDFORM. " FILL_SE01
*&---------------------------------------------------------------------*
*& Form DYNPRO
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM DYNPRO USING SCREENBEGIN PROGRAM VALUE.
*
IF SCREENBEGIN EQ 'X' OR SCREENBEGIN EQ 'x'.
MOVE: PROGRAM TO BDCDATA-PROGRAM,
VALUE TO BDCDATA-DYNPRO,
'X' TO BDCDATA-DYNBEGIN.
APPEND BDCDATA.
ELSE.
CLEAR BDCDATA.
MOVE: PROGRAM TO BDCDATA-FNAM,
VALUE TO BDCDATA-FVAL.
APPEND BDCDATA.
ENDIF.
*
ENDFORM. " DYNPRO
*&---------------------------------------------------------------------*
*& Form OUTPUT_DATA
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM OUTPUT_DATA.
*
SORT I_E071 BY OBJ_NAME TRKORR.
* delete adjacent duplicates from i_e071 comparing trkorr.
*
LOOP
AT I_E071.
WRITE : /00 I_E071-TRKORR HOTSPOT.
HIDE I_E071-TRKORR.
WRITE : 30 I_E071-OBJ_NAME.
ENDLOOP.
*
ENDFORM. " OUTPUT_DATA
Convert ABAP coding to html based printout
*&---------------------------------------------------------------------*
*& Report ZSS_CODE_2_HTML (Version 1.0)
*& by Stefan Schmocker (1999)
*& emails:
* privat: unter der Woche mit Weiterleitung an privat
* - Gesammelte Textelemente in Tabellen
* - Links zu den Untersektionen
* geplant: - feinere Linkaufteilung zu den einzelnen Includes
* - Links innerhalb des Quellcodes zu entsprechenden Punkten
* - GUI-Status,
* - Dokumentation,
* - Dynpro-ablauflogik und Fullscreen-Anzeige
*&---------------------------------------------------------------------*
REPORT ZSS_CODE_2_HTML LINE-SIZE 255.
TABLES: D010INC.
* Tabelle fur die aufzunehmenden ABAP-Texte
DATA: BEGIN OF SOURCECODE OCCURS 0,
LINE(200),
END OF SOURCECODE.
* Tabelle fur den erzeugten HTMLCode
DATA: BEGIN OF HTMLCODE OCCURS 5000,
LINE(256),
END OF HTMLCODE.
DATA: BEGIN OF INCLUDETAB OCCURS 0,
NAME LIKE D010INC-INCLUDE,
END OF INCLUDETAB.
DATA: TEXTELEMENTETAB LIKE TEXTPOOL OCCURS 50 WITH HEADER LINE.
DATA: EINRUECK TYPE I, " Soweit im HTML einrucken
CHAR2(2).
*----------- Selektionsbild und Verarbeitung --------------------------
SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME.
PARAMETERS: PROGNAME LIKE D010SINF-PROG.
PARAMETERS: HTMLFILE LIKE RLGRAP-FILENAME
DEFAULT 'c:\temp\test.html'.
PARAMETERS: MITINCLD AS CHECKBOX DEFAULT 'X',
MITTEXTL AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK BL1.
SELECTION-SCREEN BEGIN OF BLOCK BL2 WITH FRAME.
PARAMETERS: MITZEILE AS CHECKBOX DEFAULT 'X',
ONSCREEN AS CHECKBOX DEFAULT 'X',
SAPINCLD AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK BL2.
* Ein subtrivialer Tests
AT SELECTION-SCREEN.
READ REPORT PROGNAME INTO SOURCECODE.
IF SY-SUBRC <> 0.
MESSAGE E159(AT) WITH 'Program could not be read'.
ENDIF.
*----------- Programmanfang --------------------------------------------
END-OF-SELECTION.
* In der Tabelle sourcecode sollte hier schon der Quelltext stehen.
PERFORM ERZEUGE_KOPF.
PERFORM WRITE_SOURCE.
* Includes falls erwunscht
IF MITINCLD = 'X'.
PERFORM WRITE_INCLUDES.
ENDIF.
* Textelemente falls erwunscht
* Includes falls erwunscht
IF MITTEXTL = 'X'.
PERFORM WRITE_TEXTELEMENTE.
ENDIF.
* Und abschlieЯen des Files
PERFORM ERZEUGE_SCHWANZ.
PERFORM ABSPEICHERN TABLES HTMLCODE
USING HTMLFILE.
*----------- Unterroutinen --------------------------------------------
* include zcd_ss_debugroutinen.
*---------------------------------------------------------------------*
* FORM ABSPEICHERN *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
* --> FILENAME *
*---------------------------------------------------------------------*
FORM ABSPEICHERN TABLES TEXT_ZU_SCHREIBEN
USING FILENAME LIKE RLGRAP-FILENAME.
*&---------------------------------------------------------------------*
*& Form ERZEUGE_SCHWANZ
*&---------------------------------------------------------------------*
* Erzeugt die abschlieЯenden HTML-Befehle
*----------------------------------------------------------------------*
FORM ERZEUGE_SCHWANZ.
HTMLCODE-LINE = ' </body>'.APPEND HTMLCODE.
HTMLCODE-LINE = '</html>'.APPEND HTMLCODE.
ENDFORM. " ERZEUGE_SCHWANZ
*&---------------------------------------------------------------------*
*& Form WRITE_SOURCE
*&---------------------------------------------------------------------*
* Schreibt den Sourcecode
*----------------------------------------------------------------------*
FORM WRITE_SOURCE.
DATA: ROT.
* Erstmal die Uberschrift hinstellen
PERFORM ADDZEILE USING '>+' '<h1 align=center>'.
PERFORM ZEILEUMB USING '' PROGNAME.
PERFORM ADDZEILE USING '->' '</h1>'.
CLEAR HTMLCODE-LINE.APPEND HTMLCODE.
* Link auf Includes
IF MITINCLD = 'X'.
PERFORM ADDZEILE USING '>+' '<h2 align=left>'.
PERFORM ZEILEUMB USING '' '<a href="#Includes">Includes</a>'.
PERFORM ADDZEILE USING '->' '</h2>'.
ENDIF.
* Link auf Textelemente
IF MITTEXTL = 'X'.
PERFORM ADDZEILE USING '>+' '<h2 align=left>'.
PERFORM ZEILEUMB USING ''
'<a href="#Textelemente">Elementos de texto</a>'.
PERFORM ADDZEILE USING '->' '</h2>'.
ENDIF.
* Und Linie zum Trennen gegen den Quellcode
PERFORM ADDZEILE USING '>+' '<h2 align=left>'.
PERFORM ZEILEUMB USING '' '<hr>'.
PERFORM ADDZEILE USING '->' '</h2>'.
* Und jetzt der Quellcode
PERFORM CODELINES.
ENDFORM. " WRITE_SOURCE
*&---------------------------------------------------------------------*
*& Form ADDZEILE
*&---------------------------------------------------------------------*
* Fugt eine Zeile in den HTML-Code ein und korrigiert Einrucktiefe
*----------------------------------------------------------------------*
FORM ADDZEILE USING VALUE(EINRUECKEN) LIKE CHAR2
VALUE(TEXT).
DATA: ER.
ER = EINRUECKEN(1).
IF ER = '+'.
EINRUECK = EINRUECK + 1.
ELSEIF ER = '-'.
EINRUECK = EINRUECK - 1.
ENDIF.
ER = EINRUECKEN+1(1).
IF ER = '+'.
EINRUECK = EINRUECK + 1.
ELSEIF ER = '-'.
EINRUECK = EINRUECK - 1.
ENDIF.
ENDFORM. " ADDZEILE
*&---------------------------------------------------------------------*
*& Form SONDERZEICHEN
*&---------------------------------------------------------------------*
* Sonderzeichen in HTML darstellen
*----------------------------------------------------------------------*
FORM SONDERZEICHEN CHANGING ZEILE.
DATA: S LIKE SY-SUBRC,
LASTHIT LIKE SY-FDPOS,
DUMMY(256).
* &
LASTHIT = 0.
DO.
DUMMY = ZEILE+LASTHIT.
IF DUMMY CA '&'.
REPLACE '&' WITH '&' INTO DUMMY.
ZEILE+LASTHIT = DUMMY.
LASTHIT = SY-FDPOS + LASTHIT + 1.
ELSE.
EXIT.
ENDIF.
ENDDO.
* AOUaouЯ<>"
DO.
S = 1.
REPLACE 'e' WITH 'e' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE 'a' WITH 'a' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE 'i' WITH 'i' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE 'o' WITH 'o' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE 'u' WITH 'u' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE 'A' WITH 'Ä' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE 'O' WITH 'Ö' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE 'U' WITH 'Ü' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE 'a' WITH 'ä' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE 'o' WITH 'ö' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE 'u' WITH 'ü' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE 'Я' WITH 'ß' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE '<' WITH '<' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE '>' WITH '>' INTO ZEILE. S = S * SY-SUBRC / 4.
REPLACE '"' WITH '"' INTO ZEILE. S = S * SY-SUBRC / 4.
IF S = 1.EXIT.ENDIF.
ENDDO.
ENDFORM. " SONDERZEICHEN
*&---------------------------------------------------------------------*
*& Form ZEILEUMB
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
FORM ZEILEUMB USING VALUE(EINRUECKEN) LIKE CHAR2
VALUE(TEXT).
CONCATENATE TEXT '<br>' INTO TEXT.
PERFORM ADDZEILE USING EINRUECKEN TEXT.
ENDFORM. " ZEILEUMB
*&---------------------------------------------------------------------*
*& Form CODELINES
*&---------------------------------------------------------------------*
* Schiebt die Zeilen aus sourcecode ins HTML-Format
*----------------------------------------------------------------------*
FORM CODELINES.
DATA ZEILE(5).
PERFORM ADDZEILE USING '>+' '<p><pre>'.
LOOP AT SOURCECODE.
* Erst mal die Sonderzeichen ersetzen
PERFORM SONDERZEICHEN CHANGING SOURCECODE-LINE.
* Bei einem Kommentar diesen Rot und kursiv darstellen
IF SOURCECODE-LINE(1) = '*'. " roter Kommentar
CONCATENATE '<font color=red>'
SOURCECODE-LINE
'</font>'
INTO SOURCECODE-LINE.
ENDIF.
* Bei Zeilennummerierung diese in dunkelblau dazustellen
IF MITZEILE = 'X'.
ZEILE = SY-TABIX.
SHIFT SOURCECODE-LINE RIGHT BY 35 PLACES.
CONCATENATE '<font color=blue>'
ZEILE
'</font> '
INTO SOURCECODE-LINE(35).
ENDIF.
PERFORM ADDZEILE USING '' SOURCECODE-LINE.
ENDLOOP.
PERFORM ADDZEILE USING '->' '</pre></p>'.
ENDFORM. " CODELINES
*&---------------------------------------------------------------------*
*& Form WRITE_INCLUDES
*&---------------------------------------------------------------------*
* Die ganzen Includesources anfugen
*----------------------------------------------------------------------*
FORM WRITE_INCLUDES.
DATA: FIRSTTIME.
FIRSTTIME = 'X'.
SELECT * FROM D010INC WHERE MASTER = PROGNAME.
IF SAPINCLD = 'X'
AND D010INC-INCLUDE(1) = '<'.
CONTINUE.
ENDIF.
IF FIRSTTIME = 'X'.
PERFORM ADD_INCLUDES_HEADER.
CLEAR FIRSTTIME.
ENDIF.
* Die Namen der Includes merken und nacher am Anfang in den Quellcode
* als Navigationspunkte hinzufugen
APPEND D010INC-INCLUDE TO INCLUDETAB.
* Namen und Quelltext schreiben
PERFORM ADD_INCLUDE_NAME USING D010INC.
READ REPORT D010INC-INCLUDE INTO SOURCECODE.
PERFORM CODELINES.
ENDSELECT.
ENDFORM. " WRITE_INCLUDES
*&---------------------------------------------------------------------*
*& Form ADD_INCLUDES_HEADER
*&---------------------------------------------------------------------*
* Fur den 1. Include eine kleine Sonderbehandlung
*----------------------------------------------------------------------*
FORM ADD_INCLUDES_HEADER.
HTMLCODE-LINE = '<h1 align=center><font color=red>'. APPEND HTMLCODE.
HTMLCODE-LINE = '<hr>'. APPEND HTMLCODE.
HTMLCODE-LINE = '<a name="Includes">INCLUDES</a>'.APPEND HTMLCODE.
HTMLCODE-LINE = '</font></h1>'. APPEND HTMLCODE.
HTMLCODE-LINE = ' </font></h2>'. APPEND HTMLCODE.
ENDFORM. " ADD_INCLUDE_NAME
*&---------------------------------------------------------------------*
*& Form WRITE_TEXTELEMENTE
*&---------------------------------------------------------------------*
* Textelemente des Hauptprogramms auch noch ausgeben
*----------------------------------------------------------------------*
FORM WRITE_TEXTELEMENTE.
PERFORM TEXTELEMENTE_HEADER.
READ TEXTPOOL PROGNAME INTO TEXTELEMENTETAB.
PERFORM HTML_TEXTELEMENTE USING 'en programa principal'.
LOOP AT INCLUDETAB.
READ TEXTPOOL INCLUDETAB-NAME INTO TEXTELEMENTETAB.
CHECK SY-SUBRC = 0.
PERFORM HTML_TEXTELEMENTE USING INCLUDETAB-NAME.
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.