Skip to Content
Author's profile photo Leonard Tan

Quick Test Data Generation in SAP BW

During development in BW, I’m sure many have come across the situation where we are lacking of test data for testing especially if it’s the source that provide the test data is a new development as well. To save time while waiting for the actual test data to be generated, there’s a program in SAP BW that can generate random test data directly into the underlying InfoCube(s) that is feeding your report or logic.

**Disclaimer: Unfortunately, this random test data generation program only generate data for InfoCube and doesn’t work on DSO or ADSO.

Following are 3 simple steps for quick test data generation so that you can test on the functionality (like variables, key figures, formula and etc) of your report while waiting for the actual test date.

Program Name: CUBE_SAMPLE_CREATE

Step 1 – Go to SE38 and execute the above program

            

 Step 2 – Execute the program with the below info

InfoCube Entry

  • InfoCube Name: Technical name of your InfoCube, if it’s a SPO, remember to enter the technical of the underlying InfoCube and not the SPO Name (for example, SPO: ZABC01, the underlying InfoCube will be ZABC01XX)
  • Number of Data Records to be Generated: Provides the number of Test Data to be generated
  • Fiscal Variant: If you have Fiscal Period to be generated

 

  Input Mode:

  • Generated Values: The program will Immediately generate and display the Test Data
  • Vals from Master Data Table: The program will generate and display the Test Data based on Master Data
  • Read-For-Input ALV: Personally I would recommend this approach as the program will generate the test data based on your preference
    • You can change the value of the table before hitting the save button to generate the test data into the target InfoCube
    • Tip: You can export this structure to excel, manually change all the test data, then copy and paste the values back to the ALV table

 

 

Step 3 – Check the Target InfoCube

Result

Every time the Test Data Generation is executed, you will see a new request being created at your targeted InfoCube. You can always remove this request after your testing.

Hope it helps!

Assigned Tags

      5 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Debraj Ray
      Debraj Ray

      Good one Leonard! Thanks for sharing.

      Author's profile photo Harish Allachervu
      Harish Allachervu

      Informative! actually I used to use RSINPUT tcode for similar purpose..but this program have more functionality.

      Thanks for sharing 🙂

      Regards,

      Harish

      Author's profile photo Aïmad NAMOUSS
      Aïmad NAMOUSS

      Thank you for sharing this tutorial

      🙂

      Kind regards.

       

      Author's profile photo Dominic Bayer
      Dominic Bayer

      For aDSO, there's a program called RSDSO_SAMPLE_DATA

      Please be aware: This program is marked as a SAP internal test program

       

      Best regards, Dominic

      Author's profile photo Raf Boudewijns
      Raf Boudewijns

      Also, this is not really the same as RSINPUT, it just generates random data (whereas you choose which data to enter via RSINPUT).