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: