Sie sind auf Seite 1von 12

Beginners Guide to Real Time Data Access via Web Services in SAP NW-BI

By Arun Bala Ganesan, Wipro Technologies


Some organizations require making decision based on real time up to-date details regarding certain process or product information. For Example: Stock markets, Communications, Defense, Aeronautics, Supply chain management etc. Here each of and every transaction data matters the most in making a decision at a priority level, and its very crucial to transfer data to the reporting side at shorter & regular intervals. RDA: Extracts data from BW with a high frequency from source systems & migrates it to BI system. Real time data acquisition which supports tactical decision-making is a framework for deriving information from data as data becomes more complex. Frequency is data transfer is quite high. Follows regular type of data transfer, where extracted data runs through extraction & transformation process. Although not true real-time, data transferred is physical data

Example: RDA using SAP Service API

RDA in Extraction Layer

The core of RDA is the SAP Source systems. Other source systems can be linked to the concept of RDA only if they act as a Web service and transfer data via SOAP messages to SAP BI.

Figure I: RDA in Extraction Layer For SAP systems, the data sources that need to be connect by RDA need to be explicitly marked as 'Real time enabled'. For Generic Data sources, you can specify if a data source is able to handle accesses in real-time or not. The decision if a Generic Data source needs to be marked as real time enabled depends, how generic deltas are created. Condition 1: The delta defining fields should enable a high performance access to new/modified data. I.e. delta defining field must be selective & must be max. Affected by different values Condition 2: If there is a recent extraction, identification of the relevant data records from delta creation must contain only those recent data records.

Via the SOAP services, the SOAP messages are directly written to the PSA level of the data source. Hence, the messages don't find a way into BI through extraction process. So a BI system does not require executing the extraction, but only the PSA data, which is further processed in the delta procedure.
Process Steps

Go to RSA1, and follow the steps as below. This is a DSO which has been copied from the cube. The name for this source DSO: DSO_SLS. The target DSO has a name: DSO SOAP (Technical Name: C_DSO_SO) Now, In Info provider section we can view the DSO's structure. It has got the following fields. Primary Key fields - Customer ID (TCS CUSTID; Technical Name is TC_CUSTID) & Material ID (TCS MATID; Technical Name is TC_MATID). Data Fields is Quantity (TCS_QTY; Technical Name is TC_QTY) & its Unit of measure (0UNIT) Go to DSO Settings & choose 'Select Type'.

There are 3 options in the DSO level to choose its type. We choose to play safe with Standard DSO.

It should be noted that this DSO will have unique fields. That means no data must be repeated. Go to Data sources & we choose 'XML'. This option helps us choose the type of Data source we intend to use. It could be 'FLAT FILE', 'SAP...' or 'XML' etc. Since we are using WSDL demo, we'll choose XML for now. In 'Data Sources', we need to create the Application Component Area. We create an AC Area & provide its long description also in this step. In this step, under the newly created Application Component Area, we create a 'Data Source'. In short all DS are just objects & are collected under this Application Comp. Area, which is a sort of 'folder' for these objects.

Here, as illustrated, we name the data source using a name, describe its Source system as XML_DATA & its to be noted that we are using a data source which utilizes 'Transaction Data' perfect for reporting purposes. XML_DATA is the source system, as XML is very light weight & is currently used widely in Web Services. Here, in the 'Extraction' field, we have an adapter option, where we must choose to use a push service. So we must choose 'Web Service (Push)'. As for as extraction is concerned for this data source its never a problem specifying the file names, header rows, columns to be ignored etc. When using Web service its tad simpler as compared to 'Load Data from Flat Files' following these issues. But by any means, XML can handle only limited data & has its own pros & cons. This is the next tab, Proposal tab where we must specify the fields for use.

So we need to copy these from the DSO structure of previous source DSO, which is DS_SLS. Now that we have copied, they are pasted as in order. Save & Activate. Now, Save and activate the new structure. There's a dialog box displaying an information 'R3TR generated changes possible'. Now that the Data source has been successfully created & activated, we can refresh & find if its activated or not; after a refresh, we can notice the 'Active' Version of the Data source.

Creation of IP: We now create an IP. Right click DS & choose option "Create Info Package". Enter a description for this IP & Click Save. Click 'Yes'

Finally the Info package has been created. We can notice the technical name of the IP starts with "ZPAK...... Now, we need to migrate to the reach the Web administration. From here we can directly go to 'Web Service Administration' or use TCODE WSADMIN. But for now we move on to create the entire data flow structure, further which we can transfer data from portal to Info providers (like DSO) via IP & DTP

This is an optional step. Go to WSADMIN to view the URL, Web service Key, Release Text, WS Definition etc. Also dont assign IP at this stage. Creation of Transformation: Right click the DSO & choose the option "Create Transformation". This will now create a transformation to map source(s) & target(s). Create Transformation: This has the Source & Targets. Here the source object is the Data source (DS_XML_CSK) & the source system is XML_DATA. Now, the target object is of type "Data Source Object" (DSO SOAP; Technical Name: C_DSO_SO). In the transformation level, we have mappings between the source Data source & the target DSO. Creation of DTP: At this step we create a DTP. Right click on & choose the option "Create Data Transfer Process..."

Fig.1.22 - As earlier, we need to choose setting of the options - DTP Type: "DTP for Real Time Acquisition" & Source is Data source (DS_XML_CSK); Target is DSO (DSO SOAP; Technical Name: C_DSO_SO. Notice the 'Execute' option is disabled. The DTP is now in 'Modified' state, so it must be activated. Now, we can notice the Version is now 'Active' & Mode: 'Processing Mode for Real-Time Data Package'. Even after Activation, the 'Execute' option would not be enabled, because it must be handled by a daemon. So, we go to RSRDA, where we create a daemon.

Create a daemon in RSRDA, using key F5 or clicking 'Daemon' command button. Now, enter the Daemon #, Short Description and Interval Period [1 min]. After this click on 'Save'. We can notice the nodes which are all daemons. Here we our Data sources (DS_XML.... etc) under the category 'Unassigned Nodes. Now right click the corresponding DS & choose an option to 'Assign Daemon' to a particular daemon 'node'.

Here we assign the daemon ID [For instance: Daemon ID #07 has been assigned for this data source]. Now, that we have assigned the DS to this daemon 'node', we cannot start unless we have DTP also. Note: Info package is visible; its technical name comes in handy as it starts with 'ZPAK.......'. At this point, we have to assign the DTP also for data transfer. Here we have right clicked on the DS & choose the option 'Assign DTP'. Notice the message 'DTP assigned to Info Package', which means its a successful procedure. Now, its time to begin the daemon process: Here we right click the daemon & choose the option 'Start Daemon with all Info packages...'

Fig.1.33 - The batch job has been planned for the IP & the job is started when batch job is free. Notice the change in the # of records in upload & the 'Last Upload' time.

Go to DS level & click on 'Web Service Administration'; In Web service administration page, Choose the corresponding web service (Here its /BIC/CQDS_XML_00003000) Choose the option 'Web Service Homepage' or use Ctrl + F8. Choose the option - 'RPC Style' in Settings for WSDL Generation & click OK.

Login the web portal with user name & password. Notice the details of the web service [As in example for /BIC/CQDS_XML_00003000]. We have the WSDL details, description, UDDI publications, Features etc. On viewing these details, we navigate to the page which handles the 'Operations' for the /BIC/CQDS_XML_00003000. Clicking on the /BIC/CQDS_XML_00003000's operation would lead us to this page. Here we need to key in details of the Database via portal, which is formatted using XML. Here we can notice the details are entered as - [Mat.ID, Cust.ID, Quantity, Unit] E.g. for a sample data is like - [MX3330, CX3330, 343, KG]. Notice the time-out for this is 60 seconds as created for the daemon. After clicking 'Submit', the data is processed & sent to the recipient.

Now in WSADMIN, we can notice the change in 'Records in Upload' as 1, and it took exactly the correct transfer as assumed. Hence its successful.

Go to RSA1, and we must right click the DSO & choose the option 'Display Data'. Perform the 'Field selection Output' function for details necessary for user. Successfully all details have been updated to DSO from the portal via a web service.