Wednesday, January 18, 2017

Printing to PDF from SAP GUI

In case you need to save an output from SAP GUI into PDF format there are couple of options.

First of all Spool functionality supports saving PDFs within t=codes related to spool request such as SP02. It is available under menu Spool requests -> Forward -> Export as PDF…

In case system is based on older versions of SAP NetWeaver there are couple of ABAP reports that can be used to convert any spool request to PDF such as: RSTXPDFT4.

At last there are few applications t-codes such as in SD module: VF03 (Display Invoice) in which by entering PDF! Into t-code field automatically generates the PDF file.

More information:
1580639 - Is a PDF software required in windows for PDF conversion via device PDF1?

Tuesday, January 17, 2017

ABAP inline declarations

One of the new features of ABAP version 74 is inline declarations within ABAP expressions. The feature helps to shorten ABAP statements as there is no need for specific data variable creation upfront the statement.

The inline declaration is executed using an operator in a expression while placed in declaration position. Result of the inline declaration is used within the ABAP statement at the statement operand.


DATA(itab) = VALUE t_itab( ( ) ( ) ( ) ). 
LOOP AT itab INTO DATA(wa). 
DATA(text) = ’…’.


DATA(dref) = NEW t_itab( ( ) ( ) ( ) ). 








Method call:
oref->methIMPORTING p1 DATA(a1)
... ).
DATA(ref) = class=>factory( ... ).
DATA(ixml) = cl_ixml=>create( ).
DATA(stream_factory) = ixml->create_stream_factory( ).
DATA(document) = ixml->create_document( ). 

Target is work area:
  SELECT SINGLE @abap_true FROM /bic/pcompcod
WHERE /bic/pcompcod @i_compcod AND objvers 'A'
INTO @DATA(lv_compcode).
Target is internal table:
  SELECT scarr~*spfli~*
FROM scarr INNER JOIN spfli ON scarr~carrid spfli~carrid
WHERE scarr~carrid @carrier
ORDER BY scarr~carrid

More information:
ABAP News for Release 7.40 – Inline Declarations

Saturday, January 14, 2017

What version of JAVA platform does SAP support?

Most of SAP software even up to now supports Java EE 5 (former name was J2EE – Enterprise Edition) platform which was introduced back in 2006. Reason I write “even” is that fully fledged JAVA platform that was implanted to SAP products is still the Java EE 5. The truth is that SAP NetWeaver 75 supports Java 8 but only in limited modes like web profile. To surprise of many enterprise software folks out there it is needless to say that the Java EE 5 was only supported JAVA platform for years. Since SAP NetWeaver 70 and higher (7.1, 7.2, 7.3 and 74) supported only the Java EE 5 only. Therefore a move to Java 8 was a big step when it was announced in 2015 even though the Java 8 is not fully supported.

To better understand a reason of SAP it is needed to dig further into history. When SAP introduced JAVA Stack of NetWeaver (NW Java) it was more less clear that it is meant as the J2EE server to be used in a SAP environments. Acquisition of Sun by Oracle (in 2010) also didn’t attract the SAP to pay more attention to the JAVA either. Between these facts small clues are laying. One may be even dare to write that the JAVA has not been the focus of SAP. Even before cloud computing era they tried to support JAVA developers with so called Lean Java Server (LJS). That was never a real products but it later formed the JAVA server in SAP HANA Cloud Platform (HCP) which was earlier called SAP NetWeaver Cloud (and some other former names were: NetWeaver Neo or OnDemand Cloud Platform) which is cloud Platform-as-a-Service (PaaS)) offering from SAP. Actually the SAP NetWeaver Cloud supported Java EE 6.

It is obvious that going forward to keep up with rest of the enterprise software world SAP must support newer versions of JAVA platform. It is also reasonable that JAVA underwent many changes between versions the Java EE 5 and the Java 8. Also it needs to be understood that it is not easy to support the version 8 just by releasing a new support package and without disruption of customers installed SAP NW JAVA Stacks.

More information:

2250903 - Supported JVM versions for versions of NetWeaver Java

Friday, January 13, 2017

BPC related customizing in SPRO

Some BPC related parameters are being set up in t-code SPRO. BPC folks are very much aware of this but some BW folks do not know where to find it. So path in SPRO is SAP Customizing Implementation Guide -> Planning and Consolidation -> then e.g. Configuration Parameters -> Set Global Parameters

Thursday, January 12, 2017


On last year Barcelona’s TechEd (Nov. 8–10 2016) a new generation of SAP HANA was introduced – the HANA 2. It is basically a new generation offering functions in areas of DB management, data management, analytical intelligence, and application development. In details they cover following:

DB management – A new active/active read-enabled option allows reading data stored in secondary systems. Before that such a data needed to be replicated first before using it.

Data management – a web based tool called SAP Enterprise Architecture Designer allows to visualize impact of new technologies to current landscapes. E.g. enhancement of tiered storage impacting distributed storage of data by priority.

Analytical intelligence – new algorithms of areas like classification, association, time series and regression were added into predictive library to support job of e.g. data scientists in terms use cases of machine learning.

Application development – in this area functions for application servers, development tools, and development languages were added. New file processor interface allows to extraction of metadata from documents.

Micro services usage of cloud based micro services can enhance applications with analytical insight using APIs and any language or development platform.

More information:

Monday, January 2, 2017

BW: Conversion of DB tables to from Row Store to Column Store

Within a move of SAP NetWeaver based system from any DB to HANA DB there are many steps involved. Also a step of converting tables from row to column based is one of them.

Running the system on HANA DB you can have the table regardless of it store type (either row store or column store). Then depending on type of the system (OLTP or OLAP) majority of tables are set to one of the store types. E.g. in case of OLAP system (e.g. SAP BW) most of the tables are type of column store tables because it delivers a better performance in case of data warehouse data processing (running queries, transforming the data, etc). Also it delivers better compression rate in case of OLAP. On other side in the systems like OLTP it requires balanced approach whereas for some table a row store might be better and for others column store concept.

During HANA migration (or even before that to minimize downtime) an ABAP report called RSDU_MOVE_TO_COLUMN is used convert the tables based on row store to column store. However the program can be run even after the migration to find out what are tables that have potential to be converted to column store. The report has several modes of runtime. In the “Check only” mode a list of biggest row store tables is provided.

Also to see to what store type a particular table is set; see table DD09L (DD: Technical settings of tables) and its field (ROWORCOLST - For distinction between Row or Column Store) in particular.

More information:

2044047 - Pre-BW7.4 SP08 RowStore-to-ColumnStore conversion

Sunday, January 1, 2017

Usage of t-code LISTCUBE

One of t-codes that enable showing of cube data in SAP BW system is LISTCUBE (report RSDD_SHOW_ICUBE). It is foreseen to be a central tool for analyzing raw data in infoproviders and problems with data in there.

The tool is also used by SAP support organization while solving customer’s issues. As usually custom infoproviders are pretty complex it is not easy to prepare example of data where issue is related to for SAP support. However the LISTCUBE tool can be leveraged in a way that pretty straightforward examples can be created for the support team. Below is procedure how to prepare it.

1. On the LISTCUBE selection screen just a check box called “Technical names” needs to be ticked off and some Z* custom ABAP report name needs to be specified in field “Name of ABAP Program”.

2. Next screen is displayed in case there are many characteristics and key figures within the infoprovider whose data shall be displayed. The screen is only displayed in case a number of objects exceed limit of ALV output. Furthermore it is possible to save a list of selected fields in a text file on your PC or to import changed field lists from the PC. The file is basically used to limit no of objects. E.g. only objects that are needed will be stored into the file and the file will be used in next analysis of the issue.

3. Create a variant of fields that need to be restricted on the selection screen of particular infoprovider. Later on the variant can be used by SAP Support team.

By following this procedure a new custom Z* report that was specified in step no 1 will be created for the infoprovider. When the SAP Support team logs into the system they just simply run the new custom Z* report and they also use the variant with restrictions of data that was also created.

All of these will speed up processing of the issue either by SAP support or within local support team in case more person are working on the issue.

More information:
1956741 - How to create a LISTCUBE report including a display variant
1479893 - BW LISTCUBE improvements
1591837 How to analyze query results
2055174 How to create a listcube-report out of a keyfigure-definition shown in transact  

Saturday, December 31, 2016

Change of time zone in BW -> impact on BW system

In case of multinational companies a BW system serves as global system. This means users are using it around a clock depending on their time zones. To support different loading times to satisfy user communities from different systems it makes sense to put the system time zone to UTC (Coordinated Universal Time). This time zone then serves as base time zone from which loads for different user communities can be derived.

Change of time zone in BW, needs to be done by transport which moves following table entry: R3TR TABU TTZCU (Customizing time zones)

However more important is impact on BW system while time zone change. There are multiple places in the BW system that might be impacted by this. Therefore on such an event the BW system as whole must be carefully checked. Also all BW applications (InfoAreas) must be checked as well.

More over below are areas that must be also thoroughly checked:

1. Load schedules – in case some Ipacks/DTPs/Process Chains are scheduled at particular time that will be schifted while the time zone change

2. ABAP Logic in BW transformation/routines/formulas/user exits/DTP(Ipacks) filters - which deals with system field related to time zone (e.g. sy-datlo, sy-tzone, sy-zonlo, etc.)

3. Loads notification delays – in case there is a workflow in place that notifies user about progress of loads. In case email/sms that must arrive on time and that time might change by the time zone shift..

4. BWA/HANA rollups delays – also if particular rollup must be on time makes sure that that time doesn’t change

5. Broadcast runs – similar as in point no 4

Automatically Repeat Red Requests in Process Chains

Similarly to possibility to repeat DTP in case its previous run failed that I described here – it is also possible to enable in similar way repetition of step within process chain. A kind of automatic re-start of failed steps in the PC thing. This helps to improvements running of the PC and overall maintenance effort of SAP BW systems.

Normally in case the process step fails someone must go process chain log via Administration t-codes and manually restart the step. If certain settings are maintained for the process then after it failed depending on the settings automatic repeat of process chain steps happens.

Following is a procedure to maintain the settings for particular process in the PC:
In change mode of the PC and there is an item in right click menu available for the process -> "Automatic Repetition". In next pop-up window following parameters need to be maintained:

Seconds: a time in seconds is specified here how long the process needs to wait before repeating the task.

Number of Repetitions: The maximum number of times this process should be repeated

After maintain the settings the PC must be activated in order to enable this feature.

Technically the settings are implemented in table RSPCCHAIN and its fields AUTO_REPEAT and REPEAT_TRIALS. 

Automatically Repeat Red Requests within DTP

Within DTP there is a new flag available on Execute tab. It is called “Automatically Repeat Red Requests in Process Chains”. This feature helps to speed up administration of BW system. 

Imagine a case if the flag is NOT set and the DTP terminates. Normally an error message appears explaining that no new request can be started until the previous request is either repaired or deleted. 
Now if the flag IS set the previous request that contains errors is automatically deleted and a new one is started.

Technically the flag is implemented in table RSBKDTP and its field AUTORESTART. Data dictionary domain behind is RSBKAUTORESTART - DTP Request: Automatic Repetition of Terminated Request.

How to find in which TRFN particular ABAP INCLUDE is used

In order to decouple of application logic used in BW’s Transformation ABAP code is sometimes not placed into the Transformation’s Start/End Routine directly but instead this an ABAP INCLUDE is used. So custom logic is complete placed into the INCLUDE that is included in the particular routine.

One may wonder how to find out what is/are Transformations where that ABAP INCLUDE is used. To find out this below is procedure:

1. Display INCLUDE in t-code SE38 and perform either Where-Used function (CTR:+SHIFT+F3 or icon on toolbar) or syntax check shows a list of GP* programs where the ABAP INCLUDE is used.

2. Particular GP* program shall be looked up in table RSTRAN in field TRANPROG. Notice that has to be the GP* program ID used but w/o prefix of GP. In field of TRANID field an ID of Transformation is then found.


3. Display the GP* program in t-code SE38.

4. Move up in the ABAP editor into beginning of the GP* program where comment having Tran ID information is display (e.g. at line 31)

5. Take Tran ID information and use Find function of RSA1 to find a particular Transformation.

How to delete process variant of Process Chain

It is an often case that an process variant within process chain is created but later on for whatever reason it is not needed anymore. The process variant should be deleted in such a case. So how to delete an old process variant that is not needed?

Basically within t-code RSPC1 (or via RSA1 -> Modeling -> Process Chain) any PC needs to be displayed in the PC maintenance mode. Then depending on Process Type of process that needs to be deleted such a Process Type needs to be found within the displayed PC.

1. Right Click -> Exchange Variant

2. Select the process variant that needs to be deleted from available pop-up list

3. Double click on selected process variant

4. On next screen of the process variant maintenance - click on change button and Delete the selected process variant via Delete button

Slovak (and Czech) blogs related to SAP

As starting on next year (just tomorrow) this blog is celebrating its 10 year anniversary I was thinking to see whether there are some other people blogging about same topics I do – SAP. Therefore I took to google collected below list of blogs and web pages created/maintained by people in Slovakia and Czech Republic region and of course related to SAP. Here’s what I found. A list is not so long; even some blogs are not active anymore. However I hope I keep an eye on this from time to time and going forward I will be updating it.

URL                                         Person                       Status              Ladislav Rydzyk        Active                    Miroslav Oprsteny     Active          Stefan Misik             Last activity in 10/2012                            Pavel Jaros              Last activity in 04/2016                         Miloš Volek              Not active since 10/2016                            unknown                 Not active since 08/2011                        Lubos Adamka         Active                 unknown                 Not active since 08/2014                            Juraj Sukupa           parked domain only                     Michal Rehák            Not active since 02/2016           Milan Sedlácek
Tomáš Marný           Not active since 06/2013                        Ludvik Spilka            Not active since 04/2016

abap pre zaciatocnikov        unknown                 ABAP tutorial for beginners in Slovak language                       Peter Jarunek          2 articles on very basic SAP topics

last update: Dec 31th 2016

Friday, December 30, 2016

Can DTP be pushed to HANA DB for execution?

Usually one of very first things that are checked once the BW system is migrated to HANA database is to find out what are data loads that can be pushed to HANA easily without any modification. To do this check SAP offers within the set of tools for migration to BW on HANA tool called SAP BW Transformation Finder (ABAP report ZBW_TRANSFORM_FINDER).

The tool is quite a complex and it offers to identify redundant data layers like "1:1" or "N:1" transformations. Through this tool the transformations that can be pushed to the DB can be found. Although a list of the TRFN is definitely useful I was wondering whether there is a way to identify a list of the DTP for the same – push to the HANA DB. As I blogged in my older post Pushing DTP execution to HANA DB there is a button available in the DTP maintenance screen that allow to find it out. To check this for many DTPs at one shot I developed short program. The program can be found in my github - DTP_TO_BE_PUSHED2HANA.

My tool similarly to SAP one utilizes a call of method CLARIFY_REALIZATION of class CL_RSTRAN_DB_STAT. If DTP particular DTP is compatible with SAP HANA Execution then it is listed out in tool’s output screen. Hope someone will find the tool useful.

More information:

1908367 - SAP BW Transformation Finder