Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Call the same report

Former Member
0 Kudos

Hi experts,

I have a urgent requirements ......

In the selection screen i have three fields . And i m displaying one alv report for a perticular vendor number .My requirement is when i am double clicking the vendor number then it'll show another output of the same report for different selection criteria ...

plase help its an urgen t.

regards,

Satya

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Satya,

you can use SUBMIT <same report> via selection-screen <with different criteria> (fill the table with your desired options)..

This will on event of double clicking in ALV.

Regards,

Mohaiyuddin

12 REPLIES 12

Former Member
0 Kudos

Hi

It is possible to get same output thru interactive report programming..

but i did not get the question of having different selection screen. Please explain in detail. Do u want to have the selection screen again while the report is still under execution.?

Thank you.

Regards,

Srinivas Rao

Former Member
0 Kudos

Hi

You should identify the common functionality. Put the logic to display the report in one subroutine. Pass necessary values to this routine. On double click command you can call the same subroutine.

Regards,

Pratiksha.

Former Member
0 Kudos

I'm not sure but this sample program is very near to your requirement...

http://abapprogramming.blogspot.com/2007/11/alv-interactive-report-sample-code.html

nivin_varkey
Active Participant
0 Kudos

HI,,pls..tell me ur exact requiement..i have done such kind of reports..i may be able to help..but tell me the requirement and flow of the program,..

thanks,

Nivin

0 Kudos

Hi navin,

Thanks for the replay .Actually i have to diaplay one alv list base on the vendor number and three field i.e.

sortart:

verdicht:

rastverd:.

Now alv list is coming correctly .Now my requirement is : when i double click on the vendor number then it'll show another list which is the output of the same vendor number with the following parameter:

sortart:1

verdicht:0

rastverd:.0.

so can u please help me out for this

Its a very urgent

Regards,

Satya

0 Kudos

is this

sortart:1

verdicht:0

rastverd:.0.

always a constant input for the the double clicked report call??

0 Kudos

This question is solved my me only

Edited by: satya pujahari on May 9, 2008 12:16 AM

0 Kudos

thanks

Former Member
0 Kudos

Hi Satya,

you can use SUBMIT <same report> via selection-screen <with different criteria> (fill the table with your desired options)..

This will on event of double clicking in ALV.

Regards,

Mohaiyuddin

0 Kudos

Thansk Mohaiyuddin,

for the quick replay .But in my selection screen there are lot of input field and i am displaying the second list based on those four field.

so dose it work if i do according to u.....

small confusion please make me clear .

Regards,

satya

0 Kudos

Hi Satya,

Use FM

RS_REFRESH_FROM_SELECTOPTIONS to read all parameters you have entered on current selection screen..

loop at internal table you get from above FM and modify those 4 values which you are interested in...Then use SUBMIT...VIA SELECTION SCREEN...WITH SELECTION SET <modified RSPARAMS internal table from above logic>..

Regards,

Mohaiyuddin

Former Member
0 Kudos

hi

this code is also for the same thing follow the code

it will be help ful

\

&----


*& Report Z_SWAS_FUNCTIONAL

*&

&----


*&

*&

&----


report z_swas_functional.

tables: qmel,viqmel,iloa,afko.

--


global data declerations--

data: ok_code like sy-ucomm,

gt_itab type table of zfunctional,

t_output type table of zfunctional,

g_container type scrfname value 'CUSTOM_CONTROL',

grid1 type ref to cl_gui_alv_grid,

g_custom_container type ref to cl_gui_custom_container,

e_row type lvc_s_row,

e_column type lvc_s_col,

es_row_no type lvc_s_roid.

*CLASS DECLARATION

class z_functional definition.

public section.

class-methods : handle_double_click

for event double_click of cl_gui_alv_grid

importing e_row e_column.

endclass.

*CLASS IMPLEMENTATION

class z_functional implementation.

method handle_double_click.

perform handle_double_click using e_row e_column es_row_no.

endmethod.

endclass.

*******************************************************************

*CODE FOR SELECTION SCREEN

*******************************************************************

selection-screen begin of block 84433 with frame title text-t01.

parameters : n_number like viqmel-qmnum as listbox visible length 10,

n_type like qmel-qmart,

f_loca like iloa-tplnr,

name like qmel-qmnam.

selection-screen end of block 84433.

************************************************************************

  • screen validation event *

************************************************************************

at selection-screen on n_number.

select single *

from viqmel

where qmnum eq n_number.

  • if sy-subrc ne 0.

  • MESSAGE 'NOTIFICATION NUMBER DOESNOT EXIST' TYPE 'E'.

  • endif.

*

*

  • select qmart from qmel into qmel where qmart eq N_TYPE.

  • endselect.

  • if sy-subrc ne 0.

  • MESSAGE 'NOTIFICATION TYPE DOES NOT EXIST' TYPE 'E'.

  • endif.

*START OF SELECTION EVENT

start-of-selection.

perform fetchdata.

end-of-selection.

*Call screen event

call screen 100.

*PERFORM DISPLAY.

&----


*& Form FETCHDATA

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form fetchdata .

*

*SELECT VIQMEL~QMNUM VIQMEL~QMTXT VIQMEL~QMDAT VIQMEL~LTRMN VIQMEL~PRIOK

  • VIQMELBEZDT VIQMELAUFNR VIQMELTPLNR AFKOGLTRP into corresponding fields of table GT_ITAB

  • FROM VIQMEL INNER JOIN AFKO ON VIQMELAUFNR = AFKOAUFNR

  • WHERE VIQMELQMNUM IN N_NUMBER and VIQMELQMART IN N_TYPE AND VIQMEL~QMNAM IN NAME.

*

call function 'ZSWAS_TEST'

exporting

qmnum = n_number

qmart = n_type

tplnr = f_loca

qmnam = name

tables

output = gt_itab

.

if sy-subrc ne 0.

message e000(z84433_msg_class).

endif.

endform. " FETCHDATA

&----


*& Module STATUS_0100 OUTPUT

&----


  • text

----


module status_0100 output.

set pf-status 'MAIN'.

  • SET TITLEBAR 'xxx'.

*creating custom container and grid instance

if g_custom_container is initial.

create object g_custom_container

exporting container_name = g_container.

create object grid1

exporting i_parent = g_custom_container.

call method grid1->set_table_for_first_display

exporting

i_structure_name = 'ZFUNCTIONAL'

changing

it_outtab = gt_itab.

*set handler events

set handler z_functional=>handle_double_click for grid1.

endif.

endmodule. " STATUS_0100 OUTPUT

&----


*& Module USER_COMMAND_0100 INPUT

&----


  • text

----


module user_command_0100 input.

case ok_code.

when 'EXIT'.

perform exit_program.

endcase.

clear ok_code.

endmodule. " USER_COMMAND_0100 INPUT

&----


*& Form EXIT_PROGRAM

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form exit_program .

leave program.

endform. " EXIT_PROGRAM

&----


*& Form handle_double_click

&----


  • text

----


  • -->P_E_ROW text

  • -->P_E_COLUMN text

  • -->P_ES_ROW_NO text

----


form handle_double_click using e_row type lvc_s_row

e_column type lvc_s_col

es_row_no type lvc_s_roid.

data: t_output type zfunctional.

read table gt_itab into t_output index e_row-index .

if sy-subrc = 0 and e_column-fieldname eq 'QMNUM'.

set parameter id 'K01' field t_output-qmnum.

call transaction 'ZSMART' and skip first screen .

endif.

endform. " handle_double_click

thanks s

swaroop