cancel
Showing results for 
Search instead for 
Did you mean: 

SAP query - Drill down

Bema
Active Participant
0 Kudos

Hi,

Is it possible to create a drill down report

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

OR

Is it possible only with logical database or table /join

regards,

Beena

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

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.

endif.

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.

note:

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

cheers,

sasi

Answers (1)

Answers (1)

sergey_korolev
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

hi sergei,

how to pass the value to the second report, as like i stated above if user select the sales order number the second report only displys the corresponding sales order item details

cheers,

sasi

sergey_korolev
Active Contributor
0 Kudos

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.