Wednesday, April 29, 2015

Digging into user BEx Analyzer’s Favorites

Sometimes BW people are just ask to loot at user’s reports stored in his Favorites. Business users always do not want to deal with report’s technical names. They just refer to their Favorites and ask to do something with particular report. So be it and as BW developers we need to deal with it.



How to find reports which are stored in someone’s BEx Analyzer Favorites? Table which holds this information is called SMEN_BUFFC. It is common table which holds much more information than just BW’s Favorites. There is information on Favorites in SAP’s GUI SAP Easy Access (like tcodes, folders, URL.), BW reports, ABAP Queries, Report Writers reports etc. To recognize what type of the object is it use field REPORTTYPE, which can have following values:

<space>      ABAP
AQ               Query
BB                Report Portfolio Rpt
LS                Form
RE                Drilldown Reporting
RW               Report Writer Report
TR                Transactions
OT                Other

To get someone’s BW reports a filter on field REPORT and value SAP_BW_QUERY needs to be placed.





Further how to get the BEx query technical name. From the table SMEN_BUFFC take value of corresponding field named SAP_GUID. With value of this field go to table RSRREPDIR and put the value into the field GENUNID on selection.



Is SAP software used in surveillance?

In March of this year strange allegations related to SAP broke into the media. In particular it was related to possible ties between SAP and NSA. Also other article claimed that SAP is working with US intelligence agencies.

Moreover articles mentioned above suggest that SAP HANA is used by these agencies to help with surveillance. If that is true on one hand it would be good for SAP to claim that even the NSA belongs to circle of its customers. However we lie in post Snowden era where everything related to break of privacy is an issue. On other hand it may not need to be necessary good for SAP to have the NSA as a client. Also SAP claimed its gain in could computing was partially driven by customers who do not want to sit their data in US data centers. Revealing its ties to the NSA may not be again be good for SAP’s push to the cloud.

SAP reacted very rapidly on these claims. They published statement related to it. The statement is that they honor every customer. Regardless either it is from public or private sector around a world. They also contradict any allegations related to so called “back doors” in its software.


Whatever truth is one thing matters. SAP can’t do much about the scenarios on how customers do use their software. Even if it is used to the purposes what claims are suggesting into.

Tuesday, April 28, 2015

Few notes on SAP Screen Personas 3.0

I introduced SAP Screen Personal some time ago here. The Personas is powerful framework to simplify and beautify SAP user interface in particular its screens and transactions. Meanwhile (mid of 2014) the Personas evolved with version 3.0 which bring s lot of new features.
Most important to me is that it doesn’t leverage Microsoft Silverlight anymore for rendering. The Personas 3.0 is integrated fully into HTML as it is part of the SAP GUI for HTML. One down side is here though. Due to technology change a migration of flavors between Personas 2.0 and 3.0 is required. Also the Personas 3.0 is still not officially supported on mobile devices. It is considered as desktop technology. But there are discussions on SCN saying that at least on android based devices it works quite well.

Also scripting in the Personas is very advanced. It includes now more JavaScript language constructions like nested IF conditions and looping.

While using calls to remote enables Function Modules do not forget to perform whitelisting of such a FM. It involves entering the FM into table /PERSONAS/C_RFCW. Whole procedure is very easy and is described here.


Following are few remarks on famous P icon or button of SAP Personas:






Blue bar on top of the page in WebGUI:













or an P icon/button in WebGUI:





or an P icon/button in SAP GUI:




All these indicate that Personas are actually installed in particular SAP system.

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.

BW73:


BW74:

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.

BW73:

















BW74:

























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

Diagnosis
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.

Procedure
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


Links:

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:


/usr/sap/SID/SYS/profile/oracle/

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:

OPEN DATASET lv_filename FOR OUTPUT 
IN TEXT MODE 
ENCODING DEFAULT 
WITH WINDOWS LINEFEED.


Possible values of line feed:

XXX
End line marker
Unix
LF
WIN
CRLF
NATIVE
line end marker is interpreted in accordance with the current code page
SMART
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 http://ideas.sap.com 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 ideas.sap.com 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