10-11-2010 7:27 AM
Hi,
We have one SAP query report, in output, there are fields like BKPF-BUKRS, BKPF-BELNR, and BKPF-GJAHR. So if i click on that record, i would like to drill down to report to document display level using tcode FB03.
For FB03, above mentioned fields are enough as selections.
I hope we need to insert some code in infoset of query report. in SQ02, there are few code sections are there.
So can anyone tell me the exact code and where it need to be inserted in SQ02 coding sections?
Regards,
Srinu.
10-11-2010 3:52 PM
You don't need to modify the InfoSet for that. You can assign a query hotspot for a transaction within the query definition itself:
Goto -> Report assignment -> Insert row -> Other report type -> Transaction -> FB03.
The generated code will handle selecting the appropriate fields from the output for the transaction call and display the document accordingly.
10-12-2010 7:18 AM
Hi Brad,
This is Awesome solution.
I did as you told for my 3 query reports. Out of them, 2 are working fine. But a small issue with third query report,.
I have output fields EKPO-EBELN and EKPO-EBELP. So for this query output, if i have only one record in output, it is working fine as it is passing the EBELN correctly and displaying the purchase order using ME23N. But if more than one record is there in the output, system is showing display of a purchase order, which is called in the last instance, where single record exists.
Please guide to resolve as i am expecting like, when i click on a row, system should pass both EBELN and EBELP and display the purchase order with position the cursor respect to EBELP in item level and with tab purchase order history in item details section.
Is it possible?
Regards,
Srinu
10-12-2010 3:21 PM
Unfortunately, the query hotspot approach won't work for that; it only works for direct transaction calls. The annoying part about ME23N, being an Enjoy transaction, is that it always displays the last PO viewed and you have to use the menu to get the PO that you need. You could use ME23 but you'd lose the enjoy functionality and you still could not control the item view. You have some limited control with your own Z-transactions or by using an ABAP program instead of a transaction.