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: 

Submit reports in main report.

Former Member
0 Kudos

Hi everybody,

My requirement is such that, I have 3 reports and Main report. whenever main report is executed, a selection-screen with 3 radiobuttons will appear. when user select first radiobutton and execute, control leads to respective reports selection-screen. like this when user select remaining radiobuttons and execute the selection-screen of respective report should come. here condotion is, user has to select radiobuttons in sequence and execute them (i.e. first report 1, next report 2, and at last report 3). Otherwise a warning message should be appeared. I am uasing SUBMIT and if conditions. But the warning message doesnt come accordingly. pls suggest logic.

regards,

zak.

4 REPLIES 4

varma_narayana
Active Contributor
0 Kudos

Hi..

DATA : FLAG .

Parameters : r1 radiobutton group g1.

Parameters : r2 radiobutton group g1.

Parameters : r3 radiobutton group g1.

AT SELECTION-SCREEN.

CASE 'X'.

WHEN R1.

SUBMIT ZREP1 VIA SELECTION-SCREEN AND RETURN.

FLAG = 'A'.

WHEN R2.

IF FLAG = 'A'.

SUBMIT ZREP2 VIA SELECTION-SCREEN AND RETURN.

FLAG = 'B'.

ELSE.

message 'Execute Report1 First' type 'E'.

ENDIF.

WHEN R3.

IF FLAG = 'B'.

SUBMIT ZREP3 VIA SELECTION-SCREEN AND RETURN.

FLAG = 'C'.

ELSE.

message 'Execute Report2 First' type 'E'.

ENDIF.

ENDCASE.

reward if Helpful.

JozsefSzikszai
Active Contributor
0 Kudos

hi Zakir,

user has to run always each report in order?

thanks

ec

Former Member
0 Kudos

Hi,

if r_button1 = 'X'.

submit ...

elseif r_button 2 = 'X'.

submit ...

elseif r_button3 = 'X'.

submit....

endif.

Program accessed

REPORT report1.

DATA text TYPE c LENGTH 10.

SELECTION-SCREEN BEGIN OF SCREEN 1100.

SELECT-OPTIONS: selcrit1 FOR text,

selcrit2 FOR text.

SELECTION-SCREEN END OF SCREEN 1100.

...

Calling program

REPORT report2.

DATA: text TYPE c LENGTH 10,

rspar_tab TYPE TABLE OF rsparams,

rspar_line LIKE LINE OF rspar_tab,

range_tab LIKE RANGE OF text,

range_line LIKE LINE OF range_tab.

...

rspar_line-selname = 'SELCRIT1'.

rspar_line-kind = 'S'.

rspar_line-sign = 'I'.

rspar_line-option = 'EQ'.

rspar_line-low = 'ABAP'.

APPEND rspar_line TO rspar_tab.

range_line-sign = 'E'.

range_line-option = 'EQ'.

range_line-low = 'H'.

APPEND range_line TO range_tab.

range_line-sign = 'E'.

range_line-option = 'EQ'.

range_line-low = 'K'.

APPEND range_line TO range_tab.

SUBMIT report1 USING SELECTION-SCREEN '1100'

WITH SELECTION-TABLE rspar_tab

WITH selcrit2 BETWEEN 'H' AND 'K'

WITH selcrit2 IN range_tab

AND RETURN.

Former Member
0 Kudos

The best way to restric is disable the radio button...

at selection screen output..

loop at screen

if none of the radio is selected then

1- enable

2&3 disable

if radio1 is selected

2 - enable

1&3 disable

no rewards Plz.