Wednesday, April 14, 2010

CUBE_SAMPLE_CREATE



This program allows you to be really lazy if you want to have some sample records in a InfoCube. No need to use flat files, edit the value in a ALV-Grid or let the system generates random values for you. It works only on InfoCube, not ODS. Works for BW3.5 and BI7.0
The records are added to the cube in one request “Request loaded using the APO interface without monitor log”
It can be very useful if you want:
  •  some sample data to test your query but the source system is not available
  •  to add special records as placeholder of certain characteristic values when you don’t want to use structure in your query

Monday, April 12, 2010

Delete not used master data



You can delete the values that are not used from a characteristic using the report RSDMD_DEL_BACKGROUND.You have to execute the report with the following parameters:
P_IOBJNM = (Technical name of time characteristic)
P_CHABNM = (Technical name of time characteristic)
P_DELSID = ‘X’
P_DELTXT = ‘ ‘
P_OBJ = RSDMD
P_SUB = MD_DEL
P_EXT = ‘ ‘
P_NOPROT = ‘ ‘
It takes a long time if you have lots data in the table.
Another way, delete and reload all seems better, but never try.
While it is true that the reason why you cannot delete master data is because of referential integrity checks between MD and data in the infoproviders it should be noted that these are surrogate keys and not the actual key values (ie. customer id, employee #, etc). Assuming that you are not looking to change these but rather the attributes hanging off of these you can do the following:
adjust the /BI0/Q and /BI0/P tables using SE14 (activate and adjust  database - drop contents). This will delete the contents of the time dep and time indep master data tables.
do the same for the text tables assuming that you have this, you may have to also do this for the navigational attributes tables, again assuming that these have been turned on at the infoobject level.
Do NOT touch the /BI0/S table since this provides the link to your infoproviders.
 reload your master data.

DB statistics take long time to run during change run and roll up


DB statistics take long time to run during change run and roll up

After addin more and more aggregates to the cubes, it becomes tough to estimate when the load would finish, as sometimes the Attribute Change Run takes 10 min to run, sometimes, 2 hours.
There are many ways to deal with it. For example, reduce the percentage of DB statistics calculation, switch off the aggregates…
The following SAP OSS note might help. But need to be careful with the warnings in the same note.
You can deactivate the DB statistics initiated by the BW system by making the following entry in the RSADMIN table. You can use the SAP_RSADMIN_MAINTAIN ABAP report to do this:
  •  
    • Object: DB_STATISTICS
  •  
    • Value: OFF
Note that the RSADMIN table is buffered. You should execute a/$tab RSADMIN (invalidates buffers for RSADMIN) or /$sync(invalidates all table buffers) command afterwards.

Missing values in time characteristics


Missing values in time characteristics

When selecting filter values for time characteristics, some users noticed that they can’t find the dates they want, although, these dates exist in the infoProviders.
Apparently, there’s a default date range setting for time characteristics, e.g.0calday, 0calmonth, 0calweek. To change, go to t-code SPRO -> F5. Path may vary depending on the system.
SAP Netweaver –> Business Information Warehouse –>Reporting-relevant settings -> General Reporting settings for Bex  –>Set F4 Help and Hierarchies for Time Characteristics/OLAP Settings –> Time Interval

Day of Last Period ABAP Function

Day of Last Period ABAP Function
Sometimes, in the course of your BW work, you will encounter a situation where the business requirement is to get the day of the last fiscal period. This is due to the fact that you want to populate, say calday infoobject, but the datasource only contains information in FISCPER format like 002.2008 for February 2008 for example.

So how do you overcome this? How to derive the last day in that period? Well the easy way is to use this built-in ABAP function in your transformation rules / or transfer rules etc:

CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
EXPORTING
I_GJAHR = your_fiscal_year
I_MONMIT = 00
I_PERIV = your_fiscal_variant
I_POPER = your_fiscal_month
IMPORTING
E_DATE = output_last_day_of_period
EXCEPTIONS
INPUT_FALSE = 1
T009_NOTFOUND = 2
T009B_NOTFOUND = 3
OTHERS = 4
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

result = output_last_day_of_period.

So how to use this function? You need to replace the following fields which is highlighted in bold above, 'your_fiscal_year', and 'your_fiscal_month', should be replaced by the fiscal year and fiscal month respectively, in this case, you can derive this from fiscper from datasource. Remember, that 'your_fiscal_month', must be in 'financial format', meaning that its length is 3 and not 2 as usual. Remember to also populate the 'your_fiscal_variant', without this, the program will return with an exception error most likely.

This function will return 'output_last_day_of_period', and you can use this value to populate your calday in the transformation rules / transfer rules as you like!

BW IDOC Status

Sometimes, when we load data to BW, it's important to know the idoc status of the loads. There are times when the load is stuck and it's good to know the reason why.

Anyway, here's a list of some of the known IDOC status:

00 Not used, only R/2
01 IDoc generated
02 Error passing data to port
03 Data passed to port OK
04 Error within control information of EDI subsystem
05 Error during translation
06 Translation OK
07 Error during syntax check
08 Syntax check OK
09 Error during interchange handling
10 Interchange handling OK
11 Error during dispatch
12 Dispatch OK
13 Retransmission OK
14 Interchange Acknowledgement positive
15 Interchange Acknowledgement negative
16 Functional Acknowledgement positive
17 Functional Acknowledgement negative
18 Triggering EDI subsystem OK
19 Data transfer for test OK
20 Error triggering EDI subsystem
21 Error passing data for test
22 Dispatch OK, acknowledgement still due
23 Error during retransmission
24 Control information of EDI subsystem OK
25 Processing despite syntax error (outbound)
26 Error during syntax check of IDoc (outbound)
27 Error in dispatch level (ALE service)
28 Not used
29 Error in ALE service
30 IDoc ready for dispatch (ALE service)
31 Error - no further processing
32 IDoc was edited
33 Original of an IDoc which was edited
34 Error in control record of IDoc
35 IDoc reloaded from archive
36 Electronic signature not performed (timeout)
37 IDoc added incorrectly
38 IDoc archived
39 IDoc is in the target system (ALE service)
40 Application document not created in target system
41 Application document created in target system
42 IDoc was created by test transaction
50 IDoc added
51 Application document not posted
52 Application document not fully posted
53 Application document posted
54 Error during formal application check
55 Formal application check OK
56 IDoc with errors added
57 Test IDoc: Error during application check
58 IDoc copy from R/2 connection
59 Not used
60 Error during syntax check of IDoc (inbound)
61 Processing despite syntax error (inbound)
62 IDoc passed to application
63 Error passing IDoc to application
64 IDoc ready to be transferred to application
65 Error in ALE service
66 IDoc is waiting for predecessor IDoc(serialization)
67 Not used
68 Error - no further processing
69 IDoc was edited
70 Original of an IDoc which was edited
71 IDoc reloaded from archive
72 Not used, only R/2
73 IDoc archived
74 IDoc was created by test transaction

SAP BW Authorisation Object Value table




Checking Authorisation Object value in the base table:
RSECHIE
RSECTXT
RSECVAL

BW Security (Authorizations)



The following are some of the relevant SAP BW Security transaction codes.
Transaction Code
Description
RSA1
Transaction RSA1 is the main transaction for administrative functions in SAP BW (Administrator Workbench)
RSD1
This transaction code can be used to mark objects as relevant for authorization (InfoObject Maintainence)
RSSM
This transaction code can be used to create and modify authorization objects in SAP BW
RSZV
This transaction code is used to create or modify the variables for authorization checks. (Variable Maintenance)
RRMX
Business Explorer is the reporting tool in SAP BW and is used for analyzing data.
GLOBAL_TEMPLATES
Templates for modelling and evaluating data

How to Activate Authorizations In BW

 The following steps explains how to activate the authorizations in BW.
 1)  Mark InfoObject as relevant for authorization tcode => RSD1
 2)  Create report authorization object tcode => RSSM
3)  Select InfoCubes tcode => RSSM
4)  Manually integrate authorization object in role tcode => PFCG
5) Change / Maintain authorization values => PFCG
6)  Assign role to user tcode => PFCG or via Central User Administration
 Hierarchical Authorizations in BW
 The following steps describe the steps to control authorizations for hierarchies
 1) Transfer and activate InfoObject 0TCTAUTHH tcode => RSD1
2) Mark InfoObject 0TCTAUTHH as relevant for authorization tcode => RSD1
3) Mark Leaf InfoObject as relavant for authorization tcode => RSD1
4)  Create authorization objects with 0TCTAUTHH and Leaf InfoObject => RSSM
5) Define hierarchical authorizations tcode => RSSM
6) Manual intrgration of authorization object in role tcode => PFCG
7)  Maintain authorization values tcode => PFCG
8)  Assign role to user tcode => PFCG or via Central User Administration
 For extracting structural authorizations from HR (mySAP ERP HCM)  and to map it in SAP BW to maintian consistency between the two systems the tables of interest are:
1)  T77PR for Structural Authorization profiles
2)  T77UA for user assignments
3) T77UU for users (in this table you can select the users for extraction. You can either select all or specific users)

 Structural Authorizations in SAP BW

 The following steps show the way Structural Authorization is enforced in SAP BW.
 The following steps to be carried out in the mySAP ERP HCM system.
 1) Call program RHBAUS02 for uploading Table T77UU and enter users.
2) Call program RHBAUUS00 for generating an index for structural authorization profile
3)  Activate Data source 0HR_PA_2
 The following steps to be carried out in the SAP BW system
 1) Replicate Data source 0HR_PA_2
2) Activate ODS InfoProvider 0HR_PA_2
3) Create an InfoPackage to perform an extraction for 0HR_PA_2
4) Load ODS data from mySAP ERP HCM
5) Mark InfoObjects as relevant for authorization (In order to use structural authorizations in SAP BW, all characteristic values like position, employee etc. which are relevant to reporting should be marked as authorization relevant InfoObjects.)
6)  Create reporting authorization objects
7)  Link authorization objects to InfoCubes
8)  Call program RSSB_Generate_Authorizations.    

SAP Workload Analysis


 
Performance Analysis

In order to perform analysis of a SAP software component the component should start without an error and there should be spare work processes available to run the analysis.
If there are no work processes available then use the program dpmon at the operating system level which will give the same output as the work process overview.

Workload Analysis (tcode ST03 or ST03N)
Menu Path
Tools=> Administration=> Monitor=> Performance=> Workload=> Analysis
Problem
Analysis
High database time i.e. more than 40% (database time = response time – wait time)
Check using tcode STAT / STAD if buffer reload then check ST10 for Table Access Statistics if OK, then use ST05 for SQL trace analysis.
Roll wait time more than 200 mseconds
Check using tcode ST05 for RFC trace
GUI time more than 200 mseconds
Check for networks bottlenecks
Load time more than 50 mseconds
Check the program buffer, maybe the program buffer too small
Roll out or roll in time more than 20 mseconds
Check SAP memory, problem cold be with SAP extended memory or SAP roll buffer
Programs with high CPU time i.e. >40%
Check ABAP program tcode SE30

Work Process Overview  SM50 / SM66
Menu Path
Tools=> Administration=> Monitor=> Performance=> Exceptions / Users=> Active Users=> All processes

Work Processes with status running

Direct read, Sequential read, Insert, Update, Delete or Commit
Check databse locks tcode DB01, if exclusive lock wait, check process holding the lock.
Load Report or semaphore 1
SAP program buffer too small
Roll in, Roll out or semaphore 6
Check SAP memory problems due to extended memory or roll buffer
Work processes with status stopped

Reason PRIV
Check SAP memory problems due to extended memory or roll buffer
Reason CPIC
Test RFC destination using tcode SM59
Work process with status complete
Save the work process trace file and restart work process


Operating System Monitor ST06
High CPU load i.e. idle avarage <35%

SAP work process causing the high CPU load?
SM50 SM66 Check ABAP trace using tcode SE30
Database processes causing high CPU load?
ST04 Check expensive SQL statement
External processes causing high CPU load?
Postpone the process to off peak hours
File system cache >10% of RAM
Reduce file system cache

SAP Memory Configuration Monitor ST02
SAP extended memory >80%
Enlarge the SAP extended memory
Individual users consuming a lot of memory
Check user action
Many buffer swaps
Enlarge the related buffer
ztta/roll_first >1024
ztta/roll_first=1

Table Access Statistics ST10
Invalidations for buffered tables
If required deactivate buffering
Large buffer size for buffered tables
If required deactivate buffering
Many rows affected for buffered tables
If required deactivate buffering
Many total ABAP processor requests for non-buffered tables
If required activate buffering

Use BI 7.0 LInks

Related to Netweaver BI 7.0
SAP Release Upgrade BI7 & ECC6
How To Load a File into BI-Integrated Planning
How to Load a File into BI-Integrated Planning - Additional Materials

http://www.hometutorials.com/SAP-BW/

For Upgrading from R/3 4.6 to ECC6.0 related information

SAP ERP Upgrade Guides
SAP ERP Upgrade Masterguide
Upgrade Roadmap
Combined Upgrade & Unicode Conversion Guide for R/3 4.6C customers
Upgrading to SAP ERP - Frequently Asked Questions
Getting Started with an Upgrade to SAP ERP 6.0
Transition and Upgrade
Value of ERP Upgrades 
Strategy and Roadmap 
How to build a business case
What IT Professionals must know about SAP enhancement packages for SAP ERP

General Topics

SAP Tables for Technical Consultants
Understanding Transitive Attributes

Trouble shooting in Inventory Management

1.    The extractor 2LIS_03_BX is not visible in Logistic cockpit?
       This wont be visible as the extract structure of this is not changeable. Don't worry this wont impact anything.
 2.    The BX extractor setup run is not available thru the SBIW path?
         Use T-code MCNB
 3.    The fields like BWGEO,BWMNG,BWAPPLNM,BWART are not getting populated after the setup table run?
         Please check if the below setting are done in R/3 side.
         A.   Table TBE11 : Maintain Entry 'NDI' with text 'New Dimension Integration' and activate the flag(Note 315880)
         B.   Table TPS01 : Entry should be as below(Note 315880)
                PROCS - 01010001
                INTERFACE  - SAMPLE_PROCESS_01010001
               TEXT1 - NDI Exits Active
         C.   Table TPS31 : Entry should be as below(Note 315880)
                PROCS - 01010001
               APPLK  - NDI
               FUNCT - NDI_SET_EXISTS_ACTIVE
         D.   Tcode -   MCB_  
               In most cases you need to set the industry sector as 'standard'. For more info please see Note 353042
         E.   Tcode -  BF11
               Set the indicator to active for the Business warehouse application entry. This entry may needs to be transported to the production system. (Note 315880)
4.    If the inventory extractors are set in Unsterilized V3 update mode the delta entries for material movements are not shown in Extraction queue (LBWQ)?
       Please check the delta entries in Update records menu (sm13).
5.    Issue with staging the BX extractor data with DSO?
       No DSO possible for BX data. This data directly needs to be loaded to the non cumulative cube.
6.    After BX data load the data is not visible in cub?
       This data won't be visible in cube. After compression this data can be viewed thru reports only.
7.    The inventory data is not matching with R/3 with reference to time period?
        A.    Check if compression is done for the initialization requests properly in cube. The program SAP_REFPOINT_COMPLETE can be used for this.
        B.    If you have not staged UM extractor data then check if material revaluation occurs in your company. If does then load also UM data to cube.
        C.    If the stock amount is showing fine in plant and material level but giving wrong results in more drill down level like storage level or batch, then the stock values are not maintained properly for inter plant movements. For those scenarios we can calculate the stock values in BI from quantity and stock price.
8.    Data mismatch after reloading of non cumulative cube?
       The below process should be followed strictly for data reload.
       A.  Load the BX data. Compress the request with stock marker (uncheck the marker option).
       B.  Load the BF and UM init data. Compress the loads without the stock maker (Check the marker option).
       C.  The future delta loads from BF and UM should be compressed with Stock marker (uncheck the marker option).
9.    Data inconsistency with reference to time characteristics although all the material movements are loaded to cube?
       Check if the validity table is updating correctly. Use T-code RSDV.
10.  How to check the stock data in R/3?
        The below T-code can be used.
        MB5B: Opening and Closing Stock on a posting period
        MB51: Material movement transaction
        MB52: Stock on hand by material, batch, storage location and plant.

Thursday, April 8, 2010

Replacement Path in Variable Reporting



What is the exact functionality of replacement path in Variable reporting.  What exactly it replaces?
Replacement path processing type is used in a variable when you wish to get a value from attributes of another character or from a query. 
  
Example:- if you wish to display the age of a customer in your report which will not be in the cube. I mean Age is attribute of customer and not part of the cube. But each transaction record in the cube is assigned with a customer field. So ..if we want to get this value into our report .. we create a variable on customer with replacement path and use its attribute AGE . So when you use this variable in your query for any thing you get the age of the customer associated with that transaction data
   
You can find one more example:
   
Lets assume we are using a text variable in the Query description (-->Query properties) description is : 'Sales Qty report'
Suppose we have Fiscal year/Period in our Query and variable on it(characteristic).
Now your requirement is to display Fiscal year/period along with description of the Query.  For that you need to create a text variable and use it...
While creating text variable, you have to choose processing type as 'replacement path' and characteristic as 'fiscal year/period' and replace variable with as 'key or text'....
and place this text variable into Query description (from Query properties)...
Suppose user selects some value for fiscal year period, same period will be displayed along with description.