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:

Thursday, January 29, 2015

Multitenancy in HANA

Motivation: I heard a lot of regarding multitenancy recently. In this blog I wanted to sort out basically what the multitenancy is especially with regards to HANA. Eager to hear from you regarding the topic and even to correct me!

Release SPS09 of SAP HANA 1.0 came into spotlights in October of last year. It was flourished that one of the main features of this release is multitenancy. Term tenant is very important within today’s very hot cloud computing. The multitenancy in software architecture terminology means that a single instance of software runs on a server and it is serving multiple tenants. The tenant is a group of users sharing same view on the software they using. Software designed according the multitenant architecture provides every tenant a dedicated share of instance its data, configuration, user management and tenant specific functionality.

To put it simple imagine it as multiple customers running same app on the same server. An infrastructure is shared among them and there is software infrastructure that keeps their data separated even the data is stored in the same database.

It can be said even simpler. To compare it with classic NetWeaver ABAP stack – the tenants are clients in SAP system. All the data is separated in the clients but all system configuration and metadata (e.g. ABAP Data Dictionary) is shared. ABAP system is multitenancy system. All SQL statements like Selects are by default only taking the data from that particular client where they run.

In contrast there is another approach called multi-instance architecture. In this case several separate software instances operate on behalf of different tenants. Note: some of definitions used above are quotes are from wiki.

When it is said that HANA is capable of multitenancy it means there is one single HANA system with its database. In this DB there is configuration stored. Configuration is meant from system wide landscape information which allows configuration and monitoring of the overall system. Additionally there can be N tenant databases in that HANA system. These are storing application data and user management. App and user data is strictly isolated from each other. They share only hardware resources as they all run on the same instance. Users of one tenant database cannot access application data of another tenant. From DB backup and recovery perspective – it is done for every tenant independently from one to another. The HANA’s multitenancy feature is called Multitenant Database Containers (MDC).

By the MDC it is meant that there is one HANA system represented by one SID. Such a system supports multiple applications in different databases and schemas.

Note: these are quotes from SAP Note 2096000 - SAP HANA multitenant database containers.
Following are options available in HANA SPS09 with regards to multitenancy:

Standard deployment
Multiple Components One Database (MCOD)
Multiple Components One System (MCOS)
>1 (one DB per system)
Multitenant Database Containers (MDC)
>1 (one DB per system)

Further information:
2096000 - SAP HANA multitenant database containers - Additional Information
2075266 - SAP HANA Platform SPS 09 Release Note
1826100 - Multiple applications SAP Business Suite powered by SAP HANA
1661202 - Support for multiple applications on SAP HANA

Tuesday, January 27, 2015

New version of the Master Data deletion

In BW 7.0 SP23 a major change related to master data deletion was introduced. An aim is to overcome issue with the MD deletion like performance, memory overflows, dumps etc. The change is visible on dialog of master data’s IO deletion. The dialog box iis available e.g. in tcode RSA1 -> right click on IO -> Delete Master Data:

There are few more options available for the deletion now. I’m not going to the details about them. I refer you to SAP Notes listed below to get the details.

Just one more information is related how to switch this functionality ON. It can be done in RSA1, menu Settings -> Global Settings. Thick ON check box called: 'Pack.Mas.Data.Del'. If you do not have the check box available they you are running on newer version of BW because as of release 7.3 this is default deletion option. So to choose new MD deletion option is only available in release below 7.3

More information:
1370848 - New Master Data Deletion - Information
1705824 - Old master data deletion is obsolete

IO's Attributes flag: Delete master data with 0RECORDMODE

I noted recently a new flag on IO’s attribute maintenance screen. It is available in tcodes like RSA1 or RSD1 while IO is displayed on its Attribute tab. Help key F1 doesn’t say much about it just the same of the flag name itself:

Delete Master Data with 0recordmode

In order to find out what it is about I tried to create new IO and check the flag on. What happened was that it added IO 0RECORDMODE as new attribute of the IO. Similarly if 0RECORDMODE is added manually into the list of IO’s attributes the flag gets turned ON automatically.
I tried to find out what is database table where the flag is stored. I thought about table like RSDIOBJ - directory of all InfoObjects but there was no indication at all that this flag is stored in here. I tried couple of other tables without any success. After same debugging I found out that there is no table which holds this flag. Presence of flag is determined on the fly while system is checking whether particular IO has 0RECORDMODE as its attribute. In case 0RECORDMODE is there the flag gets checked on. There is following standard ABAP method IS_RECORDMODE_CONTAINED of class CL_RSD_IOBJ_UTILITIES which does that via following statement:

p_recordmode_exists = cl_rsd_iobj_utilities=>is_recordmode_contained( i_iobjnm ).

The code of the method goes down to the DB table called RSDBCHATR and checks for field ATTRINM; if there is a value equals 0RECORDMODE. The field ATTRINM is retrieved by e.g. Function Module RSD_IOBJ_GET in its export table E_T_ATR.

OK, so I now knew same basic facts about the flag. But what it is really doing? As next I turned to SCN to check if there is something about this feature. I found few forum threads: here and here but they do not say much about it. I continued to search on SAP Notes/KBAs. Here I found following KBA “1599011 - BW master data loading: Changed time-dependent attribute is not updated into master data table from DSO”. And here it was.

The flag introduces delta handling in master data update. Having 0RECORDMODE in particular IO’s attributes enables to recognize new records (N) for the delta load. In case data flow of particular master data IO has an underlying DSO object which can provide IO 0RECORDMODE it can be leveraged to process deletion of master delta. As long as it is mapped to the same IO’s attribute.

As per the KBA this feature was introduced in SAP BW 7.11 (SAP NW BW7.1 EhP 1).