*SAP ABAP USER PROFILE REPORT(USERWISE)
* USER AND OBJECTWISE
*MODULES : ABAP / BASIS
************************************************************
SUGGESTION FOR THIS REPORT :
" SELECT * FROM WILL REDUCE SPEED OF OUTPUT OF REPORT
************************************************************
REPORT Z_USERPROFIL_STATUS LINE-SIZE 320
LINE-COUNT 65
NO STANDARD PAGE HEADING.
TABLES : AGR_USERS,TSTCT,AGR_1251,AUTHX,DD04V,AGR_1252,USVART.
DATA : CFLAG(1),CTCODE(20) .
DATA : BEGIN OF ITAB1 OCCURS 0,
IUNAME LIKE AGR_USERS-UNAME,
IAGR_NAME LIKE AGR_1251-AGR_NAME,
IOBJECT LIKE AGR_1251-OBJECT,
IAUTH LIKE AGR_1251-AUTH,
IFIELD LIKE AGR_1251-FIELD,
ILOW LIKE AGR_1251-LOW,
IHIGH LIKE AGR_1251-HIGH,
IFLAG LIKE CFLAG,
ITEXT LIKE DD04V-DDTEXT,
END OF ITAB1.
DATA IOBJ TYPE TOBJ.
DATA WUSR TYPE USR02.
DATA IFLD TYPE AGR_1251.
DATA: COL1(15), COL2(20), COL3(30), COL4(36), COL5(15).
COL1 = 'User'.
COL2 = 'Activity Group'.
COL3 = 'Transaction Code'.
COL4 = 'Description'.
COL5 = 'Duplicate Flag'.
*SELECT-OPTIONS : SUNAME FOR AGR_USERS-UNAME.
SELECT-OPTIONS SUNAME FOR WUSR-BNAME.
SELECT-OPTIONS SOBJ FOR IOBJ-OBJCT.
SELECT-OPTIONS SFIELD FOR IFLD-FIELD.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION POS_HIGH.
SELECTION-SCREEN END OF LINE.
START-OF-SELECTION.
SELECT * FROM AGR_USERS WHERE UNAME IN SUNAME.
SELECT * FROM AGR_1251 WHERE AGR_NAME = AGR_USERS-AGR_NAME AND
DELETED EQ SPACE AND OBJECT IN SOBJ AND FIELD IN SFIELD.
SELECT SINGLE LOW HIGH FROM AGR_1252 INTO (AGR_1252-LOW,
AGR_1252-HIGH) WHERE
AGR_NAME = AGR_1251-AGR_NAME AND VARBL = AGR_1251-LOW.
IF SY-SUBRC = 0.
ITAB1-ILOW = AGR_1252-LOW.
ITAB1-IHIGH = AGR_1252-HIGH.
ELSE.
ITAB1-ILOW = AGR_1251-LOW.
ITAB1-IHIGH = AGR_1251-HIGH.
ENDIF.
SELECT SINGLE FIELDNAME ROLLNAME FROM AUTHX INTO (AUTHX-FIELDNAME
,AUTHX-ROLLNAME) WHERE
FIELDNAME = AGR_1251-FIELD.
IF SY-SUBRC = 0.
SELECT SINGLE DDTEXT FROM DD04V INTO (DD04V-DDTEXT) WHERE
ROLLNAME = AUTHX-ROLLNAME AND DDLANGUAGE = 'EN'.
ENDIF.
ITAB1-IUNAME = AGR_USERS-UNAME.
ITAB1-IAGR_NAME = AGR_1251-AGR_NAME.
ITAB1-IOBJECT = AGR_1251-OBJECT.
ITAB1-IAUTH = AGR_1251-AUTH.
ITAB1-IFIELD = AGR_1251-FIELD.
ITAB1-ITEXT = DD04V-DDTEXT.
APPEND ITAB1.
ENDSELECT.
ENDSELECT.
SORT ITAB1 BY IUNAME IAGR_NAME IAUTH IOBJECT IFIELD.
END-OF-SELECTION.
LOOP AT ITAB1.
WRITE: /(10) ITAB1-IUNAME,
(14) ITAB1-IAGR_NAME,
(14) ITAB1-IAUTH,
(10) ITAB1-IOBJECT,
(06) ITAB1-IFIELD,
(37) ITAB1-ITEXT,
(8) ITAB1-ILOW,
(8) ITAB1-IHIGH.
AT END OF IAUTH.
WRITE: /.
ENDAT.
ENDLOOP.
* USER AND OBJECTWISE
*MODULES : ABAP / BASIS
************************************************************
SUGGESTION FOR THIS REPORT :
" SELECT * FROM WILL REDUCE SPEED OF OUTPUT OF REPORT
************************************************************
REPORT Z_USERPROFIL_STATUS LINE-SIZE 320
LINE-COUNT 65
NO STANDARD PAGE HEADING.
TABLES : AGR_USERS,TSTCT,AGR_1251,AUTHX,DD04V,AGR_1252,USVART.
DATA : CFLAG(1),CTCODE(20) .
DATA : BEGIN OF ITAB1 OCCURS 0,
IUNAME LIKE AGR_USERS-UNAME,
IAGR_NAME LIKE AGR_1251-AGR_NAME,
IOBJECT LIKE AGR_1251-OBJECT,
IAUTH LIKE AGR_1251-AUTH,
IFIELD LIKE AGR_1251-FIELD,
ILOW LIKE AGR_1251-LOW,
IHIGH LIKE AGR_1251-HIGH,
IFLAG LIKE CFLAG,
ITEXT LIKE DD04V-DDTEXT,
END OF ITAB1.
DATA IOBJ TYPE TOBJ.
DATA WUSR TYPE USR02.
DATA IFLD TYPE AGR_1251.
DATA: COL1(15), COL2(20), COL3(30), COL4(36), COL5(15).
COL1 = 'User'.
COL2 = 'Activity Group'.
COL3 = 'Transaction Code'.
COL4 = 'Description'.
COL5 = 'Duplicate Flag'.
*SELECT-OPTIONS : SUNAME FOR AGR_USERS-UNAME.
SELECT-OPTIONS SUNAME FOR WUSR-BNAME.
SELECT-OPTIONS SOBJ FOR IOBJ-OBJCT.
SELECT-OPTIONS SFIELD FOR IFLD-FIELD.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION POS_HIGH.
SELECTION-SCREEN END OF LINE.
START-OF-SELECTION.
SELECT * FROM AGR_USERS WHERE UNAME IN SUNAME.
SELECT * FROM AGR_1251 WHERE AGR_NAME = AGR_USERS-AGR_NAME AND
DELETED EQ SPACE AND OBJECT IN SOBJ AND FIELD IN SFIELD.
SELECT SINGLE LOW HIGH FROM AGR_1252 INTO (AGR_1252-LOW,
AGR_1252-HIGH) WHERE
AGR_NAME = AGR_1251-AGR_NAME AND VARBL = AGR_1251-LOW.
IF SY-SUBRC = 0.
ITAB1-ILOW = AGR_1252-LOW.
ITAB1-IHIGH = AGR_1252-HIGH.
ELSE.
ITAB1-ILOW = AGR_1251-LOW.
ITAB1-IHIGH = AGR_1251-HIGH.
ENDIF.
SELECT SINGLE FIELDNAME ROLLNAME FROM AUTHX INTO (AUTHX-FIELDNAME
,AUTHX-ROLLNAME) WHERE
FIELDNAME = AGR_1251-FIELD.
IF SY-SUBRC = 0.
SELECT SINGLE DDTEXT FROM DD04V INTO (DD04V-DDTEXT) WHERE
ROLLNAME = AUTHX-ROLLNAME AND DDLANGUAGE = 'EN'.
ENDIF.
ITAB1-IUNAME = AGR_USERS-UNAME.
ITAB1-IAGR_NAME = AGR_1251-AGR_NAME.
ITAB1-IOBJECT = AGR_1251-OBJECT.
ITAB1-IAUTH = AGR_1251-AUTH.
ITAB1-IFIELD = AGR_1251-FIELD.
ITAB1-ITEXT = DD04V-DDTEXT.
APPEND ITAB1.
ENDSELECT.
ENDSELECT.
SORT ITAB1 BY IUNAME IAGR_NAME IAUTH IOBJECT IFIELD.
END-OF-SELECTION.
LOOP AT ITAB1.
WRITE: /(10) ITAB1-IUNAME,
(14) ITAB1-IAGR_NAME,
(14) ITAB1-IAUTH,
(10) ITAB1-IOBJECT,
(06) ITAB1-IFIELD,
(37) ITAB1-ITEXT,
(8) ITAB1-ILOW,
(8) ITAB1-IHIGH.
AT END OF IAUTH.
WRITE: /.
ENDAT.
ENDLOOP.
way of on-demand BW services and ABAP services. Our recent long-term ... SourceCode has core strength in SAP Business Warehouse. survival warehouse review
ReplyDelete