Thursday, April 24, 2025

Does my BW run in cloud or on-premise?

In case there is a need to recognize programmatically whether the BW system runs in cloud or on-premise there are some options on how to check it.

First let’s see how it is regarding HANA DB. There is ABAP class CL_SHDB_HC (HANA cloud base functions). Its method IS_HANA_CLOUD fetches versions of the HANA (major, minor, revision and patch) via calling system function call DB_GET_REL. The method returns true in case the HANA DB runs in the cloud and false if it doesn’t.

Subsequently regarding SAP BW. There is the ABAP class CL_RS_UTILITIES (General Auxiliary Methods) and its method GET_IS_CLOUD_BW4_SYSTEM. The method reads table RSADMINA table for column CLOUD_MODE (domain and data element RS_CLOUD_MODE). If the value of the parameter is X it means the BW system runs in the cloud otherwise it is considered as on-premise system.

In case of other SAP systems like S/4 there is the ABAP class CL_COS_UTILITIES (Utility routines for content separation/client separation) and its method VALIDATE_GV_S4H that can be used to determine running environment of the system. The other method IS_CLOUD in the same class is set as obsolete. The VALIDATE_GV_S4H reads first the information from shared memory via parameters like s4h_public_cloud / s4h_on_premise. If that is not successful it reads table TDEVC (Development Packages) for cloud-only packages like 'SR_APS'. Finally, it calls FM 'SFW_IS_BFUNC_SWITCHED_ON' (checks what Business Functions are activated in the system) to check whether function 'SIMPLIFY_ON_PREMISE' is active.

My ABAP code snippet to check whether the BW and underlaying HABA DB runs in cloud or on-premise environment is available here.


More information:

BW4 – Parameters of RSADMINA table

Parameters of RSADMINA table

Tuesday, April 22, 2025

BW Technical Configuration Checks

To check the technical configuration of BW state there is a t-code RS_SICK available. The T-code runs ABAP program RSTCO_200_TEST_CHECKS. It executes different checks for BW functions with relation to the following:

 

·        HANA authorizations

·        System state

·        Operating scope

·        Activation status of objects

·        IOBJ consistency

·        Services

·        User authorizations

Output of the checks is available to be viewed in t-code SLG1 with object RSTCO_CHECKS.


The RS_SICK t-code reassembles SAP Basis t-code SICK that serves as initial installation SAP consistency check.

Saturday, April 19, 2025

BW/4HANA Cockpit – Check tool (t-code BW4CHECK)

I previously wrote about the SAP BW∕4HANA Cockpit in my post here. In short, the SAP BW∕4HANA Cockpit is a web-based central hub for managing and administering an SAP BW∕4HANA system.

Setting up the Cockpit involves several activities. Below, I’ve briefly listed the relevant SAP Notes. If any issues arise during the setup, the t-code BW4CHECK (Check BW/4HANA Cockpit Setup) can be useful for troubleshooting. The BW4CHECK runs ABAP program BW4_UI5_IFC_CONSISTENCY. The program calls a method CHECK_STATUS of a class CL_BW4_FLP_HEALTH_CHECK. The method and few inner method calls read ICF services from table ICFINSTACT (service name = BW4_LAUNCHPAD, etc.) and checks if they are activate.

There are errors reported by the t-code in case some ICF/OData services that the launchpad uses are not configured.

In case the Cockpit setup is okay there is an information message: All services are active! (msg no BW4_UI5_TOOLS001).


More information:

BW/4HANA Cockpit

3405328 - FAQ: BW/4HANA 2023 Cockpit Setup

3129762 - FAQ: BW/4HANA 2021 Cockpit Setup

2918492 - FAQ: BW/4HANA 2.0 Cockpit Setup

ABAP Support Tools for Cloud - t-code SABAPAR

T-code code SABAPAR (program ABAP_TSM) is used as ABAP Support Tools for Cloud tasks SAP NetWeaver or ABAP Platform based systems. It helps with troubleshooting and maintaining ABAP programs, ensuring consistency and performance in cloud environments or in on-premise system e.g. for cloud readiness related tasks.

From this umbrella t-code it is possible to launch many different ABAP tools. Below is a list of the particular tools as well as how they are organized within several categories:


