Skip to content

Saptechnicalguru.com

Blog for SAP technical guru's: SAP basis, SAP security and authorization, SAP ABAP, SAP Focused Run

  • Home
  • Contact
  • Newsletter

Author: saptechnicalguru

SAP system hacking using RFC jump

SAP system hacking using RFC jump

This blog will explain the SAP system hacking using RFC jump method. It will show the simplicity of the hack, and tell you what to do in preventing this method to be used on your SAP system.

Question that will be answered:

  • How does the RFC jump SAP system hack work?
  • How do I check all my RFC’s for this weakness?
  • What can I do to prevent this hack from happening on my system?

RFC jump hack background

SAP uses RFC connections between SAP systems to send and received business data. For example the BI system will pull data from the ECC system via an RFC connection. The SAP solution manager system is fed from the ECC system via an RFC connection. Or a SAP netweaver gateway system serving SAP FIORI tiles.

In the RFC setup the system admin will have to set the connection details and its logon method. The logon methods can be:

  • Current user via logon screen
  • Current user via trust logon screen
  • Fixed user ID: dialog user ID or background user ID

The first method with logon screen will prompt for user ID and password and is not useful for hacking.

The trusted connection will check the rights in the other SAP system using your own user ID and privileges.

The RFC’s with fixed user ID’s will use the user ID and privileges of the user ID in the RFC connection and also using password entered by the admin. So you don’t even need to know the password…..

3 methods of misusing the RCF jump

3 methods of misusing the RFC jump will be explained. All of the scenario’s start from a already compromised system.

RFC jump explained

You have gained access to an SAP system, which in first instance is less important. For example by using standard SAP passwords (see blog on this topic).

1. Using the weakness to jump from one system to another: named dialog users in RFC

Now you start to scan the RFC’s of this server in SM59.

RFC with admin password

You notice that there is an RFC to another system which has the user ID and password of the system admin. You now simply click the remote logon button and you jump to the other system.

Remote logon button

You are logged on now into this system with the user ID and privileges of this other user ID. From this system you can even jump further.

This way you could go from a development to productive server. Or from a BI to an ECC server. Or from Solution manager to ECC productive server.

2. Using the weakness to jump from one system to another: named background users in RFC

The jump will not work if the user ID in the RFC is a background user ID. One example here is the ALEREMOTE user in ECC, which is used by the BI system to extract data from ECC. Since this user has to pull a lot of data and is needing a lot of privileges this user ID is sometimes given SAP_ALL privileges.

If this is the case the hacker can still misuse this RFC. In the hacked system he goes to transaction SE37 and creates a test function module sequence consisting of 2 calls: BAPI_USER_CHANGE and BAPI_TRANSACTION_COMMIT.

function modules

The first call will have the input to change user ID ALEREMOTE user type from B (background) to type A (dialog). The commit is needed to actually confirm and push the change to the database. Once the sequence is setup the hacker will use the test function to fire the sequence. In the testing the hacker will put in the RFC with the ALEREMOTE user. Now this sequence will be fired with the privileges of the ALEREMOTE user (it has SAP_ALL). So it will then itself change its own user type remotely…. After this is done the dialog jump will work from the remote system and the hacker comes into the system with user ALEREMOTE and the attached SAP_ALL rights.

3. Using the weakness to jump from one system to another: trusted RFC’s

If you have taken over one system and you see a trusted RFC towards another system this can be misused for hacking.

Trusted connection

But you need extra information. If you know the user ID of the admin in the system target, set up the user ID in the system already taken over, or if already there reset password. Then logon in the taken over system with the admin user ID. Goto SM59 to the trusted connection. Click remote logon and you jump to the other system without having to logon, but with the user ID and privileges of the admin.

For setup of trusted RFC’s read this blog.

How to detect the jumps which are misused?

The complexity in detection is not to detect the jumps itself, because there is also good use of the jumps (via the trusted RFC’s), but to detect the misused jumps. This is hardly possible.

Detection can be done for the user changes executed by background users. Detection could be done with tracking the terminal ID suddenly switching user ID.

The SAP audit log can help you find traces to what has happened as detective after the fact method. But it will not help you detect or prevent misuse.

How to scan your RFC’s for potential misuse?

SAP provides a program to check RFC’s for weak settings: RSRFCCHK.

Running this program will leave system log messages: 2724967 - Program CL_SAIS_ Reports Security Breach notification when running program RSRFCCHK

If you start the program select all the destinations and optionally the connection test to see if the connections work at all.

RSRFCCHK program

The result will give you a list of potentially dangerous RFC connections and the user ID’s used.

RSRFCCHK program result including connection test

This you can use as a work list for checking.

Read more on RFC security checking in this blog.

Apply note 3283474 – Adjustment of authorization for program RSRFCCHK to upgrade security of program RSRFCCHK itself.

Protection measures

Protection is possible by a series of actions (a single action will not be sufficient):

  • Access restriction. Restriction of access to SU01 user management and SM59 RFC setup. Not only on main systems, but also on connected trusted systems.
  • Remove SAP_ALL and user rights from background and RFC users.
  • At least yearly scan systems for wrongly setup RFC’s and delete them.
  • Instruct basis team never to put in their own account into an RFC connection.

The most though misunderstanding is with some security and control teams themselves. They heavily underestimate the danger of the trusted connections. They come with statements like “we focus on production only”, or “that system is not part of our compliance XYZ framework check”.

Basic golden principle:
The trusted system must have same protection level and control measures as the system it is connected to.

More RFC hacking: RFC callback hack

Next to the RFC attack methods above there is also the RFC callback hack, which uses the back direction to execute malicious actions. Read more in this blog.

Author saptechnicalguruPosted on 6 October 201716 August 2024Categories Basis, Hacking, RFC, SecurityTags hacking, RFC, RFC hackLeave a comment on SAP system hacking using RFC jump

Direct table maintenance versus transport

Direct table maintenance versus transport

Some standard SAP tables are delivered by SAP as customizing tables with transports, but which are logically and business wise application tables and are maintained directly in production by business people. Example is the currency exchange rate table.

This blog will explain the option and best practices to overcome this.

Questions that will be answered:

  • What are current settings and how does it work?
  • When and how to de-customize a standard SAP table?

Current settings

Current settings is bit of hidden feature in SAP systems. Per customizing object you can select if it is using the current settings option or not.

To do this, start transaction SOBJ and select the customizing object or table. The current setting flag is indicated on the example picture below for the currency conversion rate table:

Direct table updates Current settings

The effect of the Current Settings is as follows: if the system client in SCC4 is set to “Productive” the transport flags are ignored, and the user can directly update the table and save the changes without transport request popup.

On a development or quality system the “Productive” setting is not there and the SAP system will prompt you for transport request. Especially on quality systems this can be quite annoying.

The current settings is therefore only a solution for tables that you and the business want to maintain directly on production, and not on a development and quality system. Background note on this side effect is 356483 – In test system, behavior of customizing objects which are editable in production i.e. Current Settings.

See OSS notes 2336175 – SPRO | modifiable | unwanted, 2442887 – SOBJ | How to assign object attribute Current Settings to a maintenance object or 3138477 – SM30 | SPRO | Client XXX has status ‘not modifiable’ | Client role Production for a full instruction.

De-customizing a customizing table

If you want a customizing table to be maintainable directly on development and quality systems, without transport request, you have to de-customize the customizing table.

Always ask for approval for procedure below and document the tables for which this procedure was applied. Pending on your business security and regulatory requirements more approvals and documentation can be needed.
The de-customization procedure

Step 1 starts with transaction SE11 to call up the table. This you have to doc in the development system. In the delivery and maintenance tab the delivery calls normally shows as type C (customizing).

Direct table updates Before customizing

Now edit and change it to type A (application):

Direct table updates After application

In most cases this will do the trick. The change itself you have to put in a transport request.

Step 2 would be to re-generate the maintenance view and de-activate the recording routine. This should look as shown on picture below:

Direct table updates check recording routine

Also this change must be executed on development system and must be put in transport request.

Step 3 is to move the transport request into the quality and later productive system.

See also OSS note 3139583 – SPRO | SM30 | SM34 | SV138 Check maintenance object xxx or update function group xxx.

Special cases

Below is a list of special cases and exceptions.

CO allocation cycles (KSU1 etc)

Via the procedure described in OSS Note 853601 – “ALLOCATION: Deactivating the automatic transport” you can leave all the allocation tables as-is and don’t need to apply the de-customization procedure or current settings.

RSA1 settings to avoid transport popup for BI objects

Some settings in RSA1 like process chain starters you want to set locally per system. Default SAP asks you for a transport. In RSA1 you can overrule this. Select Transport Connection on the left hand side. Then select the button Object Changeability on top. In the popup right click on the Not Changeable and set it to Everything Changeable for the items that you don’t want a transport popup to come.

RSA1 local settings

Save your data.

SAP reference: click here.

Author saptechnicalguruPosted on 29 September 201716 August 2024Categories ABAP, BasisTags current settings, direct table maintenanceLeave a comment on Direct table maintenance versus transport

Set up custom IMG node

Set up custom IMG node

As customer you will sometime have the need to setup your own customizing tables. These tables you create in SE11 and mark them as customizing tables, which means all updates must be done in development system and are put in transport. This own customizing table can then be called from your custom programs, user-exits and enhancement points.

Managing these custom tables becomes increasingly difficult over the years. An elegant solution for this is to create your own IMG customizing setup and corresponding documentation. This way you can easily track which customizing custom tables you have and for which reason.

This blog will answer following questions:

  • How to set up a custom IMG customizing tree?
  • How to link the tree into the real SAP customizing tree?
  • How to link the IMG entry to your customizing table?
  • How to document your custom IMG entry?
  • How to deal with issues in SAP IMG?

Preconditions for Z table

Your Z customizing table must have the following to be easily integrated into a customer IMG:

  1. Table has technical delivery class Customizing table
  2. Log Data Changes option is set to true in Technical Settings of the table
  3. Table maintenance generation has been done and table can be maintained in SM30

Setting up the custom IMG node as part of the SAP reference IMG

SAP has two ways of setting up extra IMG nodes:

  1. Via transaction S_IMG_EXTENSION
  2. Via transaction SIMGH

