05-08-2006 10:43 AM
I need to execute a report by double-clicking on a line in my ALV list. I want to use the values on the ALV line to populate the selection criteria for the report. After the report is executed, I want to return to the ALV list. Can I execute the report without assigning a transaction to the report?
Thanks for any help.
Sandy
05-08-2006 10:44 AM
Hi,
You can make use of SUBMIT ..... AND RETURN.
Hope this helps.
regards,
Satya
05-08-2006 10:46 AM
Yes, you can. From the double click event you can find the data of the row on which the click has happened.
Use the SUBMIT REPORT statement and pass the parameters values in the SELECTION SET option of the SUBMIT statement.
Regards,
Ravi
Note : Please mark the helpful answers
05-08-2006 11:07 AM
hi assum
you can easily do it
once the double click event is triggered then you can call your report using <b>SUBMIT <report name> AND RETURN</b>.
Cheers,
Abdul
Mark all useful answers...
05-08-2006 11:20 AM
<b>SUBMIT <report name> USING SELECTION-SET <variant name> AND RETURN.</b>
Cheers,
Abdul
05-08-2006 11:17 AM
05-08-2006 11:21 AM
Here is a example with / without selection set
SUBMIT... [VIA SELECTION-SCREEN]
[USING SELECTION-SET <var>]
[WITH <sel> <criterion>]
[WITH FREE SELECTIONS <freesel>]
[WITH SELECTION-TABLE <rspar>].
1. Without selection set
seltab-sign = 'I'. seltab-option = 'BT'.
seltab-low = 1. seltab-high = 5.
APPEND seltab.
SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
WITH paramet eq 'Selection 1'
WITH selecto IN seltab
WITH selecto ne 3
AND RETURN.
2. WITH selection set
wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
wa_rspar-sign = 'E'. wa_rspar-option = 'BT'.
wa_rspar-low = 14. wa_rspar-high = 17.
APPEND wa_rspar TO rspar.
wa_rspar-selname = 'PARAMET'. wa_rspar-kind = 'P'.
wa_rspar-low = 'Selection 2'.
APPEND wa_rspar TO rspar.
wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
wa_rspar-sign = 'I'. wa_rspar-option = 'GT'.
wa_rspar-low = 10.
APPEND wa_rspar TO rspar.
SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
WITH SELECTION-TABLE rspar
AND RETURN.
Regards,
Ravi
Note : Please mark the helpful answers
05-08-2006 11:21 AM
selection-set is variant name.
data: selset type raldb_vari .
there are various of passing values to program thru submit statement.
i would suggest you to look at the ABAP key word documentation.
go to se38 and click on the blue button with "i" on it and entet "submit" in the abap key word filed and hit enter.
Regards
Raja
Reward points to helpful answers by choosing appropriate radio buttons
05-08-2006 11:23 AM
Hai Sandy
Check with the following Document
SUBMIT rep.
Additions
1. ... LINE-SIZE col
2. ... LINE-COUNT lin
3. ... TO SAP-SPOOL
4. ... VIA SELECTION-SCREEN
5. ... AND RETURN
6. ... EXPORTING LIST TO MEMORY
7. ... USER user VIA JOB job NUMBER n
8. ... Various additions for parameter transfer to rep
9. ... USING SELECTION-SETS OF PROGRAM prog
Effect
Calls the report rep . Leaves the active program and starts the new report rep .
Addition 1
... LINE-SIZE col
Effect
Prints the report with the line width col .
Addition 2
... LINE-COUNT lin
Effect
Prints the report with lin lines (per page).
Addition 4
... VIA SELECTION-SCREEN
Effect
Displays the selection screen for the user. In this case, the selection screen is redisplayed after return from the report list display - the user's entries are retained.
Addition 5
... AND RETURN
Effect
Returns to the calling transaction or program after the called program has been executed. SUBMIT ... AND RETURN creates a new internal mode .
Addition 6
... EXPORTING LIST TO MEMORY
Effect
Does not display the output list of the called report, but saves it in SAP memory and leaves the called report immediately. Since the calling program can read the list from memory and process it further, you need to use the addition ... AND RETURN . Also, since the called report cannot be requested for printing, the addition ... TO SAP-SPOOL is not allowed here. You can read the saved list from SAP memory with the function module 'LIST_FROM_MEMORY' and then (for example) store it in the database with EXPORT . You can process this list further with the function modules 'WRITE_LIST' , 'DISPLAY_LIST' ... of the function group "SLST" .
Addition 7
... USER user VIA JOB job NUMBER n
Effect
Schedules the specified report in the job specified by the job name job and the job number n . The job runs under the user name user and you can omit the addition USER user . The assignment of the job number occurs via the function module JOB_OPEN (see also the documentation for the function modules JOB_CLOSE and JOB_SUBMIT . This addition can only be used with the addition ...AND RETURN .
Note
When scheduling a report with the SUBMIT ... VIA JOB job NUMBER n statement, you should always use the addition ...TO SAP-SPOOL to pass print and/or archive parameters. Otherwise, default values are used to generate the list and this disturbs operations in a production environment.
Addition 9
... USING SELECTION-SETS OF PROGRAM prog
Effect
Uses variants of the program prog when executing the program rep .
Note
Important
The programs prog and rep must have the same SELECT-OPTIONS and PARAMETER s. Otherwise, variants of the program prog may be destroyed.
Note
When using this addition, the specified variant vari of the program prog is taken in USING SELECTION-SET vari . On the other hand, all variant-related actions on the selection screen of rep (Get , Save as variant , Display , Delete ) refer to the variants of prog .
Example
SUBMIT REPORT01
VIA SELECTION-SCREEN
USING SELECTION-SET 'VARIANT1'
USING SELECTION-SETS OF PROGRAM 'REPORT00'
AND RETURN.
Effect
Executes the program REPORT01 with the variant VARIANT1 of the program REPORT00 .
Note
Runtime errors
LOAD_PROGRAM_NOT_FOUND : The specified program was not found.
SUBMIT_WRONG_TYPE : The specified program is not a report.
SUBMIT_IMPORT_ONLY_PARAMETER : Only one value passed to a report parameter.
SUBMIT_WRONG_SIGN : Invalid value passed to a selection with the addition SIGN .
SUBMIT_IN_ITAB_ILL_STRUCTURE : Table passed to a selection with WITH sel IN itab had an unexpected structure.
Try with this Example
Data: listobject like abaplist occurs 1 with header line.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1 .
IF sy-subrc <> 0.
message ID '61' TYPE 'E' NUMBER '731'
with 'LIST_FROM_MEMORY'.
ENDIF.
Thanks & regards
Sreenivasulu P
05-08-2006 11:46 AM
Hi,
Please check with the vaiants of SUBMIT statement.
In the user command of doubleclick, this submit statememt is to be included.
Thanks,
Bharadwaj