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: 

At selection-screen on radio button.

Former Member
0 Kudos

Hi ,

I wrote a prog. for radio button. The aim of the prog. is: there should be 2 radio buttons on the selection-screen, by clicking the 1st radio button it should display an ALV report and by clicking the 2nd radio button it should display an Interactive report and the two reports must have selection screens.

Everything is fine, but one prob. is when am clicking the BACK button in any of the report display, it is not taking to the radio-button selection-screen, directly it is taking to the source code. Suggest me how i hav to write the code : when am clicking the back button in any one of the report, the cursor should take me to the radio-button selection-screen.

Source Code:

report z_test1234 .

selection-screen begin of block b1 with frame.

parameters: r1 radiobutton group rad1 default 'X',

r2 radiobutton group rad1.

selection-screen end of block b1.

At selection-screen on radiobutton group rad1.

if r1 = 'X'.

submit z_alv_94 via selection-screen.

endif.

if r2 = 'X'.

submit z_94_ireport via selection-screen.

endif.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Try using the RETURN addition in the SUBMIT statement.

See help of submit statement for more details.

Regards

Arun

10 REPLIES 10

Former Member
0 Kudos

Hi,

Try using the RETURN addition in the SUBMIT statement.

See help of submit statement for more details.

Regards

Arun

Former Member
0 Kudos

hi,

plz try this

selection-screen begin of block b1 with frame.

parameters: r1 radiobutton group rad1 default 'X',

r2 radiobutton group rad1.

selection-screen end of block b1.

At selection-screen on radiobutton group rad1.

if r1 = 'X'.

submit z_alv_94 via selection-screen and return.

endif.

if r2 = 'X'.

submit z_94_ireport via selection-screen and return.

endif.

The AND RETURN addition determines the object accessed by the runtime environment after program access is completed:

Without the AND RETURN addition, the internal session of the program accessed replaces the internal session of the calling program in the same position in the call sequence. Once program access is completed, the system returns to before the position from which the calling program was started.

As of Release 6.10, the content of the system field sy-calld at SUBMIT is copied by the calling program without AND RETURN. Before 6.10, the system entered the value "X", which was incorrect when the program was accessed from the first program in a call sequence.

The addition AND RETURN starts the executable program in a new internal session. The session for the calling program is retained. Once program access is completed, program execution for the calling program continues after the SUBMIT statement.

plz reward points if helpful.

Former Member
0 Kudos

JUST COMMENT At selection-screen on radiobutton group rad1. IT WILL WORK INSTEAD OF THAT YOU CAN GIVE START-OF-SELECTION.

REGARDS

SHIBA DUTTA

0 Kudos

Thanx. a Lot.

0 Kudos

Thanx. A Lot

Former Member
0 Kudos

Hi,

If you write that code, then it will behave like that only, you need to change the logic, or just create Pushbutton and give the name as Report Display, and write the code, if the USer press the Push button then only give the output.

At selection-screen.

If SY=UCOMM = 'PUSH'.

if r1 = 'X'.

submit z_alv_94 via selection-screen.

endif.

if r2 = 'X'.

submit z_94_ireport via selection-screen.

endif.

Endif.

Former Member
0 Kudos

AND IN SUBMIT PLEASE USE RETURN.

REGARDS

SHIBA DUTTA

Former Member
0 Kudos

HI,

Change the Submit as ,

Submit ...... and return.

Even if this does not work, in the BACK button of the ALV or interactive report, write:

LEAVE or LEAVE PROGRAM.

Regards

Subramanian

0 Kudos

Thanx. A Lot

Former Member
0 Kudos

hi sunil

can u pls give me the source code for ur thread,

regards

satya