Best way is via S_IMG_EXTENSION. After an upgrade IMG is renewed and SAP might overwrite your own entries. When using the S_IMG_EXTENSION option SAP puts your entries aside and you can re-merge them after the upgrade.

After starting S_IMG_EXTENSION, you come into an empty screen. First you select the main IMG structure “SAP Customizing Implementation Guide” you want to enhance.

Next you need to create a custom Enhancement ID by clicking on the empty Enhancement ID search help. On the subsequent search screen click the Create button:

Custom IMG create enhancement ID

Attention: put the Enhancement ID generation into a real transport and not into $TMP
Tip: after selection of the IMG structure node put it into your favorites list:
Custom IMG set favorite

On the main screen you now can select the new Enhancement ID. Then pushing the Enhance Structure button will bring you to the change screen of the IMG structure.

In here you select the node position where you want to add. Then select to add a structure node:

Custom IMG create new folder

The node is nothing more than a menu entry. You can add nested ones as well. Give the node a good descriptive name.

After the creation of the node, select it. Now you can add an activity as subnode.

On the first screen of the creation of the subnode you have to give the node an ID and a name. On the assigned documents you also give the document a name.

Custom IMG create new entry first screen

If you push the Create button you go to the maintenance of the IMG node help text:

Custom IMG custom help text for IMG node

This is the place to document the reason of your extra customizing table, how to fill it, and for example list all the user-exits and enhancement spots from which the table is called.

On the Maint.Objects tab we finally can link the real table.

Custom IMG img node to customizing table

In the customizing object enter the Z table (in this example case the Z table is called  ZZCUSTLINK). For maintenance type use SM30.

Save this entry and save the changes to the tree enhancement and you are done.

End result

Start the normal SPRO transaction and you can have a look at the end result:

Custom IMG end result

You can launch your customizing and see your documentation.

Tip: do spend time on listing your tables into chapters and also spend time on the help text. This can save you lots of time. After 6 months, you normally would not remember the peculiar things of this Z table and why it was needed and how it should be used. You are happy then you properly documented it.

Using the custom IMG in into customer generated project IMG’s

Some customers create their own project IMG based on the standard SAP IMG. Initially your custom IMG extension only shows in the standard IMG and not in the customer project IMG. To include the custom IMG into the customer project IMG start transaction SPRO_ADMIN. Go to the Scope section and click the Specify scope button. Now include the newly generated custom IMG objects:

Custom IMG include in customer IMG spro setup

After this is done Generate Project IMG button must be pushed to actually update the project IMG with your changes.

How to deal with issues in SAP IMG?

In some cases SAP IMG has issues. Missing nodes, unexpected entries. In most cases a corresponding OSS note can be found.

A common case is for example after installation of Event Management. Standard SPRO is pointing to SCM in stead of Event management.

In this case (and other cases) you can apply the solution from OSS note 2197261. In the attachment of this note you find program ZSLA_SHOW_REFERENCE_IMGS. Install it and run it.

ZSLA_SHOW_REFERENCE_IMGS

Use the correct TREE_ID in transaction SCUSSEQUENCE to make this one the preferred IMG:

Tcode SCUSSEQUENCE

OSS notes and help

Standard SAP help on enhancing IMG can be found here.

Relevant OSS notes:

  • 3158481 – SPRO | How to add customer specific IMG nodes
  • 3244394 – S_IMG_EXTENSION | Edit the enhancement in language German
  • 3260475 – Improve message for package check in IMG.
  • 3365584 – S_IMG_EXTENSION | How to translate IMG structure nodes with customer Enhancement ID
Author saptechnicalguruPosted on 22 September 20176 August 2024Categories BasisTags custom IMG1 Comment on Set up custom IMG node

SCI: setup custom checks

SCI: setup custom checks

The SCI tool is great for analyzing custom code based on SAP delivered checks. For specific reasons you might want to built in your own specific checks that cannot be setup using the out-of-the-box SCI tool.

This blog will answer following questions:

  • When to setup custom check and when not?
  • How to setup custom check?
  • How does my check show up in the SCI and ATC results?
  • How to document the checks so it really fits into the standard framework?
  • How to influence the behavior of the checks and the settings for the checks?

When not to set up a custom SCI check?

If you want to do one of the following things, don’t set up custom check:

  • Change the priority outcome of a check (example from warning to error): use the option to change message priorities for this.
  • Search for specific string: use the Search functions options in SCI (they can even search trough comment blocks)

How to set up a custom SCI check?

Setting up the new category

First thing to do is to setup a new category. This will act as a placeholder for your checks.

To do this goto SE24 and copy the example class CL_CI_CATEGORY_TEMPLATE to your own Z implementation.

Custom SCI copy category

In the copy go to the CONSTRUCTOR method and adapt the description to your needs:

Custom SCI category change constructor

Important here is not to forget to double click on the 000 message and to create the message text: from here the framework will read the description. The quoted description is just for yourself to be able to read the code better.

Implementing the check

Per check you want to have, you need to have an implementation. There are two options here:

  1. Copy one of the two templates (CL_CI_TEST_ROOT_TEMPLATE or CL_CI_TEST_SCAN_TEMPLATE)
  2. Copy one of the existing SCI checks (they all start with CL_CI_) that already resembles the check you want, and modify where needed to make it your own check

The second option is easier to start with.

Hint: first take a good look at the Attributes of an existing check. Some have none (simple check), some have a few tick boxes, and for some you can have a full multiple selection as input. By using a multiple selection which you can fill in the SCI tool, you can avoid hard coding of your checks.

After the copy is done you have to go to the CONSTRUCTOR of your own check:

Custom SCI check change constructor

Important here is not to forget to double click on the message and to create the message text: from here the framework will read the description. The quoted description is just for yourself to be able to read the code better.

The CATEGORY has to refer exactly to the category class you have already created.

On the class level attributes make sure the always present attribute C_MY_NAME has the initial value of the class name of the check you have made.

Custom SCI check attribute fields

Depending on the source class check of template you have copied more constant attributes need to be checked or changed.

The actual implementation of the check is to be done in the RUN method. The advantage of copying template or existing check will be obvious in this part, since the complex coding of scanning through source code or fetching other elements like table attributes is already there. You just need to modify when you want a check to fire.

Firing a check happens within the RUN method by invoking the INFORM method. This can be invoked as many times as needed. If not invoked then the check is passed (result zero).

The inform will pass the following to the SCI report tool:

  • Name of the test (your Z test set in the C_MY_NAME constant attribute you set above)
  • Point to the code line and statement where your check fired off
  • Severity level (error, warning, information)
Activating your category and check

To activate your category and check go to transaction SCI and select the menu Code Inspector / Management of / Tests.

Your test will be fully at the bottom since they are Z checks.

Activation of both category and check will not work in one shot.

First activate the category by selecting it and pressing Save. Next activate the custom check by selecting it and press Save.

Custom SCI check activation

The text in the description is taken from the text element in the DESCRIPTION that you have made in the CONSTRUCTOR.

Testing the check

After the activation the test is available in SCI. You can make new SCI variant for testing your check. Write a small test program where you are sure the check will fire off. Then run the SCI tool with your check variant to see that your check fires off properly. Now solve the issue and rerun the SCI tool to make sure the check does not fire off any more.

Embedding in SCI and ATC

If your tests all have passed, don’t forget to activate your check in your global SCI variant.

By updating the global SCI variant used in the ATC tool, your check is automatically done as well in the ATC global and local runs.

Finalizing the checks by proper documentation

To make your check look like standard SAP ones you need to spend some time on online documentation of the checks.

First start to document your custom check. To do this start transaction SE61 to create the help text. Switch the Document Class field to Class attribute. Then in the document field put in your Z class for the custom check and for attribute fill out 0000.

Custom SCI help text creation screen

Press create and enter your specific help text:

Custom SCI help text for detailed check

Hint: copy text from standard SAP help text that you like: this saves you lot of time in the lay-outing

Save and activate and your help text is done.

Now you can setup the help text for you own category.

The basic principle of help text is the same, but now you want to hyperlink in the category text to the detailed check help text. This is bit tricky if you don’t know how. To do this select the menu entry Include / Link. The following screen will appear where you can search the referenced check and set up a text for the description:

Custom SCI help text insert link to previous

The end result in the editor is bit ugly since the above nice input screen is translated into technical terms:

Custom SCI help text for complete checks class

In the category help text you can list now all you checks in this way.

End result in the SCI tool help icon will look like this:

Custom SCI help text end result

The detailed check appears light blue like hyperlink: and it is! If you click it you jump from the category help text straight to your custom check help text.

How to activate the attributes?

You can have attributes for your own check which you can fill out on the SCI screen, and that will be passed to your test.

For this feature to work, you must do following:

  • Set the HAS_ATTRIBUTES flag to true in the CONSTRUCTOR
  • Implement the IF_CI_TEST~QUERY_ATTRIBUTES method to define the attributes (tick boxes, fields, multiple selection options) and the text of the attributes
  • Implement both the GET_ATTRIBUTES and PUT_ATTRIBUTES methods
Hint: by copying right SAP SCI check class that resembles your wanted check, you also will also copy the elements above. Just need to modify it to your own needs.

Example

Example of a custom SCI check: check for presence of AUTHORITHY-CHECK statement.

OSS notes

Oss notes relevant for custom SCI checks:

  • 2848760 – Custom SCI check variants can not be seen from ATC.
Author saptechnicalguruPosted on 15 September 20173 January 2025Categories ABAP, Code reviewTags custom checks, SCILeave a comment on SCI: setup custom checks

ATC: managing your complete custom code base

ATC: managing your complete custom code base

This blog will explain you the ATC tool to manage your complete custom code base. The name ATC is bit misleading: officially the name is ABAP Test Cockpit, but the tool has nothing to do with test management. It is a code profiling tool.

This blog will answer questions like:

  • How do I scan my complete custom ABAP code base for issues?
  • Can I scan custom ABAP code for a complete project?
  • What is my state of quality of my complete ABAP code base?
  • The SCI SAP code inspector is nice, but how can I enforce it?
  • How can I use ATC in the peer review process?
  • How can I prevent an ABAP workbench from being released if the coding is not ok?
  • Does the ATC tool replace a peer review?
  • How do I organize the implementation of the ATC tool in my organization?
  • How is ATC used in S4HANA migration?

Setting up the ATC tool

Setting up the ATC is quite simple. Just launch transaction code ATC:

Then choose the Configure ATC entry on the screen.

The ATC tool runs on top of the SAP code inspector (SCI). This must be setup first. Choose the variant you have created here as Global Check Variant.

To enable peer review set ATC exemptions to Yes.

If you want to integrate ATC with transport system: set the behavior on Release to either information or error. Be aware that if you set this setting to Error, the transport mechanism will run the ATC tool and will completely block release and transport if any prio 1 or 2 item is found! Only when the issues are solved or exempted, the transport will be released.

This is a great feature for enforcing code standards, but do not switch it on after you have some experience with the ATC tool and your developers are used to the process. Switching it on should also be clearly communicated to basis team and all consultants working on the system. They should be aware of the block coming when releasing transport in SE10 (the description of the block is bit cryptic):

Running the ATC tool

The ATC tool can be run in two different modes:

  • Globally by development lead for complete custom code base
  • Locally by developer for one or more of his objects
Running ATC tool globally

To run the ATC tool on all custom code you need to select the Schedule Runs in the ATC tool menu.

Before you can run the tool, you have to create a Run variant. In the setup of this variant it is very important to select the right packages. For custom code only put in Z* in the package selection. If you have projects doing development in separate packages, it is possible to setup a dedicated project variant for that Z project package only.

If you have chosen to use the exemptions and allow pragma’s to be used by the developers, do check the help text in Handling of pragma’s carefully before making a selection.

After the variant has been created, you can now select is and press the Schedule button:

In the next screen before hitting execute, please make sure you have checked the number of processes versus your system hardware. The default value of 10 is pretty aggressive and is assuming a large development system. Use transaction SM50 to check the amount of dialog processes on your system. Don’t fill in more than half the amount of DIA processes than your system has. If you do you might find an angry basis admin at your desk asking you why you are completely filling up your system….

After the executing starts a batch job is triggered, which will fire off as many dialog processes as you have indicated. The amount of time the job takes depends on:

  • Amount of Z code in your system and selected in your variant
  • Amount of processes chosen and infrastructure power you have
  • Using HANA or not (complete code base scanning on HANA runs amazingly fast: full code base of 1000 Z objects with 10 parallel processes can finish under 10 minutes. Running same on slow non-HANA system can run over 8 hours in the night.)

You can use the ATC run monitor to see if your run has finished:

Result of ATC run

When the run is finished go to the Manage Results entry in the ATC menu.

Here you can see the results and the statistics of the results of your run.

If you are working in an agile devops environment this overview screen is very nice. If you run the ATC tool daily or weekly, this can immediately provide you with the needed code quality KPI statistics for the ongoing sprint.

If you select the run results you get a list sorted by priority. Selecting one of the findings will give you the details of the finding (code positing, explanation of reason of the finding):

Double clicking on the object name will immediately jump you to the code program point where the finding is found.

Running the ATC tool locally

The other option is to run the ATC tool locally. In each editor you can call Program/Check/ABAP test cockpit to run the ATC for you specific program.

If you work in Eclipse, you can also run ATC by selecting Run/Run as/Abap test cockpit.

Fixing ATC issues

The easiest way of fixing ATC is simply taking away the root cause. In some cases this simply isn’t possible. Reason can be: you have to select data without full key and ATC is detecting this as error. If agreed upon, you can use the corresponding pragma to suppress the finding in the results. Best practice here is to add a comment line why the pragma was used.

Another sample program:

REPORT zpragma.

DATA: zgs_mara TYPE mara.

* need all for demo, suppress with pragma
SELECT MATNR FROM mara INTO zgs_mara. "#EC CI_NOWHERE
ENDSELECT.

The corresponding ATC result looks like this:

As you can see the error for having no selection clauses is not shown. It is suppressed with the #EC CI_NOWHERE pragma.

The ATC is still throwing issues: there is no check on SY-SUBRC. If needed the ATC tool suggests to use the #EC CI_SUBRC pragma.

Practical use of pragma’s

If you want to allow the pragma’s or not is up to you. The ATC result list can be configured to simply ignore the pragma’s. Best practice is to allow the use of pragma’s, but to demand comment line with explanation. Some pragma’s (like the previous example of not checking sy-subrc) you might suggest not to use at all.

Apply OSS note 3088590 – ATC: Offer default option to handle pseudocomments and pragmas to set default options for pragma handling.

Use of exemptions

If the issues in ATC cannot be solved by changing the code or using the pragma, the last resort it to request an exemption.

This can be done on the detailed screen of the ATC finding:

Upon requesting the system will ask you to fill out why the exemption is needed:

The approver need to be configured in the ATC overview screen. Only the exempters in that list will be shown here.

Unfortunately the ATC tool forces you now to enter a fixed name here. You cannot send the exemption to the group of approvers.

Judging the exemption

If the admin allows to setup mail on your development system you are lucky and get a mail (if configured in the ATC main configuration screen). If not, you either have to check regularly or ask the developers to tell you if they have submitted and exemption.

In the ATC main screen select the Exemption Browser select the exemptions for which you are the approver:

You get a list of items for you to approve, reject or return to the requester.

Again here: if you don’t have mail system, send a signal to the requester that you did an action.

Dealing with old ABAP code

If you have to perform a change to ABAP code that is created before you implemented the ATC tool, the tool might highlight a lot of issues that are in the old section of the code. Should you fix these issues as well? This depends on the size of the coding and the organizational agreements you make. Typically if the coding is very small (user exit with 20 lines) it is common just to fix it. If the coding is large, best practice is to ignore the findings of the ‘old’ code: it is simply too dangerous and too much work to fix it. Or you can work with the baseline option (see this dedicated blog).

ATC tool versus peer review

The ATC tool does not replace a peer review. It is a tool to speed up the peer review, since the tool takes away the burden of the more technical checks like naming conventions, checks of use of SY-SUBRC, are hard coded text replaced by text symbols etc.

Peer review tasks that cannot be done by the ATC tool:

  • Judgement if the development itself makes any sense
  • Judging use of comment lines (sufficient?)
  • Judging if the coding is structured in readable way: future maintenance can be done easily
  • Correct use of pragma’s
  • ….

Implementation of the ATC tool in your organization

The ATC tool can be implemented in every organization.

Steps to do:

  1. Organize your code standards: have them documented and approved. This is the basis for the setup of the SCI variant you want to run in the ATC tool.
  2. Deploy the SCI tool in your developer community and make sure they understand and run the tool consistently. This is also the time you can fine tune the outcomes of the SCI tool.
  3. Now setup the ATC tool without Exemptions and without transport block. First run the tool globally only yourself to see and understand the ATC tool results and statistics. This will get you a feeling on how long the tool runs on your system and how many exceptions it will report.
  4. Consider if you want to use the pragma’s fully, partially or not.
  5. Set up the Exemption users and organizational agreements (like dealing with old code).
  6. Start to communicate the use of the ATC tool to your developers. If you didn’t think about the pragma’s and the exemption process you will very soon receive many questions from the developers.
  7. If the ATC process with exemptions is running stable, if you want you can now turn on the transport block to avoid any bad code from being released.

From step 1 to step 7 can take several months depending on the speed you can organize, agree and communicate the usage of the standards and tools. Don’t rush it without having the proper communication and organization.

Reorganization of ATC data

If you have large custom code base and run ATC often, the results table SATC_RT_RUN_EXE might get large and your system admin might complain to you about it. If this is the case you can schedule clean up program SATC_AC_REORG_REPOSITORY on weekly basis.

Running ATC central for more systems or against older versions: remote ATC

If you want to run ACT centrally for more development systems, or against an older SAP version not yet enabled for ATC: please read this blog on remote ATC.

ATC settings logging

The ATC setting changes are not logged. The logging is needed if you have a large crew of ABAP developers and apply the rules strictly (for example if you use the option to give an Error on transport release with ATC). To achieve this, switch on table logging for table TRCHECK.

Scope of ATC

ATC is capable of analyzing ABAP code.

For analyzing Smartforms, please make sure you have implemented the OSS notes listed in note 2715684 – Smartforms are not being checked by ATC.

For analyzing Adobe forms, please make sure you have implemented the OSS notes listed in note 2617401 – ATC: Enable ATC Checks for Adobe Forms.

It cannot analyze AMDP code. See OSS note 3086517 – AMDP method not checked by ATC.

S4HANA custom code migration

The ATC tool is a cornerstone tool in the S4HANA custom code migration. For more information, read this dedicated blog.

Running ATC on standard SAP or addon

For running ATC on standard SAP or on an addon, follow the instructions in this blog.

Running ATC on a transport

Running ATC on a transport is explained in OSS note 3250073 – How to perform ATC check of transport request.

ATC explanation notes

ATC explanation notes:

  • 2360080 – SCI/ATC false positive messages in SAP standard code which is included in customer program
  • 2403798 – Missing ATC and SCI check variants
  • 2414437 – ATC – How to configure e-mail notification to approver
  • 2736934 – “Tool failures possibly caused incomplete result” error happens in the ATC result
  • 3218711 – ATC: Analyzing Check Failures Caused by Incompatible Checks

ATC bug fix OSS notes

ATC bug fix OSS notes:

  • 2595081 – ATC results for logical database objects
  • 2706147 – ATC: Check Run terminates with CX_SCA_RESOURCE_FAILURE Unsupported action code
  • 2766934 – ATC: Option to Suppress Findings for Pseudo Comments Does Not Work
  • 2846485 – ATC: Objects that should be checked might be ignored
  • 2944794 – ATC: Error message when applying recommended quickfixes in enhancements
  • 2945390 – ATC: Uncaught exception CX_SATC_AC_INVALID_PARAM on doubleclicking an ATC finding
  • 2945457 – Runtime error when performing a ABAP Test Cockpit (ATC) run
  • 2950665 – ATC: Runtime Error UNCAUGHT_EXCEPTION CX_SATC_CI_EXEMPT_RFC_ERROR
  • 2951422 – ATC check of transport requests via ChaRM/Solution Manager might be incomplete
  • 2952245 – ATC: Missing raising clause in method definition
  • 2967266 – ATC: No Quickfixes in Enhancement Implementations
  • 2968679 – ATC: No Check Failures for Incorrect Check Variant
  • 2970235 – ATC: Unable to check Enhanement Implementations in local Check Scenario
  • 2985080 – ATC: Too few tool failures or unjustified check title ‘Unavailable’
  • 3000103 – ATC: Visibility of Parameter “Calculate Quick Fix Proposals”
  • 3022875 – ATC Performance Improvement – Avoid Redundant Enhancement Checks

  • 3026462 – ATC: Performance improvement for object providers with RFC destination NONE

  • 3039994 – Missing findings in cl_ci_test_sysubrc

  • 3045902 – Code Inspector: Analysis of update statements with CLIENT clauses
  • 3048533 – ATC findings for database views with subtracted field lists
  • 3051486 – Missing messages during combined execution of cross-program tests

  • 3052280 – Pseudo comment for exec sql findings in cl_ci_test_critical_statements

  • 3052556 – Performance improvement for cl_ci_test_analyze_select_hana

  • 3054114 – SLIN: Pseudo comment shown as pragma instead of correct pragma
  • 3057562 – Correction for some ATC-checks

  • 3058968 – Smartforms are not checked during CI transport check

  • 3059343 – Dump in GETWA_NOT_ASSIGNED in cl_ci_source_where_root or cl_ci_test_scan

  • 3060802 – Table attributes checks yields false positive findings when appending views

  • 3062094 – CX_SY_ASSIGN_CAST_ILLEGAL_CAST in CL_CI_PROVIDE_CHECKSUM

  • 3070110 – ATC: Transport checks ignore enhanced objects

  • 3070525 – ATC-check failure: RAISE_EXCEPTION: REFERENCE_IS_INITIAL

  • 3071443 – ASSERTION_FAILED in cl_sca_ci_qfix_engine=>resolve_chain

  • 3072077 – No-Order-Corrections for different releases

  • 3073128 – ATC: Long Loading Times in Result Browser in Eclipse / Latest RFC Stub Version
  • 3079756 – Cleaning up ATC tables is very slow

  • 3080254 – false positive in cl_ci_test_sysubrc

  • 3083555 – ATC: Exclude Pseudocomments/Pragmas from quickfixes

  • 3085789 – Object sets by creation date

  • 3089250 – ATC Check Corrections: EC CI_NOORDER

  • 3091155 – ATC: Runtime error UNCAUGHT_EXCEPTION in SATC_CI_CFG_SERIES_SCHEDULE

  • 3094306 – Short Dump in check failure display in ATC result view

  • 3096178 – ATC Problems view: ATC run for multiple packages is not displayed correctly

  • 3097843 – ATC: Code Classification BAdI for classification of development objects
  • 3102237 – ATC: No or too few objects included in check run

  • 3102790 – Dump in CL_CI_TEST_NO_ORDER_BY for select statements with component accesses to data references

  • 3105656 – Unit tests of ATC-checks are made robust

  • 3108750 – ATC Check: Tool Failure due to Incomplete Analysis Data

  • 3131892 – ATC Tool failures for program errors
  • 3132483 – ATC-check cl_ci_test_no_order has problems with move-correponding exact
  • 3136908 – False positives in cl_ci_test_no_order_by
  • 3137846 – TIME_OUT or TSV_TNEW_PAGE_ALLOC_FAILED in cl_ci_source_where_root
  • 3142782 – ATC: Titles of checks and check messages are missing
  • 3148409 – Display of pseudo comments and pragmas for findings in objects without source code
  • 3152107 – ATC: An ATC run terminates with runtime error RAISE_EXCEPTION in Postprocessing phase
  • 3156805 – Missings findings in cl_ci_test_imud_taw_a
  • 3192624 – False positives in cl_ci_test_select_taw_bybuf
  • 3193098 – ATC – BDEF and ENHO handling
  • 3198322 – Missing Object shown for PERFORM … IF FOUND
  • 3198613 – Memory problem in quickfix context for ATC checks
  • 3199091 – ATC: Failing or wrong navigation for links in finding details for recheck
  • 3202485 – ASSERTION_FAILED in cl_ci_test_search_cds_priv_acc
  • 3207637 – False positives of ATC-Check ‘Search problematic SELECT * statements’
  • 3215485 – Easy way to analyze declarations with cl_ci_test_abap_comp_procs
  • 3216064 – Corrections for Quick Fixes
  • 3217665 – Findings in generated Gateway classes
  • 3221688 – ATC reports findings in SAP Code of customer exit includes
  • 3224198 – Correction cl_ci_test_analyze_select_hana: SELECT with FIELDS
  • 3225564 – ATC: Adjust determination of object keys for WB requests
  • 3225942 – cl_ci_test_scan: cds_ast not read
  • 3226081 – Pseudo comment not working for cl_ci_test_no_order_by
  • 3227279 – ATC: Improve performance of program “Push_Pull_Exemptions”
  • 3227616 – Correction cl_ci_test_analyze_select_hana: FILTER
  • 3235243 – Remote ATC: DOMA, TTYP, SHLP information
  • 3236288 – Performance-Problem when calling function module SATC_CI_GET_CHECK_METADATA with check classes
  • 3240262 – ATC/CI: Check ‘FOR_ALL_ENTRIES’ <CONTINUE in IF>
  • 3244419 – More infos from cl_ci_test_abap_comp_procs=>get_select_stmt_infos
  • 3245867 – Missing findings AMB_SINGLE for cl_ci_test_no_order_by
  • 3247493 – False positives in SAP-coding for ATC-Check cl_ci_test_no_order_by
  • 3276198 – False positives No-Order-Check: SELECT .. UP TO 1 ROWS/ (former) POOL/CLUSTER-tables
  • 3291908 – Missing findings of ATC-Check cl_ci_test_no_order_by
  • 3313518 – ATC Problems view shows links which do not work
  • 3337402 – When checking an enhanced object, findings in the enhancements are displayed although, this option was not selected
  • 3338048 – ATC: Enhanced objects are not analyzed when called from an external API
  • 3338990 – ATC check does not show findings in enhancement implementations in ADT
  • 3342420 – Checking of Modifications that are not supported by the Classification
  • 3345837 – ATC check ‘Detect customer modifications’ does not find all modifications
  • 3349341 – ATC check priority 2 error: Function module exception missing (1025)
  • 3358907 – ATC-messages for cl_ci_test_analyze_select_hana
  • 3360626 – ATC: Correct inconsistency message when saving a run series
  • 3364256 – An exemption with scope finding is displayed for the wrong sub object (i.e. Include, Method )
  • 3370294 – ATC-Check cl_ci_test_sysubrc has false positives
  • 3375426 – ATC check for annotations in data definitions – include hidden annotations
  • 3383593 – Baseline and exemptions for findings with object type INCL not working correctly
  • 3388932 – ATC in ADT: Do not miss findings for object type INCL
  • 3389891 – ATC: ADT/API Result Reader returns incorrect findings when include exempted findings
  • 3392600 – ATC: Exemption is not considered in mass run
  • 3433091 – No findings for ATC-Check
Author saptechnicalguruPosted on 7 September 20175 August 2024Categories ABAP, Code reviewTags ABAP test cockpit, ATC15 Comments on ATC: managing your complete custom code base

SCI: SAP code inspector

SCI: SAP code inspector

SAP code inspector is a SAP delivered tool to quickly inspect your custom built ABAP code.

This blog will answer following questions:

  • Why use SAP code inspector?
  • SAP code inspector versus other source code scanner tools
  • How to setup SAP code inspector?
  • Which SCI checks are recommended in general?
  • Which SCI checks are a must do for S/4 HANA readiness?

Why use SAP code inspector?

SAP code inspector can be used by both ABAP developer or customer who has outsourced ABAP development. The SAP code inspector will check custom ABAP code for:

  • Potential performance issues
  • Potential usability restrictions
  • Robust programming checks
  • Use of ABAP code naming conventions
  • Scan for certain statements if wanted

The code inspector has been given big boost last few years by SAP, since has become primary tool to prepare custom ABAP code for S/4 HANA.

SAP code inspector versus other source code tool scanners?

Several major IT parties have setup their own custom build source code inspector tool. In the past these tools could deliver source code scanning functions that SAP did not provide in SCI.

With the improvements done last years on preparing ABAP code for S/4 HANA the SCI tool is now so mature that there are almost no checks missing any more.

The setback of other source code tool scanners is their lack of integration with the SAP development tools (SE38, SE80, SE24, SE37, Eclipse ADT, etc).

How to setup SAP code inspector?

Setting up SAP code inspector is quite straightforward. Start transaction SCI and you come to the main SCI screen.

In this main screen goto the part for Check Variant. Give it a name and make sure that the icon next to Name is switched to global variant as is shown in the screenshot:

Now press create and the empty variant screen is shown.

By clicking on the i icon you can get detailed information on the checks.

By default no checks are active and you have to select which checks are relevant for you.

Let’s go over a few important ones.

Make sure the performance checks are on:

Under Syntax Check make sure the classical SLIN extended program checks is switched on:

In the robust programming section switch on the SY-SUBRC handling. Here you have to take care (as do some other checks) to fill out the details (click on the green multiple selection symbol):

Finally (this is optional) you can also set the ABAP naming conventions:

Setting the variant as DEFAULT SCI variant

If we want to run the SCI tool from code editor the variant DEFAULT is used. This is different variant then we just created. To set the variant for SCI tooling for our own created variant, goto tcode SE16 and edit the contents of table SCICHKV_ALTER:

In the CHECKVNAME_NEW enter the name of the created SCI variant.

Running the SCI tool

The SCI tool can be run from different places. You can run it from tcode SCI itself by entering object or transport there. Or you can run it from code editor and selecting the menu Program/Check/Code Inspector.

Let’s use this sample program:

REPORT zscidemo.
 
 DATA: zlt_vbak TYPE TABLE OF vbak.
 DATA: zls_vbak TYPE vbak.
 
 SELECT * FROM vbak INTO TABLE zlt_vbak.
 
 LOOP AT zlt_vbak INTO zls_vbak.
   WRITE: / zls_vbak-vbeln.
 ENDLOOP.

And now we run code inspector. Results:

The result shows 3 aspects:

  1. Use of SELECT * on large table
  2. SY-SUBRC is not handled after the read: this is correct and should have been done
  3. Naming conventions of variables are not according to settings

After the run the developer can repair the items and rerun as much as needed.

SAP SCI will determine the severity of the found issue into Critical (error/red), Warnings (yellow) and Information (green).

Fine-tuning the SCI message priority

For several reasons you want to fine-tune the SCI message priority. Some check you regard as less important than SAP and some check you regard as more important then SAP is rating them in the SCI standard settings.

If you are in the main SCI screen choose the menu entry Code Inspector/Management Of/ Message Priorities, you come to the screen to adjust and fine-tune the priorities:

The example show is the increase of the check from warning to error (yes, it is still the German Fehler) for the omission of SY-SUBRC check after direct database update.

SCI tool and S/4 HANA migration

When you are in the process of migrating or thinking to migrate to S/4 HANA, then the SCI tool checks play a central role in preparing the custom ABAP code.

In oss note 1912445 – “ABAP custom code migration for SAP HANA – recommendations and Code Inspector variants for SAP HANA migration” SAP explains the details in the 2 newly delivered SCI variants.

You can run these new variants specifically, but it is best to already incorporate these checks into your existing SCI main variant. Even if you don’t plan to upgrade, the checks are good anyhow.

Most important highlights:

  • Mandatory use of ORDER BY or SORT BY (this check is vital: if not done it can even cause functionality issues!)

  • Unsecure use of FOR ALL ENTRIES (if not checked if table has entries, ALL database entries will be read, which causes both functional issues and kills performance)

  • Don’t use SELECT * (code will work, but in HANA this is a performance killer)

  • Checking for database hints (you rarely see this in custom code, but if done code will not properly work after migration)

This last check is bit hidden: open the multiple selection and in the details make sure Native SQL and DB hints are checked on.

For more details see the blog on S4HANA readiness 2.0 and the blog on setup of S4HANA custom code adjustments.

Checking your complete Z code base

If you want to check your complete Z code base or a larger block for a project, you can use the ATC tool. The ATC tool uses the SCI checks to analyze large blocks of Z code.

Check variant update

In SCI use the menu option Utilities and Import Check Variants to update your check variants. More background in OSS note 2948146 – SCI/ATC check variant is different between systems.

Checking addons and standard SAP

To check standard SAP code or addon ABAP code, follow the instructions in this blog.

Extra custom checks

If you need extra checks in SCI, you can use ABAP code to build your own custom checks. Please follow the instructions in this blog.

Running SCI on standard SAP and addons

If you need to run SCI on standard SAP and/or addons, you will find this is not possible (see OSS note 1986391 – Using SLIN/SCI to check SAP standard objects)

. Follow the trick in this blog to have it done anyhow.

Explanation OSS notes

Notes with extra hints and explanation:

  • 2360080 – SCI/ATC false positive messages in SAP standard code which is included in customer program
  • 2403798 – Missing ATC and SCI check variants
  • 2539725 – “Export of Program Information” missing when creating a SCI check variant
  • 2867608 – How to search specific ABAP statements or string in custom developed Z/Y programs
  • 2953541 – ATC/CI: Navigation in developer scenario
  • 3118312 – Code Inspector Check for restricted ABAP Language Version 5 (ABAP for Cloud Development) – Update 2108

Bug fix OSS notes

List of bug fix OSS notes:

  • 2899381 – Cannot deactivate custom Code Inspector category
  • 3051657 – Improvement of rs_ci_compare
  • 3068658 – Dump during display of Code Inspector results

  • 3085789 – Object sets by creation date
  • 3103235 – GEN_INCLUDE_NOT_EXEC dump when excuting OO statistics check

  • 3136206 – Code inspector checks on st05 Traces
  • 3137752 – Error for method of tree model when displaying results in SCI
  • 3142466 – Cannot perform inspection: The check YCL_CI_ADDITIONAL_CHECK does not exist in the check system.
  • 3260049 – Verification of Check Variants in Developer Scenario
  • 3296448 – Inconsistent treatment of count( * ) in FIELDS clauses during SQL analysis
  • 3359382 – Short dump in collector for objects by creation date
  • 3365286 – NON_EXISTENT_OBJECT error from table attributes check

Author saptechnicalguruPosted on 1 September 20171 August 2024Categories ABAP, Code reviewTags SAP code inspector, SAP SCI3 Comments on SCI: SAP code inspector

Aftercare for SAP upgrade or support package

Aftercare for SAP upgrade or support package

This blog will explain the normal aftercare that needs to happen after an SAP system is upgrade or has been patches with support packages.

Questions that will be answered:

  • What is the normal processing sequence in SPAU?
  • What is the new SPAU_ENH transaction?
  • Which aftercare is needed when using embedded search via TREX or HANA?
  • Which aftercare is needed for the authorization team?
  • What are the general sanity checks after an upgrade?
  • How to regenerate SAP_ALL and SAP_NEW?
  • How can I check for new or altered security parameters?
  • What other things to do after upgrade?
  • SEGW issues after upgrade, how to solve them?
  • How do I check for new security parameters?

SPAU processing

For extensive explanation on SPAU, read the dedicated blog. The below is a summary.

When starting transaction SPAU in a netweaver 7.50 or higher system the screen will look as follows:

First thing to do is to hit the Reset OSS notes button or Prepare OSS notes button (the name can differ bit per version):

This will download all OSS notes again and automatically mark the obsolete ones and will remove them from the list. Wait until the batch job doing this job for you is finished. This will save you a lot of time.

In a 7.50 or higher system look at OSS note 2532229 that solves a bug with notes in adjustment mode.

Second step is to process all the OSS notes. Don’t start the other activities until the OSS notes are done.

Third step is to process the tab With Assistant. Only when this is done continue with the tab Without Assistant.

The steps Deletions, Migrations and Translations are optional, but best to do as well. Deletions can be many, but here you can select all and reset to SAP quite quickly.

SPAU_ENH to process enhancements

Often forgotten is the post processing with transaction SPAU_ENH.

If there are changes in enhancements made by SAP conflicts with customer implementations can occur. SPAU_ENH will list them, and you can process them. If forgotten the customer implementation might not be called, which can lead to functionality giving errors.

In rare cases you will need to regenerate the enhancement spots via program ENH_REGENERATE. See OSS note 2507482 – ENHO: After System Upgrade, BADI_SORTER for BAdI Implementation is not being triggered:

RTCCTOOL post processing

After any upgrade/support package the basis person must run the RTCCTOOL program. This will check and list any needed updates.

In almost all cases the actions behind the button Addons&Upgr must be triggered by the basis person.

DMIS plug in OSS notes

If you are using the DMIS plugin for SLT, then you need to run the DMIS note analyzer program(s) again after the support package or upgrade. More information: read this blog.

ScenarioReport name
Object Based Transformation (OBT)CNV_NOTE_ANALYZER_OBT
ABAP Integration for SAP Data Intelligence (DI)CNV_NOTE_ANALYZER_DI
S4HANA Migration Cockpit (MC)CNV_NOTE_ANALYZER_MC_EXT
SAP Landscape Transformation (SLT) Replication ServerCNV_NOTE_ANALYZER_SLT
Near Zero Downtime Technology (NZDT)CNV_NOTE_ANALYZER_NZDT

Embedded search post processing

With an upgrade or support package SAP will deliver new improved version of embedded search models. If you are using embedded search you have to do post processing to make use of these new improved versions.

By default SAP will keep using the old model to make sure the search function keeps working. The basis administrator can then update the search models at their convenience.

To update start transaction ESH_COCKPIT:

Then from the Other drop down select the option Model modified:

Note: if there are no Model modified present, but you do get the message like "update in background started", then wait until the model update background job is finished. This job can take long time. If finished restart transaction code ESH_COCKPIT again.

Select all to be updated (or in case there is a lot a subsection). Then select from Actions menu the Update option:

Then you have to wait (a lot). Even on HANA this will take a long time.

You might get a message that you yourself are locking the update process: in this case, wait until your processes in the background are done (SM66 monitoring) and then try again, or use smaller selection.

Alternative is to delete the search model after the upgrade and redo completely. For setting up search model in S4HANA read this dedicated blog.

Background OSS note: 2468752 – Re-indexing after an application Upgrade.

Authorization post processing

With any upgrade or support package SAP will deliver new authorization objects. These need to be handled as well.

Regenerate SAP_ALL and SAP_NEW

SAP_ALL needs to be regenerated. This can be done simply by starting transaction SU21 and hitting the Regenerate SAP_ALL button:

See also SAP note 410424 – Customizing for generation of profile SAP_ALL.

SAP_NEW can be regenerated with program REGENERATE_SAP_NEW:

Regenerate SAP_NEW

See OSS note 2606478 – REGENERATE_SAP_NEW | bridging authorizations for input helps.

SU25 profile generator post processing

The authorization team needs to do post processing in the SU25 transaction to update profile generator.

Upon starting this transaction after the upgrade or support packages it will prompt you for having checked OSS note 440231 (SU25 preparation FAQ note).

Do download the most recent version (redownload the OSS note!) and read the content. The note cannot be applied automatically (it will say cannot be implemented). This is because it is a FAQ note. If you open the content scroll to your version and check the OSS notes. Make sure the notes listed there are applied to your system before continuing with SU25.

Then startup SU25 again and process steps 2a, 2b and 2c:

More background information can be found in SAP note 440231 – SU25 | FAQ: Upgrade postprocessing for Profile Generator.

Standard SAP job updates

After any SAP support package or upgrade, SAP will improve and/or change the standard clean up jobs.

To do this: go to SM36 and click the button Standard Jobs. Then select the Default Scheduling job. Then the system will tell you which jobs will be stopped (no longer needed), changed and new jobs there will be planned. See also the technical clean up blog.

For S4HANA standard jobs, read this blog.

Update of IMG nodes

If you use custom IMG nodes, you have to re-integrate your node into the main IMG using transaction S_IMG_EXTENSION. For more information see the blog on setting up custom IMG nodes.

Updating requirements and formulas

After an upgrade or support package the requirements and formulas might need to be regenerated via program RV80HGEN. More details: read this blog.

Updating ABAP where used list

After an upgrade or support package the ABAP where used list must be regenerated again. Read this dedicated blog.

Security parameters

With an S4HANA upgrade, the is a program to run to check for new security parameters: RSPFRECOMMENDED. Read this dedicated blog for details.

General sanity checks after an upgrade

The basic sanity checks after an upgrade actually start before the upgrade!

Before the system is being upgraded, you should check following items:

  • ST22 short dumps
  • SM37 batch job failures
  • SM13 update failures
  • SM58 RFC failures (for idocs and qRFC)
  • SM21 system log issues

If you check this at regular intervals before the upgrade you get a good mental picture (you can also take screen shots before the upgrade) of the issues already present in the system.

After the system upgrade and/or support package you check these items again. Because you checked before it is easy for you to see and filter out new items. New items can be analyzed for solution (can be SAP note that is needed, custom code that is not properly updated, changes in functionality, etc).

SGEN code generation

After support pack or upgrade you can use transaction SGEN to generate all ABAP code (standard SAP and custom) and check for errors in code generation. More information in this blog.

SEGW issues on standard SAP after the upgrade

In the past you could solve SEGW FIORI ODATA exposing issues directly in the system. Now SAP has forbidden this. See OSS notes 2734074 – Editing of standard SEGW projects for customers is blocked and 2947430 – Editing Standard OData Service Project throws error: Editing Prohibited SAP delivered projects cannot be edited in your system. The emergency workaround is described in OSS note 3022546 – In Transaction SEGW, Error ‘SAP delivered projects cannot be edited in your system’ is encountered during change of the OData Project PS_PROJFIN_MNTR.

Check for new or altered security parameters

After a support pack most security parameters remain the same. After and upgrade you need to check for new or altered security parameters. For S4HANA upgrade there is special note and program to quickly check for new and altered security parameters including the SAP recommendation: read more in this blog.

Other things to do after an upgrade

After an upgrade you can scan and check for new or enhanced functions you can use.

Examples to check:

  • Update the SCI variants delivered by SAP (see blog)
  • SAP audit logging will deliver new checks, but these are deselected after the upgrade
  • If using enterprise search: check if SAP delivered new search models that might be interesting for the business
Author saptechnicalguruPosted on 25 August 201714 January 2025Categories ABAP, Basis, Security, UpgradeTags support package, upgrade1 Comment on Aftercare for SAP upgrade or support package

SAP audit log

SAP audit log

This blog will explain the SAP audit log.

Questions that will be answered are:

  • What is the intended goal of the SAP audit log?
  • How to switch on the SAP audit log?
  • What are the recommended settings for the SAP audit log?
  • What are the common issues with audit logging?
  • Can I get anonymous access to the audit logging?
  • How can I get statistics on audit logging?
  • How can I get a where used list from the audit logging?
  • How can I archive audit log data for long term storage?
  • How can I delete audit logging?

Goal of SAP audit log

The goal of the SAP audit log is to capture all audit and security relevant actions. The audit logging function can capture failed logon attempts, dangerous actions like debug & replace, execution of transactions and programs, and many more.

SAP has a note for the frequently asked questions:

  • Older versions: 539404 – FAQ: Answers to questions about the Security Audit Log.
  • Newer versions (as of 7.50): 2191612 – FAQ | Use of Security Audit Log as of SAP NetWeaver 7.50

Also interesting read is this note: 3352573 – How to check transactions executed by an user in AS ABAP.

Audit log and privacy

The audit log will capture actions performed in the system. It will not only capture the actions, but also the user ID and terminal ID. This makes the tool a bit of a big brother is watching you tool. Auditors are normally used to dealing with sensitive topics. But next to answering audit questions the audit can also be misused to check ‘is this person doing a lot of work in the system’. For this reason access to audit log should only be given to persons who understand the sensitivity and people privacy. This includes in giving information to managers extracted from the audit log.

Anonymous audit log reporting

In the SAP audit log user names and terminal ID’s are visible. This is in many cases privacy information. Due to privacy rules and regulations the audit log access might be very restricted or cumbersome. Especially when the audit logging is to be used for analysis purposes, rather than for audit. If OSS note 2883981 – RSAU_READ* | anonymized display of Security Audit Log data is applied, a new transaction is created. This new transaction, RSAU_READ_LOG_ADM, shows all the information, but now with user ID and terminal ID columns in anonymous mode.

Switching on the audit log

For switching on the audit log first the corresponding system parameters must be set:

  • rsau/enable: set to 1 to enable
  • rsau/local/file: set the file location in format “/usr/sap/<SID>/<instno>/log/
    audit_<SAP_instance_number>” (yes, unfortunately audit log still uses a file)
  • rsau/max_diskspace_local: max disk space (set to at least 1 GB)
  • rsau/selection_slots: default is 2, but typically this is set to 10 slots

Unfortunately these parameters are not dynamic, which means a system restart is required to activate these parameters.

After the activation you can go to transaction SM19 (or in newer version to RSAU_CONFIG) to switch on the audit logging in detail.

First step is to create a profile and activate it.

Next step is to setup the filters.

Audit log filters

The audit log filters are used to filter events. If you select all events this will cause logging shadow and make the function unreliable.

To configure the filters use transaction RSAU_CONFIG (this is replacing old SM19 transaction).

Main client versus 000, 001 and 066 client

SAP has multiple clients. The 000, 001 and 066 client are only used by system admins. For these clients you can setup a special filter and log ALL actions for ALL users. This will not cause too many entries.

If you want to fully avoid SAPSYS entries, follow the instructions from this blog section.

Main client logging settings

In the main client you have to be selective on the checks.

The audit log has 3 classification of checks:

  • Critical (always switch these on!)
  • Severe (if possible switch on as well)
  • Uncritical (be very selective for switching these on)
Audit log

Key filters recommendations

ALWAYS switch on the critical checks. This will include:

  • Debug & replace actions
  • Debug start
  • Changes to audit log configuration itself
  • User creation
  • Failed logon attempts
  • User locks due to wrong password

From the severe and uncritical sections the following checks are useful:

  • Logon failed: this can help to detect logon attempts with standard users (see blog on SAP standard users): the audit log will capture the terminal ID from which the attempt happened
  • Start of report failed: will avoid discussions if people really could start or not
  • Report started: though in many productive systems SE38 etc is not allowed for directly starting a report outside a transaction code, this still will happen by admins and firefighter. This check will log which direct report is started
  • Transaction locked and unlocked: capture locking and unlocking of transactions with SM01 in old systems (and SM01_DEV and SM01_CUS in newer systems)
  • Transaction started: this will avoid discussion if people key in the tcode or not (do remember that audit log captures the start; it can still be user is not authorized to continue with the transaction). And many RBE (reverse business engineering) type of tools rely on this audit log tracing rather than the ST03 logging. Reason is that the audit log is on user level rather then aggregated level and is usually kept longer.
  • User deleted, user locked and user unlocked
  • Password changed for user
SE92 audit log details

Using transaction SE92 you can get a more easy overview of the settings definitions as provided by SAP for the audit log details. Read more in this blog.

RSAU_CONFIG configuration overview

Using transaction RSAU_CONFIG you can get a more easy overview of the actual activation and configuration.

Audit log reporting

Transaction codes SM20 or RSAU_READ_LOG can be used to view the audit log results.

Be  careful to whom you give the rights to read the audit log.

Audit log settings overview

You can use transaction RSAU_CONFIG_SHOW to get an overview of the audit log settings.

New checks

With every new SAP release SAP improves the audit log. By default the audit logging is not updated after an upgrade. Therefore it is wise to check for new items added to the audit log after an upgrade.

Determining changes to audit log settings

OSS note 2680888 – SAL | Report for determination of differences in event parameters is delivering new report RSAU_READ_LOG_DIFF to show changes done to the audit log configuration:

RSAU_READ_LOG_DIFF

Delete SAP audit log files

Start transaction RSAU_ADMIN and start the option for log file reorganization:

Delete audit logging

Or you can run/schedule program RSAUPURG.

Restricted access to this function is a must.

Archiving audit logging

There might be requirements from security or business side that require you to find a solution for long term storage of the audit log data. Deletion as explained above could not be an option for you.

To archive audit logging data, activate the settings for archiving object BC_SAL. Read this blog on the exact technical execution of archiving runs.

OSS notes to be applied for the audit log archiving function:

  • 3014220 – RSAU_ARCHIVE_READ | Optimization of evaluation
  • 3054172 – Audit log archive management
  • 3063886 – RSAU_ARCHIVE_DELETE | SARA Statistics
  • 3068475 – RSAU_ARCHIVE_WRITE | Optimization and functional enhancements
  • 3081540 – RSAU_ARCHIVE_WRITE | UNCAUGHT_EXCEPTION CX_PARAMETER_INVALID_RANGE
  • 3094328 – RSAU_ARCHIVE_RELOAD | Reloading Security Audit Log archives
  • 3232857 – RSAU_ARCHIVE_WRITE | Archive up to current date not possible
  • 3281751 – BC_SAL | Masked error message for archiving of audit log data
  • 3323638 – Performance optimization for RSAU_ARCHIVE_DELETE

Issues with audit logging

There are some known issues with the audit logging.

Logging shadow

If too much items are selected in the filters the audit logging will grow very fast. If the audit log is full, it will start to overwrite the earlier entries. The earlier entries are then lost. This is called logging shadow. Depending on your requirements, you have to increase the disk space, and better: check which item in the audit log settings you don’t need, but do cause extensive amount of logging.

Large SAP systems with multiple application servers

On large SAP systems with multiple application servers, the file handling can cause issues. If the system is setup using shared files and the names of the profile configuration per application server for the file name is identical, this will cause nasty issue. The issue is that the audit logging from several application servers will overwrite each other entries. This is hard to detect. Solutions: don’t use shared file, or change the profile parameter per application server to include the application server name into the audit log file name. To do this set the FN_AUDIT parameter to this value: SQL_++++++++.AUD. Upon runtime the +’s will be replaced with the application server name.

See point 25 in the audit log FAQ note 539404 – FAQ: Answers to questions about the Security Audit Log. And point 12 in the new (as of Netweaver 7.50) note 2191612 – FAQ | Use of Security Audit Log as of SAP NetWeaver 7.50.

Audit logging integrity

Based on the settings in OSS note 2033317 – Integrity protection format for Security Audit Log, you can switch on the audit logging integrity. This way you can prove nobody tampered with the audit log. But this also means you cannot read the audit logfile on file level or by any third party tool. Please consider this carefully and read the note about other effects and prerequisites first before switching on.

Where used list and audit log statistics

On newer versions (or via notes below) there are 2 new programs available:

  1. RSAU_GET_STAT for statistical information
  2. RSAU_GET_WUSL for a where used list of security events

To get this function apply these OSS notes:

  • 3002091 – RSAU_READ_LOG | optimization of message statistics
  • 3015325 – SAL | Supplementation of information tools

  • 3044997 – Optimization of UTC timestamp processing


Audit log self check

To get this function apply the same notes as for the audit log statistics:

  • 3002091 – RSAU_READ_LOG | optimization of message statistics
  • 3015325 – SAL | Supplementation of information tools

  • 3145365 – RSAU_SELF_CHECK_DIA | Enhancement of environment check

Then you can run program RSAU_SELF_CHECK_DIA.

If you want to run the Still Alive Check:

You first have to make sure to activate Audit test event AU0:

Auditing user SAP*

If you need to audit user SAP*, the * is a wildcard. You have to use the escaped version: SAP#*. See SAP help link.

Background OSS notes and blogs

Logging incidents for SAL (SAP Audit Log): 3295213 – Required information for analyzing issues with the Security Audit Log (AS ABAP) within the new SAL environment.

Useful background OSS notes and blogs are:

  • Audit log FAQ note 539404 – FAQ: Answers to questions about the Security Audit Log.
  • 1941568 – SAL | FAQ for use of customer-specific events
  • 2191612 – FAQ | Use of Security Audit Log as of SAP NetWeaver 7.50

  • 2360334 – Security Audit Log does not work after setup
  • 2414468 – Analysis of SAL log data in the background
  • 2546993 – Analysis and Recommended Settings of the Security Audit Log (SM19 / SM20)

  • Blog on recommended security audit log settings
  • 2676384 – Best practice configuration of the Security Audit Log

  • 2838480 – SAL | Secure by default

  • 2995772 – How to Specify Massive Audit Files to be Searched with RSAU_READ_LOG and RSAU_SELECT_EVENTS
  • 3055825 – RSAU_LOAD_FILES for transferring audit log data to the SAL database
  • 3090362 – RSAU_ADMIN | Integrity protection format – data management
  • 3094328 – RSAU_ARCHIVE_RELOAD | Reloading Security Audit Log archives

  • 3097820 – Configuration of “Maximum Size of One Audit File” is incorrect – Audit log in ABAP system
  • 3113752 – User logoff entry not captured in audit logs.
  • 3237752 – Security Audit Logs not recorded when using NFS storage
  • 3137004 – How to archive audit log from DB?
  • 3140539 – SAL | New event definition for change access in SE16N
  • 3143980 – How to activate a static profile in T-Code RSAU_CONFIG
  • 3144105 – How to apply the configuration of a static audit log profile to the dynamic configuration without system restart in RSAU_CONFIG
  • 3218604 – Troubleshooting user logon problems
  • 3219561 – Where to find information about the Security Audit Log and it’s configuration ?
  • 3225726 – Logging the Client IP address in the Security Audit Log when using SAP Web Dispatcher.
  • 3226223 – How to monitor debug activities in SAP Netweaver.
  • 3233604 – How to check RFC logon lock or failure issue in security audit log
  • 3265014 – New events FUG, FUH, and FUI
  • 3274589 – New events FUJ and FUK
  • 3298279 – New event FUL (shared object topic)
  • 3319853 – SAL events for DBA Cockpit
  • 3376172 – SM19/RSAU_CONFIG | Enhancement of list of permanently active events

  • 3386875 – SAL Event FUR for File Share Client
  • 3476220 – How to read Security Audit Log data from an inactive or decommissioned server (AS ABAP) ?

Known bugs and bug fixing OSS notes

Bug fixing OSS notes:

  • 2841034 – Security Audit Log: AU3 entry for core transaction of variant transaction
  • 2902365 – Enhancement of RSAU_COLLECT_STAT_DATA
  • 2903947 – Unnecessary event logging
  • 2919024 – RSAU_READ_LOG | Reading of logs for inappropriate parameterization
  • 2936390 – RSAU_SELECT_EVENTS displays incorrect instance for local search
  • 2990798 – Original virus scan profile is not listed in Security Audit Log
  • 2993146 – SM20/RSAU_READ_LOG | problem when reading from files
  • 2998269 – RSAU_READ_LOG | error when displaying the interval of data actually read
  • 3005997 – RSAU_READ_LOG | Error when reading the audit log

  • 3027399 – Optimization in SM19 and RSAU_SELECT_EVENTS

  • 3038925 – RSAU_SELECT_EVENTS | Statistics information in the list header

  • 3050692 – Recording trigger for events BU2 and EUU

  • 3053695 – RSAU_ADMIN | Reorganization of log files after change of FN_AUDIT

  • 3068475 – RSAU_ARCHIVE_WRITE | Optimization and functional enhancements

  • 3075661 – Secure Audit Log event BU2

  • 3078007 – RSAU_READ_LOG | Event sequence in result list

  • 3080892 – SAL | Conversion error when saving numeric parameters

  • 3081540 – RSAU_ARCHIVE_WRITE | UNCAUGHT_EXCEPTION CX_PARAMETER_INVALID_RANGE

  • 3081762 – SAL | Event trigger for BUS

  • 3086916 – SM20/RSAU_SELECT_EVENTS | unsuitable short texts for security level

  • 3089438 – Missing transaction start (AU3) entries in the Security Audit Log

  • 3090191 – SAL | Optimization of class CL_SAL_ALERT_API

  • 3090362 – RSAU_ADMIN | Integrity protection format – data management

  • 3090494 – RSAU_READ_LOG / SM20 | Transaktionskontext für Audits

  • 3097820 – Configuration of “Maximum Size of One Audit File” is incorrect – Audit log in ABAP system

  • 3102375 – Inconsistent entries in Security Audit Log for events of type AU5 and AUK

  • 3150788 – Security Audit Log information on the used transaction-code is unavailable.
  • 3205227 – Transaction execution log missing in the audit log
  • 3249114 – Optimization of APIs for reading the audit log
  • 3261220 – RSAU_ADMIN | Options on the selection of T-Code RSAU_ADMIN are greyed out
  • 3298908 – RSAU_MAINT_LOG | job with error message ‘Trigger () does not exist in table RSAU_SYNC’
  • 3308752 – API RSAU_API_GET_ALERTS does not find any data
  • 3346306 – RSAU_ADMIN | Allow Reorganization of data for recording target database – API mode
  • 3367960 – Files created by the Security Audit Log have a different format than defined via profile parameter FN_AUDIT
  • 3406914 – Performance issue when evaluating SAL logs (written to the file system) via SM20/RSAU_READ_LOG due to incorrect SAL configuration
  • 3407647 – RSAU_READ_LOG | Optimization of reading audit log 
  • 3432332 – SAL | Parameter rsau/max_diskspace/per_day and rsau/max_diskspace/per_file cannot have the value 0

Author saptechnicalguruPosted on 18 August 201727 December 2024Categories Basis, SecurityTags audit log4 Comments on SAP audit log

Swiss knife for idocs: WLF_IDOC transaction

Swiss knife for idocs: WLF_IDOC transaction

This blog is about the new and too much unknown new Swiss knife for idocs: the WLF_IDOC transaction.

The blog will answer questions like:

  • What are the new features of the WLF_IDOC transaction?
  • Which transactions does WLF_IDOC replace?
  • Why should I start using the WLF_IDOC transaction?
  • How can I search in idoc content?

Idoc listing

The first function WLF_IDOC replaces are the idoc listing transactions WE02 and WE05.

Starting up WLF_IDOC will give you first screen to enter selections for idocs:

WLF_IDOC startup screen

This will give you the output screen with the list:

WLF_IDOC list output

So far nothing new.

The new part is the single idoc view:

WLF_IDOC detailed idoc screen

The idoc segments are shown on the left hand side and the idoc statuses top right.

The main new difference is when you select a segment on the left hand side, the right hand side bottom view will show you ALL the segments of that name in the idoc. This will give you a more complete overview of the idoc content. There is no need any more to scroll through the segments one by one: you see all in one shot.

Compare content of 2 idocs

If you are in the list screen of the idocs in WLF_IDOC, you can select two idocs and then use the idoc compare icon to compare the content of the selected idocs:

End result:

WLF_IDOC compare idocs result screen

This output screen now shows you the differences in the two selected idocs.

Idoc reprocessing

From the list overview you can start the idoc reprocessing for idocs with status 51. If you select and idoc and press the Process button:

you will be given following choices:

You can do online, background or jump to the classical BD87 idoc reprocessing transaction.

In the overview screen you can select multiple idocs as well for mass processing.

Change idoc status

If you have selected idocs in the overview screen you can use this button to change the idoc status:

You can use this for example to change status 51 (error in processing) to status 68 (error – no further processing) to avoid the idoc from ever being processed again.

Search in idoc content

In the selection screen of WLF_IDOC content there is a tab called criteria for data record.

idoc processing
WLF_IDOC search in idoc content

This tab can be used to filter idocs based on content of the idoc for a field fo the segment. You can select based on 1 filter (just leave the second one empty). Or you can use it to have and / or selection of the content of 2 segment data fields.

This can be used for example to fast select all the idocs for a certain material number inside the idocs.

Do keep in mind that the idocs are still filtered based on the data in the first tab (status, date, idoc type, etc.).

Alternative transaction for search is WE09.

Editing idoc content

To be able to edit idoc content, there are 2 ways:

  1. Classic BD87 and WE19 test tool approaches (BD87 can be used also in production, but WE19 should not be used in production): from WLF_IDOC you can go to BD87 by selecting an idoc and press Process (then select BD87 dialog), or go to WE19 by selecting an idoc and selecting menu option Utilities/Idoc Test Tool.
  2. Allowing some idoc fields to be edited directly

To allow some idoc fields to be edited, you first have to customize this. In SPRO go to the menu path Cross-Application Components, then select Idoc Monitor for Agency Business and Retail (yes, it is a strange place), finally select Idoc Maintenance Settings.

Now enter the message type and segment you will allow editing. And in the details specify the fields that should be editable. Example is given below:

Editing idoc content configuration

In the WLF_IDOC transaction, you can now select and idoc from the main screen and press the change button. In the details these fields have become editable (and only these fields):

Idoc editable fields in WLF_IDOC

Make the changes and save the idoc. Go back to the main screen in WLF_IDOC and you can reprocess the idoc via the Execute/reprocess idoc button.

You have to indicate the editing per message type/segment/field. It is not suitable for mass processing or test functions. This is really meant for a limited amount of fields in a productive system where business needs to correct idocs (most likely wrong reference numbers or dates).

Running in productive systems

This section requires intermediate SAP knowledge

When you run WLF_IDOC in a productive system (in SCC4 system is set to productive) some functions are restricted:

  • Change control record
  • Copy IDOC and delete segment
  • Change status

If you still want to use these functions, you must have proper authorizations. Next to that add parameter RWLFIDOC_NEW_EXPERT with value X in your user defaults (transaction code SU3).

If you are in WLF_IDOC, key in &expert into the transaction code area and you will be switching to Expert Mode where these functions are available.

See OSS note 2455691 – Missing functions in productive systems in WLF_IDOC.

Bug fixing OSS notes

Please apply following notes to fix bugs get up to date functionality:

  • 2583961 – Error WZRE_IDOC020 in WLF_IDOC transaction
  • 2719264 – Tcode WLF_IDOC displays IDOC data changes incorrectly
  • 2731547 – Formatting of the job name in the IDoc monitor
  • 2734460 – IDoc monitor outbound IDocs
  • 2766052 – Background processing and IDoc monitor
  • 2776628 – Too many jobs created in the IDoc monitor
  • 2780140 – WLF_IDOC: changes applied to unexpected segments
  • 2842617 – Missing confirmation prompt in the IDoc monitor
  • 2851080 – This SAP Note provides a new BAdI in the IDoc monitor
  • 2870356 – Number of selected IDocs is not output
  • 2895571 – IDoc monitor: Monitoring background processing
  • 2942915 – WLF_IDOC: Cannot replace by blank/initial
  • 2944675 – IDoc monitor: Search using Parex fields does not work
  • 2961763 – IDoc monitor performance improvement
  • 2971969 – Display is not updated correctly
  • 2977604 – Links are not determined correctly
  • 2984067 – Links are not updated
  • 3006419 – In the IDoc monitor, the quick info of the column LOG is not displayed correctly.
  • 3015165 – WLF_IDOC dumps when executed through webgui
  • 3022325 – Advanced selections are ignored
  • 3086903 – Unable to modify Idoc in WLF_IDOC
  • 3087668 – WLF_IDOC authority check not working for unauthorized message type
  • 3111441 – Not possible to turn on expert mode in WLF_IDOC webgui
  • 3120019 – Data selection check does not work correctly
  • 3125064 – Segment information may be missing during the output of error messages
  • 3143791 – WLF_IDOC: message EBR113 should display in status bar
  • 3181911 – IDoc processing in different time zones
  • 3247924 – WLF_IDOC authorization issues
  • 3332437 – WLF_IDOC authorization issues
  • 3352174 – transaction WLF_IDOC returns wrong search results
  • 3361269 – Error occurs when displaying status records in the IDoc monitor
  • 3394918 – WLF_IDOC search issue
  • 3444780 – In transaction WLF_IDOC, click button “Choose Another Structure” twice to navigate to another structure
  • 3591822 – String search issue in WLF_IDOC transaction

More on idocs

See the blog on idoc tips & tricks.

Author saptechnicalguruPosted on 14 August 201727 May 2025Categories ABAP, Basis, IdocTags idoc, WLF_IDOC4 Comments on Swiss knife for idocs: WLF_IDOC transaction

SAP standard users

SAP standard users

This blog post will explain the process for dealing with SAP standard users.

Questions that will be addressed:

  1. Why are there SAP standard users?
  2. Which users are there?
  3. How to check if the standard SAP users are dealt with properly to avoid security issues and how to solve them?
  4. How to detect if somebody is trying to logon with standard SAP user?
  5. How to deal with standard SAP user DDIC in client 000?
  6. How to deal with standard SAP user TMSADM

Why SAP standard users and which ones are there?

After initial installation of SAP there is only one way to login: is via the standard user SAP* with password PASS. After logon, create your own user and disable user SAP* by giving it a new password and lock it. SAP* can be there without profiles and roles. Also set parameter login/no_automatic_user_sapstar to 1 to avoid automatic re-creation of SAP*. SAP has new way of dealing with superuser SAP*; read this dedicated blog.

To set up the SAP ABAP system code the standard user DDIC is used. This user compiles the ABAP code.

For software deployments the initial setup must be done by user TMSADM (TMS = transport management system, ADM = admin).

For historical reasons also the EARLYWATCH and SAPCPIC user are still present.

How to check standard SAP user settings and how to solve issues?

SAP delivers standard program RSUSR003 to check for correct setting of these users ID’s and passwords. Transaction code for this program is also RSUSR003.

End result should look like:

If any item has a red or yellow color you should act: link to solution.

How to check if standard users are being unlocked?

You can use SAP Focused Run to have a custom metric to detect when a standard user is unlocked. You can configure an alert mail to be sent 5 minutes after the unlock happens. More information on this: read this blog.

How to detect if somebody is trying to hack a system by trying to log in using standard SAP users?

There are 2 main ways of finding if standard SAP users are being tested for system access:

  1. Somebody runs report RSUSR003 (whitebox method)
  2. Somebody tries to use the users and passwords from outside (blackbox method)
Detection of running RSUSR003

Two ways of detection of running RSUSR003:

SM21 system log will show similar entry:

In this log you can see the user of the program and by double clicking you can also retrieve the terminal ID from which the user ran the program.

More background in OSS note 2248319 – Program RSUSR003 reports “Security violation” in SM21 system log.

SM20 audit log can show similar entry (provided the start of report is configured properly):

Also here you can see the user who ran it and from which terminal.

The exact scope of program RSUSR003 is described in OSS note  2481566 – Functional scope of report RSUSR003.

Bug fix note: 3224200 – SUIM | RSUSR003 displays lock by unsuccessful logon.

Detection of black box standard SAP user testing

SM20 audit log can show similar entry (incorrect logon attempts configured properly):

User DDIC in client 000

In many blogs there is a lot of discussion on how to deal with DDIC in client 000. There is no one size fits all approach here.

SAP standard recommendation is:

“To make sure everything runs smoothly, give DDIC the authorizations for SAP_ALL during an installation or upgrade and then lock it afterwards. Only unlock it when necessary.”

This is fine for smaller systems on which little maintenance is ongoing. If more frequently support packs, upgrades and/or installations are happening this is more annoying.

The main issue is when a system is using third party solutions which are provided by external parties in transports. When DDIC is locked in client 000 and the foreign transport is imported, this import will not finish and continues forever until DDIC is unlocked.

That is why on systems with more maintenance, and less strict regimes (business without SoX and FDA, etc), DDIC will not be locked on client 000 and the password is known to basis team. DDIC should be locked in all the other clients.

DDIC unlock in main client is needed only when implementing a TCI based OSS note (see blog on OSS notes).

Background OSS note on DDIC: 1998382 – User DDIC for Transport Activities.

Also read this note: 3035580 – Job RDDIMPDP running as DDIC to replace DDIC with different job user for import dispatchers.

User TMSADM

User TMSADM needs to exist in client 000. It can be deleted in all the other clients (including the main data client). Background on SAP help.

Password change instructions for user TMSADM: 1568362 – TMSADM password change.

User SAPSYS

SAPSYS is used for OS jobs, CCMS monitoring, running the background processing scheduler, and performing other system-internal operations (most of them executed as so-called AutoABAP programs). Don’t lock SAPSYS otherwise you get big issues.

Reference OSS note: 3195498 – SAPSYS user modifying background jobs.

Cross client hacking

See this blog on how a hacker can jump from one client to the other.

Client 001 and 006 deletion

To reduce the attack surface, you can also delete clients 001 and 066. See this blog for more background information.

Standard users in the Early Watch

Standard users are also listed in the early watch. Sometimes with a little different logic. The explanation of standard users in the EWA is kept in OSS note 1610103 – EWA : Default Password of Standard Users – Detailed overview for T/S.

Author saptechnicalguruPosted on 9 August 201729 July 2024Categories Basis, Hacking, SecurityTags SAP standard users3 Comments on SAP standard users

Posts pagination

Previous page Page 1 … Page 39 Page 40

Recent Posts

  • Webdynpro tips & tricks
  • SCOV coverage analyzer
  • SAP support webcasts and documents
  • Financial document archiving: check document archiving
  • Printing with protected spool function
  • HANA FAQ and How-to OSS notes
  • Transaction tips and tricks
  • SAP tools for keys
  • SAP BTP availability
  • ABAP dictionary check
  • OAUTH call from ABAP
  • Security Services Tools
  • SAP Focused Run LMDB and landscape management
  • Data archiving: customer and vendor master data
  • Load balancing analysis tool
  • SAP GUI for slow or remote network
  • /SDF/SMON_DISPLAY to display snapshot monitoring data
  • SICF tips and trikcs
  • SAP Focused Run API’s
  • User based debugging

Tags

  • archiving
  • ATC
  • batch jobs
  • clean up
  • Cloud ALM
  • content server
  • custom metric
  • Data archiving
  • debug
  • EWA
  • FIORI
  • Focused Run
  • hacking
  • Humor
  • interfacing
  • licenses
  • mail
  • network
  • ODATA
  • OSS notes
  • Performance
  • Printing
  • RFC
  • S4HANA
  • S4HANA custom code
  • S4HANA readiness
  • S4HANA upgrade
  • SAP Focused RUn
  • SCI
  • search
  • security
  • security notes
  • soap runtime
  • solution manager
  • ST03
  • ST03N
  • system usage
  • transports
  • trex
  • upgrade
  • User measurement
  • USR02
  • webdynpro
  • webservice
  • Workflow
Films en seriesFilms en series
  • Home
  • Contact
  • Newsletter
Saptechnicalguru.com Proudly powered by WordPress