Saturday, March 24, 2012

Where used list of BW reports for characteristics


A need of knowing in which BW reports is particular characteristics used is quite common in SAP BW area. Imagine that you need to analyze BW system for e.g. for auditing purposes. 

Usually what you would do is to go to RSA1->Modeling->InfoObjects. Here you search for InfoObject and you go to its maintenance screen. In toolbar of this screen there is a Where-used button available. You hit this button and task is supposed to be completed in case you would get a list of BW reports where this InfoObject is used. Surprisingly this is not the case. You get the list of InfoProviders, Transformations, InfoObjects, Transfer Rules, 3.x InfoSource, etc. But not the reports!


What to the in this case? Luckily there is a special InfoObject transaction (RSD1) which does the same but for broader spectrum of objects. Peculiarity here is that once you are in RSD1 you cannot go via Where-Used button. This gives you the same what RSA1 gave – no reports list. What you need to do is go via menu->Edit->Where-Used List. Even more this functionality gives you a list of BE’x variables related to the InfoObject.



ABAP code which is behind this Functionality is function module RSDG_IOBJ_USAGE_SHOW.

Monitor 2 screen of DTPs

In BW of version 7.x so called monitor 2 screen has appeared. As it is not available for InfoPackages I assume it was introduced just in version 7.x. I found it by accident by right clicking in area of DTP’s maintenance screen. If you choose item MON2 from menu you get to this screen.



Screen allows browsing for another DTP and what you basically see is all the instances of this DTP. It contains status (U and T) of particular data load request, request ID, its time stamps. From here you can jump to from to monitor of this request, you can execute DTP, delete it and set its QM status to red and green.


Request status can have following values: 

0 New 
1 Executable 
2 Processed Successfully 
3 Processed with Errors 
4 Deleted 
5 Active 
6 Processed, with Warnings 
7 Further Processing Started 
8 Processed Further 
9 Deletion Started 
A Further Processing Terminated 

I was digging deeper to see what ABAP code is behind this screen. It is function module RSBK_MONITOR_SHOW what is being called here. In my eyes screen can be handy mostly for support people. I was not aware of this screen and looking forward to hear some comments from you how do you using this functionality.

Saturday, March 3, 2012

Endless loops in ABAP

I haven't updated my blog for quite long time. This is mostly because I’m currently involved in project which requires me to travel a lot. Therefore today here comes again only very short tip. To be more precise the tip will be how to code so called endless loops in ABAP. 

First let me explain what it is endless loop. It is a part of code which is being constantly executed over and over again until certain condition (there can be terminating condition or condition that is never met) is not fulfilled or loop is terminated by user. In other words we call the endless loop as infinite loop or unproductive loop.

Secondly let me explain why we (from time to time) need that. There might be situation that you need to check or monitor behavior of system while runtime of your program. Someone might say that for this I could set a breakpoint and achieve the same. Yes that would be possible but imagine you run your program as a job and within distributed SAP environment comprised from several application servers. In such a scenario you cannot be sure by which server your program will be executed. Therefore you let your program run in endless look.  Afterwards you observe on which server it runs and you switch into its runtime from e.g. TA SM50 via Debugging functionality (process, menu Program-> Debug program).  Actually in this case loop gives you a time to prepare TA50 and get into the processing of program as well.

In case of BW there are certain situations where infinite loops are handy as well. As all BW processing usually takes place on background (e.g. extraction: DTP, InfoPackages, Process Chains or BEx reporting variables programming) endless loops are needed here as well. I’m pretty sure you can figure out our examples.

Here’s one example of the endless loop:

data: debug(1).
do.
if debug = 'X'.
exit.
endif.
enddo.

If you are done with program’s environment monitoring you can easily escape this loop by manipulating with value of variable debug setting it to ’X’.

See blog on similar ABAP topic: If 1 equals 2, what’s the purpose?

Wednesday, January 25, 2012

Blogs reposting 1

Today just reporting few blogs that I posted at SDN recently. Just in order to have a link to them from here I'm doing this repost. So here they are:

What year 2011 gave to SDN?
SAP HANA - composite post
Tuning of BWA – FEMS compression
Things that drive me crazy on SDN

Monday, December 26, 2011

Other ways of starting Process Chains


If you want or need to avoid tracking of starting process chains by transport system asking you to provide transport request number there are few possibilities available.

  1. You can trigger process chain via standard ABAP Function Module: RSPC_API_CHAIN_START. Using this FM you can start PC that is scheduled to be executed via meta chain (Start via Meta-Chain or API) and you do want to change it to direct scheduling.
  2. Starting your PC via custom ABAP report. This report would call FM mentioned in point no.1.
  3. Start PC via event. You can maintain custom event in TA SM64. The event that you created than specify into PC’s start variant.
  4. Exclude changes into PC’s start variants and PC’s processes from BW’s Transport Connection. You can customize this in RSA1->Transport Connection->Object Changeability

Full Process Chain’s API:
RSPC_API_GET_CHAINS
RSPC_API_CHAIN_GET_STARTCOND
RSPC_API_CHAIN_START
RSPC_API_CHAIN_GET_STATUS
RSPC_API_CHAIN_GET_LOG
RSPC_API_CHAIN_GET_PROCESSES
RSPC_API_PROCESS_GET_INFO
RSPC_API_PROCESS_GET_LOG
RSPC_API_CHAIN_MAINTAIN
RSPC_API_CHAIN_RESTART
RSPC_API_CHAIN_INTERRUPT

- Update on 05/07/2017 -
Similarly there can be a case that you need to run the PC just one time. When the PC is scheduled already and you may do not want to de-schedule it. There is an option in RSPC1 t-code in menu called Execution -> Execute synchronously. By using this function the PC will run in dialog mode. All processes within the PC are executed serially and the PC is kept scheduled.



Online documentation on this topic:

Processing of SAP Support messages

SMP messages are kind of communication channel between SAP support organization and SAP’s customer. The aim is to support customers within their problems with SAP applications. Customer reports problems via SMP under /message link. There are 4 priorities (see below) defined from which customers can choose according problem’s severity. After submitting support message you may wonder what is the duty time range within SAP should respond. Please notice that this time may differ per particular contract between SAP and customer. Also if customer is using e.g. max attention product -> times may differ. However times specified below can serve as general guideline.

So to make it short the initial respond times/update periods and response goals are follows:

 Priority     Severity     Initial Response     Update period      Response goal
 ------     ---------    ---------------    --------------     ---------------
     1         very high     60 minutes           4 hours               2 days
     2         high             4 hours               1 day                  4 days
     3         normal         8 hours               2 days                8 days
     4         low              16 hours             4 days                16 days


For details see following SAP notes: