Tuesday, January 10, 2023

SAP retrofit transports

In general, a term retrofitting is referring to an addition of new technology or features to older systems. Given SAP terminology, a retrofit is a process of dual landscape synchronization.

Retrofit comes to a picture in case there is dual landscape deployed. That can be for example a regular DEV1->QAS1->PRD1 system landscape used to maintain exiting productively used SAP applications (maintenance landscape). This landscape is used to maintain the SAP apps. In parallel to that there is another landscape used to develop a new SAP app (development landscape).

As the second landscape is not productively used there are only 2 systems in the landscape: DEV2->QAS2. Commonly speaking developments are performed in the development landscape and corrections/maintenance activities in the maintenance landscape at the same time.

What would be beneficial is to keep both the landscapes in sync from the objects that they share - point of view. Again, the synchronizing of the changes between the two landscapes is called retrofitting. Retrofit helps to synchronize changed objects (customizing and workbench) from maintenance development system to project or upgrade development system in dual track landscapes. Dual landscapes are known as N 1 landscapes)

SAP Solution Manager has some certain features to support automation of retrofitting. There can be an automatic import of corrections done by SOLMAN. See details in help pages.

Now to the dual BW development landscape. Large BW deployments can have several landscapes too. Thus, it is needed that BW specific objects are moved across all the landscapes. The Solman does support also below BW objects for retrofitting: File data sources (ISFS), Transfer rules (ISMP), Transfer structures (ISTS), Data source (RSDS), Transformation (TRFN), Routines (ROUT) and BW formulas (RSFO).

There is one more interesting information about the retrofit concerning one specific BW object type – BW Transformation. There is special OBJVERS type called R (probably stands for Retrofit) for the Transformation. In case particular transformation is deleted, the R version of it is kept in the BW system. The retrofit entry is always generated in the system. Its purpose is to be used for retrofit transport. Anyhow if for any reason one would like to get rid of it there is a SAP standard program provided to delete it: RSTRAN_TRFN_DELETE_R_VERSION


More information:

Solman - Retrofit for BW

Monday, January 9, 2023

SAP Knowledge Warehouse

SAP Knowledge Warehouse (KW) is a knowledge management system that allows organizations to capture, store, and share knowledge across an organization. It enables organizations to build and manage a knowledge base, to facilitate knowledge sharing and collaboration, and to develop knowledge-driven processes. KW can be used to create and organize knowledge, to search and retrieve knowledge, and to track and monitor knowledge usage. It also enables organizations to leverage existing knowledge assets to improve decision-making processes and to enhance organizational productivity.

Perhaps people remember it because of famous *.KEP files that contained SAP standard trainings. The files were stored in the KW. Once you got the file, you could play them via %ProgramFiles%\SAP\FrontEnd\iwb\sapshow\sapshow.exe that was part of SAP GUI. This software was used to do an offline presentation in the training area. It was provided as KW add-on installed in addition to the SAP GUI. However, SAP stopped this practice and no new version of SAP contained after version 7.4.

The KW leveraged following SAP technologies:

Application Server ABAP

Application Server JAVA

SAP Content Server (with MaxDB)

SAP NetWeaver TREX

 

Similarly also SAP trainings are not provided in the KW any more too. Starting in 2015 (precisely on December 31, 2014) SAP abandoned a development of new training courses in the KW. All the training content is only available via SAP Learning Hub. In addition, the SAP KW does not support any SAP cloud software (e.g. S/4HANA Cloud Edition).

Some organization can still opt to use the KW to developer their own training materials. Following use cases are still possible: capture, store, retrieve, track/monitor knowledge usage, share knowledge across enterprise.

How can one access the SAP Knowledge Warehouse?

It is accessible through the SAP Fiori Launchpad. Open the SAP Fiori Launchpad and select the Knowledge Warehouse tile. This will open the Knowledge Warehouse home page. From here, you can search for content, create new content, and manage existing content. You can also access the Knowledge Warehouse from the SAP Business Suite, where you can access it from the Knowledge Warehouse Home tab. Old style of accessing in (via SAP GUI) would comprise of using t-codes like:

SII0: Change Management Area

SII1: Change Documentation Area

SII2: Change Training Area

SIIALL: Change All Areas

SIT1: Translate Documentation Area / Assignment of numbers for Area same as for Change