INDX-Like Data

RSINDX00                          Analyze ABAP Cluster Table and Update Data

RSINDX00_STREAMREADER Analyze Local Binary File in INDX Format

RSINDX00_LOCATOR           Find EXPORT TO INDX

RSINDXCHECK                    Find Broken Data Records in INDX Tables

 

DDIC Inconsistencies

RSNTABCONSISTENCY         Recursive Consistency Check for DDIC Runtime

RS_TYPE_WIZARD               Analyze Type Declarations

RSDDQV                             Quick Display with Time Stamps

RSNTVSABAP                     Compare Nametab with RTTC

SABP_DD_CATALOG_SUPPORT_VIEWER Nametab Object Viewer

 

PXA Objects

RSPXA000                       Consistency of Time Stamps, PXA <-> Database

RSPXA001                       Compare DDNM Time Stamp with Current Nametab

RSPXA002                       Invalidate Single Objects in PXA Buffer (Tou

 

ABAP Compiler

SYNT                                 Syntax Trace

SAPMSCOMPTEST               Compiler Tests

RS_ABAP_SYN_TYPES         Display Types from Syntax Check

RS_ABAP_ERROR_ANALYZE Syntax Error Analysis

RSLIN_SHOW_SCAN           Test ABAP Scanner

BADI_RSANALYZE               Analysis Report for New BAdIs

SENH                                 Display Enhancement Information

RS_SHOW_VIRT_KWS         Display Virtual Keywords

 

ABAP Load

RSDEPEND                       Get Dependent ABAP Sources for ABAP Load

RSDEP000                       Find ABAP Loads with Inconsistent Time Stamp (Touch

RSLOAD00                       Show Parts of ABAP Load

TOUCHSRC                       Reset Time Stamp for ABAP Source

TOUCHINC                       Reset Time Stamp for Consumers of ABAP Source

TOUCHTAB                       Reset Time Stamp for Consumers of DDIC Type

RSKMETH                        List of Registered Kernel Methods

RS_ABAP_BEHV_LOAD              BDEF Implementation

RS_CHECK_LOAD_VERSION_MISMATCH Find Version Inconsistencies in ABAP Load

RS_LOAD_FORMAT_ADM             Load Format Information of System

 

Trace Tools

RS_DYNPRO_TRACE           Dynpro Trace

RSSYNT00                          Syntax Trace with Navigation Tree

 

Simple Transformations (XML)

ST_TESTER                         Test ST Programs

RS_ST_DEPENDENCIES       Dependencies Between ST Programs

SXSLT_SC                          Display ST/XSLT Loads

S_ABAP_TOOLS_XML_LOAD_DISPLAY  Display ST/XSLT Loads (New)

 

ABAP Unit

RSAUNIT_SETUP_OVERVIEW                    Setup and Customizing

SAUNIT_ANALYSE_TEST_SRC_CODE         Compiler View of Test Classes

 

ABAP Keyword Documentation

ABAP_DOCU_SERVICES             Services and Administration

 

Miscellaneous Tools

RSTIME00                       Time Settings

RSCORE00                      Transfer Short Dumps from File to Da

RSNAPREAD                    Alternative and Lightweight Short Du

RSTRC000                       Change Trace

RSPARAM                        Display SAP Profile Parameters

ABAP_DOCU_SERVICES       Services for ABAP Online Documentation

RSABAP_DB_ACCESS          Display for Various ABAP Tables

SAMT                                 Program Sets

SCI                                         Code Inspector

RS_ABAP_BDEF_SHOW             BDEF Display

RS_ABAP_CLEAN_ANALYSIS      Delete COMP-PROCS Caches

RS_COCO_INFO_TOOL              Demonstration for Code Completion


Wednesday, April 16, 2025

Operating Scope of BW4/HANA system

During the setup of a new BW4/HANA system or converting of existing BW system to the BW4/HANA there is an Operating Scope needed to be set up. The operating scope describes which of the essential objects are installed to run the BW/4HANA system. By the objects it means any of BW TLOGO types – see here. However, the most important are objects like business content delivered versions of: IOs (DOBJ), InfoArea (DARE), Data Element (DELM), Planning function type (DPLT), Routine (DROU) etc. are usually being installed or better to say activated from technical business content.

What is going on technically when the BW4 scope is set? At first a table RSTCO_OBJ_SCOPE is populated with the BW objects that will be installed for what operating scope. Then the activation runs it-self. Afterwards another table, RSTCO_OBJ_ACT is populated with having information about all the objects whether particular object was installed correctly or not. It is a field STATUS with values SUCCESS - Activation was successful, ERROR - Activation failed, PARTACTIVE - Activation partly successful (domain RS_TCO_200_STATUS). The whole operation of the scope setting has a log that can be found in t-code SLG1 under object RSTCO_200.

What are the operating scopes that can be set up? At the currently the newest BW4/HANA 2023 the domain RS_TCO_OP_MODE_DOMAIN holds following values for the scope:

1        Lean Data Warehouse

4        BPC Planning only

16      Data Warehouse

 

The Operating Scope for BW/4HANA is 16 which means a full-blown data warehouse system.


More information:

Activating technical business content in BW4/HANA systems

Activating technical business content in BW4/HANA systems

As mentioned in my post What to consider while moving to BW/4HANA there is no t-code RSTCO_ADMIN (program RSTCO_ACTIVATION_ADMIN) available anymore in BW4/HANA based systems. This means that technical IOs like 0CURRENCY, 0LANGU, 0IOBJNM, 0INFOPROV, 0UNIT, etc. need to be activated differently.

There are dedicated tasks in t-code STC01 (Task Manager for technical Configuration, program STC_SCN_MAINTAIN) that need to run to be able to activate those IOs. The STCO1 is used to automate BW configuration tasks. Basically, it is a framework that runs tasks as jobs in background in order to achieve specifics system activities that otherwise needed to be run manually by scheduling those jobs. Particular tasks are organized into so called task lists. More on the t-code STC01 can be found here.

Sequence of tasks lists to activate the technical objects (technical business content) is following:

SAP_BW4_SET_OPERATION_SCOPE

SAP_BW4_SETUP_SIMPLE

SAP_BW4_AFTER_UPDATE

 

Activity of the IOs activation takes place in task list - SAP_BW4_SET_OPERATION_SCOPE and in particular in task called CL_RSTCO_200_CONF_TRIG_CONT - Set BW/4HANA Operating Scope. A number of activated IOs depends on the operating system scope.

More on operating scope can be found in this blog post.

 

More information:

Converting BW system to BW/4HANA

Automation for SAP BW configuration tasks

2665746 - Activating BW technical InfoObjects 0LANGU etc in BW/4HANA without RSTCO_ADMIN

2400585 - Collective Note & FAQ: SAP BW/4HANA Content (BW4CONT & BW4CONTB)


Friday, March 28, 2025

Replacement of obsolete FM WWW_GET_MIME_OBJECT

Recently I noticed that FM WWW_GET_MIME_OBJECT was marked as obsolete.


Thus, Code Inspector reports it in case it is used in custom ABAP coding.

Function module WWW_GET_MIME_OBJECT is flagged as obsolete. Send any queries to the developer of the ==> Function module WWW_GET_MIME_OBJECT.


I was looking for a replacement function. I found FM WWWDATA_IMPORT. This FM has even interface similar to the WWW_GET_MIME_OBJECT. Below I introduce a call of both the FMs.

 

WWW_GET_MIME_OBJECT call:

DATA:  picture TYPE TABLE OF w3mime,

       w3_queries TYPE TABLE OF w3query,

       w3_htmls TYPE TABLE OF w3html,

      return_code TYPE w3param-ret_code,

      content_type TYPE w3param-cont_type,

      content_length TYPE w3param-cont_len.

 

    INSERT VALUE #( name  = `_OBJECT_ID`

                    value = `Z_SMW0_ENTRY`) INTO TABLE w3_queries.

    CALL FUNCTION 'WWW_GET_MIME_OBJECT'

      TABLES

        query_string        = w3_queries

        html                = w3_htmls

        mime                = picture

      CHANGING

        return_code         = return_code

        content_type        = content_type

        content_length      = content_length

      EXCEPTIONS

        object_not_found    = 1

        parameter_not_found = 2

        OTHERS              = 3.

 

WWWDATA_IMPORT call:

  DATA mime TYPE w3mimetabtype.

 

  DATA(key) = VALUE wwwdatatab( relid = `MI`

                                objid = `Z_SMW0_ENTRY` ).

  CALL FUNCTION 'WWWDATA_IMPORT'

    EXPORTING

      key                    = key

   TABLES

     mime                    = mime

   EXCEPTIONS

     wrong_object_type       = 1

     import_error            = 2

     OTHERS                  = 3.


Other option would be to replicate the function that the FMs are doing. In nutshell what both the FM are doing is to read the table WWWDATA via IMPORT ABAP command. Something like this:

  DATA key TYPE w3mimetabtype.
  key-objid `Z_SMW0_ENTRY`.

  IMPORT mime FROM DATABASE wwwdata(mi) ID key.

 

Friday, February 28, 2025

SAP Business Data Could (BDC)

On Feb 13th 2024 SAP hold an event (SAP Business Unleashed) where a new software-as-a-service (SaaS) solution in area of data management called SAP Business Data Could (BDC) was announced. The solution is marketed as an evolution of SAP capabilities of planning and analytics solutions like SAP Datasphere, SAP Analytics Cloud, and SAP Business Warehouse. All these are unified with Databricks’s capabilities of data engineering and machine learning/AI.

What is Databricks? It is a data lakehouse (portmanteau of "data warehouse" and "data lake") solution that unifies data warehouses and data lakes on one platform. By handling data, analytics, and AI workloads.

By mixing of SAP data management portfolio with Databricks customers get:

- Unified Data & Analytics to combine SAP & non-SAP data

- Scalability & Performance with Apache Spark and serverless

- Delta Sharing for data access across platforms, clouds and regions

- Robust AI & Machine Learning Tool Set

 

With this new announcement does it mean that SAP Datasphere is dead?

With Databricks now deeply integrated into SAP, does SAP Datasphere still have a role, or is it redundant? Business Data Cloud is rather the next iteration of DataSphere. However, it can turn out that some features will not be build in the Datasphere but rather in Databricks. Thus, for some use cases the Datasphere may become obsolete.

 

Release of SAP Business Data Cloud:

Version 1.0 General  1.0     Feb 13, 2025

 

More information:

Press release

Press release 2

BDC landing page

BDC product tour

Online docu

Databricks announcement

Databricks paper - Lakehouse: A New Generation of Open Platforms that Unify

Data Warehousing and Advanced Analytics

Thursday, February 6, 2025

BW transport issue: object locked despite transport is released

Recently I saw a situation where object was not able to be included into the transport. System was indicating that the objects is locked via pop-up message (TK117):

Object XXX locked for request/task <SID>Kxxxxxx

Choose ‘Display object’ or ‘Cancel’.



However, the object was not locked by any transport neither task. The transport that the error mentioned was released and moved across the landscape long time ago.


To solve this issue, I went to t-code SE03 then in menu Requests/Tasks -> Unlock Objects (expert tool) and via this I was able to unlock object.




Notice that 1st option – Unlock Object List needs to be selected. Transport Request/Task input field needs to be populated with the task no of the Transport Request in which the error message indicates that it is locked in.

 

Behinds the scenes what this t-code is doing is to remove a lock entry from table TLOCK (Change and Transport System: Lock Table). The table basically holds all the objects that are locked in the TRs. In my case for some reason while I released the TR the lock entry wasn’t removed from the table. And it is not known to me what was that reason…

 

Doing further research about the error I found also SAP Note 2537981 - SE13 | TK117 | Request lock on nonexistent task/request, rep ZSLA_DELETE_ORPHANED_TLOCK_2. The Note describes how to removed the lock entry (so called orphaned lock) for LIMU TABT objects.

 


Sunday, January 12, 2025

What is ABAP Cloud?

In 2023, ABAP – SAP’s proprietary programming language celebrated 40 years anniversary.  Nowadays there it is its latest evolution – ABAP Cloud. But what exactly it is?

The ABAP Cloud is the latest evolution of the ABAP programming language. It is modernized version of traditional language designed for cloud-native development in SAP Business Technology Platform (BTP) and as well as for hybrid setups where both on-premises (e.g. SAP S/4HANA editions) and cloud SAP systems coexist (side by side or extensions). It is the SAP's effort to bring their classic ABAP programming language and development tools into the cloud era.

It is not a new product but an evolution of the ABAP development model, enabling cloud-based solutions and extensions while adhering to modern development principles.

 

Features of the ABAP Cloud

·        Clean Core Principle: It enforces strict development guidelines that prevent modifications to standard SAP code, encouraging the use of extension points and APIs instead. This makes upgrades and maintenance easier.

·        Cloud-Optimized/Native support: It provides built-in support for cloud services, RESTful APIs, and modern web technologies while maintaining compatibility with traditional ABAP syntax. Focuses on principles of cloud computing, such as scalability, security, and high availability.

·        Restricted ABAP: Operates within a "restricted ABAP environment," which ensures that development aligns with cloud principles by enforcing the use of modern and safe ABAP practices. It prevents the use of older, system-dependent, or unsafe techniques. See ABAP Strict and ABAP language versions blog posts.

·        Development Model: It supports both on-stack (in the core system) and side-by-side (on SAP BPT) scenarios, allowing developers to create cloud-ready extensions and applications.

·        Core Elements:

·        ABAP Cloud incorporates essential components like:

o   Core Data Services (CDS) for data modeling and embedded analytics.

o   ABAP RESTful Application Programming (RAP) Model for business logic and service development. Programming model specifically designed for building modern, cloud-native business applications.

o   SAP Fiori and OData Integration: It is optimized for building SAP Fiori applications and RESTful services using OData. This aligns with SAP's UX strategy and the shift toward API-first development.

o   Cloud-optimized ABAP language syntax and tools.

·        Tools: Developers use ABAP Development Tools (ADT) in Eclipse as the integrated development environment (IDE).

·        Extensibility: Enables building of side-by-side extensions for SAP applications, such as SAP S/4HANA Cloud, without modifying the core application. This approach ensures that updates and upgrades to core systems are seamless.

 

Use cases of the ABAP Cloud

·        Modernizing legacy ABAP Code: Transitioning older ABAP developments to a cloud-ready format while adhering to best practices and SAP's guidelines.

·        Custom apps: Building entirely new applications to meet specific business needs, leveraging SAP BTP services.

·        Extensions: Extending the capabilities of SAP S/4HANA Cloud or on-premise systems without modifying the standard SAP codebase.

Steampunk vs. ABAP Cloud

It’s essential not to confuse ABAP Cloud with Steampunk (or Steampunk Embedded). The ABAP Cloud was initially introduced in steampunk or back then called “SAP Cloud Platform ABAP Environment” (approx. in 2018). Then the steampunk is internal name for the ABAP environment in SAP BTP, which offers a subset of classic ABAP functionality optimized for cloud development. Since then, the ABAP Cloud became also available in all SAP S/4HANA editions means it is present on the SAP S/4HANA stack.

Umbrella term 'ABAP Cloud' doesn’t mean development in the SAP BTP ABAP Environment. Rather it is more about cloud-ready development standards which also apply to on-premise or on-stack extensions to keep the core clean.

What to add? In a nutshell it is new cloud-ready ABAP development model. The ABAP Cloud is an SAP’s next step on a journey from classic ABAP to ABAP Cloud and perhaps, eventually to ABAP AI perhaps?

 

More information:

ABAP Cloud FAQ

ABAP Cloud what does it comprise

ABAP Cloud Technical use cases and recommended technologies


Saturday, January 4, 2025

Program RSPROCESS vs RSBATCH_EXECUTE_PROZESS

In one of my earlier posts, I described ABAP program called RSPROCESS. However, there is also a program RSBATCH_EXECUTE_PROZESS. Both are serving similar purpose in SAP BW systems. They are used to managing certain BW processes. As described in that other blog post the RSPROCESS executes process variant of process chain. For various types of process variant of the PC see this post or refer to table RSPROCESSTYPES.

On other hand the RSBATCH_EXECUTE_PROZESS program is used for managing BW processes in terms of individual batch process. It is often involved in specific data warehousing activities such as data loads, DSO (DataStore Object) activations, and parallel processing. RSBATCH_EXECUTE_PROZESS is typically scheduled as a background job to handle these tasks efficiently.

Selection screen of the RSBATCH_EXECUTE_PROZESS.



Automation for SAP BW configuration tasks

ABAP Task Manager (aka Task Manager for Technical Configuration) is part of the ABAP stack that serves for purposes of execution of an automation task lists for various configuration tasks in automated way. It is available in SAP ABAP Platform/ABAP NetWeaver Stack backend via t-codes STC01 (ABAP task manager for lifecycle management automation), STC02 (Task list run monitor). As an example of task lists that exists in the Task Manager are automation of following activities: system copy, post system copy (PCA – Post copy Automation), initial system setup, system check, FIORI setup, embedded search, etc. Of course, in SAP BW systems there are task lists also available for SAP BW tasks automation.



ABAP Task Manager is only the runtime for the execution of the automation task lists. For most of automation tasks there is also needed corresponding automation content, which are offered by SAP as well. The content contains the tasks itself. Below are listed few examples of the SAP BW related task lists:

 

SAP_BW_HOUSEKEEPING                         Activities associated with regular BW system maintenance           

SAP_BASIS_BW_OIA_CONFIG                    SAP_BASIS_BW_OIA_CONFIG       

SAP_BW_AFTER_MIGRATION                     Activities following the successful migration of a BW system 

SAP_BW_AFTER_UPGRADE                       Activities following the successful upgrade of a BW system           

SAP_BW_BASIS_COPY_INITIAL_CONFIG      Initial Copy for BW and BW Source Sys – Cleanup and Configuration

SAP_BW_BASIS_COPY_REFRESH_CONFIG    Sys Refresh of BW/BW Source Systems Export/Cleanup/Import/Conf

SAP_BW_BEFORE_MIGRATION                    Activities prior to the migration of a BW system       

SAP_BW_BEFORE_UPGRADE                       Activities prior to the upgrade of a BW system         

SAP_BW_COPY_INITIAL_PREPARE               Preparation for Initial Copy of BW System   

SAP_BW_SETUP_INITIAL_CONFIG               BW Initial Setup Task List 

SAP_BW_SETUP_INITIAL_S4HANA              BW Initial Setup Task List for S4/HANA

SAP_BW4_TRANSFER_CHECK_CLOUD_RMT  Collect and Check BW objs whether they are compatible to BW Bridge

SAP_BW4_TRANSFER_CHECK_CLOUD_SHL   Collect and Check BW objs whether they are compatible to BW Bridge

SAP_BW4_TRANSFER_CHECK_INPLACE        Collect and Check BW objects whether they are compatible to BW/4

SAP_BW4_TRANSFER_CHECK_REMOTE        Collect and Check BW objects whether they are compatible to BW/4

SAP_BW4_TRANSFER_CHECK_SHELL           Collect and Check BW objects whether they are compatible to BW/4

SAP_BW4_TRANSFER_CLOUD_REMOTE        Activities to be performed in original sys of remote BW4Cloud-Transfer

SAP_BW4_TRANSFER_CLOUD_SHELL           Activities to be performed in original sys of shell BW4Cloud Transfer

SAP_BW4_TRANSFER_INPLACE                   Transfer BW objects to be compatible to BW/4

SAP_BW4_TRANSFER_READY4CONV            Transfer IOs & Open Hub Destinations to be compatible to BW/4

SAP_BW4_TRANSFER_REMOTE_PREPARE     Activities to be performed in original system of remote BW4-Transfer

SAP_BW4_TRANSFER_REMOTE_SHELL         Activities to be performed in original system of shell BW4-Transfer

SAP_BW4_TRANSFER_SEM                         Tasks to Transfer SEM-BW objects to be compatible to BW/4

SAP_BW4_TRANSFER_SEM_SHELL              Transfer SEM-BCS objects & BW objects w/o data into remote sys

 

While the task list is being executed the BW system triggers job within following naming convention: BW_TASK e.g. job BW_TASK_20241105082934000005000

 

More information:

Automated Initial Setup of ABAP Systems Based on SAP NetWeaver

ABAP Post-Copy Automation for SAP BW Configuration Guide

1829728 - BW housekeeping task list

3349077 - [BW Central KBA] Systemcopy / Refresh