02-02-2007 6:11 AM
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.
02-02-2007 6:17 AM
Hi,
Try using the RETURN addition in the SUBMIT statement.
See help of submit statement for more details.
Regards
Arun
02-02-2007 6:17 AM
Hi,
Try using the RETURN addition in the SUBMIT statement.
See help of submit statement for more details.
Regards
Arun
02-02-2007 6:18 AM
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.
02-02-2007 6:18 AM
JUST COMMENT At selection-screen on radiobutton group rad1. IT WILL WORK INSTEAD OF THAT YOU CAN GIVE START-OF-SELECTION.
REGARDS
SHIBA DUTTA
02-02-2007 7:00 AM
02-02-2007 7:00 AM
02-02-2007 6:19 AM
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.
02-02-2007 6:19 AM
02-02-2007 6:20 AM
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
02-02-2007 7:01 AM
03-13-2007 3:33 PM
hi sunil
can u pls give me the source code for ur thread,
regards
satya