Thursday, May 21, 2015

Running OS commands from SAP

When it comes to OS issues SAP Basis people usually tend to access directly OS level of SAP server in order to investigate it. This is done by different telnet like tools which provide console to the OS access. However it may be the case that OS level access is not an option because it is not provided by various reasons.

1. report RSBDCOS0
Therefore there has to be other way how to basically reach out to OS just from SAP system. There is a report available for that. It is RSBDCOS0 and it basically provides terminal windows to the OS.  Multiple OS commands can be entered into the report in similar way is ti would be done in real OS terminal. See on picture below how I run OS command: dir c:


All commands ran from the report are logged into files on OS level by C command: C_WRITE_SYSLOG_ENTRY.
If you want to run some OS commands on automated basis then there is an option to create custom ABAP report. Such a report will run these OS commands via FM SXPG_COMMAND_EXECUTE.

In case you have an issue to run OS commands in the RSBDCOS0. E.g. the report returns nothing just error code = 1. As very basic check is it is advisable to look whether an environment variable "ComSpec" is set. In case of WIN OS it should be set to value: ComSpec=C:\WINDOWS\system32\cmd.exe

As a last not on this report I say that the report is very powerful. Therefore it is not something to play with. Every user who uses it must be very well aware of what it actually doing! There is one SAP Note which witnesses about the power of the report. It is the Note: 117657 - Reports RSBDCOS0, RSNNUXCD are deleted or changed where it says:

As a result of multiple requests, report RSBDCOS0 was activated again.
This means SAP already tried to remove the report from standard SAP installations. However as per heavy pressure (as I can imagine it!) of customers they decided to give it back for usage. Better secure an access to this report!

2. tcode SM69
Other option to run OS command from SAP environment is to use tcode SM69. This tcode consists of commands which were setup up and can be even OS specific. It is possible to add new command as well; add additional parameters to existing commands, run commands etc.  


Monday, May 11, 2015

BW 74: Master data maintenance: web based environment

This is one of the changes in BW 74 which is a bit controversial. Whereas occasional end user may like it hard core business users and BW administrators tent to dislike it. Issue is that complete screen for IO data maintenance was moved from SAP GUI screen to web environment. It is related to tcode “RSDMD - Master Data Maintenance w.Prev. Sel.” - which is not based in GUI anymore. Functionality is based on ABAP WebDynpro technology. The change is available in BW as of version 7.40 SP 05.

To enable web based MD maintenance following services must be active in tcode SICF:
RSDMDM_MD_MAINTENANCE_APP
RSDMDM_MD_NEW_APP

URL of the web dynpro has following structure:



Old way:

New way:

While promoting the change SAP claims that new web dynpro based app is capable of maintaining very long characteristics which very introduced in BW 74. Like CHAVL (extension of RSCHAVL 60+ chars) and XL Texts. That is for sure very true. But how many customers have already start using longer values of IO? For most of them ti would be extremely useful to have possibility to choose which way they want to maintain their MD. There must be definitely possibility to let the user to choose either old way (before 74) or new way (74) shall be used when starting tcode RSDMD. However at present this possibility is not in place. There is something which SAP has to deliver soon or later. There are already a “hacks” available to get the old behavior back. One example is manipulating function module RSDMD_MDMT which is called by ABAP program RSDMD_MDMT_WITH_F4 (the program is behind the tcode RSDMD). By implementing this “hack” user can decide either old or new way will be used. There is only one downside within the hack. Which is that is a change of SAP standard code. While doing it; it may cause issues during next upgrade of the SAP BW system as SPAU/SPDD adjustment will be needed.


Useful information:
help.sap.com - Creating and Changing Master Data
1913238 - Master data maintenance in Web Dynpro BW7.40 SP05
1997402 - Master data maintenance is not possible in old GUI based one
1969105 - Master data maintenance for InfoObjects does not start

Sunday, May 10, 2015

Uncommenting reports /SSA/* - Service tools for Applications ST-A/PI

There is a bunch of functionality delivered within Service tools for Applications ST-A/PI. In particular functions are related to following areas:

·         ST-A/PI "Service Tools for Applications Plug-In"

·         SAP GoingLive, SAP EarlyWatch, Service preparation, report RTCCTOOL

·         Application monitor, Logistics Monitor, tcode: ST14

·         Analyis&Service Tools Launchpad, tcode: ST13

·         ABAP Trace for EarlyWatch/GoingLive, tcode: ST12

These functions are delivered via ABAP reports within naming convention like: /SSA/*. The functions are available via tcode ST13 where particular Tool name (function name e.g. BW-TOOLS, BWATOOLS, BPSTOOLS, BIIPTOOLS, etc.) needs to be selected and then sub function related to what was selected can run. I wrote detailed post about BW related functions (BW-TOOLS) here.

What may happen in particular NetWeaver ABAP based systems is that that certain function is not available to be chosen in ST13. Simple the function is not there in the function list. Reason of why it is not there might be that it source ABAP code got commented out by some SAP Notes implementation. Uncommenting can be done under certain circumstances in following way.


In tcode ST13 run tool name called RTCCTOOL. Here choose Addon&Upgr button on the toolbar. On next popup run “Procedure after add-on implementation.”



















What it does is checking SAP Notes implementation prerequisites of the commented coding and automatically does uncomment of the coding. The certain prerequisite is that relevant support package level in the ABAP system is high enough.

However, if there already was an SAP note for the affected coding implemented before the 'procedures after add-on implementation' were executed; the coding can no longer be automatically uncommented.

Other option is to use ABAP report /SSF/SAO_UTILS to uncomment. However it is the most likely the same report which is used by tool name RTCCTOOL as described above. So in case it didn’t work for you via RTCCTOOL this report won’t either.












However there is a 3rd option. You may want to copy source of any commented out /SSA/* report. You can copy this to Z* namespace and try to uncomment it manually. The tool name/function won’t be visible in ST13 but you can run it manually in tcode SE38.


69455 – Service tools for Applications ST-A/PI (ST14, RTCCTOOL, ST12)
1384471 - RTCCTOOL message: "Report /SSA/*" cannot be uncommented

Friday, May 8, 2015

BW 74: Monitoring of process chain for mobile devices

Transaction codes like RSPC1 or RSPCM are very commonly used by BW administrators. Their main purpose is very simply to monitor the process chains so basically to monitor the data loads. For overview of all RSPC* related t-codes see here.

Within BW 74 these t-codes get even better as there is new t-code available. It is RSPCM_WEB (this is available in BW 74 SP09+) which uses web environment instead of SAP GUI. The web application is based on SAPUI5 framework which provides unified look&feel for any devices. Data connection BW server is based on SAP Gateway technology. Therefore your BW 74 system must have installed SAP Gateway component (look for components SAP_GWFND = SAP Gateway Foundation in your system). If you have a Gateway installed on your BW system then follow up OData service configuration as per this guide. Basically you need to activate OData service (RSPCM_GW_SERVICE_SRV) in customizing: t-code SPRO -> SAP NetWeaver -> Gateway -> OData Channel -> Administration -> General Settings -> Activating and Managing Services. Then follow with activate of the the SAPUI5 application in t-code SICF -> service Name: RSPCM*

Once it is you have it all configured you can run the app via calling following URL:

http(s)://:/rspcm_web

or by just kicking it off from SAP GUI via t-code: RSPCM_WEB

Common issues with this functionality are that while attempt to run tcode RSPCM_WEB following error message is raised:

Transaction error with 403 Forbidden
Followed by message:
No Process chains found


Usually this is caused either by fact that corresponding service to UI5 service is not active. In this case you need to activate following service in t-code SICF /sap/bc/ui5_ui5/sap/rspcm_web. Other case might be that there is no process chains entered in t-code RSPCM. 















More information:
2113675 - RSPCM_WEB transaction error with 403 Forbidden

Thursday, May 7, 2015

What systems are connected to my BW?

Recently for purposes of one SAP BW upgrade project I needed to find out what systems are connected into particular BW. Easy way is to run t-code RSA1 and loot at Modeling -> Source systems. Of source I needed to have more technical information about the sources. Also I wanted to have a central source of this information so I dig into the system to find out what table stores this information. It is RSBASIDOC – Assignment of source systems to BIW systems incl. IDoc type. The table as all about source system connections, status of particular connection, what kind of IDOC Basic type is used for the connection, prefix used for particular source system, etc.

Let’s have a closer look at all its fields:

SLOGSYS      log.name of system connected to the particular BW system

RLOGSYS      log. name of receiver; identifies BW system into which SLOGSYS is connected to

OBJSTAT      Object Status; wheatear connection is active (ACT) or inactive (INA)

BIDOCTYP    IDoc Basic type used for the connection

TSIDOC3X    Transfer structure 3.x number state for a source system; not used in BW 7.x

TSPREFIX     Transfer structure prefix for a source system; 2 chars used in field BIDOCTYP; it identifies the source system connection for source system dependent objects

SRCTYPE      Type of the source system: 3 = SAP R/3 from version 3.0D onwards; B= External system, data staging done by BAPI; M = used for connection of BW itself (myBW); D = SAP BW system; F = External system based on File; G = DB Connect type of source system; S = UD Connect type of source system; I = Web Service type of source system

SAPREL        Release of SAP System (version of SAP Basis component)

TSTPNM       User who changed it last

TIMESTMP    Time Stamp of the last change (in format YYYYMMDDhhmmss)

SBWBCRL     Release of SAP Sending System

RBWBCRL     Release of SAP Receiver System


So to answer my question from the title of this blog spot: go to the RSBASIDOC table and look at values of SLOGSYS field.


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