SITALL: Translate All Areas

 

More information:

1301360 - Central note for SAP Knowledge Warehouse Content Update

SAP Support Site (OSS) component: KM-KW (SAP Knowledge Warehouse)

Online doc for ABAP platform

Online docu for NW platform

2450679 - SAP KW Viewer: Last delivery with KW add-on for SAP GUI 7.40

2129988 - KW Content Updates: Discontinued

Monday, January 2, 2023

Different ABAP message types

There is an ABAP statement called a MESSAGE that can be used to raise an message from an program to drive it. The message a form of text identified by its ID. The message ID is associated with the text that can be maintained in multiple languages. Along the ID, there is also message type with the message.

The message type is classified by one character that defines how the message is displayed in SAP GUI and it drives further flow of the ABAP program.

Following are message types:

A termination (Abort) message, also called as ABEND (Abnormal END, see Similarities of SAP and mainframes)

E Error message

I Information message

S Status message

W Warning message

X eXit message

 

The message type is stored in domain MSGTY used in system structure SYST.

At first sight, one may say that message type A and E are the same. However, there is a difference. In case, A message type the program is ultimately terminated after the message is raised and it cannot be resumed in this case. In case of E message type, the error message raised and program processing is interrupted. Once the message is acknowledged, processing can continue.

Sunday, December 18, 2022

How to do System/Update/tRFC debugging in new ABAP debugger?

In case you there is a need to debug some features of SAP ABAP NetWeaver platform like system, update or tRFC debugging it needs to be specifically activated to do so. Normally while a developer enters the ABAP debugger in its menu there were options to activate those kinds of debugging. However, in the newer releases of the SAP ABAP NetWeaver platform those settings are not right there in the menu. They are available under a new umbrella menu called Change Debugger Profile/Settings under Settings menu of the ABAP debugger.

Once you choose this menu, following pop-up is displayed where you can choose the type of the debugging you want to do:


I got used to do an update tasks debugging directly selecting it from the Debugger’s menu. After some time not using it I got confused that this settings was moved to the separate pop up and it took me a little while to find where the activation of update debugging is :-)

Sunday, December 11, 2022

Clean ABAP resources

Clean ABAP or Clean ABAP style guide is an initiative launched by SAP to promote the use of modern, object-oriented programming practices in the development of ABAP applications. It is a set of coding standards and best practices that aim to improve the readability and maintainability of ABAP code, while at the same time reducing the risk of potential errors and inconsistencies. It encourages the use of modern object-oriented design patterns and principles, such as encapsulation, abstraction, and separation of concerns. It also encourages the use of more modern syntax, such as using the New ABAP statement and using the new ABAP Core Data Services (CDS) to define and access data.

Below I’m summing up few of resources ABAP developer can use to follow Clean ABAP practice.

 

"Good Example" vs "Bad Example" on ABAP online documentation:

Latest documentation

ABAP 7.51 Modern ABAP

 

ABAP Examples in online documentation

 

Clean ABAP

 

Cheat sheets

 

Golden Rules

 

Best Practice

 

Code Pal for ABAP - tool that provides a set of checks to help adhering to the Clean ABAP

picture credit: DALL·E


Code ABAP in MS Visual Studio Code

Microsoft Visual Studio Code (Code) is popular programmer’s IDE these days. First, it is a free, open source, cross-platform code editor. It includes support for debugging, syntax highlighting, IntelliSense code completion, and embedded Git. The Code also includes built-in tools for web development such as IntelliSense, code snippets, and refactoring. It can be used for both small and large projects, and is a great choice for developers who want to quickly create applications without having to learn a complex language. It is a lightweight code editor that can be used to write, debug, and test code across many different programming languages, including JavaScript, CSS, Node.js, and HTML.

Wait a bit, what about ABAP? Can I use the VS Code to code in the ABAP? It turns out yes you can! It is possible due to “ABAP remote filesystem for visual studio code” (ABAP FS) plugin to the Code written by Marcello Urbani. Let us have a look how to install this extension to develop in ABAP in MS Visual Studio Code.

Install the Code (e.g. from here). I choose a version for MS Windows OS. Notice that you can even installed in MS Windows machines where you do not have an administrator rights granted. Once it is installed open the extension part of it from left side. Here type ABAP remote filesystem for visual studio code to search for this plug. Once it is found click on little blue Install button to get it installed.

There are few more plugins to be installed as they are dependencies to the ABAP one. Thus also install following ones:

·        ABAP by Lars Hvam

·        ABAP CDS language Support by Frederik Hudak

·        Winregistry by Marcello Urbani

Another requirement is to have installed ABAP Development tools for eclipse (ADT) installed in SAP HANA Studio on a machine where you installed the MS Code. You can install the ADT from here https://tools.hana.ondemand.com/#abap.

One more prerequisite is to enable ADT specific service at SAP ABAP server. Once you log in there via SAP GUI run SICF t-code. Navigate to the service: default_host -> sap -> bc -> adt. If the service is not active just activate it via right click: Activate service.

Now you need to setup the ABAP plugin in the Code. In the Code, navigate to ABAP FS extension and click on little Manage icon and then choose Extension Settings


Here choose Edit in settings.json.


In the JSON file, provide an input into following fields:

·        SID of ABAP NetWeaver system (3 characters abbreviations)

·        url of ABAP NetWeaver system

·        username in the ABAP NetWeaver system

·        password of above user

·        client of ABAP NetWeaver system

Once this is done press F1 and enter following command:

ABAPfs Connect to an ABAP system

Afterwards, there should be a new icon appearing in left part of yoru CODE IDE called ABAP FS. 


Now you can go to Explorer part of the Code and here you can access ABAP repository objects e.g. under $TMP development class that belong to yoru user. From here, you just click on the ABAP object e.g. program and it gets opened in the Editor.


I faced following issues while setting the plugin up:

·        No ABAP filesystem mounted in current workspace – I forgot to update url part of configuration JSON file for the plugin.

·        Unable to get local issuer certificate - I forgot to put SID of my ABAP system in configuration JSON file for the plugin.

  

More information:

MS Visual Studio Code download page

Plugin wiki

Plugin issues

Plugin installation

Thursday, December 8, 2022

ABAP language versions

While SAP is transitioning into a cloud, an ABAP programing language is transitioning itself into towards the cloud as well. A multiple versions of this programming language are popping up. Every version is a restricted in some way while compared to standard ABAP – a Unicode version that was introduced in Basis Release 6.10 (also known as WAS 6.10). Restrictions can be based on merit of what enhancements can be made, what part of it are whitelisted (allowed), how repository objects are used, what rules are followed and so on.

As of Q4 2022 there are following subsets (or variants) of ABAP:

 

1/ Standard ABAP (Unicode) – Introduced in SAP Basis Release 6.10 when the standard SAP ABAP programs were converted to Unicode enabled ones. Unicode compatible ABAP programs fall under stricter syntax rules and provide a clearer programming style. That means that ABAP language constructs that are questionable and prone to error are prohibited. On top of the Unicode enabling there were changes done in areas of ABAP objects, internal tables, Open SQL, and update, ABAP Compiler, ABAP runtime and ABAP tools. This version covers entire ABAP language scope. This is called universal basic version of the ABAP.

2/ "ABAP for Cloud Development" or "ABAP for SAP BTP ABAP environment (formerly SAP Cloud Platform) and SAP S/4HANA Cloud" - Restricted language scope and restricted access to released APIs for developments in the SAP BTP ABAP Environment and for customer developments in the ABAP Platform Cloud. Standard ABAP (Unicode) rules apply here as well but only a very restricted set of language elements are supported and access to external repository objects is also restricted. Furthermore, the developments are implemented in methods and the stricter syntax rules for classes apply automatically. No obsolete language elements are allowed.

3/ ABAP for key users - is designed for secure implementations of enhancements as part of enhancement points by key users provided by SAP. The rules for Standard ABAP (Unicode) apply but only a very restricted set of language elements are supported and access to external repository objects is also restricted. Similarly, to ABAP for Cloud Development, the enhancements are implemented in methods and the stricter syntax rules for classes apply automatically. No obsolete language elements are allowed too. Available to key users to implement extensions using the SAP Fiori extensibility apps Custom Fields and Logic and Custom Business Objects. Key users can use this ABAP variant to implement business logic extensions using a Web-based editor in the SAP Fiori environment.

4/ Static ABAP with limited object use (obsolete) – has a restricted use of repository objects, where all language elements of Standard ABAP (Unicode) except dynamic language elements are allowed.

5/ Standard ABAP with limited object use (obsolete) – has a restricted use of repository objects, where all language elements of Standard ABAP (Unicode) are allowed.

6/ Non-Unicode ABAP (obsolete) – ABAP language as it was defined in SAP release 4.6. Here the Unicode checks are ignored. A program with this language version doesn’t run in Unicode SAP systems. As all currently SAP NetWeaver releases (6.10+) are supporting the Unicode this ABAP version is obsolete.


There is a DDIC domain ABAPVRS that hold values of all the ABAP language versions.

ABAP language versions as seen in classic SAP HANA Studio (eclipse based) IDE:



ABAP language versions as seen in classic SE80 t-code:

To find out what syntax is compatible with what ABAP language version you can use ABAP program DEMO_ABAP_VERSIONS


Additionally program ABAP_DOCU_VERSION_WHITELIST is available to provide a list of the repository objects that are allowed for the restricted ABAP language versions.

 

More information:

"ABAP strict" as ABAP language version

ABAP for Key Users

ABAP glossary

Wednesday, December 7, 2022

Extracting data from SAP BW to MS SQL via Theobald Xtract IS tool

Microsoft stopped to offer an updates on its Connector for SAP BW for MS SQL Server some time ago. See their announcement about it here. Instead, they suggest to use 3rd party software from Microsoft ISV partners such as a Theobald Xtract IS to act as plug-in for the SQL Server Integration Services (SSIS) of the MS SQL Server.

It happened that I worked with this software some time ago. At my client, we used it to extract data from SAP BW to MS SQL server. We used Theobald Xtract IS in particular Xtract OHS (Open Hub Service) component. In our case, there was a Process Chain at SAP BW side that was triggered from Xtract IS. The Chain prepared data into Open Hub and the Xtract IS pulled data from the OH to MS SQL.

Here some challenges I faced while deploying integration scenarios:

1. No authorization: In case that SAP BW user that is used for an extraction is not authorized to read the data from the BW source object (OH) there can be following logs spotted at MS SQL side:

Error: 0xC0047062 at TRIGGER PROCESS CHAIN <PROCESS_CHAIN>, Xtract OHS [8]: Theobald.Extractors.Table.TheoReadTableException: User not allowed to access table /BIC/OH<OH_tech_name>.

at Theobald.Extractors.Table.TheoReadTableExtractor.Run(Action`1 processPackage, CancellationToken cancellationToken)

at Theobald.Extractors.Common.ExtractorBase`1.Run(Action`1 processResult, LoggerBase logger, CancellationToken cancellationToken)

 

Whereas from above log it is clear that the authorization is an issue there can also below error logs that is not pointing to the authorization being as the issue:

Information: 0x3E8 at TRIGGER PROCESS CHAIN <PROCESS_CHAIN>, XtractIS: [2022-05-05T11:09:42.662+02:00] Xtract IS Version 6.7.5.1

Information: 0x3E8 at TRIGGER PROCESS CHAIN <PROCESS_CHAIN>, XtractIS: [2022-05-05T11:09:42.676+02:00] Xtract Kernel Version 5.1.4.95

Information: 0x3E8 at TRIGGER PROCESS CHAIN <PROCESS_CHAIN>, XtractIS: [2022-05-05T11:09:42.677+02:00] Theobald.Extractors Version 1.20.14.1

Information: 0x3E8 at TRIGGER PROCESS CHAIN <PROCESS_CHAIN>, XtractIS: [2022-05-05T11:09:42.687+02:00] Component is licensed to xxx

Information: 0x3E8 at TRIGGER PROCESS CHAIN <PROCESS_CHAIN>, XtractIS: [2022-05-05T11:09:43.273+02:00] Connected to '<hostname>', system number <xx>

Information: 0x3E8 at TRIGGER PROCESS CHAIN <PROCESS_CHAIN>, XtractIS: [2022-05-05T11:09:43.284+02:00] Current Windows identity: <user>

Information: 0x3E8 at TRIGGER PROCESS CHAIN <PROCESS_CHAIN>, XtractIS-OhsExtractorTable: [2022-05-05T11:09:43.301+02:00] Starting process chain '<PROCESS_CHAIN>'...

Error: 0xC0047062 at TRIGGER PROCESS CHAIN <PROCESS_CHAIN>, Xtract OHS [8]: ERPConnect.ABAPProgramException: RfcInvoke failed(RFC_ABAP_EXCEPTION): FAILED

   at ERPConnect.NW.NwApi.CallFunction(IntPtr client, IntPtr function)

   at ERPConnect.NW.NwClientFunction.CallApi()

   at ERPConnect.NW.NwClientFunction.Execute(String tid, String queue)

   at ERPConnect.RFCFunction.ExecuteImplementation(String tid, String queue)

   at ERPConnect.RFCFunction.Execute()

   at Theobald.Extractors.Ohs.OhsExtractorBase.StartProcessChain()

   at Theobald.Extractors.Ohs.OhsExtractorTable.Run(Action`1 processResult, CancellationToken cancellationToken)

   at Theobald.Extractors.Common.ExtractorBase`1.Run(Action`1 processResult, LoggerBase logger, CancellationToken cancellationToken)

   at Theobald.Extractors.Common.ExtractorBase`1.Run(Action`1 processResult, LoggerBase logger)

   at XtractIS.XtractSourceOHS.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers)

   at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper100 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer100[] buffers, IntPtr ppBufferWirePacket)

