Monday, June 15, 2015

Are your BW users still using BEx 3.x?

To see BW of version lower than 7.x is quite rare case nowadays. Most of the present BW systems are running on version 7.0+. It has been almost decade now since first version of BW 7.0 was introduced in 2005. With evolution of BW backend its frontend system progressed as well. Despite of having many frontend tools in eyes of most of BW users the "main" frontend tool still remains BEx Analyzer.


There are two significant releases of BEx tools. Within introduction of BW 7.x the BEx which was present at that time was just renamed to BEx Analyzer 3.x and new release of BEx compatible with BW 7.x was released. The old BEx Analyzer 3.x (also known as BEx 3.5) was still shipped with SAP GUI and once deployed there are both version available for the user.
























As the both versions are available some user may try to still using the old one maybe not knowing that it is the old one. It was not issue until version 7.4. Actually within the 7.4 BEx 3.5 cannot be used with BW 7.4x. This is official advice from SAP (see Note 1410878 - Maintenance for BW 3.5 front-end add-ons). This fact is even more stressed out in the note 1932461 - SAP BW 3.5 BEx tools / BW 3.5 frontend add-ons are incompatible with BW7.4.

But what will happen when we (despite all the advices from SAP) try to use old BEx? In case of Query Designer (QD) there is a warning pop up saying that component (BEx Query) was edited with recent version of BEx.

In case of BEx Analyzer 3.5 when we try to open the query running in BW of version 7.4 the BEx Analyzer crashes with following error:























Of course BW administrator will never hear about this until user doesn't complain. But there is also a dump associated with the crash of BEx Analyzer 3.5. it looks like follows:

FM RRY_SESSION_INITIALIZE
Runtime error: CALL_FUNCTION_NOT_FOUND
Terminated program: SAPMSSY1

So in case you are on BW 7.4 and you observe such a dump you may want to check with particular user and advise him/her to start using regular BEx Analyzer instead of old one. Because only this dump is sign that some users are still sticking into the old BEx!


Friday, June 12, 2015

Cross-application Settings for Web Dynpro ABAP

To maintain parameters and to control Web Dynpro ABAP runtime or Web Dynpro ABAP applications there is a WD app provided by SAP. Its name is WD_GLOBAL_SETTING delivered within WD Component called WD_GLOBAL_PARAMETERS.


Most of the settings come in form of URL parameters. The URL params are very useful also in case we need to adjust some params just for particular app. As the setting in the app are valid globally for all the WD apps running in the system by force some the params by URL we can adjust the values of the params.














Following settings is possible to setup via the application.
Parameters:
Activate Accessibility Mode (WDACCESSIBILITY):                                      SAP-ACCESSIBILITY
Allow User Agents (WDALLOWEDUSERAGENTS):
Allow Multiple Actions per Round Trip (WDALLOWMULTIPLEACTIONS):                    WDALLOWMULTIPLEACTIONS
Quickviews for MouseOver (WDALLOWQUICKVIEWS):
Default Values for Input Fields (WDALLOWVALUESUGGEST):                                  WDALLOWVALUESUGGEST
Configuration Name (WDCONFIGURATIONID):                                          SAP-WD-CONFIGID
Delta Rendering (WDDELTARENDERING):                                                 SAP-WD-DELTARENDERING
Deactivate Download Resources for File Download, ActiveX etc (WDDISABLEDYNAMICRESOURCESDN):
Application Starts with a Loading Animation (WDDISPLAYLOADINGPAGE):   SAP-WD-DISPLAY-LOADINGPAGE
History of Input Fields (WDENABLEFIELDHISTORY):
File Download in Separate Browser Window (WDENABLESECUREFILEDOWNLOAD):
Permit eCatt Rendering (WDENABLEXBCMLCLIENT):
Control Help Center Display (WDHELPCENTERDISPLAY):                            SAP-WD-HELPCENTERDISPLAY
Extended Help Off by Default (Exception per Field) (WDHIDEMOREFIELDHELPASDEFAULT):
HTML Render Mode (WDPREFERREDRENDERING):
Save Application (WDPROTECTEDAPPLICATION):
Behavior When Reference Fields Are Changed (WDREFFIELDBEHAVIOUR):
Optimizations for Remote Desktop Connections (WDREMOTEDESKTOP):      SAP-WD-REMOTEDESKTOP
Set Focus on Message Area (WDSETFOCUSONMESSAGEAREA):
Runtime Repository as Shared Object (WDSHAREDREPOSITORY):
Use of External Style Sheets (WDUSEEXTERNALSTYLESHEET):
Use (Un)Signed Applets for GANTT/NETWORK (WDUSESIGNEDAPPLETS):

Adjustments:
Do Not Allow Personalization by the User (WDDISABLEUSERPERSONALIZATION):
Enables the user to hide UI elements (WDENABLEUIELEMENTSHIDE):                     SAP-WD-ENABLEUIELEMENTSHIDE

Design:
Relative URL of Favicon (WDFAVICON):
Force Use of External Stylesheet (WDFORCEEXTERNALSTYLESHEET):
Label Alignment (WDSTYLE_LABELALIGNMENT):                                        WDSTYLE-LABELALIGNMENT
Toolbar Design (WDSTYLE_TOOLBARDESIGN):                                         WDSTYLE-TOOLBARDESIGN
Stylesheet URI (WDTHEMEROOT):
UI Guideline (WDUIGUIDELINE):                                                              WDUIGUIDELINE
Show Animation (WDUSEANIMATION):                                                     SAP-LS-USEANIMATION

Side-Panel:
Configuration ID of Side Panel (WDSIDEPANELCONFIGURATIONID):
Opened at Program Startup (WDSIDEPANELOPEN):
Enable Receipt of Tagging Data in Remote Side Panel (WDSIDEPANELREMOTECONSUMER):
Enable Sending of Tagging Data to Remote Side Panel (WDSIDEPANELREMOTEPRODUCER):
Size can be changed by user (WDSIDEPANELRESIZABLE)

More information:

Tuesday, June 9, 2015

Tools to develop regular expressions

Many times one being an ABAP developer needs to process strings. There are few options (like comparison operators, predicate functions and regular expressions) how to do that as I wrote about them here. The latter one is the most interesting. By using the regular expressions we can match whole character string or substring in order to evaluate what we need. By definition regular expressions are sequences of characters that define a search pattern, mainly for use in pattern matching with strings, or string matching, i.e. "find and replace" type of operations. They are provided by many programming languages - ABAP including. In the release 7.0 of NetWeaver regular expressions can be used as arguments of FIND and REPLACE ABAP statements. Also there are ABAP classes (CL_ABAP_REGEX and CL_ABAP_MATCHER) available where they can be used.

The most important part is to design the regex. To support the design time of the regex SAP is using the tools where the developer can "tune" particular regex. Within the tools one can design new regex directly running it on some sample data without writing ABAP test program. There are following tools available as ABAP reports:


DEMO_REGEX - provides ABAP statement FIND's interface to the regex.



DEMO_REGEX_TOY - on a top of ABAP statement FIND's interface to the regex there is also REPLACE statement supported.



Monday, June 1, 2015

Dynamic tokens in ABAP

Usage of dynamic tokes is one way of how to code generic programs in ABAP. By definition generic programming or so called dynamic generation of source code enables ABAP programs to be as dynamic as possible. This involves specification of data objects on the fly or dynamic specification. Therefore we call fragments of the code which are specified dynamically as dynamic tokens. Dynamic token specifications are often used in combination with dynamic access to data objects. The tokens can be operands or whole ABAP language statements or clauses declared in form of character/string data objects which values are populated by runtime and passed to the ABAP statements. They must contain source code correctly defined during design mode which is executed during runtime.

Following are examples of dynamic tokens:

1. Dynamic access to attributes of classes (Dynamic Access)

ASSIGN | {class|(class_name)}=>{attr|(attr_name)} } 


2. Call procedures or methods dynamically (Dynamic Invoke)
CALL METHOD {(meth_name)
            |oref->(meth_name)
            | (class_name)=>(meth_name)
            |class=>(meth_name)
            |(class_name)=>meth}
 


3. Run Time Type Services (RTTS) - enables dynamic type specifications for data on the fly - when it is not known what the type of data objects to be generated is. It is implemented by type class hierarchies (CL_ABAP_TYPEDESCR and its main subclasses: CL_ABAP_DATADESCR and CL_ABAP_OBJECTDESCR plus they having more child classes). These classes contain method for creation (RTTC) and identification (RTTI) of data objects.

CREATE DATA dref [ AREA HANDLE handle ] 
                 [ TYPE { {abap_type|(name) 
                           [LENGTH len] [DECIMALS dec]} 
                        | {[LINE OF] type|(name)} 
                        | {REF TO type|(name)} 
                        | {{{[STANDARD] TABLE} 
                           |{SORTED TABLE} 
                           |{HASHED TABLE}} 
                           OF [REF TO] {type|(name)} 
                           [WITH [UNIQUE|NON-UNIQUE] 
                              {KEY {comp1 comp2 ...}|(keytab)}|{DEFAULT KEY}] 
                           [INITIAL SIZE n]} 
                        | {HANDLE handle} } ].

4. Dynamic specifications of clauses when internal tables are accessed or in Open SQL. Dynamic tokens in Open SQL are dynamic notation of databases, dynamic WHERE clauses, dynamic SET expressions in UPDATE statements etc.)

DATA(sql_cond) = `BNAME = @input`. 
SELECT SINGLE * FROM usr02 WHERE (sql_cond) INTO @wa.


There is a certain change in ABAP Release 7.40 SP02 where a new S QL parser for Open SQL was introduced. The parser now checks both: statically specified Open SQL statements as well as content of dynamic tokens. These checks are more strict in this and subsequent ABAP releases. The strictness involves that dynamic tokens must be syntactically correct. This means that in former releases the checks were ignored. But in the Release 7.40 SP05 an exception occurs in such a fragment of the code. See Note 1810104 - Upgrade from Release 7.0 EhP3 or Release 7.3 EHP1 to Release 7.40.

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.