Wednesday, September 8, 2010

SAP Basis Tips



Delete Old SM35 sessions:
Users have created a ton of batch input sessions and processed them with SM35. The users did not care about deleting unwanted sessions and there are a lot of old sessions, with almost any status (in processing/in background/processed/errors). All of them are junk (in your terms), and have to be removed from the system.
You can delete unwanted sessions with abap program RSBDCTL6  at once and then setup a background job that deletes the sessions for a specific session, user who created the session, date range, older than x days etc. that runs on a regular basis.
As an alternative, you can run program RSBDC_REORG. However, our tests showed that this program may not be suitable for sessions that have a status other than processed.
Note: This has been validated on a ECC 5.0 system. Please consult SAP Marketplace if your system doesn’t have these programs and/or if these are suitable for your release.

How To Delete Developer Keys from SAP

You may have come across the audit requirement to delete developers (developer keys) from your Development, Quality Assurance or Production system. Developer keys are stored in table DEVACCESS. If this table is not enabled in your system for maintenance via SM30, SE16 or SE16N transaction, you can write a small program and map it to a custom transaction, most likely with some basis authorizations so that not everyone can run it.
Please add the program heading according to your the programming standards your company has issued:
REPORT  ZBCDEVACCESS.
* ===================================================================
*
*  TITLE: Delete Record from Table DEVACCESS
*
*  DESCRIPTION: This program deletes the SSCR Developer Keys from the
*  table DEVACCESS. There is no maintenance dialog available via SM30
*  and thus this program is necessary.
*
* ===================================================================
TABLES: DEVACCESS.
PARAMETERS: p_user LIKE DEVACCESS-UNAME.
DELETE FROM DEVACCESS WHERE UNAME EQ p_user.
IF SY-SUBRC EQ 0.
WRITE: /’User and key for ‘, p_user, ‘deleted from table DEVACCESS.’
.
ELSE.
WRITE: /’Error deleting user and key for ‘, p_user, ‘ return code ‘,
SY-SUBRC.
ENDIF.

No comments:

Post a Comment