Thursday, December 22, 2011

TYPES OF ROUTINES

Types of Routines in BW


Routines are used to define complex transformation rules. In most of the cases data won’t be coming directly in desired form before sending to the target. In some cases output needs to be derived on some incoming data. In such cases we need to go for writing of routines at the transformation level.
There are four types of Routines available

  • Characteristic or Field Routine

  • Start Routine

  • End Routine

  • Expert Routine

The routine which we need to go for depends on when it needs to be executed. Suppose if some logic needs to be implemented before transformation then the start routine needs to be implemented.

Characteristic or Field Routine

It operates on a single record for a single characteristic or key figure. The value gets modified in the routine based on one or more source fields before it is transferred to the target

Start Routine
The start routine is run at the start of the transformation. The start routine has a table in the format of the source structure as input and output parameters. It is used to perform preliminary calculations and store these in a global data structure or in a table. This structure or table can be accessed from other routines. You can modify or delete data in the source_package .
For field routine it will act on each record but in start routine it will have all the data in source_package . In Start routine we will have the structure of the source fields.

End Routine
An end routine is a routine with a table in the target structure format as input and output parameters. You can use an end routine to postprocess data after transformation on a package-by-package basis. Data is stored in result_package.
End Routine is processed after start routine, mappings, field routines and finally before the values is transferred to the output. End routine has the structure of the target and result_package contains the entire data which finally is the output.

Expert Routine
An Expert routine is a routine with contains both the source and target structure. we can use Expert routine if there are not sufficient functions to perform transformation.
For Expert Routine every things needs to be written using coding. In simple an expert routine performs all the actions of Start Routine, Mappings, Field and End Routines.
In Expert Routine we will read from source_package which contains all the data and update into result_package which should be the output .

Steps To Run Strucked Process Chain

 
1) If a proces chain is stuck at a particular step and we want to restart it.
2) Data loading is successful, but the next step of the chain is not executed..
Reason :- The event that will register in the back end data base is not set properly or may go to hold state, so as a result will have to change the parameter manually.
Solution:-

Step 1: At the step where the process chain is stuck
Go to display messages >>>chain>>>copy variant, instance & start date
Step 2: Go to se16>>>rspcprocesslog
Enter the below details,
Variant >>> variante
Instance >>> instance
Batch date >>> start date
This will give a single entry in the table rspcprocesslog.
Step 3: Execute the function module RSPC_PROCESS_FINISH
Enter the below details,
Rspcprocesslog >>>instance >>> I_INSTANCE.
Rspcprocesslog >>>variante>>> I_VARIANT
Rspcprocesslog >>>logid>>>I_LOGID
Rspcprocesslog >>> type >>>I_TYPE
Enter 'G' for parameter I_STATE and press execute (F8).

After executing the above FM, with the above stated parameters, the actual process will be set to green and the following process in the chain will be started and the chain can run to the end.

PARTITIONING

Info cube partitioning


InfoCube Partitioning
So what is partitioning and why do it?
You use partitioning to divide the data in an InfoCube into multiple, smaller, independent and related segments. This separation improves system performance when performing data analysis InfoProvider, this is because the system knows only to read a particular part of the disk to retrieve the data you are after. In addition it can perform parallel data reads of multiple partitions speeding up the queries execution time. There are always two extra 'catch all' partitions created as well as the ones you explicitly specify in order to store all of the low and high values that fall outside of the normal range, as shown in the example below:

What partitioning options do you have?
Physical Partitioning
Physical partitioning is done at database level and is can only be based on one of the following date based criteria: Calendar Month (0CALMONTH) or Fiscal Year/Period (0FISCPER).
An increase in performance is only seen for the partitioned InfoCube if the time dimension of the InfoCube is consistent. In the standard example shown on the right only the first record is consistent.


To setup partitioning for an InfoCube, choose Extras -> DB Performance -> Partitioning and specify the value range. Where necessary, limit the maximum number of partitions, the SAP recommended optimal maximum number of partitions is 30-40, so consider this when planning the range spilt. All changes are transparent for the user and behind the scenes you still have one logical database table.
In BW 3.5 you had to setup partitions whilst the InfoCube was empty but this constraint has disappeared in BI 7.0 (for all database providers except for DB2). In 7.0 it is not only possible to partition whilst the InfoCube has data but also re-partition any existing groupings. Repartitioning can be useful if you have already loaded data to your InfoCube and you have loaded more data into your InfoCube than you had planned when you partitioned it, you did not choose a long enough period of time for partitioning or some partitions contain no data or little data due to data archiving over a period of time.
You can access repartitioning in the Data Warehousing Workbench using Administration, or in the context menu of your InfoCube.
Logical Partitioning
Logical portioning is done at the data level and is achieved by separating out related data into separate InfoCubes that are joined into a multi-cube. In this case the related groupings are not solely restricted to time only, although by year would be a sensible choice, you could partition by plan and actual data, regions or business area. All queries based on the multi-cube will automatically use parallel sub-queries as required to retrieve the result-set thus improving query performance.

Conclusions
For anyone involved in planning solutions the logical partitioning will already be part of everyday life for comparing Plan vs Actuals data but other InfoCubes that contain a fair amount of data could benefit from being split into smaller cubes by for example year. Not only will this bring performance benefits but also make it easier to archive old unused data.
In BW 3.5 many cubes were partitioned at their point of creation but maintenance was a real issue and many were left with inadequate ranges over time, now this problem has been addressed in BI 7.0 it should be much easier to keep the systems running in a optimal state and well worth investigating.

Attribute Change Run

Attribute Change Run

Attribute change run is nothing but adjusting the master data after its been loaded from time to time so that it can change or generate or adjust the SID's so that u may not have any problem when loading the transaction data in to data targets. It is used for realignment of the master data..

Whenever master data attributes or hierarchy is loaded an attribute change run need to be performed due to the following reasons:

1. When a master data is changed/updated it gets loaded into the master data table as version "M"(modified).
It is only after a attribute change run that the master data becomes activated i.e. version "A".
2. Master data attributes and hierarchies are used in cube aggregates also. So to do update the
latest master data attributes values in the aggregates attribute change run need to be performed.
You need to schedule an attribute change run when you change master data attributes or hierarchies that are used as navigational attributes or in aggregates.
The hierarchy/attribute change run which activates hierarchy and attribute changes and adjusts the corresponding aggregates is divided, into 4 phases:

Finding all affected aggregates.
set up all affected aggregates again and write the result in the new aggregate table.
Activating attributes and hierarchies
rename the new aggregate table. When renaming, it is not possible to execute queries.


T code RSATTR
Program : RSDDS_ATTR_CHANGERUN
RSDDS_CHANGERUN_MONITOR To monitor change run

In any SAP system Only one Attribute change Run can Run at a given Point.


check the following link for more information
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/17435

Tuesday, November 8, 2011

ERROR: Basic type ZSAB004 does not exist-MESSAGE NO 447

Error Message:
---------------------------------------------------------------------------------------------
ERROR: Basic type ZSAB004 does not exist-MESSAGE NO 447

Diagnosis

    IDoc type ZSAB004 could not be found.

System Response
 

Procedure

    Please enter an IDoc type that exists.
------------------------------------------------------------------------------------------
Steps To Reproduce:
1. Rht clk on the source system and select "Check".

Resolution:

Goto WE30 T-Code and create new IDoc(ZSAB004) with basic type.
Now the issue was resolved.

IDoc Status Messages

Outbound IDOCs
Code Error Event Severity SAP Meaning
2 Yes Error Error passing data to port
3 No Error if transaction SM58 indicates an RFC transmission error Data pass to port OK
4 Yes Error Control information of EDI subsystem
5 Yes Error Translation
6 No Harmless Translation
7 Yes Error Syntax check
8 No Harmless Syntax check
9 Yes Error Interchange handling
10 No Harmless Interchange handling
11 Yes Error Dispatch
12, 13, 14 No Harmless OK
15 Yes Warning Interchange acknowledgement negative
16 No Harmless Functional acknowledgement
17 Yes Warning Functional acknowledgement negative
18 No Harmless Triggering EDI subsystem
20 Yes Error Triggering EDI subsystem
22 No Harmless Dispatch OK, acknowledgement still due
23 Yes Error Retransmission
24 No Harmless Control information of EDI subsystem
25 Yes Warning Processing despite syntax error
26 Yes Error Syntax check
27 Yes Error ALE error
29 Yes Error Error in ALE services
30 No Harmless Ready for dispatch (ALE)
31 No Harmless IDOC is marked for deletion
33 No Harmless Original of an IDOC which was edited
34 Yes Error Error in control record of IDOC
36 Yes Error Timeout error; electronic signature not performed
37 Yes Error IDOC added incorrectly
38 No Harmless IDOC archived
39 No Harmless Receive confirmed
40 Yes Error Application document not created in target system
41 No Harmless Application document created in target document
Inbound IDOCs
Code Error Event Severity SAP Meaning
51, 52 Yes Error Posting error
53 No Harmless Posting successful
54 Yes Error Error during formal application check
55 No Harmless Formal application check
56 Yes Error IDOC with error added
60 Yes Error Syntax error
61 Yes Warning Processing despite syntax error
62 No Harmless IDOC passed to application
63 Yes Error Error passing IDOC to application
64 No Harmless IDOC ready to be passed to application
65 Yes Error ALE error
68 No Harmless IDOC is marked for deletion
70 No Harmless Original of an IDOC which was edited
73 No Harmless IDOC archived

TABLESPACE ERROR - unable to extend table SAPSR3.DDPRS by 1024 in tablespace PSAPSR3"


Category               ABAP Server Resource Shortage
Runtime Errors         DBIF_RSQL_SQL_ERROR
Except.                CX_SY_OPEN_SQL_DB
Date and Time          06.11.2011 23:34:07



Short text


SQL error 1653 while accessing table "DDPRS".




What happened?


Database error text: "ORA-01653: unable to extend table SAPSR3.DDPRS by 1024 in


 tablespace PSAPSR3"




What can you do?


Please make a note of the actions and input which caused the error.


-





To resolve the problem, contact your


SAP system administrator.





Using transaction ST22 for ABAP dump analysis you can see and


administrate termination messages and retain them for longer periods.


Please make a note of the actions and input which caused the error.


-





To resolve the problem, contact your


SAP system administrator.





Using transaction ST22 for ABAP dump analysis you can see and


administrate termination messages and retain them for longer periods.




Error analysis


An exception occurred that is explained in detail below.


The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught


 in


procedure "WRITE_TABLE_DDPRS" "(FORM)", nor was it propagated by a RAISING


 clause.


Since the caller of the procedure could not have anticipated that the


exception would occur, the current program is terminated.


The reason for the exception is:


Database error text: "ORA-01653: unable to extend table SAPSR3.DDPRS by 1024 in


 tablespace PSAPSR3"




How to correct the error


Internal call code.........: "[RSQL/INSR/DDPRS ]"


Please check the entries in the system log (Transaction SM21).


You may able to find an interim solution to the problem


in the SAP note system. If you have access to the note system yourself,


please use the following search criteria:





    "DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"


    "SAPLSLOG" bzw. "LSLOGF05"


    "WRITE_TABLE_DDPRS"


If you cannot solve the problem yourself, please send the


following documents to SAP:





1. A hard copy print describing the problem (short dump).


   To obtain this, select "System->List->Save->Local File (unconverted)"


   on the current screen.





2. A suitable hardcopy printout of the system log.


   To obtain this, call the system log with Transaction SM21


   and set the time interval to 10 minutes before and 5 minutes after


   the short dump. In the display choose "System->List->Save->


   Local File (unconverted)"





3. If the programs are your own programs or modified SAP programs,


   supply the source code.


   To do this, choose "More Utilities->Upload/Download->Download" in the


   Editor.





4. Details regarding the conditions under which the error occurred


   or which actions and input led to the error.


You may able to find an interim solution to the problem


in the SAP note system. If you have access to the note system yourself,


please use the following search criteria:





    "DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"


    "SAPLSLOG" bzw. "LSLOGF05"


    "WRITE_TABLE_DDPRS"


If you cannot solve the problem yourself, please send the


following documents to SAP:





1. A hard copy print describing the problem (short dump).


   To obtain this, select "System->List->Save->Local File (unconverted)"


   on the current screen.





2. A suitable hardcopy printout of the system log.


   To obtain this, call the system log with Transaction SM21


   and set the time interval to 10 minutes before and 5 minutes after


   the short dump. In the display choose "System->List->Save->


   Local File (unconverted)"





3. If the programs are your own programs or modified SAP programs,


   supply the source code.


   To do this, choose "More Utilities->Upload/Download->Download" in the


   Editor.





4. Details regarding the conditions under which the error occurred


   or which actions and input led to the error.


The exception must either be prevented, caught within proedure


"WRITE_TABLE_DDPRS" "(FORM)", or its possible occurrence must be declared in


 the


RAISING clause of the procedure.


To prevent the exception, note the following:




System environment


SAP Release..... 730


SAP Basis Level. 0000





Application server... "BOE"


Network address...... "192.168.10.93"


Operating system..... "Windows NT"


Release.............. "6.1"


Hardware type........ "8x AMD64 Level"


Character length.... 16 Bits


Pointer length....... 64 Bits


Work process number.. 4


Shortdump setting.... "full"





Database server... "BOE"


Database type..... "ORACLE"


Database name..... "BOE"


Database user ID.. "SAPSR3"





Terminal.......... "DAMA-PC"





Char.set.... "C"





SAP kernel....... 720


created (date)... "Oct 20 2010 01:56:25"


create on........ "NT 5.2 3790 S x86 MS VC++ 14.00"


Database version. "OCI_10201_SHARE, 10.2.0.4.0 "





Patch level. 68


Patch text.. " "





Database............. "ORACLE 10.1.0.*.*, ORACLE 10.2.0.*.*, ORACLE 11.2.*.*.*"


SAP database version. 720


Operating system..... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2, Windows


 NT 6.0, Windows NT 6.1"





Memory consumption


Roll.... 0


EM...... 58657088


Heap.... 0


Page.... 90112


MM Used. 47998624


MM Free. 6463312




User and Transaction


Client.............. 100


User................ "HCL4"


Language key........ "E"


Transaction......... "RSA1 "


Transaction ID...... "9CA108E1DA7DF1079B98E61F13AD0907"





EPP Whole Context ID.... "E61F13AD09071ED1829432A9FA699B98"


EPP Connection ID....... 00000000000000000000000000000000


EPP Caller Counter...... 0





Program............. "SAPLSLOG"


Screen.............. "SAPLRSD_GUI_IOBJ_MAINT 1200"


Screen Line......... 31


Debugger Active..... "none"




Information on where terminated


Termination occurred in the ABAP program "SAPLSLOG" - in "WRITE_TABLE_DDPRS".


The main program was "RSAWBN_START ".





In the source code you have the termination point in line 314


of the (Include) program "LSLOGF05".


The termination is caused because exception "CX_SY_OPEN_SQL_DB" occurred in


procedure "WRITE_TABLE_DDPRS" "(FORM)", but it was neither handled locally nor


 declared


in the RAISING clause of its signature.





The procedure is in program "SAPLSLOG "; its source code begins in line


226 of the (Include program "LSLOGF05 ".



Procedure To Resolve:
Drop the mail to BASIS Consultant.

For me, this is my responsibility in this organization.
Goto the T-Code DB02, check for database overview and segment overview, check the Top Growth monthly. You can find the object taking more tablespace and the usage % here.

Using the BRTools u can increase the tablespace with ease.

Excute brtools at the OS level (command prompt), make sure that u have logged in as ORA<SID> or <SID>adm and proceed as follows

brtools --> 2 - Space management --> 1 = Extend tablespace --> c(ontinue) --> c(ontinue) --> 1 = Extend tablespace --> Select the required tablespace and then proceed accordingly.

You have to ensure that there is enough space available in the disk before u start extending the tablespace. Else the brspace program will fail.