2009 Feb 23 12:45 AM
Hi,
I am able to attach 2 transactions (e.g. MM03 and ME23) to my SAP Query through report assignment. My question is how do I skip the selection screen that asks me if I want to Display Material or Display PO?
What i want to happen is in my report, if I click on the material - MM03 is called and if I click on the PO, ME23 is called.
Is this even possible through queries?
Cheers.
2009 Feb 23 4:08 AM
Hi DGE,
Try using this in program.It might help!
SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN no-display.
This will skip the selection screen.
Much Regards,
Amuktha.
Hi,
I am able to attach 2 transactions (e.g. MM03 and ME23) to my SAP Query through report assignment. My question is how do I skip the selection screen that asks me if I want to Display Material or Display PO?
What i want to happen is in my report, if I click on the material - MM03 is called and if I click on the PO, ME23 is called.
Is this even possible through queries?
Cheers.
2009 Feb 23 1:21 AM
try to use this as a reference:
AT LINE-SELECTION.
GET CURSOR FIELD FILD_NAME VALUE F_VALUE.
case FILD_NAME.
when 'IT_VAL-INCOST'.
clear: idstr.
idstr = sy-lisel+0(12).
perform view_doc.
when 'IT_DOC-EBELN'. " calling the ME23N that will directly view the documents
SET PARAMETER ID 'BES' FIELD F_VALUE.
CALL TRANSACTION 'ME23N' and SKIP FIRST SCREEN.
endcase.
you can get the parameter ID by pressing F1 on the active field of the certain transaction.
Regards,
Mon Magallanes
2009 Feb 23 2:56 AM
Thanks for replying.
I did as suggested and added the following at the start of my code.
AT LINE-SELECTION.
GET CURSOR FIELD FILD_NAME VALUE F_VALUE.
I set a breakpoint in AT LINE-SELECTION and when I executed my query, it wasn't passing through it.
When I removed the line AT LINE-SELECTION, it passes through GET CURSOR FIELD, but FILD_NAME is not populated. It's blank.
Below is my code at the moment:
data: fild_name(30), F_VALUE(50).
*AT LINE-SELECTION.
GET CURSOR FIELD FILD_NAME VALUE F_VALUE.
if fild_name = 'MAT'.
PARAMETERS P_MATNR LIKE MARA-MATNR. "DD ref. as in MM03
SET PARAMETER ID 'MAT' FIELD P_MATNR. "ID for MARA-MATNR
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
endif.
Appreciate any help.
2009 Feb 23 4:08 AM
Hi DGE,
Try using this in program.It might help!
SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN no-display.
This will skip the selection screen.
Much Regards,
Amuktha.
2009 Feb 23 7:55 PM
Thanks for replying.
I understand how the code below could work with an ABAP program; however I'm not sure how SUBMIT would work with SAP queries (which is what my report is). Could you elaborate?
2009 Feb 23 9:49 PM
DGE, I think you cannot submit to two transactions from one Adhoc Query as the parameter to be passed to the transaction is whole row you can click anywhere on the row to call the transaction, not 100% sure though. I hope you already know the [Report Assignment|/people/shafiq.rehman3/blog/2008/06/16/sap-adhoc-query-sq01-sq02-sq03]
2009 Feb 23 9:59 PM
Hi Shafiq - yes I am familiar with report assignment. That is the initial set-up that I created, but what I wanted to happen is that:
a. from the query clicking on the material field leads me to MM03 and
b. from the query clicking on the PO field leads me to ME23.
I want to do away with the selection screen that comes up when I assign 2 or more transaction/report/etc in Report assignment.
Thanks for replying.
2009 Feb 23 11:22 PM
hmmmm .. I tried to debug the thingy and could not find the right hook.
This will not work, but will give you some hints which might give you or some guru some idea.
Create an empty program with a breakpoint in it. Assign it through Report Assignment and then execute the query, it will stop in the program and then hit F5 to jump into the standard program. There you will see that you just passed through this line:
SUBMIT (i_repid) AND RETURN WITH SELECTION-TABLE i_t_params.Now I tried to see whats inside i_t_params, it seems like it can hold the row and column where the user clicked. But, somehow it was empty for me. If this has some information for you then I guess you can look at how to call your prefered tcode from it.
Sorry, could not actually help you. But it is an interesting question that you raised.
2009 Feb 23 11:58 PM
Hi Shafiq - Unfortunately it was empty for me too. Thanks for all the help
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |