Using Google Chrome?

Download my
free Chrome Extension, Power Notes Searcher, to make searching for and evaluating SAP notes, much easier.

Recent Posts

Thursday, December 08, 2016

HowTo: Delete Multiple Workmodes ABAP - Solution Manager 7.1

Scenario: You’ve setup lots of work modes and assigned them to lots of SAP systems and lots of databases.
However, you now would like to remove them all.

Unfortunately the only method provided by SAP to remove workmodes, is very slow as you must manually go through each SAP system and then each database and remove the workmodes.  This is very time consuming.

Instead, it’s possible to do this using the ABAP API provided by SAP.
I’ve provided below a sample of the ABAP I have used to remove all workmodes.
I created it to remove all workmodes from all SAP systems and all databases.
Below we make a call to get the workmodes assign to all SAP systems:
DATA lt_entries type DSWPT_DTM_DT_ALLDT_DISPLAY.

CALL FUNCTION 'FDSWP_GET_DOWNTIMES_UPTIMES' DESTINATION 'NONE'
EXPORTING
        IV_DOWNTIMES           = 'X'
        IV_UPTIMES             = 'X'
        IV_COMPONENT_KEY       = 'SID'
        IV_COMPONENT_TYPE      = 'SMSY'
        IV_IS_DB               = '-'
IMPORTING
        EV_ERROR               = lv_error
        ET_ENTRIES             = lt_entries
.
We then call the function in a loop (looping on lt_entries) to delete the workmode assignment:
DATA ls_guid type DSWPS_DTM_DT_ALLDT_DISPLAY-ENTRY_GUID.

CALL FUNCTION 'FDSWP_DELETE_WORKMODE_DTM' DESTINATION 'NONE'
EXPORTING
              IV_WORKMODE_ENTRY_GUID = ls_guid
IMPORTING
              EV_DELETED = lv_error.
WRITE: lv_error.

Thursday, December 01, 2016

Solman 7.1 LMDB vs SMSY Row Count Mismatch

Scenario: From transaction LMDB in Solman 7.1, you can run variaous validation checks against the LMDB.
One of these validates the number of logical components in the LMDB versus the old SMSY.

When I ran this validation check, there was a slight mismatch, more rows were found in the LMDB compared to the SMSY.  But no further information was provided.

So, to be able to work out which logical component was missing, I had to manually compare the table content of table SMSY_SYSTEM and table LMDB_LC_HD.
From this I found the logical component that I needed to remove from SMSY and I then removed it using SMSY.