S4HANA embedded livecache activation

In S4HANA you have a choice to activate the embedded livecache for SCM functionality. Or to keep your current SCM livecache in a separate system.

This blog will describe the steps to activate the SCM livecache embedded in S4HANA.

Questions that will be answered in this blog are:

  • How to activate the embedded S4HANA livecache technically?
  • How to monitor the embedded S4HANA livecache?
  • How to activate the embedded S4HANA livecache functionally?

Installation

First read the embedded livecache OSS note: 2593571 – FAQ: SAP HANA Integrated liveCache.

Then determine via OSS note 2074843 – Version Matrix for HANA integrated liveCaches, which exact version to download and install.

Then follow all the manual installation steps described in OSS note 2407589 – Manual installation of liveCache for S/4HANA.

Installation will take few hours, up to a few days (depends on your experience).

Technical checks

When you start LC10 transaction, like you are used to on an SCM server, you will be re-directed to DB50 or DBACOCKPIT transaction:

In DBACOCKPIT you can see the 3 schemas for Livecache:

And you can see all livecache related technical parts:

Functional activation

After the technical activation the functional activation has to be done in customizing for advanced planning and scheduling:

And separately for global ATP:

Functional testing

After the activation you can check to see all works by creation of new material in transaction MM01. The new tab Advanced Planning should be available now:

PP/DS optimizer

The PP/DS optimizer still needs separate server and installation.

See this blog and OSS note 1686826 – Installation help for installing SCM Optimizers.

FIORI cache refresh

After update of a FIORI app UI5 code you will sometimes face issues that the browser or server still holds components from the old app version. This issue is there for both custom developed and for standard SAP UI5 apps. The root cause is the caching at multiple levels to assure highest performance. There are caches on frontend browser, gateway server and backend server.

Questions that will be answered are:

  • What do I need to do on the browser for refresh?
  • How do I clear the caches on the gateway frontend server?
  • How do I clear the caches on the backend server?

When to perform all the cache refreshes?

The below full procedure of cache refresh at all levels is only to be performed:

  • When upgrading or applying support pack of SAP_UI component
  • When facing severe distortions on the UI that can’s be solved after browser cache

Background: the server cache refresh will invalidate all caches for end users. This means that all end users need to get the download the FIORI app again. Each FIORI app is between 5 to 15 MB large and takes time to download and render on the front end. This will take 10 to 60 seconds, during which the end users gets a full white screen.

Avoid cache refresh to keep happy users.
Only mandatory at support pack or upgrade.

Browser cache refresh

After an update of the UI code best to clear the browser cache. In Chrome also: open the application in chrome and use key combination ctrl + shift + R to perform a hard reload.

Or run in Private or Incognito mode.

Best browser for testing is Chrome.

Gateway and backend server cache clearing

Use the following sequence to clear all caches:

1. Execute /IWBEP/CACHE_CLEANUP transaction in ECC system (or other backend system) as well as Gateway system (this is program /IWBEP/R_MGW_MED_CACHE_CLEANUP) .

2. Execute /IWFND/CACHE_CLEANUP transaction in Gateway system with checkbox checked (this is program /IWFND/R_MED_CACHE_CLEANUP).

3. In the gateway system, you need to do the below steps:

  • Go to transaction SMICM
  • Click on ‘Goto’ menu bar button
  • Select option ‘HTTP Plug-In’ Select option ‘Server Cache’
  • Select option ‘Invalidate Globally’

4. Execute reports /UI2/INVALIDATE_GLOBAL_CACHES, /UI2/INVALIDATE_CLIENT_CACHES, /UI5/APP_INDEX_CALCULATE in front-end gateway system.

For the last program (/UI5/APP_INDEX_CALCULATE) you can do a delta or full for all or for a specific application.

Note on the cache cleanup: 2319491 – How to clean up the cache after applying changes that affect SAP Fiori apps.

Background

More background on caching can be found in OSS note 2626394 – Troubleshooting Fiori Apps Cache issue – how to information.

Other interesting OSS notes:

Bug fix notes:

qRFC tips & tricks

This blog will give tips and trick on the basis part of qRFC (queued RFC).

Questions that will be answered are:

  • How to assign a specific server group to qRFC?
  • How to correct host ID in SMQS?
  • What to do with the scheduler error RES_LACK?
  • What to do when inbound entries in SMQ2 stay in status RETRY?
  • How to check performance of qRFC?
  • How to check consistency of qRFC?
  • How can I activate the application log to detect manual actions performed on qRFC?
  • How to monitor qRFC?
  • In which table is qRFC header data stored?

Assigning specific server group for qRFC

In RZ12 you have defined a specific server group. In SMQR or SMQS you can assign that server group with menu option Edit / Change AS group:

Check also note: 3159931 – SM58 tRFC failed with “Error when opening an RFC connection (CPIC-CALL:”.

How to correct host ID in SMQS?

After a system copy the host ID in SMQS might be still pointing to the old system. To solve this, goto SM51 and select menu option Goto / Host Name Buffer / Reset / Entire System. Then go back to SMQS and re-activate the scheduler via menu option Edit / Activate Scheduler. See also OSS note 2377064 – How to correct the host ID in SMQS.

Empty host ID in SMQS

Initially the host ID in SMQS is empty. After the first message is sent, the host ID will be filled. See OSS note 2915187 – SMQS Host ID is blank or empty.

Outbound scheduler in status RES_LACK

If the outbound scheduler SQMS has the status RES_LACK, then the amount of DIA versus BTC processes is not balanced. Follow the instructions from OSS note 1970757 – Outbound qRFC scheduler with status RES_LACK to balance the processes.

Deletion of queued messages

Deletion of queued messages is possible, but should be done with care. After deletion, support can be lost on certain functions. See for example OSS note 2375304 – Deleted queues from SMQ2. You can apply OSS note 2837536 – Customer Connection – Improvement Request 217719 – Authorization check for message deletion in Smq2 / Smq3 to restrict the access to message deletion via special authorization object.

Inbound queues SMQ2 stay in status RETRY

When inbound entries in SMQ2 queue remain in status RETRY, this is normally caused by lack of authorization for launching batch job. This can happen to background user and user reprocessing the jobs. Check the authorization trace to see what needs to be fixed. More background in OSS note 1862256 – Inbound queues (SMQ2) stay in status RETRY.

Queue in the inbound queue scheduler SMQ2 with “Name or password is incorrect (repeat logon)”

When you get this issue a password change of the RFC might be required. Read more in OSS note 2474161 – Queue in the inbound queue scheduler SMQ2 with “Name or password is incorrect (repeat logon)”.

Queue resets via batch jobs

Report RSQOWKEX can be used to reset the outbound queue. RSQIWKEX can be used to reset the inbound queue. The goal is to reprocess messages in error state like SYSFAIL, CPIERR. More details are in OSS note 2552322 – RSQOWKEX and RSQIWKEX. Note 2195856 – Double message execution explains to be careful with using these programs with status RETRY.

These programs can be scheduled in batch mode to automate reprocessing.

Consistency checks of qRFC

Consistency checks of qRFC:

  • You can identify and delete inconsistencies in the outbound queue using report RSTRFCEG.
  • You can identify and delete inconsistencies in the inbound queue using report RSTRFCEH.

Background is described in OSS note 779664 – Consistency check of qRFC queues with deletion.

Deletion of unprocessed LUW’s in qRFC

Deletion of unprocessed LUW’s in qRFC: background is described in OSS note 760113 – Delete unprocessed LUWs in the qRFC.

Application log for qRFC manual processing

In SMQ1 and SMQ2 manual actions can be done, which are normally not logged. Apply OSS note 3031450 – Application log for inbound qRFC monitor such as SMQ2 to get the actions logged in the application log.

Alerting of failed qRFC in EWM systems

qRFC is very important in EWM systems. In EWM systems there is a built in program for alerting on qRFC failures: /SCWM/R_QRFC_QUEUE_ALERT. More on this feature you can read in OSS note 2226372 – EWM – Alerting for Failed Queues.

Issues with destination NONE

When using qRFC with SQMS for destination NONE, you can have unwanted interference with tRFC. See OSS note 1813159 – Hanging LUW´s in SM58 with the function module IDOCS_OUTPUT_TO_R3. Set the registration of NONE with flag ‘w/o tRFC’ on. And make sure the max connections is not set to 1, but much higher.

Issues with performance of qRFC

OSS note 2183108 – t/qRFC processing: general performance verifications contains program Z_RFC_QUEUE_PERF. This program can be run to check for potential performance issues. Output example:

Deleting saved queues in SMQ3

To delete saved queues in SMQ3, follow the instructions in OSS note 2558561 – Delete saved queues in SMQ3.

Monitoring of qRFC

SAP Focused Run can be used to monitor qRFC’s. Read more in this blog.

Storage of qRFC header data

Header data of qRFC is stored in tables TRFCQIN and TRFCQOUT.

Reference OSS notes

Reference OSS notes:

Bug fix OSS notes

Bug fix OSS notes:

SWLT performance tuning worklist

This blog explains how to use the SWLT performance tuning worklist to find poorly performing Z code by combining SQL monitoring data from production and ATC results.

Questions that will be answered are:

  • How to setup the SWLT performance tuning worklist tool?
  • How to analyze the results from the SWLT performance tuning worklist tool?

Preparations

As preparation for the SWLT tool you must have run the SQL monitor in a productive system and created a snapshot of the data. This snapshot you can export and import in a development system (see note 2700312 – How to import SQL Monitor (SQLM) extracted data). In the development system you configure and run the ATC code check tool.

The SWLT performance tuning worklist tool will combine these results. As example we will use this poorly written Z code:

Running the SWLT tool

Start transaction SWLT:

You can reduce the scope by just taking the needed Z packages. Goto the tab Static Checks to select the appropriate result of the ATC run (for more on ATC read this blog):

Now select the SQL monitor tab to select your SQLM data snapshot you took from your productive system:

Now that all data is loaded, you can hit the execute button to start the SQL performance tuning worklist.

It might be you don't see the SQLM snapshot in SWLT. In that case create a new snapshot from SWLT directly.

The tool will now start to merge the results. In the example above you can see the following result:

In the total result select a line. On the bottom left you can see the SQL monitor results. Bottom right you can see the ATC check result. Clicking on the underlined program or SQL statement will bring you to the poorly performing ABAP code point.

Bug fix notes

3060630 – Runtime error RUNT_INTERNAL_ERROR while fetching SQLM data (e.g. via SWLT)

SQLM SQL monitor

This blog will explain about the SQLM tool to monitor expensive SQL statements in a productive environment.

Questions that will be answered are:

  • How to start and configure the SQLM tool?
  • How to analyze the results?

Configuration of SQLM tool

The SQLM tool does not require specific configuration or installation if you have a bit modern SAP system. To activate it start transaction SQLM and click on the Activate button for All Servers:

The trace is active now until the given time frame.

Example use of the SQLM transaction

First we start by writing a very bad performing Z program:

This program is really inefficient. After activation of the SQLM monitoring we run this program a few times.

Now we goto the SQLMD transaction (or from SQLM and then press display data button) to display the SQL monitoring results:

Selection can be done on total number of executions, execution time, amount of records. Result:

You see now the impact of our badly written program. Double click on the line will jump to the ABAP code point.

Creating snapshots

At the bottom of the SQLM start screen there are the buttons to create snapshots:

This results into the Snapshot screen:

You can create a snapshot here for later re-use. You can also download the snapshot to a different system by using these buttons: first export to file:

When you have the file, goto the target system and start SQLM and press create snapshot. Now use the option Create with Data Source File Import.

It is common practice to capture data in production by a basis administrator who exports it. Then the data download is handed over to an ABAP developer using the data as upload in SQLM database in the development system to improve poorly performing Z code. The developer can use the SWLT tool (see blog) to combine the SQLM data with the static code review data taken from the ATC tool (see blog).

Follow up use in SWLT

The SQLM data can be used as input in the SWLT tool: SQL performance worklist tool. This tool combines the SQLM data with the ATC tool results. Read more about SWLT in this blog.

Background information

More background information can be found in OSS note 1885926 – ABAP SQL monitor and 3242700 – ABAP SQL Monitor: Implementation Guide and Best Practices.

Useful blog (which is start of blog series on SQLM): link.

Impact on performance and memory is minimal. Description is fully documented in OSS note 3100598 – Memory Requirement and Performance Impact of the SQL Monitor.

OSS notes

Relevant OSS notes:

Solution manager demo system

This blog will explain about the free available SAP solution manager 7.2 demo system. If you are looking for a Cloud ALM demo system, read this blog.

Questions that will be answered are:

  • How can I access the free available SAP solution manager 7.2 system?

SAP solution manager 7.2 demo system

To promote the use of SAP solution manager 7.2 SAP has made a system available for everybody to test drive.

Follow this link to go to the main page. Then scroll down to the access link:

This will bring you to the launchpad by using one of the roles (with user ID and password on the site):

After logon you reach the launchpad, for that specific role (example here is Business Process Expert):

This will enable you to test drive the new functionality for Solution documentation:

This is just one of the examples. You can also test drive Focused Build and Focused Insights functionality. Both are free to use as of 1.1.2020 (see blog).

The system that SAP offers does have regular updates and resets of data. Read the SAP blog for the actual dates.

I18N internationalization

This blog will explain about the I18N internationalization transaction.

Questions that will be answered are:

  • How can I see which languages are installed in my system?
  • How is my system configured for internationalization?

Transaction I18N

Almost all internationalization topics in SAP are centrally maintainable from transaction I18N:

In the menu on the left you can select all the topics and tools. More background on the transaction itself can be found in OSS note 848036 – Transaction ‘I18N’ (Internationalization).

Installed languages

By selecting the installed languages tool you can see which languages are installed in your system and which ones are allowed for logon:

Current internationalization configuration

By selecting the troubleshooting tool Current I18N system configuration, you can list all the related current system settings:

Time zones

For internationalization of time zones read this dedicated blog. For daylight saving, read this dedicated blog.

Webservice message monitoring

This blog will explain about webservice message monitoring.

Questions that will be answered are:

  • How can I display webservice messages?
  • How can I set the deletion retention timing for webservice messages?

This blog assumes that you have correctly activated the basic SOAP webservice runtime. See separate blog on this topic.

Webservice message monitoring

You can start the webservice message monitoring with transaction SRT_MONI. In the selection screen fill out filtering parameters are per need:

Result will look like:

By clicking on the message itself you can see the content in XML format.

Monitoring OSS notes:

Web service error log

Use transaction SRT_ELOG to go to the web service error log.

Setting retention period of webservice message deletion

Webservice messages will get deleted automatically in the SAP system. The default value is one week. You might need to keep the messages longer. The setting that controls this retention period is quite hidden. To change the setting, you need to start transaction SXMB_ADM and then select the option Schedule Delete Jobs:

Then you change the retention settings as per need:

Web service tracing

Web service tracing can be activated in transaction SRT_UTIL.

Be careful when switching the trace to on, on a productive system: it can generate a lot of load. Do apply and read OSS note 3084970 - SRT_UTIL: Show disclaimer when enabling tracing for URIs.

Payload trace is explained in OSS 3195367 – ESI – How to use the SRT_UTIL Payload Trace.

OSS notes for tracing and SRT_UTIL:

Generic search frame work

SAP has create in S4HANA 2020 extra search framework. Transaction code SRT_MONI_GSF starts up a specialised search frame work:

To get this new framework you need to apply these 4 OSS notes:

Bug fix OSS notes

SAP buffers and buffer refreshes

This blog will explain the SAP buffer setup and the SAP buffer refresh process.

Questions that will be answered are:

  • What is the use of table buffers?
  • Which tables are buffered?
  • How can I check on my productive system which buffered table is using a lot of memory?
  • How to force a buffer refresh in general?
  • How to force a buffer refresh for a specific table?
  • How to force a buffer refresh on a specific application server?

Background of table buffers

The primary reason of a table buffer is pretty simple: performance improvement.

SAP has a 3 tier setup of:

  1. Front end GUI
  2. Application server
  3. Database server

If data is read from the database server it is processed on the application server. This data is buffered on the application server. If a user asks the same data twice, the application server already has the data. Also very frequently read tables (like company code and plant data) are buffered on the application server.

In transaction SE11 in the technical settings of a table you can see if a specific table is buffered or not, and the type of buffering. Example is for table T000, which is fully buffered:

When to set buffering?

Buffering is extremely useful on small and infrequently changing tables, which have a lot of read access. For these tables buffering will help a lot. That is why a lot of customizing table have buffering activated. You can do the same for your Z tables if they are used for customizing like purposes.

How to check buffering in productive system?

Follow the instructions from OSS note 2806927 – Remove table buffers to check table buffering in production.

Go to transaction AL12:

Then select menu option Monitor, Buffers, Table buffer, All Generic tables. Then sort by size:

How to reset table buffers?

In some specific case you might want to force a buffer reset.

For this reason you can enter specific commands (enter same way like transaction code or the famous /h for debugging):

/$TAB – Resets all the table buffers on the application server

/$TAB <table name> – Resets the TABLE buffers on the application server for that specific table (also consider program TOUCHTAB after transporting a table definition)

/$SYNC Resets the buffers on the application server

/$CUA Resets the CUA buffer of the application server (the CUA buffer is not for central user admin, but holds screen elements like menus, buttons, etc)

/$DYN Resets the screen buffer on the application server

/$ESM Resets the exp/imp shared memory Buffer on the application server

/$PXA Resets the program (PXA) buffer on the application server

/$OBJ Resets the shared buffer of the application server

ST02 buffer overview

You can use transaction ST02 to get an overview of the buffers:

By clicking the button Current parameters you get an overview of the currently set relevant parameters:

Explanation notes:

Other buffer and caching resets

There are other buffer and caching resets:

  • User buffer reset: go to transaction SU53 and select menu Authorization Values / Reset User Buffer
  • User role combination refresh: transaction PFUD, see dedicated blog.
  • FIORI buffers, see dedicated blog.

ABAP update administration

This blog will explain about the ABAP update administration. Questions that can be answered are:

  • How to check if the ABAP update process is active?
  • How to check and fix update errors?

Update administration

You can use transaction SM14 to goto the ABAP update administration:

SM14 overview screen

Update errors

The update errors can be seen with transaction SM13 (do take care to have the right date selection):

SM12 update processing errors

Double clicking on the line will give you more information:

SM13 update processing error detail

Double click again on the error for more information. This information can be used to find the OSS note to fix the issue in case of standard SAP failure. In case of Z code failure, you will have to go to you own ABAP developer to fix it.

Reprocessing

Reprocessing is sometimes possible, and in most cases not. After you have captured the information on a update failure you can delete it.

When reprocessing is possible, check first with the user. He might have posted the data already in a different way. Only when he did not post in different way, you can try to reprocess the failed update.

Alerting

You can set parameter (RZ11) rdsip/vbmail to 1 to activate mail sending. Parameter rdisp/vb_mail_user_list contains the mail addresses (separation by comma).

Automatic deletion

By setting parameter rdisp/vbreorg to 1 the automatic deletion of failed updates is activated. Parameter rdsip/vbdelete is the amount of days the SM13 entries are kept.

Background OSS notes