Skip to Content
Author's profile photo RUSHIKESH YEOLE

Read Query Output using ABAP (To Overcome APD constraints)

Dear All,

Many times, we require to capture BW query output for calculation and Analysis purpose [Especially Results Rows]. Analysis Process Designer (APD) functionality is used for this.

If the query contains SUMCT, SUMRT functions, then it is difficult to capture correct query results using APD.

To overcome this, ABAP utility/Simple ABAP code has been written. This will capture query output including RESULT rows and characteristics descriptions in output. On that, we can perform operations such as capture and update to write optimized DSO or display in ALV.

Program code has been attached for reference.

Your thoughts/Suggestions are welcome.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi, there is a standard function module available "RRW3_GET_QUERY_VIEW_DATA" .Is there any added functionality in the custom program ?


      Author's profile photo RUSHIKESH YEOLE
      Blog Post Author


      Thanks...I have used same FM to capture data. Data has been converted as per the Query output structure.

      Main purpose is to convert as per query format and use it for further calculations.

      Author's profile photo Benedict Venmani Felix
      Benedict Venmani Felix

      Nice, but I see the DSO name is hard coded in the program 🙂 . Making it a input parameter with error handling for incompatible fields would be good to have.


      Author's profile photo RUSHIKESH YEOLE
      Blog Post Author

      Yes, It can be more dynamic. Based on customer requirements, Query output will be converted and  DSO structure can be designed; and it will vary. So I have just added sample code.

      Author's profile photo Frederick Frein
      Frederick Frein



      Do you know where I would find the Program code?

      Author's profile photo RUSHIKESH YEOLE
      Blog Post Author



      I think Attachments have been removed by SCN. I will try to attach again. regret for inconvenience caused.

      Author's profile photo Rashmi Khemani
      Rashmi Khemani

      Hi Rushikesh,

      Were you able to attach the document again by any chance?



      Author's profile photo Sarmistha Mishra
      Sarmistha Mishra



      How can I find the program code. I am in a similar situation where we want to fetch the result rows of the query as SUMCT functions are used. Appreciate your help.