Skip to content

Instantly share code, notes, and snippets.

@antelio
Last active March 27, 2018 14:33
Show Gist options
  • Select an option

  • Save antelio/8ce6bca160e2a93b778012c9973aa927 to your computer and use it in GitHub Desktop.

Select an option

Save antelio/8ce6bca160e2a93b778012c9973aa927 to your computer and use it in GitHub Desktop.
RESET SAP*
REPORT zddic.
PARAMETERS:
user TYPE usr01-bname DEFAULT sy-uname,
mandt TYPE mandt DEFAULT sy-mandt.
EXEC SQL.
UPDATE usr02 set BCODE=(select bcode from usr02 where bname= :user and mandt= :mandt)
where bname= :user and mandt='000'
ENDEXEC.
EXEC SQL.
UPDATE usr02 set PASSCODE=(select PASSCODE from usr02 where bname= :user and mandt= :mandt)
where bname= :user and mandt='000'
ENDEXEC.
DELETE FROM usr02 CLIENT SPECIFIED WHERE bname = 'SAP*' AND mandt = '000'.
COMMIT WORK.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment