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 report

Former Member
0 Kudos

In my requirement, main report contains 3 radiobuttons for 3 different reports. i am using Submit statement for these 3 reports. These 3 reports have to be executed in sequence otherwise a warning message has to be displayed. Pls give logic to implement same.

Regards,

Zakir

11 REPLIES 11

former_member223537
Active Contributor
0 Kudos

Hi,

if r_button1 = 'X'.

submit ...

elseif r_button 2 = 'X'.

submit ...

elseif r_button3 = 'X'.

submit....

endif.

<b>Program accessed</b>

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.

Best regards,

Prashant

Former Member
0 Kudos

Hello,

Can you more elaborate on your requirement. If you are going to select one radiobutton than based on that one report will be called Or everytime you want to execute the all the three reports.

Thanks,

Mohit

0 Kudos

Thanks for replay.

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.

Former Member
0 Kudos

Hi Zakir,

You should write the logic if there is any error we will correct it.

Regards,

Atish

0 Kudos

Thanks for replay.

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.

Former Member
0 Kudos

your Qu is not clear

if you have 3 radiobuttons for 3 different reports.

then at a time only one radio button get selected so one report will get generated

If you want to say that for 3 diffrent radio buttons have 3 reports but with diffrent order

then for each radio button write the SUBMIT statement with that order

because at a time only one radio button will be active.

Rewards if useful................

Minal

0 Kudos

Thanks for replay

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.

Former Member
0 Kudos

The Best Solution will be ..

loop at screen..

develop a logic to disable the other two radio buttons as per the user user selection

if non of the radio is selected then

1-enable 2&3 disable

if radio 1 is selected

2 - enable

1&3 disable

and so on..

No Reawards plz//

Former Member
0 Kudos

Hi Zakir,

If I have understood you correctly, you want to execute the three reports in a sequental manner from the main report and for which you want the user to select the 3 radio buttons in that order.

For this to achieve,it is best to first write the code for the main report and use the submit in this and display the selection screen for the second report.In this second report,write the code for the functionality you want and then write submit to go to the third report and so on.

Why do you want the user to select the radio buttons in a sequental manner and then display the warnng message,I think this does not solve your purpose.

Hence,the best way is to call the reports one after the other by using the Submit statements and passing the input parameters for the next report along with the submit.In this case,there is no scope for human error.

In case you have any further clarifications,do let me know.

Regards,

Puneet Jhari.

0 Kudos

Hi Puneet,

Execution of reports in sequence is must. becoz user may select 2nd radiobutton and try to execute that report. To avoide this according to our requirement, execution in sequence is must. pls suggest logic.

Thanks in advance.

zakir.

0 Kudos

Hi Zakir,

In that case,what you can do is,write the code for the first report and on the selection screen of it,make all the 3 radio buttons active.If the user selects either the 2nd or the 3rd radio button,display an error.If the user selects the first radio button,write the code for the functionality that you want.

Once the first report has been executed,write the submit statement for the second report and in the second report's code,write the code for the selection screen and again make the 3 radio buttons active.Now in this report,if the user selects either the 1st or the 3rd radio button ,display an error.If he selects the 2nd radio button,write the functionality for the report AND SO ON............................

I know you will have some of the redundant code but I think there is no option left apart from this.

I hope it is clear.

In case you have any further clarifications,do let me know.

Regards,

Puneet Jhari.