SAP BW Objects


èThe various structures provided for creating a Data Model in SAP BW are:
l 
1.InfoObjects
2.lInfoCube
3.lODS (Operational DataStore)
4.lMultiProvider
5.lInfoSet

1.InfoObjects
                
è              Business evaluation objects are known in BW as InfoObjects. They are the basic information providers of BW and the smallest information units in BW.
è              They structure the information needed to create InfoCubes/ODS Objects. 
èInfoObject types: 
l             Characteristics
l                      Basic
l                      Time
            l            Technical
l             Key figures


è             Characteristics InfoObjects are business reference objects which are used to analyze key figures such as company code, material, product, customer group.
è
è             Key Figures InfoObjects provide values to be evaluated  such as quantity, amount, or number of items. 

è             Time characteristics are characteristics such as date, fiscal year which are time indicators.
è
è             Units Characteristic are required so that the values for the key figures have meanings. Key figures of type amount are always assigned a currency key and key figures of type quantity also receive a unit of measurement.
è
è            Technical characteristics are used for administrative purposes only within BW. An example of a technical characteristic is the request number in the InfoCube. This is generated when you load a request as an ID and helps locate the request at a later date.
 

Master Data – Attributes, Texts & Hierarchy
          
è Characteristics bear master data (i.e. attributes, texts or hierarchies) in BW. 

è ‘Attributes’ are InfoObjects that are logically subordinate to a characteristic.
 
èTypes of Master Data attributes 
l          Display Attribute – Used for display purpose in report and cannot be used for drill-down and filtering purpose. (for e.g. Material weight or Material colour)
l          Navigational Attribute – Navigational attribute can be used for further analysis in reporting (e.g. Material group, Material class) 

è The description of the characteristic is stored as InfoObject ‘text’.
l          e.g. Material # 1000023456 has a description viz. "Metallic Black Part 1L”. 
è
èA ‘hierarchy’ forms a summarization and grouping for a characteristic according to individual evaluation criteria.
l         e.g. Material can have the 4 levels of hierarchy as Product Category -> Product class-> Material group-> Material. These levels can be used in reporting for further drill down in data 


InfoObject Catalog
      
è          An InfoObject catalog is a collection of InfoObjects grouped according to application-specific criteria
è
è 
Types of InfoObject catalog
l         Characteristic: This is the collection of Characteristics InfoObjects
l         Key figure: This is the collection of Key figures InfoObjects 
InfoCube
        
è         InfoCubes are central objects of multi-dimensional model in SAP BW. Reports and analysis are based on InfoCubes.
è
è         An InfoCube describes an self-enclosed dataset for business-area from a reporting point of view.
è
è         An InfoCube consists of several InfoObjects and is structured according to the star schema.
è
è         An InfoCube is additive in nature, it aggregates data on the basis of characteristics combinations. 
è
èTypes of InfoCubes 
l        Basic
l        Basic InfoCube
l        Transactional InfoCube
l        Virtual InfoCube
l        Remote Cube
l        SAP Remote Cube
l        Virtual InfoCube with Services 
è 
        The characteristics determine the granularity (the degree of detail) at which the key figures are kept in the InfoCube.
è        Characteristics that logically belong together (district and area, for example, belong to the regional dimension) are grouped together in a dimension.
è
è        An InfoCube can have maximum of 16 dimensions (3 dimensions are provided by SAP)
                  i.e. Time, Data Package and Unit). A maximum of 256 characteristics can be included in each dimension.
è
è       Dimension tables should be small with regards to data volume, which is desirable for reasons of performance. 
Transactional InfoCube
      
è         A transactional InfoCube is a special Basic InfoCube, especially developed for SAP SEM.
è         The system accesses data in such a InfoCube is transactional, in other words, data is written to the InfoCube and instantly read again when required.
l        e.g. In BW BPS, users enter plan data via planning layouts which is in turn stored in Transactional InfoCubes.
è        A standard Basic InfoCube is optimized for pure read access and hence not suitable here.
 
 
Virtual InfoCube

        Virtual InfoCubes are special InfoCubes. A virtual InfoCube represents a logical view. Unlike Basic InfoCube, no data is physically stored in BW. The data is taken from the source system only after a query has been executed.
è
è        SAP Remote Cube allows one to define queries with direct access to transaction data in other SAP systems.
è
è       Remote Cube allows reporting using data from non-SAP systems. the external system transfers the requested data to the OLAP processor via the BAPI.
è
è       Virtual InfoCube with Services requires a user-defined function module as a DataSource.
ODS
      
•       An ODS object (Operational DataStore) acts as a storage location for consolidated and cleaned-up transaction data (transaction data or master data, for example) on the document (atomic) level.
•
•      An ODS object contains key fields (for example, document number/item) and data fields that can also contain character fields (for example, order status, customer) and key figures. 
•
•Types of ODS Object 
l     Basic ODS
l     Transactional ODS 
èEvery ODS object is represented on the database by three transparent tables:
l       Active data: A table containing current status of data
l       Activation queue: New data is saved in this table before it is activated. The data in this table is deleted after activation.
l       Change log: Contains the complete (activation) history of the changes to ODS data
 
•

Transactional ODS
        
è      A transactional ODS object differs from a standard ODS object in the way it prepares data.
è
èIn a standard ODS object, data is stored in different versions (active, delta, modified), whereas a transactional ODS object contains the data in a single version. Therefore, data is stored in precisely the same form in which it was written to the transactional ODS object by the application.
è
è     The transactional ODS object is also required by diverse application such as SAP SEM.
è
èTransactional ODS objects allow data to be available quickly. The data from this kind of ODS object is accessed transactionally and read again, as soon as possible.
 
             
 
 
 

E-Mail Validation Using PHP


 E-Mail  VALIDATION

/*email.html*/

<head>
<body>
<title>Email Validation</title>
</head> </body>
<form action ="action.php" method="post" name=one>
<h2> <center>WELCOME TO THE E-Mail Validation</center></h2>
<table>
<tr>
            <td>Enter the E-mail:</td>
            <td><input type="text" name="val" size="30" /></td>
</tr>
</table>
<input type="submit" value ="Check"/>
<input type="reset" value ="CLEAR"/>
</form>

/*action.php*/

<?php
$string = $_POST['val'];
if (eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $string)) {
    echo "<b>".$string."</b>"."  is Valid";
}
else
            echo "<b>".$string."</b>"."  is Not Valid";
?>

Accessing PostgreSQL Database from PHP


  1. <?php
  2. // Initiate the connection
  3. $conn = pg_connect('dbname=<database>');
  4. /*
  5. <database> is the name of your database. It is assumed to reside on the server you are running this code from
  6. Alternatively use something like this:
  7. $conn = pg_connect('host=myserver port=5432 dbname=database user=someuser password=secret');
  8. */
  9. if (!$conn) { // Check if valid connection
  10. // NO, some error occured
  11. echo "Error Connecting to database<br>";
  12. exit;
  13. // add your error handling function here or just exit :)
  14. } else {
  15. // Valid connection, we can go on to retrieve some data
  16. /*
  17. Assume we have a table with user data called user_table
  18. Username Password Userlevel
  19. user1 pass1 1
  20. user2 pass2 2
  21. etc.
  22. 1.) Retrieve all rows and display it in a table
  23. */
  24. $query = "select * from user_table order by Username";
  25. $result = pg_query($conn,$query);
  26. if (!$result) {
  27. // Error on Query
  28. // Your Error code Here
  29. } else {
  30. numrows = pg_numrows($result);
  31. echo "<table>";
  32. for ($i=0; $i < $numrows ; $i++) {
  33. $DataArr = pg_fetch_rows($result,$i);
  34. echo "<tr><td>$DataArr[0]</td><td>$DataArr[1</td><td>$DataArr [2]<td></tr>";
  35. } // For
  36. echo "</table>";
  37. } // Query
  38. } // Connection
  39. pg_close($conn);
  40. ?>