Transport check tool

SAP has delivered a new transport check tool. Goal of the check tool is to make sure your imports are done successful. The tool is designed to answer the following questions:

  • Do I import transports in the right sequence?
  • Do I have dependency on other transports, which are not yet imported?
  • Are there objects in the transport also used in other transports, which I should also import now, or when I do later make a downgrade?
  • How long will the import time take?

SAP transport check tool

The transport check tool is a program with name /SDF/CMO_TR_CHECK, or tcode /SDF/TRCHECK. It is delivered in updates of ST-PI component. You can run this program in the normal system or from SAP solution manager.

If you start you get the following initial screen:

Transport check tool overview screen

Here you see that you need 2 RFC’s: one to the source system where the current transports are and one to the target system where the imports will happen.

Tip: make 2 variants for this program. One is called quality import with RFC source is development and target is quality system. Second is called production import with source is quality and target is the productive system.

In the transport details you can enter 1 or more transport numbers you want to validate. Enter in the transport list the sequence of wanted import.

Important for multiple transports: sequence does matter! If you enter transports in sequence A1, A3, A2 this will give different result from A1, A2, A3.

Cross reference check

The cross reference check will take all the objects in the transport and will execute a where used list in the target system and will check their versions. If any strange thing is found in missing items, or potential version conflicts, you will be alerted. If check is ok the list of items will be empty.

For the cross reference check to work, the transports need to be released. See OSS note 3382914 – /SDF/TRCHECK Cross Reference Check error.

Sequence check

The sequence check will check the sequence of your transports if they are in the right order. It will also check other transports as well for containing the same objects, which have not yet been imported to the target system. If any strange thing is found in missing items or potential version conflicts you will be alerted. If check is ok the list of items will be empty.

Import time in source system

This check will add up the import times of the transport in the source system. This will be a good indication for import time needed in the target system. Example: if import to quality system took 2 minutes, you can expect productive import to be about 2 minutes as well. If the import to quality took 2 hours, you might want to decide more carefully on the exact time of import to productive system.

Online import check

The online import check is for checking critical objects inside the transports. This needs to be configure in the target system of the transport. Read more in this dedicated blog.

History of transport check tool runs

If you use the option Save Results, the results of the analysis will be saved for future reference. These can be retrieved via the History button on the first screen of the transport analysis tool or via program /SDF/CMO_TR_CHECK_HISTORY.

More information

More information on the check can be found by hitting the I (information) button on the program itself. Features of the tool including the PDF explaining the setup of the Online Import Check feature can be found in OSS note 2475591 – Transport Check Report.

Generic SAP blog on the transport tool and its usage can be found here and here.

Specific SAP blog on cross reference check can be found here.

Limitations of the cross reference check are listed in this OSS note: 2964512 – Limitations of the Cross Reference Check.

Bug fixes

This tool is also subject to having bug fixes. The bug fixes can be needed centrally on the SAP solution manager system and on the SAP systems that are being checked for transport imports.

List of bug fix OSS notes:

Print list archiving

This blog will explain how to setup print list archiving.

Questions that will be answered are:

  • What is use case of print list archiving?
  • How to setup print list archiving?
  • How to test print list archiving?
  • How to troubleshoot issues with print list archiving?

Goal of print list archiving

The business sometimes needs to store report output for a longer period of time. They can print the information and put it in their archive. This leads to a big physical archive.

You can also give the business the option store their output electronically in the SAP content server.

Set up or check content repository

First check which content repository you want to use to store the print lists. The type of content repository must be “ARCHLINK”. Menu path in customizing is as follows:

Set up content repository

Or you can go there directly with transaction OAC0.

Content repository A2 is default present in the system and is used in the example below. A2 is pointing towards the SAP database for storage. For productive use a SAP content server in stead of SAP database.

Customizing for print list archiving

In the following customizing path you find all the actions required for the print list archiving:

Print list archivng customizing

First check that print list document type D01 is present and is using ALF as document class:

Print list document type

In the Edit links section, you can set for document type D01 which content repository is should use.

Print list to content repository link

Then check if the number ranges for archivelink are properly maintained (if empty create new number range):

Archivelink number ranges

Then activate the print list queues:

Setup print list archive queues

Next step is to select the action to schedule the storage job. This job should not run faster than every 15 minutes.

Final step is to setup the archive printer. You can later on see it with transaction SPAD as well.

Important here: short name must be ARCH. Device type and device class must be set to archiving.

Set up archive printer screen 1

On the access method tab also set access method to archiving.

Set up archive printer screen 2

Now the setup is complete.

Testing print list archiving

The test procedure is described in OSS note 1792336 – Test if a Print List is being Archived.

If you follow this procedure you will initially run into this strange screen:

Error screen

You didn’t do anything wrong yet. The problem is that the option for print to archive is not displayed by default. First go to the properties of a working printer to enable the archiving output option:

Print request properties screen

The rest of the note is self explaining:

  • Start SE38 and run program SHOWCOLO
  • Print the output list to printer ARCHIVE and archive mode selected
  • Goto SP01 find the spool, select menu path Print with changed parameters
  • Hit the Archive button
  • Start transaction OAM1 and hit the execute button next to Archive queue
  • Start transaction OADR to read from the archived print lists
  • From the list take the document and select the button “Display from storage system”

Troubleshooting

If you have issues, please check the troubleshooting OSS note  1775577 – How To and Troubleshooting guide for storing print lists in ArchiveLink.

Other OSS notes:

Oracle statistics update

If you are having performance issues, of if you have done intensive data archiving or technical cleanup in your system running on Oracle, you need to consider the Oracle statistics. Without proper statistics the performance of your system will be sub-optimal or even bad.

Questions that will be answered in the blog are:

  • How to run Oracle index statistics update?
  • How to use the update as part of technical cleanup?

Oracle index statistics update

To run the Oracle index statistics update, go to transaction SE38 and start program RSANAORA:

RSANAORA start screen

To redo the statistics of an index fill out the table and index in the format: table~index. In this example the main index (0) of table BALDAT is chosen: BALDAT~0.

Run the update and wait for it to be finished:

After RSANAORA run

Repeat this for every index defined in your system (lookup in SE11, button Indexes).

Runtime will depend on the amount of entries in the table and the type of infrastructure. Test on acceptance system before running in productive server.

Index run for almost empty tables

If your table is empty or almost empty you can also run RSANAORA with the option Alter index rebuild online. This will speed up read performance for that table index.

Regular runs

If you have setup regular technical clean up jobs as explained in this blog, you can opt to schedule a last step in the clean up job the update of the statistics program RSANAORA. This will ensure best performance while it will hardly cost you time.

Index monitoring

Oracle has a function called index monitoring to check if indexes are used at all.  You can use it to delete non-used indexes. See OSS note 105047 – Support for Oracle functions in the SAP environment.

Transaction locking

This blog will explain the new transaction SM01_DEV and SM01_CUS, which are replacing the old SM01 transaction.

Questions that will be answered in this blog are:

  • How does SM01_DEV work?
  • How does SM01_CUS work?
  • What are the differences between SM01_DEV and SM01_CUS?

SM01 transaction locking

In older SAP systems you can lock transaction for use with transaction SM01. In newer SAP systems you will get his message when using SM01:

SM01 is obsolete

This refers to new functions explained in oss note 2234192 – Enhancement to application start lock.

The new solution has 2 locking transactions: SM01_DEV for client independent locking and SM01_CUS for client dependent locking.

SM01_DEV locking transaction

Start tcode SM01_DEV:

SM01_DEV start screen

In this example we will lock transaction SE30_OLD. On the next screen select the transaction and press the lock button. Fill out the transport number. End result:

SM01_DEV

When starting SE30_OLD you now get this error message:

Locking message

SM01_CUS locking transaction

In this example we want to lock transaction S_ALR_87012271. The start screen is identical to SM01_DEV. If you want to lock the transaction you get a popup screen in which you can differentiate for WinGui or non WinGUI.

SM01_CUS lock

The transaction will be locked, but not be put into a transport. If you want to transport the lock, you have to use the transport button.

If OSS note 2470927 - SM01_CUS | API for application start lock does not work is not yet applied in the system you will face this error message after locking:

Application lock error
Applying the note solves this issue.

After locking tcode S_ALR_87012271 and starting it you get this message now:

Locking message for customizing

The transaction is now only locked in the local client. If you have more client or want a full central lock, then you have to run SM01_CUS from client 000.

Differences SM01_DEV and SM01_CUS

Differences between the 2 transactions:

  • SM01_DEV locks global and has mandatory transport
  • SM01_CUS locks per client and has an optional feature to transport

Overview of locked transactions

Program RSAUDITC can be used to get an overview of all locked transactions.

Bug fix oss notes

Bug fix OSS notes:

Generic background note: 2234192 – Enhancement for locking application start

Workflow initial configuration

This blog will explain the steps need to make the SAP workflow engine to work. If you have to set up the SAP workflow engine in S4HANA, please read this dedicated blog.

Questions that will be answered are:

  • How to execute the automatic workflow configuration?
  • What are common issues with workflow configuration?
  • How to test the automatic workflow configuration?
  • What other settings are to be done for custom workflow building?

Automatic workflow configuration

To setup workflow configuration start transaction SWU3. This brings you to the Automatic Workflow Customizing screen.

Workflow customizing start screen

If the system is new then you see most of the icons are red. Hit the Automatic Customizing button.

Depending on your version all actions might be completed. In this step in the background the user WF-BATCH is created along with the RFC connection WORKFLOW_LOCAL_<CLIENT>.

In the newer versions of SAP netweaver this automatic step might end up with this status:

Status after automatic workflow customizing

Zooming in on the RFC connection issue:

Configure RFC workflow local destination

You will see as analysis that the user WF-BATCH is not yet created. In the newer SAP versions SAP expects you to create WF-BATCH first, before you run the automatic workflow configuration. If you have done the auto configuration and get this message, just create WF-BATCH user in SU01. Then restart SWU3 and repeat the step for automatic customizing. It will be correct:

Final setup done picture

Testing the workflow setup

On the SWU3 screen hit the Start Verification Workflow button (if needed accept the event linkage activation). Be patient now for at least 5 minutes, since in the background normally a lot of code is compiling. Then go to the inbox to check if you validation workflow was properly launched. In S4HANA the button is no longer there on the SWU3 screen to jump to the inbox. You still can use the inbox button on the SAP start screen or use transaction code SBWP.

In the inbox you should see an item. Open it and make a decision:

Workflow verification end result

This will end the verification.

Common issues

Most common issue is to execute the automatic customizing without sufficient authorizations.

Best practice from SAP basis: execute SWU3 directly after installation with SAP_ALL still attached to your user ID. Then only hand over the system to the authorization team. After activation, you can remove SAP_ALL and provide the authorizations as explained in OSS note 1574002 - WF-BATCH and SAP_WFRT Authorizations.

For further troubleshooting and more background information on SWU3 SAP has released OSS note 2366252 – Transaction SWU3 explained.

Further explanation OSS notes:

Settings for workflow development

For custom workflow development you need to execute one additional step in SWU3 to maintain the Prefix Numbers:

Workflow development setup

In the number range screen add the 900 series for custom developed workflows:

Workflow development setup 900 number range

This setting will be transported, so you only execute this action on development system.

More workflow

For workflow tips and tricks: read this blog.

Setup of FIORI my workflow inbox: read this blog.

For deletion and archiving of workflow: read this blog.

ABAP code metric tool

There are many static code analysis tools. Long list can be found on Wikipedia. At some point in time a manager or developer might come to you with one of these tools like “hey, at my previous customer we used SonarABAP for code measurements”.

This blog will explain the ABAP code metric tool built into netweaver. Together with the ATC tool the code metric tool covers most of the functions that such tools deliver.

Questions that will be answered in this blog are:

  • How can I count the amount of lines of Z code in my SAP system?
  • How to run ABAP code metric tool?
  • What output will the ABAP code metric tool deliver?
  • Use cases of the ABAP code metric tool?

Test program

The test the code metric tool write a small ABAP program like this:

ZNESTEDIF test program

This program has nested IF statements (3 levels deep), one ELSE statement and a nested DO.

Code metric tool

Start the custom code analysis tools with transaction /SDF/CD_CCA:

/SDF/CD_CCA

The code metric tool is the tool on the bottom of the screen.

On the start screen select the package and extra checks (selecting more packages and checks will increase the runtime of the tool):

Code metric tool start screen

Result for our test program:

Code metric tool output

The output is giving:

  • LoC: lines of code
  • NoS: number of statements
  • NoC: number of comments
  • COM: complexity of conditions
  • TOTAL DD: complexity weighted by decision depth
  • etc
  • IF: 3 (this was in our test program)
  • ELSEIF: 1
  • DO: 2
  • etc like amount of loops, selects, updates, deletes, modifies, case statements.

Use cases of Code Metric Tool

Use case 1: complex programs

Complex programs are normally source of most productive issues. You can use the code tool to check if the program is not too overly complex (like many nested if and case statements).

Use case 2: the procedural versus OO discussion

Sometimes you have managers wanting you to count the amount of Z objects. If you have switched from procedural coding to OO coding you will find the amount of objects to have increased. The code metric tool can help you here by counting the amount of statements and complexity. The amount of objects in OO is typically higher, but due to re-use and better setup, the total amount of statements and the total complexity decision depth should be smaller.

Use case 3: count the amount of Z code lines in your SAP system

Every now and then there is discussion on Z code. Sometimes the question will popup: “How many lines of Z code do we have in our SAP system?”. This question you can answer as well with the code metric tool explained above.

For reference: SAP standard has 238 million lines of code (source is this SAP blog).

ABAP clone finder

This blog will explain the use of SAP clone finder.

Questions that will be answered in the blog are:

  • What are clones?
  • How to run the clone finder tool?
  • How to analyze the difference between the original and the clone?

What are clones?

Standard SAP offers lot of out-of-the-box functions and reports. But in many cases the standard report only offers 95%. What to do? In many cases developers copy the standard SAP program to Z copy and add the needed 5%. When upgrading the system to higher version or when applying support packages or OSS notes, the Z clone will not be upgraded to latest version. Maybe the clone needs updates as well, or can be deleted now after upgrade (if SAP added the missing 5%).

The clone finder tool is able to find the clones made in the past.

When you are doing a S4HANA conversion project (see blog) you will have to look again at these clones if they are still relevant or not.

Running the clone finder tool

The clone finder is part of the Custom Code Analysis workbench. Start the workbench with transaction /SDF/CD_CCA or transaction CCAPPS:

/SDF/CD_CCA

Clone finder is on top of the list.

Start screen of clone finder:

Clone finder start screen

Pending on the size of your system you can run online or in batch.

Test result of standard SAP copy made as example:

Clone finder results

As example program RSUSR003 and its includes were copied to Z programs. 3 are shown as identical copies. 1 is altered.

In the function link column you can hit the Version Compare button to see the differences:

Version comparison

Differences: the name of program and includes are different. And the authorization check was removed.

Relevant OSS notes

Useful OSS notes:

Operation modes

This blog will explain about SAP operation modes.

Questions that will be answered are:

  • What are operation modes and when to use them?
  • How to setup operation mode?
  • How to use changes in operation mode during runtime issues?

Operation modes explanation

In SM50 you can see the overview of work processes (in SM66 for all servers if you have more). The work processes are divided into online DIA, background BTC, update UPD, etc. The number of work processes is limited. During a working day normally more dialog processes are need for end-user usage. During the night typically more background batches are running.

This is where the operation modes come into the picture: you can setup these different modes and assign them to a timetable. The system will then have for example less dialog and more batch processes available during the night.

Operation modes setup

Start transaction code RZ04 for setting up the operation modes screen. Hit the create operation mode button:

Create new operation mode

Give a short key name and description for the operation mode. In our example we will set up simple DAY and NIGHT.

The initial screen after creation is empty:

Initial day empty

You now need to maintain the instance data and assign the created operation modes:

Work process definition

It is import to check if this is active or not. When in doubt select the menu Instance and entry Set to active.

Also in these screens: press the save button locally and on the top of the screen.

Later on you can always change the work process distribution:

Process distribution tuning

Put the cursor on the type (example Background) and use the plus and minus to increase or decrease the amount.

Make sure both DAY and NIGHT are properly setup now. Check in RZ04 start screen.

Amount of DIA versus non-DIA processes

To avoid issues, make sure the amount of DIA work processes is always greater than the amount of non-DIA work processes. See point 4 of the SAP OSS note 1970757 – Outbound qRFC scheduler with status RES_LACK. This note explain issues you can get in your system if you don’t apply this rule.

Time table assignment

Now that we have the two operation modes DAY and NIGHT, we need to tell the system when to use which one.

In the RZ04 main screen choose menu Operation Mode and then Timetable (or transaction SM63 directly). You reach the initial time table screen:

Timetable initial screen

Choose the normal operation. Here you assign the operation mode to the time table:

Assign operation mode to timetable

This UI is bit unfriendly: double click on first time, then on last time, then assign operation mode. When done save the input.

Result in RZ04:

Operation modes with time table assigned

Activation of operation mode

Now this is done, you might check in SM50 to see nothing has changed. This is because the operation mode is defined, but not activated yet to run.

Go to transaction RZ03 and choose the operation mode you want to go to by selecting the Choose operation mode button.

RZ03 control of modes

In the menu select Control, Switch Operation Mode, All servers. Confirm the switch.

Now if you check in SM50 you see the switch is almost immediately effective.

Change of operation mode during system issues

During system issues you might want to use the switch in operation mode or change the work process distribution.

Use case 1: project team needs to do conversion on the fly in the system and did not notify basis team. All batch processes are filled up. Temporary quick solution: switch to NIGHT profile.

Use case 2: somehow the update processing is slow and you see bottleneck in UPD processing. Temporary quick solution: change the DAY profile to have 1 or 2 more UPD processes and less of something else. Save DAY profile and goto RZ03 to activate. After issue is resolved, don’t forget to revert back to normal. In this case it might be due to growth that anyhow more UPD processes were needed in the system.

Bug fix OSS notes

Please check following bug fix notes in case of issues:

Setup parallel processing

This blog will explain about setting up parallel processing groups.

Questions that will be answered are:

  • How to set up parallel processing group?
  • How to test parallel processing group?

Setup parallel processing group

In transaction RZ12 you can setup parallel server groups. Or change existing.

Within a server group you can set with percentages how much of the available work processes the parallel group can consume:

RZ12 server group creation

RZ12 explanation and bug fix notes:

Testing the parallel server group

Transaction SBPT brings you to the parallel background test environment:

SPBT parallel background task test environment

Here you can evaluate your settings.

Real live use

Some SAP transaction use parallel execution. Example is transaction code FAGL_MM_RECON.

FAGL_MM_RECON

More on load balancing

Parallel processing is an important part of load balancing across multiple application servers. More on load balancing can be read in this dedicated blog.

Digitally signed SAP notes

In the previous blog on SAP security notes you will see that security notes popup around “Digitally signed SAP notes”.

This blog will explain more on how to implement this.

Questions that will be answered in this blog are:

  • Why switch over to the new way?
  • How to implement the feature to download digitally signed SAP notes?
  • How to make the relevant settings?
  • Where to find more information?

Why switch over to the new way?

SAP keeps improving their security in all ways. Including OSS notes. There is no direct benefit. After downloading the OSS notes, the handling is identical for old and new way.

Switching over from current way of working to digitally signed SAP notes can be done any time.

SAP has announced the following: "Post January 1, 2020, the download and upload process will stop working unless Note Assistant (SNOTE transaction) is enabled in ABAP systems to work with digitally signed SAP Notes".

How to implement digitally signed SAP notes?

There are 2 basic ways to implement (you have to do only one):

  1. Apply OSS notes 2508268, 2408073 and 2546220.
  2. Apply TCI based OSS note  2576306, which contains all the notes (and manual work) in the notes mentioned in point 1. Your system needs to be able to handle TCI based OSS notes (see this blog on how to do this).
  3. Follow the guided procedure

Guided enablement procedure

The guided procedure is the easiest way to apply and check the digitally signed OSS notes way of working.

Follow the instructions from OSS note 2836302 – Automated guided steps for enabling Note Assistant for TCI and Digitally Signed SAP Notes. Attached this note is an explanatory PDF document that describes all steps in detail. After installation of the OSS note (and prerequisite notes), you can run program RCWB_TCI_DIGITSIGN_AUTOMATION, which will guide you through the steps and verifies the results at the end:

Settings after implementation

If you have done the TCI based import a new customizing node is available:

Spro extension for SNOTE

The first one (direct program in SE38 is called RCWB_SNOTE_DWNLD_PROC_CONFIG) is to set the way of downloading:

Note download procedure

The second one (direct program in SE38 is called RCWB_UNSIGNED_NOTE_CONFIG) is to allow only digitally signed SAP notes:

File type for SAP note

How to validate if the notes now are digitally signed?

To see if all is ok, download and implement a new OSS note. In the note log you can now see the digital signature download in the note log (in nice German words):

Digital signature in SAP note log

Known issue notes

Please read OSS note 2721941 – Download of digitally signed note – changes to configuration report and other minor changes carefully. It contains last minute fixes and changes.

Where to find more information?

More information can be found at the following sources: