Tuesday, 27 October 2015

SAP TESTING

Testing is an essential part of any SAP implementation. Proper testing is a critical component and results in eliminating/reducing risks and gaps. 


Testing Strategy
You should always plan to have multiple test cycles. For most of the implementation I see three cycle strategy for test execution. This assumes that test scripts for every test cycle in a test stage are executed three times. Each cycle will have progressive improvement in pass rate. Each cycle should have predetermined Entry/Exit criteria. Entry/Exit criteria are sets of conditions that must be satisfied before entering/exiting a project phase.
Entry criteria - what is required to support a cycle.
Exit criteria - what is required of a cycle to determine completeness

Testing strategy should focus on the following:
  • Testing should be structured and should aim at validating that requirements and specifications are properly implemented and meets Business expectations.
  • Testing should attempt to identify problems as early as possible and ensure that specifications are complete and correct.
  • Testing should ensure that the specifications are properly and correctly implemented and that the solution meets the business and performance requirements.

Testing can be classified into Functional and Technical Testing and done at various stages of the project implementation. I am listing all the relevant testing that is applicable to a typical SAP implementation. Based on the size of your SAP release/implementation, you can adopt use some or all of the testing types for you implementation.


Test Types:

Unit/Component testing: Testing each individual component of the application after the build for each unit of the application is completed. Each of the RICEFW (R-Reports, I-Interfaces, C-Conversions, E-Enhancements, F-Forms & W-Workflows) objects should be unit testing to make sure they work as expected stand alone. A thorough unit test will result in minimizing issues and delays at later stages.

Integration (product) test: E2E (end-to-end) testing of the business processes across all applications and platforms. This test should incorporate testing the interactions of related application components and functions are properly integrated. This testing can be started only after completing the build activities.
Main aim of integration testing is
  • Business requirements are fulfilled
  • Functional Design specifications are correctly implemented
  • Business processes execute correctly
  • Business process errors and exceptions are handled appropriately

Performance test: To test to see if the system is capable of operating at the specified load levels with optimal performance requirements and agreed service levels.  This testing helps you fix any performance issues and fine tune the application/User Interfaces.

User Acceptance Test (UAT). This testing ensures that the business users and end users are satisfied with the designed solution. This phase will give users an opportunity to complete review of the system prior to deployment. After successful completion of this phase the product can be released into production system.

Regression Test: Regression testing helps you ensure that when new changes are introduced to a system they do not adversely affect the original functionality of the system. You should plan scope of regression testing to include all relevant functionality is tested. This testing is usually applicable during your monthly/Quarterly releases. For major releases, this will usually covered under your integration testing.
Regression testing should be designed to have detailed, repeatable and automated scripts. Automation of regression testing reduces the testing effort. This will help regression testing to be completed with minimal effort.



Defect Management
This is where you track and manage the identification of defect, resolution and re-test of application/system defects during your test execution.
This process should mandate  
  • recording
  • reviewing
  • prioritizing
  • addressing
  • retesting
  • approving

Effective testing helps validate that requirements and specifications are properly implemented and meets your SAP implementation functional, technical and operational expectations.

BI 7.0 New Features - Transformation - Object oriented ABAP




 tips and tricks in writing the BW Transformation program. thought of sharing them with the community:
For quick migration of transfer or update rules you can use auto migration ;  right click transfer or update rules and select Additional Function>Create Transformation. All routines will be migrated automatically to the new OO ABAP.
In BI 7.0 environment, transformation (formerly called Update/Transfer rules) requires object oriented ABAP and here are some difference worth noting down between Object oriented ABAP and ABAP which would help you in working with BI 7.0.
 
                BI 3.5

                BI 7.0

Internal Table

DATA: BEGIN OF INT_EBELN OCCURS 0,
 OI_EBELN   LIKE /BI0/POI_EBELN-OI_EBELN,
/BIC/ZMEXPDGRP  LIKE /BI0/POI_EBELN-/BIC/ZMEXPDGRP,
/BIC/ZMPOVERNO  LIKE /BI0/POI_EBELN-/BIC/ZMPOVERNO,
/BIC/ZMPURSTAT  LIKE /BI0/POI_EBELN-/BIC/ZMPURSTAT,
/BIC/ZMPORLSON  LIKE /BI0/POI_EBELN-/BIC/ZMPORLSON,
/BIC/ZMVALD_PO  LIKE /BI0/POI_EBELN-/BIC/ZMVALD_PO,
 END OF INT_EBELN.

It's 2 step process in BI 7.0. 1st step declare the structure and in 2nd step declare Internal table referring to the above structure
TYPES: BEGIN OF INT_EBELN_STRU,
       OI_EBELN   TYPE /BI0/POI_EBELN-OI_EBELN,
       /BIC/ZMEXPDGRP  TYPE /BI0/POI_EBELN-/BIC/ZMEXPDGRP,
       /BIC/ZMPOVERNO  TYPE /BI0/POI_EBELN-/BIC/ZMPOVERNO,
       /BIC/ZMPURSTAT  TYPE /BI0/POI_EBELN-/BIC/ZMPURSTAT,
       /BIC/ZMPORLSON  TYPE /BI0/POI_EBELN-/BIC/ZMPORLSON,
       /BIC/ZMVALD_PO  TYPE /BI0/POI_EBELN-/BIC/ZMVALD_PO,
        END OF INT_EBELN_STRU.
DATA: INT_EBELN TYPE TABLE OF INT_EBELN_STRU.

Reading data from Internal Table

READ TABLE INT_EBELN INTO WA_PO WITH KEY
    OI_EBELN = DATA_PACKAGE-OI_EBELN BINARY SEARCH.
    IF SY-SUBRC = 0.
DATA_PACKAGE-/BIC/ZMVALD_PO = WA_PO-/BIC/ZMVALD_PO.
DATA_PACKAGE-/BIC/ZMEXPDGRP = WA_PO-/BIC/ZMEXPDGRP.
DATA_PACKAGE-/BIC/ZMPORLSON = WA_PO-/BIC/ZMPORLSON.
DATA_PACKAGE-/BIC/ZMPURSTAT = WA_PO-/BIC/ZMPURSTAT.

1st define a Work area and read from there.
WA_PO LIKE LINE OF INT_EBELN  à Work Area
READ TABLE INT_EBELN INTO WA_PO WITH KEY
       OI_EBELN = WA_DATA_PACKAGE-OI_EBELN BINARY SEARCH.
      IF SY-SUBRC = 0.
WA_DATA_PACKAGE-/BIC/ZMVALD_PO = WA_PO-/BIC/ZMVALD_PO.
WA_DATA_PACKAGE-/BIC/ZMEXPDGRP = WA_PO-/BIC/ZMEXPDGRP.
WA_DATA_PACKAGE-/BIC/ZMPORLSON = WA_PO-/BIC/ZMPORLSON.
WA_DATA_PACKAGE-/BIC/ZMPURSTAT = WA_PO-/BIC/ZMPURSTAT.

Data Package
 
Data: DATA_PACKAGE type table of _ty_s_SC_1,
      WA_DATA_PACKAGE LIKE LINE OF DATA_PACKAGE.

Loop  Statement

LOOP AT DATA_PACKAGE.

LOOP AT DATA_PACKAGE INTO WA_DATA_PACKAGE
Some points for consideration
1)      We need to familiarize ourselves with transformation as well as DTP and the integration of both in the process chain.  These are dependent once we perform data loads in production.
2)      Check the validity of the routines generated from the auto transformation. You may also want to improve the existing routines or the overall transformation flow as well.
3)      To debug a transformation routines you can use DTP (Tab: Execute >processing mode> serially in the Dialog Process (for debugging). 
 And Finally, Below is a very useful link from SAP BI help library which describes in a step-by-step how to migrate your data flow to the new concept (transformations and DTP's):

BI TABLES

BW Statistics & RSDDSTAT* views, tables
BW 3.x:




- before you use table RSDDSTAT you must activate the BW Statistics: RSA1 -> Tools -> BW Stats for InfoProviders
- can collect stats for 
OLAP (frontend) & for 
Loading (WHM backend)
- make sure that you have stats checked for ALL InfoProviders that you are querying on
- all RSDDSTAT tbls get updated when BW stats are switched on
- all RSDDSTAT tbls feed into the ST03 monitor 
==================================================
BI 7.x:
- to activate statistics goto tcode RSA1 .. Tools ... Settings for BI Stats 
-- set stats for Query- set stats for InfoProvider (as per 3.x)
- set stats for Web Template- set stats for Workbook 
==================================================
RSDDSTAT* predefined views & tables in BI 7.x:
- RSDDSTATAGGR
-- Detail Table for Aggregate Setup
- RSDDSTATAGGRDEF
-- Detail Table of Navigation for each InfoCube/Query
- RSDDSTAT_OLAP:
-- view containing data from the events from the areas for the front end and calculation layer of the analytic engine (Front End/OLAP)
-- similar to old 3.x one but now has different breakdown for OLAP time
-- SESSIONID: when you start your session (i.e. run the query)
-- STEPUID: when you do something different (i.e. navigate)#
-- Events ID 9000-9011: more info for QTIMEDB
-- Events ID 3000-3999: more info for QOLAPTIME
- RSDDSTATSTEPTP:
-- type of steps
-- BEX, BEX3, BRCS (broadcasting), EXTN (external read), JAVA, MDX
- RSDDSTATHANDLTP:
-- combines Handle & Step type
-- helps to identify where the time is being spent 
- RSDDSTAT_DM:
-- Statistics DataManager for Query execution
-- view containing data from the events from the area for the aggregation layer and analytic engine (Data Manager).
-- gives the detail of the DB access
-- get the STEPID of the RSDDSTAT_OLAP entry with Event ID = 9000 (DBTIME)
-- look STEPID up in RSDDSTAT_DM- gives the InfoProvider its reading
-- gives the aggregate being used- if $__ in AGGREGATE => BIA is being used
-- TABLTP: which fact table is being used- TIMEREAD: time spent reading- WP_ID: which work process is being used 
- RSDDSTATWHM:
-- Warehouse management statistics
-- time it takes to do a load 
- RSDDSTATCOND
-- InfoCube Compression
- RSDDSTATDELE
-- InfoCube Deletions 
BWA (BIA) tables
Table
Title
Description
RSDDSTATTREX
Statistic Data Process TREX Aggreg.
measures how long it takes to read the data from the DB, Index the data and then commit the changes in the BWA box for a particular table.
RSDDSTATTREXSERV
BIA internal statistics
contains times for Indexing activities on the BWA server and the time taken to send the data back to BW using RFC if the activity is a query execution.
RSDDSTATBIAUSE
BIA Index Maintenance Run times
In systems that are linked to an BI Accelerator server, statistics are generated for each InfoCube to see whether the query reads the data from the BIA or not. See SAP Note 1159260.
DTP tables

Table
Description
RSBKDTP
BW: Data Transfer Process Header Data
RSBKDTPH
DTP: Historic Versions
RSBKDTPSTAT
Status Information on Data Transfer Process
RSBKDTPT
Texts on Data Transfer Processes
RSBKDTPTH
Texts on Data Transfer Processes
RSDDSTATDTP
Table for WHM Statistics. Details DTP
RSOACUBE_DTP
BW: OLTP Direct Access: Directory of Assigned Remote DTPs
RSBKDATAPAKSEL
DTP: Data Package Selections
RSBKSELECT
Selections for DTP Request (Summary)
RSBKREQUEST
DTP Request
RSBKREQUEST_V
View of DTP Request
RSBKBP
Breakpoints
RSBKDATAINFO
Information on DTP Runtime Buffers
RSBKDATAPAKID
DTP: Status Table for Data Packages
RSBKSUBSTEP
Properties of Substeps in a DTP
Hierarchy Tables

Hierarchy Tables
Description
RSHIEDIR
Hierarchy Directory, Header Information
RSHIEDIRT
Hierarchy directory texts
/BI*/H<IOBJNM>
Hierarchy structure table
/BI*/J<IOBJNM>
Interval table
RSMHIERNODE
Master data table for text nodes
RSTHIERNODE
Text table for text nodes
Transformation tables
Table
Description
RSTRAN
Transformation
RSTRANFIELD
Mapping of Rule Parameters - Structure Fields
RSTRANRULE
Transformation Rule
RSTRANSTEPROUT
Rule Type: Routine
RSTRANRULESTEP
Rule Steps for a Transformation Rule
RSTRANSTEPMAP
Mapping for Rule Step Within a Rule

Important Tables in SAP BI ( NW2004)


Listing of commonly used tables in SAP BI and to understand the way data is stored in the backend of SAP BI
Listed below are some of the tables commonly used in SAP BI ( NW 2004) - however the same has not been tested in NW2004s and please make corrections if required. Some of this material has gone through a lot of eyeballs before making it to the final list and could contain some older references / incorrect references , however most of them have been validated.
Transfer Structure
RSTS 
Transfer Structure List 
RSTSFIELD 
Transfer Structure fields
RSTSRULES  
Transfer Structure rules
RSAROUTT
Text name of Transfer Routine
DD03T
Text for R/3 Transfer structure Objects
Update Rules
RSUPDROUT
Update rules List 
RSUPDDAT  
Update rules with routines
RSUPDKEY   
Update rule key fields
RSUPDINFO
InfoProvider to Infosource correlation
Embedded ABAP coding for Transfer / Update Rules
RSAABAP 
ABAP source code per object routine 
InfoPackage
RSLDPIO 
Links datasource to infopackages
RSLDPIOT  
InfoPackage Text Description
RSLDPRULE 
ABAP source code for InfoPackages
RSLDPSEL   
Hardcoded selections in InfoPackages
RSMONICDP
Contains the request-id number by data target
RSPAKPOS 
List of InfoPackage Groups / InfoPackages
ProcessChain

RSEVENTCHAIN   
Event Chain Processing Event Table
RSEVENTHEAD    
Header for the event chain
RSEVENTHEADT    
Header for the event chain
RSPCCHAIN 
Process chain details 
RSPCCHAINATTR  
Attributes for a Process Chain
RSPCCHAINEVENTS  
Multiple Events with Process Chains
RSPCCHAINT  
Texts for Chain
RSPCCOMMANDLOG 
System Command Execution Logs (Process Chains)
RSPCLOGCHAIN  
Cross-Table Log ID / Chain ID
RSPCLOGS
Application Logs for the Process Chains
RSPCPROCESSLOG
Logs for the Chain Runs
RSPCRUNVARIABLES  
Variables for Process Chains for Runtime
RSPC_MONITOR 
Monitor individual process chains
Queries 
RSZELTDIR 
Directory of the reporting component elements 
RSZELTTXT
Texts of reporting component elements
RSZELTXREF
Directory of query element references
RSRREPDIR 
Directory of all reports (Query GENUNIID)
RSZCOMPDIR
Directory of reporting components
RSZRANGE
Selection specification for an element
RSZSELECT 
Selection properties of an element 
RSZELTDIR 
Directory of the reporting component elements
RSZCOMPIC 
Assignment reuseable component <-> InfoCube 
RSZELTPRIO
Priorities with element collisions 
RSZELTPROP
Element properties (settings) 
RSZELTATTR 
Attribute selection per dimension element
RSZCALC
Definition of a formula element
RSZCEL 
Query Designer: Directory of Cells 
RSZGLOBV 
Global Variables in Reporting 
RSZCHANGES
Change history of reporting components
Workbooks
RSRWBINDEX
List of binary large objects (Excel workbooks) 
RSRWBINDEXT 
Titles of binary objects (Excel workbooks)
RSRWBSTORE 
Storage for binary large objects (Excel workbooks)
RSRWBTEMPLATE 
Assignment of Excel workbooks as personal templates
RSRWORKBOOK
Where-used list for reports in workbooks
Web templates
RSZWOBJ 
Storage of the Web Objects 
RSZWOBJTXT 
Texts for Templates/Items/Views
RSZWOBJXREF
Structure of the BW Objects in a Template
RSZWTEMPLATE 
Header Table for BW HTML Templates
InfoObject 

RSDIOBJ                               
Directory of all InfoObjects
RSDIOBJT 
Texts of InfoObjects
RSDIOBJ   
Directory of all InfoObjects
RSDIOBJT 
Texts of InfoObjects
RSDATRNAV
Navigation Attributes
RSDATRNAVT 
Navigation Attributes
RSDBCHATR
Master Data Attributes
RSDCHABAS
Basic Characteristics (for Characteristics,Time Characteristics, and Units)
RSDCHA  
Characteristics Catalog
RSDDPA 
Data Package Characteristic
RSDIOBJCMP 
Dependencies of InfoObjects
RSKYF  
Key Figures
RSDTIM 
Time Characteristics
RSDUNI 
Units
InfoCube
RSDCUBE  
Directory of InfoCubes 
RSDCUBET
Texts on InfoCubes
RSDCUBEIOBJ 
Objects per InfoCube (where-used list)
RSDDIME 
Directory of Dimensions
RSDDIMET
Texts on Dimensions
RSDDIMEIOBJ  
InfoObjects for each Dimension (Where-Used List)
RSDCUBEMULTI
InfoCubes involved in a MultiCube
RSDICMULTIIOBJ 
MultiProvider: Selection/Identification of InfoObjects
RSDICHAPRO 
Characteristic Properties Specific to an InfoCube
RSDIKYFPRO
Flag Properties Specific to an InfoCube
RSDICVALIOBJ
InfoObjects of the Stock Validity Table for the InfoCube
Aggregates
RSDDAGGRDIR 
Directory of Aggregates 
RSDDAGGRCOMP 
Description of Aggregates
RSDDAGGRT
Text on Aggregates
RSDDAGGLT
Directory of the aggregates, texts
ODS Object 
RSDODSO 
Directory of all ODS Objects 
RSDODSOT 
Texts of all ODS Objects
RSDODSOIOBJ 
InfoObjects of ODS Objects
RSDODSOATRNAV
Navigation Attributes for ODS Object
RSDODSOTABL 
Directory of all ODS Object Tables
PSA 
RSTSODS  
Directory of all PSA Tables
DataSource (= OLTP Source) 
ROOSOURCE   
Header Table for SAP BW DataSources (SAP Source System/BW System) 
RODELTAM
BW Delta Procedure (SAP Source System)
RSOLTPSOURCE
Replication Table for DataSources in BW
InfoSource
RSIS  
Directory of InfoSources with Flexible Update 
RSIST
Texts on InfoSources with Flexible Update
RSISFIELD 
InfoObjects of an InfoSource
Communications Structure 
RSKS
Communications Structure for InfoSources with Flexible Update 
RSKS
Communications Structure (View) for Attributes for an InfoSource with Direct Update
RSKSFIELD
Texts on InfoSources with Flexible Update
RSISFIELD
InfoObjects of an InfoSource with Flexible Update
Transfer Structure 
RSTS 
Transfer Structure in SAP BW 
ROOSGEN 
Generated Objects for a DataSource (Transfer Structure, for example in SAP Source System)
Mapping
RSISOSMAP
Mapping Between InfoSources and DataSources (=OLTP Sources) 
RSOSFIELDMAP
Mapping Between DataSource Fields and InfoObjects
InfoSpoke 
RSBSPOKESELSET
InfoSpoke Directory and Selection Options 
RSBSPOKEVSELSET
InfoSpoke Directory with Selection Options and Versioning
RSBSPOKE
List of all InfoSpokes with attributes maintained with transaction RSBO which include the name of
the Source & Target Structures
RSBSPOKET
List of all InfoSpokes with the Short & Long Descriptions (only one of these can be maintained).
RSBSTEPIDMESS
Contains all the messages that have been recorded during the execution of an InfoSpoke. This table can
be added to using the ABAP Class/Method i_r_log->add_sy_message.
SAP BW Statistics
RSDDSTAT
Basic Table for InfoCubes/Queries
RSDDSTATAGGR 
Detail Table for Aggregate Setup
RSDDSTATAGGRDEF
Detail Table of Navigation for each InfoCube/Query
RSDDSTATCOND
InfoCube Compression
RSDDSTATDELE
InfoCube Deletions
RSDDSTATWHM
Warehouse Management
Misc
RSFEC
BW Frontend Check. Useful for checking the installed SAP GUI versions on user machines.
RSSELDONE 
InfoPackage selection and job program, there in field UPDMODE the update status (INIT/DELTA/FULL)
RSPSADEL
PSA Table deletion
TBTCP
Job Schedule Definition
TBTCO
Job Schedule Result
RSMONMESS 
Monitor Messages
RSERRORLOG
Check loading errors in table
V_RSZGLOBV
Report Variables view table
DEVACCESS
Developer Keys table
TSTC
All Transactions in the system
RSDDAGGRDIR
Directory of the aggregates
ROIDOCPRMS
Control parameters for data transfer from the source system
SMEN_BUFFC
Objects in User's Favorites
TSTCT
Transaction Codes with Text 
DD03L
field names and corresponding data element names
DD03LT
Description of each data element
DD02L
All SAP Defined Table Names
DD02LT
Description of All SAP Defined Table Names
Web Item
RSZWITEM
Header Table for BW Web Items
RSZWMDITEM
BW Web Metadata: Template Item ( Dataprovider, Item, ... ).
RSZWITEMXREF
Cross Reference of Web Items 
RSZWMIMEIOBUFFER
Buffer for Translation MIME Rep. to IO 
RSZWOBJ
Storage of the Web Objects
RSZWOBJTXT
Texts of Templates/Items/Views 
RSZWOBJXREF 
Structure of the BW Objects in a Template
RSZWTEMPLATE 
Header Table for BW HTML Templates
Archiving 
RSARCHIPRO 
BW Archiving: General Archiving Properties
RSARCHIPROIOBJ
BW Archiving: General Archiving Properties
RSARCHIPROLOC
BW ARchiving: General Local Properties
RSARCHIPROLOCSEL
BW Archiving: Archived Data Area
RSARCHIPROPID
BW Archiving: Program References of InfoProvider
RSARCHREQ
BW Archiving: Archiving Request
RSARCHREQFILES
BW Archiving: Verfified Archive Files
RSARCHREQSEL
BW Archiving: Request-Selections
Open Hub Destination 
RSBOHSERVICETP 
Open Hub: Service Types
RSBREQUESTDELTA 
Open Hub: Cross Reference Outbound/Inbound
RSBREQUESTMESS
Open Hub: Log for a Request
RSBREQUID
Open Hub: Requests
RSBREQUID3RD
Open Hub: Status of 3rd Party Requests
RSBREQUIDRUN
Open Hub: Table with Status for a Request
RSBSTRUCTURE
Open Hub: Generated Structures and Tables

Master Data Tables

Table
Description
/BI*/P<INFOOBJECTNAME>
Stores values of Time Independent Attributes
/BI*/Q<INFOOBJECTNAME>
Stores Values of Time Dependent Atrtibutes
/BI*/T<INFOOBJECTNAME>
Stores Time Independent and Time Dependent Texts
/BI*/X<INFOOBECTNAME>
Stores the SID Values for Time Independent Navigation Attributes
/BI*/Y<INFOOBJECTNAME>
Stores the SID Values for Time Dependent Navigation Attributes
/BI*/S<INFOOBJECTNAME>
Stores the SID Values for Characteristic Key Values found in the P, Q or T table
/BI*/M<INFOOBJECTNAME>
A Database View defined as the Union of Time Dependant and Time Independent Master Data Attributes

Naming Convention - /BI<C or 0>/<table code><InfoObject>
<C or 0> ?
C = Customer Defined Characteristic
0 = SAP defined Characteristic
Process Chain Tables

Table
Description
RSEVENTHEAD
Header for the event chain
RSPC_BUFFER
Shared Buffer for Processes
RSPC_MONITOR
Monitor individual process chains
RSPCCHAIN
Process chain
RSPCCHAINATTR
Attributes for a Process Chain
RSPCCHAINEVENTS
Multiple Events with Process Chains
RSPCCHAINT
Texts for Chain -> Text - Chain-ID
RSPCLOGS
Application Logs for the Process Chains
RSPCLOGCHAIN
Cross-Table Log ID / Chain ID
RSPCPROCESSLOG
Logs for the Chain Runs
RSPCRUNVARIABLES
Variables for Process Chains for Runtime
RSPCVARIANT*
Generic Variant-Storage

PS Tables


Tables
Description
PRPS
WBS element master table
BPJA
Total costs for annual period CO object
KBUD
Budget
KNB0
supplementary budget