Error: 0xC0047038 at TRIGGER PROCESS CHAIN <PROCESS_CHAIN>, SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on Xtract OHS returned error code 0x80131500.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.

 

Solution is to review what authorization the extraction user at SAP BW side has. Identify what is missing and add those missing authorization objects into a role that user has assigned to. In case SAP BW objects are being extracted, you need to trace the extraction to see what authorization is needed. In case of extraction from SAP tables also following authorization is needed: S_TABU_NAM ACTVT=03; TABLE=ENLFDIR

 

2. Memory exhausting issue: In case that MS SQL loads from multiple OHs in parallel, there can be a memory issues. At SAP BW side there is a following ABAP dump:

Short Text          "connection closed (no data)"

What happened? Error in the ABAP application program.         The current ABAP program "SAPLZ_THEO_READ_TABLE" had to be terminated because it found a statement that could not be executed.

 

And at MS SQL side there is a following error logs:

Error: 0xC0047062 at TRIGGER PROCESS CHAIN <PROCESS_CHAIN>, Xtract OHS [46]: ERPConnect.ERPException: RfcGetFunctionName failed(RFC_INVALID_HANDLE): RFC_FUNCTION_DESC_HANDLE handle  0544DEA0 was already removed

   at ERPConnect.NW.NwApi.CallFunction(IntPtr client, IntPtr function)

   at ERPConnect.NW.NwClientFunction.CallApi()

   at ERPConnect.NW.NwClientFunction.Execute(String tid, String queue)

   at ERPConnect.RFCFunction.ExecuteImplementation(String tid, String queue)

   at ERPConnect.RFCFunction.Execute()

   at Theobald.Extractors.Table.TheoReadTableExtractor.Run(Action`1 processPackage, CancellationToken cancellationToken)

   at Theobald.Extractors.Common.ExtractorBase`1.Run(Action`1 processResult, LoggerBase logger, CancellationToken cancellationToken)

   at Theobald.Extractors.Ohs.OhsExtractorTable.Run(Action`1 processResult, CancellationToken cancellationToken)

   at Theobald.Extractors.Common.ExtractorBase`1.Run(Action`1 processResult, LoggerBase logger, CancellationToken cancellationToken)

   at Theobald.Extractors.Common.ExtractorBase`1.Run(Action`1 processResult, LoggerBase logger)

   at XtractIS.XtractSourceOHS.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers)

   at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper100 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer100[] buffers, IntPtr ppBufferWirePacket)

Error: 0xC0047038 at TRIGGER PROCESS CHAIN <PROCESS_CHAIN>, SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on Xtract OHS returned error code 0x80131500.  The component returned a failure code when the pipeline engine called PrimeOutput (). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.

Or

Error: 0xC0047038 at TRIGGER PROCESS CHAIN SKU TO MSBI Q4, SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on Xtract OHS returned error code 0x80131500.  The component returned a failure code when the pipeline engine called PrimeOutput(). The

Error: 0xC0047062 at TRIGGER PROCESS CHAIN SKU TO MSBI Q1, Xtract OHS [46]: Theobald.Extractors.Table.TheoReadTableException: Shared memory ran out of memory. Try setting package size lower.

Error: 0xC0047038 at TRIGGER PROCESS CHAIN SKU TO MSBI Q1, SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on Xtract OHS returned error code 0x80131500.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.

From the 2nd error log it is clear that it is related to the memory. Solution is to review setup of the flow at MS SQL. In particular, you need to play around a package size of OHS extraction available in OHS Settings:



3. OPD extraction: There may be the case that purely OHS based extraction will not be stable enough, as there is high data volume to be extracted. Here OPD extractor can be better choice. From my experience, the OPD extractor is more robust as I enjoyed less issues related to memory. Also with respect to setup of the OPD process there is an option to specify a package size available under Advanced settings. Even a default value worked for me well. One drawback of the OPD extractor is that there is no option to run the Process Chain prior data extraction as it is possible via OHS extraction component. Thus, I created flow in which OHS part is to trigger the Chain and OPD part is to load the data to MS SQL itself.

 

4. Version of function module Z_THEO_READ_TABLE: This FM is responsible of extracting the data. Depending on its version, there are multiple options that can be leveraged. As always as it comes to any software being on higher version brings more benefits. You can find what version of the FM you have in its source code. In the top part in comments there is a version mentioned. The version I worked was 2.11 released in Feb of 2022. In case you face extraction issues perhaps quick win can be to upgrade the FM.

Tuesday, December 6, 2022

Find obsolete t-codes/apps in S/4 systems

Over the time of development of SAP ERP system, there are many t-codes that were rewritten and they replaced older ones for particular functionality. For a reasons of backward compatibility, the old ones are still present in the system. Just they are not supposed to be used any more. There are few options on how to find out whether particular t-code is deprecated transactions or not.

Mostly in SAP S/4 systems there is a table PRGN_CORR2. It stores a mapping between old (column S_TCODE) and new t-code (T_TCODE).

The t-code may be obsolete in case a lock is setup for the particular t-code via SM01_DEV t-code. There is a message “Transaction SQ11 is locked (locked development object) Message no. 00814” displayed in case an attempt to run the locked t-code is made.

In case the t-code is not present in table TSTC (SAP Transaction Codes) then it is not present in the system at all.

Furthermore, there are tables like ABLM_BLACKLIST and SBLM_BLACKLIST that holds an information about blacklisted t-codes, forms, functions, methods, any events, programs.

One more table is USOB_SM that provides an information whether object (t-code, RFC Function Module, TADIR Service, External Service) is either in normal maintenance, automatic maintenance or it is obsolete.

I wondered whether the PRGN_CORR2 table is available in the SAP BW systems. Yes, it is in there! Even it does not store any information related to BW t-codes (RS*). Reason why it is in there is that the table is part of ABAP Role Administration (Profile Generator) functions.

Monday, December 5, 2022

How to read/write/delete from/to aDSO objects

This is a sequel of my older blog that deals with classic DSO objects. This one deals with an aDSO objects. There is a set of SAP standard function modules for reading, writing and deleting data from/to the aDSO objects as well. They can easily be used in custom ABAP code in BW’s transformations.

There are function modules representing APIs for DSO objects under name space RSDRI_* (or RSDRD_*). In case of aDSO objects the API are there under name space RSDSO_*.

 

aDSO type                  Operation       Method / API

Standard                    READ                Open SQL SELECT; RSDRI_INFOPROV_READ

                                    WRITE            RSDSO_WRITE_API; RSDSO_WRITE_API_RFC

ACTIVE       RSDSO_ACTIVATE_REQ_API_RFC - Activates requests in aDSO. Multiple requests can be activated separately or whether or system can activate as many requests as possible at one shot.

                                    DETELE             N/A

Direct Update             READ                Open SQL SELECT

WRITE    RSDSO_DU_WRITE_API; RSDSO_DU_WRITE_API_RFC – Writes data from an itab into active data table of the aDSO. Each API call results in a new request. Database transaction is committed automatically.

DELETE            RSDSO_DU_DELETE_API_RFC - Deletes data from an aDSO. Whole content can be deleted or data can be deleted based on a selective deletion.

CLEANUP          RSDSO_DU_CLEANUP_API_RFC - Changes status of red requests in aDSO to green. Red requests are blocking further data loads thus have to be corrected. Only requests that were loaded via API are considered.

 

FMs ending with *RFC are supposed to be used for remote scenarios whereas other FMs are locally to be used where the aDSO and calling code resides within the same system.

 

Supporting FMs:

RSDSO_DEBUG_API – It enables a user to debug above listed RFC enabled APIs for aDSO.

 

More information:

DSO object APIs

Online docu for aDSO objects API – BW4/HANA

Online docu for aDSO objects API – BW 7.5


Thursday, November 24, 2022

BW Transformation tech name different across systems

Once BW transformation is created there is a technical ID associated with it. The tech ID is generated by the system and it is a hash value of some transformation attributes like source object and its type and subtype, target object its type and subtype. The tech ID is stored in table RSTRAN and field TRANID.  

Now the transformation is moved across the systems in BW landscape via the BW transport. Normally one would expect that the same tech ID of the transformation is replicated into target system of the transport. However, there are some checks executed in the target system that decides about the ID of the transformation. Following situation can occur the target BW system. The tech ID of the transformation can be different. This means that table entry RSTRAN-TRANID is different in source and the target BW system of the transport.

Why would the BW system generate the new tech ID? In this case, the TRFN is based on DataSource. The DS name is different because it depends on source system abbreviation. Obviously, the DS associated with the DEV (D) BW system has different name, as is the DS associated with the QAS (Q) BW system. As the DS name is among the attributes of the TRFN that is used to generate the TRFN tech ID also the generated tech ID must be different. Therefore, that’s the reason why the same TRFN has different tech ID in D and Q systems.

Original TRFN name from source system (D in this case) is stored in column ORGTRANID for a record associated with the new TRFN tech ID in table RSTRAN.




More information:

2774555 - Technical names of Transformations

2117773 - Transformation is not deleted in complex landscape

Failed transport contains objects related to new source system

Tuesday, November 22, 2022

t-code I18N - Internationalization

There is a launchpad style t-code that enables access to different customizing parts of internalization settings that reside in SAP NW system.


Following are things that are accessible in the t-code menu:

 

1. Internationalization Customizing:

1.1 I18N Language configuration - runs program RSCPINST - NLS installation tool

1.2 I18N System Parameters - runs program RSCPCOLA - Correspondence language installation

1.3 Code Page in System Landscape (RFC Dest) - runs t-code SM59 to maintain RFC destinations

1.4 Correspondence Languages - runs program - RSCPSET_PARAM - Maintain system parameters used for Internationalization (I18n) functions.

 

2. SAP Code Pages

2.1 Display / Maintain - runs t-code SCP (program RSCPSEGMENT_SHOW) – that which manages SAP code pages, segments, etc. E.g. Display and Maintain Code Page

2.2 Code Page Migration - runs program - RSCP0126 to do a Code Page Conversion: SAP Character-Based -> Unicode-Based

2.3 Upload / Download - runs program - RSCP0025 to do an Upload/Download Code Page Definitions and Code Page Segments

2.4 Compare

2.4.1 Character & Mapping Set: Detail - runs program - RSCP0129 to make a comparison of Character and Mapping Sets

2.4.2 Code Page / Segment: Remote - runs program - RSCP0133 same as above just remote comparison of Code Pages or Code Page Segments

2.4.3 Code Page Statistics - runs program - RSCP0003 to display number of characters per character set

2.5 Check

2.5.1 Code Page Consistency - runs t-code SCP - see 2.1

2.5.2 Segment Consistency - runs program - RSCP0132 to run a consistency check of segment use

2.5.3 Round Trip Measurement - runs program - RSCP0125 to measure a round trip of Code Page > Intermediate Code Page > Code Page

2.5.4 Character Conversion Test - runs program - RSCP0032 to test properties of function SCP_TRANSLATE_CHARS that translates a short text from one codepage into another.

 

3. International Standards References

3.1 Country Code - ISO 3166 - launches web page http://scn.sap.com/docs/DOC-61600

3.2 Language Code - ISO 639 - same as above

3.3 Script Code - ISO 15924 - same as above

3.4 Code Pages

3.4.1 ISO - see 3.1

3.4.2 Unicode - same as above

3.4.3 Microsoft - same as above

 

4. Language Translation and Transport

4.1 Translation Environment - runs t-code SE63 - Translation Editor

4.2 Language Transport Utility - runs t-code SMLT - Language Management

 

5. Printing

5.1 Output Controller: Spool Request - runs t-code SP01 - Output Controller, spool request

5.2 Spool Administration - runs program - RSCPSETCASCADINGFONTS - Cascading Fonts Configurator (CFC)

5.3 Cascading Font Customization - runs t-code SPAD – Spool Administration

 

6. I18N Services

6.1 Database Scan: Find and Replace Tool - runs program RSI18N_SEARCH - Database Scan Tool

6.2 File Encoding Converter

6.2.1 ABAP Tool - runs program - RSCP_CONVERT_FILE - to convert plain text files from one SAP code page to another SAP code page

6.2.2 Operating System Tool 'sapiconv' - Displays SAP Note 752859, a tool for converting the encoding of files

 

7. Troubleshooting

7.1 Current I18N System Configuration - runs program - RSCP0018 that checks profiles for language, character sets and so on

7.2 SAP Language Code - runs program - RSCP0147 that show languages and their relationship

7.3 CCC Cache - runs program - RSCP0148 that displays CCC Cache information (Code page Converter Cache). It is a shared memory that is used for code page conversion tables.

7.4 Unicode Normalization - runs program - RSCP_NORMALIZE to demonstrate Unicode Normalization (class CL_ICU_NORMALIZATION). The IDN (Internationalized Domain Name) is an Internet domain name that contains non-ASCII characters

7.5 IDNA Conversion - runs program - RSCP_IDNA_ICU to demonstrate IDNA Conversion (class CL_ICU_IDNA)

7.6 Printing Test

7.6.1 ABAP list

7.6.1.1 Characters by Unicode Block - runs program - I18N_ABAPLIST_UC_BLOCK Characters by Unicode Script Block

7.6.1.2 Multiple Scripts - runs program - I18N_ABAPLIST_MULTI_SCRIPTS to display multiple scripts for display and print

7.6.2 SAPscript

7.6.2.1 Multiple Scripts - runs program - I18N_PRINT_TEST_SC_SF_DIRECT to directly send SAPScript + Smartform doc to print with SAPscript form I18N_PRINT_TEST_SC_UC

7.6.2.2 7-bit ASCII: English - runs program - - see above but for form I18N_PRINT_TEST_SC_EN

7.6.2.3 Latin-1 Supplement: French / German - runs program - see above but for form I18N_PRINT_TEST_SC_L1

7.6.2.4 Bidi + Shaping: Arabic - runs program - see above but for form I18N_PRINT_TEST_SC_AR

7.6.2.5 Bidi: Hebrew - runs program - see above but for form I18N_PRINT_TEST_SC_HE

7.6.2.6 Double-byte: Japanese - runs program - see above but for form I18N_PRINT_TEST_SC_JA

7.6.2.7 Combining Characters: Thai - runs program - see above but for form I18N_PRINT_TEST_SC_TH

7.6.3 Smart Forms - runs program I18N_PRINT_TEST_SC_SF_DIRECT to directly send Smartform doc to print with following Smart Form forms:

I18N_PRINT_TEST_SF_UC

I18N_PRINT_TEST_SF_EN

I18N_PRINT_TEST_SF_L1

I18N_PRINT_TEST_SF_AR

I18N_PRINT_TEST_SF_HE

I18N_PRINT_TEST_SF_JA

I18N_PRINT_TEST_SF_TH

7.7 Locale

7.7.1 Maintain (TCP0C) - runs t-code SM30 for table TCP0C - Locale names for setting up C-libraries

7.7.2 Test Locale Switch - runs program - RSCP0016 to test switching system character set

7.7.3 Test TO UPPER - runs program - RSI18N_TEST_CASE_CONVERSION to test upper/lower case conversion for the ABAP statement "translate"

7.7.4 Test Sort Order - runs program - RSCP0102 to test a language-dependent sorting

 

More information:

848036 - Transaction 'I18N' (Internationalization)

42305 - RSCPINST (I18N configuration tool)

1969062 - Meaning of fields in I18N -> Troubleshooting -> CCC Cache