Skip to Content

SAP query - Drill down


Is it possible to create a drill down report

using SAP query(SQ01)'s "Data retrieval using External program" option?


Is it possible only with logical database or table /join



Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2005 at 06:27 AM


    what about your first thread?

    let us assume like this

    first report displays all the sales order header details

    if you click the sales order the second one need to populate item details

    1. create a first query & infoset with data retrieval by program

    in the first quey we need to retrieve the sales order number which is selected by user, in the first query program you add the logic like below

    at user-command.

    l_case = sy-lisel+1(8).

    l_vbeln = sy-lisel+23(1o).

    • or you can use get cursor field also

    if l_case = 'Sales order'.

    set parameter id 'VBELN' field l_vbeln.

    call transaction 'ZSecondreport' and skip first screen.


    2. create a infoset by table join for a second query with parameter/select option (sales order number)

    and create a tcode for the query ( say ZSecondreport ) this is called from first query.

    I hope this will work.


    normally if its complex we can go for normal report instead of query



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 28, 2005 at 06:53 AM

    Hi Beena, With report-report interface you can organize drill-down report for any type SAP Query report. When editing your report select menu command 'Goto -> Report assignment'. There you can specify report-receiver which will act as a details report when double-clicking on a line of your first report. Report-receiver can be also a SAP query report, or a transaction, or an executable program.

    At run time SAP Query engine will find receiving fields of the receiver report (e.g. selection screen parameters, or starting screen fields of transaction) by several attributes (by name,by domain, by SPA/GPA parameters, etc.) and afeter feeding them with source data it will execute report-receiver.

    Though there are some transactions (e.g. MM01/MM02/MM03) which cannot be used via report assignments as they have no starting screen - for example MM01/MM02/MM03 just call some dialog module without any screen.

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Sasi,

      Suppose your first report shows a list of sales orders, then you definitely have a field with domain VBELN. Second report will also have a field with the same domain at its starting screen (say transaction VA03 or whatever). In that case report-report interface will successfully pass an order number from first report to the second one. Moreover - it will skip the first screen of the second report.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.