Friday, April 24, 2015

Changes to query properties in BW 73 vs 74

While working on BW 74 upgrade I notices there are many changes in BW in many areas. I’m not writing today about some significant new features (new objects types like Advanced DataStore Object; CompositeProvider etc). Just want to mention few remarks on how BW changes over different releasesParticularly in area of Query Properties in tcode RSRT.



A new checked was added: Calculation of Commutative Formulas After Aggregation.
Dropdown menu of Operation in BWA/HANA was renamed. Option 3 which was called as Standard is called Optimized Access now.



These changes may look cosmetics thought. However options in Operation in BWA/HANA settings are not. As per the settings in this particular field an query processing is set within BWA or HANA. So far (in 73) standard settings was option 3 = Standard. However having majority of the queries marked as 3 can cause problems in BWA/HANA. These problems can be linked to issues of memory consumptions or data correctness. Therefore as per SAP Note (1790426 - Processing MultiProviders in BWA) the 3 is not default option anymore (e.g. in 74). New default is option 2 = Individual access per InfoProv.

Wednesday, April 22, 2015

How to find corresponding ABAP report to SAP BW Query

Every SAP BW query or BEx query is associated with ABAP report. The report basically represents what the query does in SAP BW backend. For example there is BEx’s report selection screen in form of ABAP statements, all the data variables declarations, calls to BW data manager etc. Sometimes it is useful to have a look into the report to see things like these. The report is generated whenever the query is saved in BEx Query Designer. Also whenever the query is regenerated in tcode like RSRT the new report is generated. The report has naming convention GP*. The hash followed after GP is generated string. Every time generation happens the old GP* replaced by new one.

Now how to find the GP* report. There are following ways that I’m aware of:

1. tcode RSRT -> button Technical Information -> OLAP-Relevant Data:

2. table RSRREPDIR: find the query entry by field COMPID and OBJVERS = A and the report name is in field RNAME:

Friday, April 10, 2015

Not possible to trigger Process Chain

I recently faced strange situation regarding process chains. It was in system freshly copied form other one.  I wasn’t able to run any of the PC. It didn’t matter whether I tried to run it from tcode like RSPC or via FM (RSPC_CHAIN_START). The PC just didn’t run I there was following work process shown running ABAP report: SAPLRS_GENERAL.

First I tried to reactivate the PCs. It didn’t help nut it gave me a clue pointing to some of processes within the chain which had warnings like this one:

Too many parallel processes for chosen server
Message no. RSPC118

On the server you have chosen, there are only 0 batch processes available. The process chain has been designed in such as way that 3 processes must be processed parallel.

System Response
Only 0 processes can be processed parallel. Note also that to be able to start sub-chains, AT LEAST TWO free batch processes must be available. Otherwise a lock situation may arise.
For more information, see SAP Note 621400.

Reduce the number of parallel processes in the chain or include sub- chains. This warning applies to all relevant processes.

Procedure for System Administration
Increase the number of batch processes available. You should note however that it makes no sense to set up more batch processes than there are CPUs on server.

Based on this I checked how work processes are configured in the system. I saw that there were no background (BGD) work processes available at the moment in the system.

After contacting Basis team; they adjusted no of background work processes in tcode RZ04.

Further information:
621400 - Number of required BTC processes for process chains
519059 - FAQ: Background processing system
1626778 - Consulting: Load distribution of BW background jobs

Thursday, March 26, 2015

SAP fieldglass

SAP bought this company in 03/2014 and solution for Workforce & Vendor Management Software (VMS) appeared in its portfolio. Vendors or let’s say extended workforces or contingent workers either temporary staff, contractors of all kinds and services delivered via statements of work can be managed by SAP fieldglass. As market of software for contingent workforce is raising this field together with growth of cloud computing became interesting for SAP. Solution is cloud based only and it offers whole bunch of processes to support these kinds of vendor’s data. Processes covers include procurement, statements of work, project management, and payment.

From integration to other SAP’s products point of view the plans are there to integrate the fieldglass with SAP's SuccessFactors HCM software and SAP’s Ariba Network. On top of that integration is planed with ECC’s HCM application. Needless to say that with advert of SAP HANA there will be a kind of HANA powered version of the fieldglass delivered soon or later.

Useful links:

HanaHaus – cafĂ© and community workspace

SAP recently (on March 19th 2015) opened a kind of coffee shop in hearth of Silicon Valley - in Palo Alto. This is just first place of this kind where SAP shows their approach to contribute to public perception of what becoming their flag ship product – HANA. By having it in Palo Alto; SAP wants to show its commitment to innovation and start up spirit which both have great legacy in this location.

What it serves for is following. There are workspaces for rent for individuals or small groups. Place for workshops, small conferences and all kinds of events like hackathons and even movie viewing or standup comedy performance. And more basic purpose is of course to just have a cup of great coffee!

Just one more thing: They serve a Blue Bottle Coffee in hanahaus J


Monday, March 23, 2015

Native SQL issue: CONNECT statement returns 4

Recently I faced following issue related to Native SQL statement. While attempt to connect external DB via Native SQL’s statement CONNECT TO I got return code 4. This happened only in one of systems in the landscape same ABAP code on other systems connected to the same external DB worked just fine.

After consulting this issue with Basis team we found out root cause. Issue was that TNS Names entry was missing. After adding the connection worked fine.

From SAP GUI you can check the enry via tcode: DBCO or DBACOCKPIT

From ORACLE DB point of view; the TNS names entry are physically stored tnsnames.ora file. Usually the file is located under path:

ORACLE_HOME\NETWORK\ADMIN directory of your database server.

Or in SAP instance:


Monday, March 9, 2015

Manipulating line end marker for files in ABAP

None SAP system is standalone and needs to communicate with other systems therefore interfaces are very important ABAP deliverables. One of interface techniques is just transfer of the data via files or sometimes called flat files. While they are transferred sometimes even over different OS; there are requirements for different end line markers.
Here it is very important to have a possibility to influence what will be a end line marker set in particular file. This is possible within ABAP command called OPEN DATASET. Within its addition called WITH XXX LINEFEED this can be achieved. In case the statement for WINDOWS OS it looks like:


Possible values of line feed:

End line marker
line end marker is interpreted in accordance with the current code page
line end marker depends on access type (INPUT/OUTPUT/APPENDING/UPDATE)

BW upgrade: not possible to display generated program for Transformation

After physical import of support packages into the BW system in case of SAP BW upgrades there may all kinds of errors occur. One of very common ones are related to the transformations. During the upgrade the transformations are reset which means generated programs behind them need to be regenerated. This can be done via ABAP report called RSDG_TRFN_ACTIVATE. This report can be used to reactivation of transformations which means the GP* will be reactivated or to just check what transformations are inactive.

There is a functionality within the UI of transformation (weather it is TA RSA1 or RSTRANGUI) which allows to see the GP* which is behind the particular transformation. It is accessible via menu Extras -> Display Generated Program.

While accessing this function for transformation which is broken we can run into the following error:

Unable to find a tool to process the request
Message No. SEU_MANAGER026

To solve this first it is necessary to have a look at what stage the transformation is. If there are errors (e.g. Transformation XYZ contains invalid rules Message No. RSTRAN344) with the transformation indicated by Check function then most likely the TRFN has no GP* generated and it even can’t be generated because there is no entry in table TRDIR for the transformation. In this case solve the issue within source and target objects of the transformation. Afterwards see the transformation itself.

In case all objects around the transformation look okay see if there are any SAP Notes applicable. This is especially valid for lower releases of BW than 7.0.

Thursday, February 26, 2015

How to change broadcast setting’s owner?

Recently I worked at client where they have a lot of reports broadcasted to the users and delivered by email. Corresponding broadcast settings are associated with user who is a so called owner of the broadcast. The user is SAP BW backend user. The email ID from the user master data is taken and it appears as a sender for those email broadcast as well. The owner of the broadcast is the one who created that particular broadcast setting. Once gut who has done that leaves an organization and his user gets lock or deleted from BW backend the emails do not work anymore. Even if you decide to do not delete the user for sake of having the broadcast functioning it will confuse your users because that will be keeping getting an email who left the company long time ago.

How to solve this? As per SAP Note 2011832 the “best” approach is to recreate the broadcast settings with other valid user. E.g. system one like DDIC. However who wants to touch which works very well? Therefore easy workaround is to develop custom ABAP reports which updates field OWNER of table RSRD_SETTING. And that’s it!

PS: I created idea at to turn attention of SAP development to this missing feature.

Max length of IO technical name

In BW 7.4 several great and useful improvements were delivered. One of them is that length of characteristic’s value is increased to 1333 characters in 74 version of BW. That’s good news. However one of big pain points of BW still stays. It is with regards to maximum length of IO’s technical name. This limit is touching every BW objects; infoobjects (IO) including. As the IOs are very basic BW objects – we can compare the IO to table field in terms of ECC; this is really burden. In case of IO the length is just 9 characters. The limit really depends on into what namespace particular IO belongs to. But for custom IO it is really just 9 chars.

There is a method called GET_MAXIMUM_LENGTH of ABAP class CL_RSD_IOBJ_UTILITIES that rules on max length of IO technical name. Based on used namespace and whether SAP or custom objects it determines the length from following constants of type group RSDG:

CONSTANTS rsdg_c_iobj_max_len_sap TYPE rsd_s_doma-intlen VALUE '11'.
CONSTANTS rsdg_c_iobj_max_len_cus TYPE rsd_s_doma-intlen VALUE '9'.
CONSTANTS rsdg_c_iobj_max_len_par TYPE rsd_s_doma-intlen VALUE '14'.
CONSTANTS rsdg_c_iobj_min_len     TYPE rsd_s_doma-intlen VALUE '3'.  

PS: idea of increasing length of BW technical names is already placed at feel free to promote it. Maybe it will be delivered by SAP soon J

Monday, February 23, 2015

Input history for SAP GUI

SAP GUI stores input entered by user while using SAP GUI in a local history database. The DB is type of MS Access database. Information that is stored is related to any type of user input entered into the input fields in SAP’s transactions. It can be number of material or sales order in corresponding t-codes. Also it can be search strings while user is searching for information in the SAP transactions. The DB is secured by a password. For security reasons the password is not known to the user or neither to administrator. Security information like user password to access SAP systems is not stored into the DB.

Database file is typically stored under following path, however can be customized in settings of SAP GUI (Options -> Local Data -> Directory for Local Data):

x:\Users\\AppData\Roaming\SAP\SAP GUI\History\SAPHistory.mdb

Usage of the GUI history functionality can be also switched off. This can be done in maintaining Windows registry settings. To disable it a new registry entry of type DWORD called "DisableHistory" with value of 1 must be placed in HKEY_LOCAL_MACHINE or under HKEY_CURRENT_USER under location: \software\sap\SAPGUI Front\SAP Frontend Server\LocalData. For any 64 bit type if OS WIN the location is different: HKEY_LOCAL_MACHINE\software\Wow6432Node\sap\SAPGUI Front\SAP Frontend Server\LocalData.

Notice that this functionality is only available in SAP GUI for Windows

Further information:
1121688 - SAP History: explaining database files, etc.
924376 - History: disable history for specific fields in registry

199527 - Input history for SAP GUI for Windows – recovering of SAP GUI history

Wednesday, February 18, 2015

How to find out SM12 entries...?

Transaction SM12 is very useful also in BW. The SM12 is about the locks. By the locks in SAP system data integrity is guarded.  In case one user is changed an business objects an attempt to change the same objects is rejected by the system because the lock was already set for object for the first user. So basically only one process or one user is allowed to change the business object at same time. This functionality in SAP is called SAP lock/enqueue handling.

Speaking of BW just remember in case of planning application how many time we have to remove lock entries to enable user save the data while particular row was locked by other user some time ago and it wasn’t removed.

Well but what to do in case an access to t-code SM12 is not granted for some reason and simply user is not authorized to run the t-code. Actually there is no table which stored these locks. The locks are managed on operating system level. What the system does while we run the SM21 is that FM ENQUE_READ2 is running. The FM executes following ABAP statement:

                   ID 'OPCODE2'   FIELD OPCODE2
                   ID 'ENQTABLE'  FIELD ENQ-*SYS*
                   ID 'GRANULE'   FIELD GRANULE
                   ID 'ARG'       FIELD GARG
                   ID 'UNAME'     FIELD GUNAME
                   ID 'CLIENT'    FIELD GCLIENT.

This means a command on operating system level, so called C-function (as ABAP interpreter is written in C/C++). Name of C function in this case is 'C_ENQUEUE'. Conclusion is that w/o access to the t-code SM12 it is not possible to find out what are current locks set in the SAP system.

Process Chains screen hanging

Recently I came across an interesting issue related to process chain. While simply going to maintenance screen of the process chains either by tcode RSA1->Modelling->Process Chains or just running of tcode RSPC the screen is not displayed it just hangs. The transaction seems to run and doing something however it is just stuck.

Symptoms of this strange behavior can be observed in work processes (e.g. in t-code SM66). Corresponding work processes is still running and its field Time value gets red after some time. I debugged the work processes and realized that it hangs in infinitive loop in following code of class CL_RSAWBN_TREE_MODEL_FOLDER and method ADD_T_TREE:

* add the actual node as successor of the last node of the actual parent
READ TABLE o_th_tree WITH TABLE KEY nodeid l_nodeid
IF -nextid IS INITIAL.
-nextid l_s_tree-nodeid.
CLEAR l_nodeid.

Processing if this WHILE statement never gets inside of inner IF statement because -nextid  is never initial. Values of table o_th_tree need to be observed. Especially value of variable l_nodeid.

The value of next ID needs to be cleared out in the debugger and transactions related to Process Chains will be available again.
Root cause of this issue lies within inconsistencies with an Application Component. This means data inconstancies in table RSCOMPTLOGO and or RSCOMPTLOGOT. If trick within the debugger doesn’t help than entries in in above mentioned tables need to be removed.

Related SAP Notes:
1664459 - Runtime Error when opening RSA1/RSPC

1691183 - BW workspace: Termination when you call transaction RSWSPW

Tuesday, February 3, 2015

What is SAP S/4HANA

Today SAP announced during event hold at New York Stock Exchange (NYSE) venue a successor of their ERP flag ship product. I followed the event online and within this blog post I want to grab interesting facts about it. It is SAP Business Suite 4 SAP HANA or shortly as SAP S/4HANA or referred as SAP S4HANA. S stands for “simple”, 4 stands for 4th generation and HANA stands for in-memory platform that can run entire company – a quote from Bill McDermott.

R/2 (1979) -> R/3 (1992) -> ERP (2004) -> S/4HANA (2015)

(Both pictures taken from twitter feeds)

Most interesting part of the event was conducted by Hasso Plattner. He explained like he was lecturing 10 years ago students at University of Potsdam about enterprise software (EnSw). As there was not much development in the EnSw area he wanted to create something new. Together with students they started by sketching of how new future EnSW should look like. They captured few rules like almost zero response time, simple DB model, less effort dedicated to maintenance of such a system, web/mobile like UI/UX etc. The research led to creation of new DB – in-memory, columnar store oriented and capable of processing both type applications (transactional and analytic) database. After two years of such a university research Hasso approached SAP and ask to develop such a DB. SAP started with some components like TREX (search engine), P*TIME (in-memory OLTP database), maxDB (in-memory liveCache engine). HANA was introduced to market first as database (approx. Nov 2010) later as whole platform (2011). Later SAP solutions like BW (BoH) and ERP started to be supported on HANA as on DB and even later SAP started to optimize these for HANA (SuiteOnHANA). Last year a first new part of ERP got optimized for HANA it was SFIN (Smart Financials), later renamed Simple Finance. In that one the FI module’s database module was rewritten just with few tables, removing all aggregates and indices. Today SAP Business Suite 4 SAP HANA was introduced where more ERP applications (old terminology would be SAP modules) were rewritten in order to be optimized for HANA. Here are its main features.

·        Reduced DB footprint – 1/10 because of simplified data model
·        3-7 higher throughput
·        Up to 1800x faster analytics
·        4x less processing steps
·        No locking, no updates, parallelism for throughput
·        Multitenancy
·        Unlimited workload capacity
·      Capable of running all kinds of the systems (ERP, BW, CRM, SCM, PLM) in one system – will be available as phased availability
·        Fiori UI – responsive for any device
·        Capable of processing all type of data: text, social, geographic, graph processing
·         Deployments possible as (public/managed) cloud, on-premise
·        Guided configuration – reinvented implementation guide (IMG)
·        No anyDB approach any more, it only runs on HANA DB

In short: S/4HANA is Business Suite designed to run on HANA with Fiori UI with focus on simplicity.

There are many questions opened on how the new S/4HANA will affect current SAP customers running e.g. ERP. It is for sure that SAP will support their software running on any DB from long term perspective. On other hand it is obvious that new features and innovations of their solutions will be delivered only for solutions running on HANA.

More information: