Posted: Fri Jan 22, 2010 4:22 pm Post subject: Utillity som udskriver oversigt over autorisations-objekter
Code:
REPORT ZZBGS057 MESSAGE-ID Z1.
*----------------------------------------------------------------------*
* Description: Utillity som udskriver oversigt over autorisations- *
* objekter :) pr. apllikation(objectklasse), pr. funktion *
* pr. objekt alle felter samt activities. *
* *
* Programmet anvendes i forbindelse med analyse af SAP R/3*
* autorisationssystem. *
* *
* Implementing Programmet er klient afhжngig og udskriver som sеdan kun*
* oplysninger for йn klient. *
* *
* Der testes ikke for autorisation til йn bestemt bruger- *
* gruppe. *
* *
* Submitting: Via transaktion SA38 eller via batch jobafvikling. *
* *
* Parametre: De viste parametre pе skжrmen kan udfyldes med generisk *
* vжrdier. *
* *
* Customizing: Programmet krжver ingen customisering. *
* *
* Change of Du skal blot kontrollere om der er жndringer til de *
* release: anvendte tabeller, skжrmbilleder og includes. Gшres *
* ved at anvende ABAP/4 workbench. *
* *
* Programmer: Benny G. Sшrensen, Cap Programator A/S *
* Date: Okt 1995. *
* *
*------------------------------ Questions -----------------------------*
* Version 5
*-------------------------------Corrections----------------------------*
* Date Userid Correction *
* 20.10.1995 CAP-BS Udvikling af program.
*----------------------------------------------------------------------*
*-----------------------------------------------------------------------
* Tables
*-----------------------------------------------------------------------
TABLES: TOBFA "Applikationen (im Zusammenhang mit betr.wirts. Vorg
,TOBFC "Betriebswirts. Vorgдnge in Obj.klassen (Applikation
,TOBC "Klasseneinteilung der Berechtigungsobjekte
,TOBJ "Objekter
,TOBJT "Tekster til objekter (til TOBJ)
,TOBF "Zusammenhang "betriebswirts. Vorgang" < > Ber.obje
,TOBFT "Texte zu betriebswirtschaftlichen Vorgдngen (Funkti
,TOBJC "% er tom
,TOBCT "Texts for Authorization Object Classes
,TBRG "Autorisationsgrupper
,TBRGT "Autorisationsgrupper betegnelser
,TDDAT "Maintenance areas for tables
,TRDIR "System tabel med ABAP/4 program attributter
,DD04V "Datadictionary - dataelement
,TACTZ "Gyldige aktiviteter pr. autorisationsobjekt
,TACT "Directory of activities which can be protected
,TACTT "Betegnelse pе aktiviteter, der kan beskyttes
.
*-----------------------------------------------------------------------
* Parameters
*-----------------------------------------------------------------------
PARAMETER: P_OCLSS LIKE TOBCT-OCLSS.
*-----------------------------------------------------------------------
* Output data definitions
*-----------------------------------------------------------------------
DATA: BEGIN OF APPFUNKOBJ OCCURS 0
,OCLSS LIKE TOBJ-OCLSS
,CTEXT LIKE TOBCT-CTEXT
,FUN_ID LIKE TOBF-FUN_ID
,FUN_TEXT LIKE TOBFT-FUN_TEXT
,OBJCT LIKE TOBJ-OBJCT
,TTEXT LIKE TOBJT-TTEXT
,FIEL1 LIKE TOBJ-FIEL1
,FIEL2 LIKE TOBJ-FIEL2
,FIEL3 LIKE TOBJ-FIEL3
,FIEL4 LIKE TOBJ-FIEL4
,FIEL5 LIKE TOBJ-FIEL5
,FIEL6 LIKE TOBJ-FIEL6
,FIEL7 LIKE TOBJ-FIEL7
,FIEL8 LIKE TOBJ-FIEL8
,FIEL9 LIKE TOBJ-FIEL9
,FIEL0 LIKE TOBJ-FIEL0
.
DATA END OF APPFUNKOBJ.
*----------------------------------------------------------------------*
* VIS_APPL_FUNK_OBJ
*----------------------------------------------------------------------*
FORM VIS_APPL_FUNK_OBJ.
CLEAR TOBJ.
SELECT * FROM TOBJ
WHERE OCLSS LIKE P_OCLSS.
CLEAR APPFUNKOBJ.
MOVE-CORRESPONDING TOBJ TO APPFUNKOBJ.
CLEAR TOBJT.
SELECT SINGLE * FROM TOBJT
WHERE LANGU = SY-LANGU
AND OBJECT = TOBJ-OBJCT.
IF SY-SUBRC = 0.
APPFUNKOBJ-TTEXT = TOBJT-TTEXT.
ELSE.
APPFUNKOBJ-TTEXT = '??????????'.
ENDIF.
CLEAR TOBCT.
SELECT SINGLE * FROM TOBCT
WHERE LANGU = SY-LANGU
AND OCLSS = TOBJ-OCLSS.
IF SY-SUBRC = 0.
APPFUNKOBJ-CTEXT = TOBCT-CTEXT.
ELSE.
APPFUNKOBJ-CTEXT = '??????????'.
ENDIF.
* Hent evt. relationer til funktioner
CLEAR TOBF.
SELECT * FROM TOBF
WHERE OBJECT = TOBJ-OBJCT.
APPFUNKOBJ-FUN_ID = TOBF-FUN_ID.
CLEAR TOBFT.
SELECT SINGLE * FROM TOBFT
WHERE LANGU = SY-LANGU
AND FUN_ID = TOBF-FUN_ID.
IF SY-SUBRC = 0.
APPFUNKOBJ-FUN_TEXT = TOBFT-FUN_TEXT.
ELSE.
APPFUNKOBJ-FUN_TEXT = 'Der findes ingen funktionstekst '.
ENDIF.
ENDSELECT.
IF SY-SUBRC NE 0.
APPFUNKOBJ-FUN_ID = ' - - - '.
APPFUNKOBJ-FUN_TEXT = 'Ikke tilknyttet nogen funktioner'.
ENDIF.
APPEND APPFUNKOBJ.
ENDSELECT.
SORT APPFUNKOBJ BY OCLSS FUN_ID OBJCT.
LOOP AT APPFUNKOBJ.
ON CHANGE OF APPFUNKOBJ-OCLSS.
NEW-PAGE.
WRITE: /01 APPFUNKOBJ-OCLSS
,6 APPFUNKOBJ-CTEXT
.
ENDON.
ON CHANGE OF APPFUNKOBJ-FUN_ID.
WRITE: /6 APPFUNKOBJ-FUN_ID
,18 APPFUNKOBJ-FUN_TEXT
.
ENDON.
ON CHANGE OF APPFUNKOBJ-OBJCT.
WRITE: /18 APPFUNKOBJ-OBJCT
,30 APPFUNKOBJ-TTEXT.
PERFORM WRITE_FIELDS USING APPFUNKOBJ-FIEL1.
PERFORM WRITE_FIELDS USING APPFUNKOBJ-FIEL2.
PERFORM WRITE_FIELDS USING APPFUNKOBJ-FIEL3.
PERFORM WRITE_FIELDS USING APPFUNKOBJ-FIEL4.
PERFORM WRITE_FIELDS USING APPFUNKOBJ-FIEL5.
PERFORM WRITE_FIELDS USING APPFUNKOBJ-FIEL6.
PERFORM WRITE_FIELDS USING APPFUNKOBJ-FIEL7.
PERFORM WRITE_FIELDS USING APPFUNKOBJ-FIEL8.
PERFORM WRITE_FIELDS USING APPFUNKOBJ-FIEL9.
PERFORM WRITE_FIELDS USING APPFUNKOBJ-FIEL0.
ENDON.
ENDLOOP.
ENDFORM.
*----------------------------------------------------------------------*
* WRITE_FIELDS
*----------------------------------------------------------------------*
FORM WRITE_FIELDS USING FIELD.
IF FIELD NE SPACE.
IF FIELD NE 'ACTVT'.
CLEAR DD04V.
SELECT SINGLE * FROM DD04V
WHERE ROLLNAME = FIELD
AND DDLANGUAGE = SY-LANGU.
WRITE: /30 FIELD
, 42 DD04V-DDTEXT.
ELSE.
WRITE: /30 FIELD
, 42 'Aktivitet'.
CLEAR TACTZ.
SELECT * FROM TACTZ
WHERE BROBJ = APPFUNKOBJ-OBJCT.
WRITE: /42 TACTZ-ACTVT.
SELECT SINGLE * FROM TACTT
WHERE SPRAS = SY-LANGU
AND ACTVT = TACTZ-ACTVT.
WRITE 45 TACTT-LTEXT.
ENDSELECT.
ENDIF.
ENDIF.
ENDFORM.
*Text elements
*-------------
* I%FS Udtrжkskriterier
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.