Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Author(s): Anil Kumar Puranam and Ravi Nidamarthi

Company: Deloitte

Created on: 24th December, 2014

Authors Bio:

Ravi Nidamarthi  is an SAP Technology professional with more than 13 years of experience leading SAP BI/ABAP implementations, developing custom applications, and developing IT strategy. He is a PMP certified manager, And also Certified SAP BI solution consultant.

Anil Kumar. Puranam is working as a Senior BW/BI Developer in Deloitte consulting. He has more than 10 years of SAP BW/BI/BO experience. He has worked on various support/implementation projects while working in consulting companies like Deloitte, IBM India, and TCS

How to save the time in the data loads, by avioding the zero records.

As part of Business wareshouse system development, we always look for easy and fast way to complete our day to day activities and different phases of the development and production support. Here are few Utility programs that we can use to make our job easy. In this document we can see one of the areas where we can save the time in the data loads by introducin Custom check.

Index:

Introduction:

          To reach the user requirements on getting the data immediately into BW, we schedule the process chains to trigger number of times in a day. In this process, Sometimes we see no new data is generated in the source system but we see the chains are taking significant time to get complete even though there are zero records. This will be more time taking to complete one cycle, if we have couple number of layers in our data flow. The time to complete on end to end cycle will be impacting back to trigger the next cycle, so we will see delay in getting the next data into BW reporting layers, if the system is busy in completing a cycle even though there is no data to process.

For ex:  as shown in the below screen, we can see that system is taking time to Process zero records. This will impact our Cycle time to bring the data into reporting.


To avoid data loads to further data targets in case of zero records in the PSA load, we can use below concepts in Combine.

  • Use the “Decision between Multiple Alternatives” Process type. So here we use Boolean sort of logic to derive the value.
  • Use the “User defined Functions” in the Decision Process. Here we internally use a Class and method to check and suitable data load requests are available to further data loads.

Let us first see how to define the Use defined functions which can be used in the “Decision between Multiple Alternatives” Process type.

Step 1: Create Class and Method to define the Custom logic.

Go SE18

     --> Select Radio button “BAdI Name”

          --> Enter “RSAR_CONNECTOR”

               --> Click in Display

                    --> Click on menu option “Implementation”

                         --> Select “Create” 

                              --> Enter the Implementation Class. For ex” ZAKS_IMP_CLASS”.

                                   --> Click on Activate. We will see the below Screen.

Step 2: Create the logic(code) for Custome defined formula to be used in the Decission Type process.

The code is attached to this document.

Click on Class ZCL_IM_AKS_IMP_CLASS created in the step 1.

      --> Create a new method "ZERO_DATA_ELIM" method.

          --> Write the logic(code) as shown below and activate it.


Here we are handling 2 Cases:
      Case 1: The source is PSA. So here we use Data source as the source
      Case 2: The source is another Data target. So here we use Cube/DSO as the source.

For the Case 1:  The logic of the code goes as below:
     Action 1: Get the PSA technical name for the combination of Data source and Source system name.


     Action 2: Get the list of data load requests happened to the PSA by using the PSA table name.


     Action 3: Delete the requests from the above list where the status of the requests is either “Error” or :Still Loading” , or “Zero records in it”.
     Action 4: Find the count of requests from end result of the above step.


     Action 5: Pass the above list of data load Requests as Parent RNR into the table RSSTATMANREQMAP along with Data source and Target name to find                     out the count of delta requests .


     Action 6: Compare the count from action 4 and 5.

     Action 7: Decide the value for Export parameter on the basis of Action 6.

For the Case 2:  The logic of the code goes as below:

     Action 1: Find out the list of successful data load requests from the table RSBKREQUEST by passing Source Info provider and Target Info provider.

     Action 2: Find out the latest request loading start time by sorting them on basis of TSTMP_START from the above list.

     Action 3: Find out the list of successful data load requests from the table RSBKREQUEST by passing Source Info provider of our target as the Target. We                     also pass condition on TSTMP_FINISH.  Here the idea is to find out the requests which are loaded to our Source info providers later then data                     pushed from the source info provider to our Target Info provider.

     Action 4: If we find any loaded requests in the source info provider whose loading time stamp is Greater than the latest requests of the Target Info provider, then we pass the information to Export parameter as value 1.

Click on Class ZCL_IM_AKS_IMP_CLASS created in the step 1.

      --> Click on "GET" method of the class.

          --> Write the logic as shown below and activate it.

This code helps the sytem to identify the Class and it's method to be used for each User-Defined Functions in the Formulas can be used in the decission process type.

Step 4: Add a decission process type just before DTP Execution in the process chian.
  •          Here we need to create as many number of Decission process types as equal to number of DTPS  that we use.
  •          And we need to introduce OR General process, to club the DTP and other wing of Decission Process.

        

Step 5: Call the User defined Formula in the decission Process type.

Here we option 1 goes to DTP Execution if there is a valid Data available in the source.

Option 2 goes to directly to OR , if there is no data pending (even Zero records in the PSA request) to push to target.

The formual that we use takes inputs as below:

  •       Source Info provider/Datasource as first operand.
  •       Target Info provider as Second Operand.
  •       Source Type is identified by Third operand.  If third operand value "1" indicates that source type is Datasource.  If third operand value "2" indicates that source type is Info provider.

Result:

We can see the DTP Executions are skipped in case of either we have Zero records in the requests in the source or we do not have any requests at all in the source as shown below.

Advantages:

Here are few advnatages:

  • We can reduce the time elapsed in any end to end cycle of data loads.
  • We can inroduce the concept of loading only required data instead of loading all the data. So that we can fasten the loading. (This is more coveres in the next document).
  • Effectively usage of the availble back ground process for other activities also.
Labels in this area