‎2008 Dec 11 7:35 PM
Hi
I got to call
selection screen 1 -> selection screen 2-> smart form
in middle if i click on selection screeen 2's BACK button i am getting the smart form trigger instead of selection screen 1.
Where to handle that BACK button .If there is some example mentioned it will be great.
Regards
Ivneet
‎2008 Dec 11 8:56 PM
It seems Standard Back functionality getting triggered for screen 2.
I think by creating a SET-PF-STATUS for "screen 2" and and having custom Back(from SE41) at the place of Back(standard) button you may handle and call smart form.
Code would be looks like.
case sy-ucom.
When 'BACK'.
handle smartforms here.
endcase.Code should be in PAI of screen 2.
‎2008 Dec 11 8:56 PM
It seems Standard Back functionality getting triggered for screen 2.
I think by creating a SET-PF-STATUS for "screen 2" and and having custom Back(from SE41) at the place of Back(standard) button you may handle and call smart form.
Code would be looks like.
case sy-ucom.
When 'BACK'.
handle smartforms here.
endcase.Code should be in PAI of screen 2.
‎2008 Dec 12 3:45 AM
Hi Ivneet,
Suppose you have two screens 1001 and 1002 (as the two selection screens).
For this make a PF-STATUS and in the PBO of the screens.
SET PF-STATUS 'ZXY_PFSTA'.
In PAI of screen 1001, you handle event and goto screen 1002.
DATA : ok_code TYPE sy-ucomm.
ok-code = sy-ucomm.
CASE ok_code.
WHEN 'NEXT'. "say the button on which you goto screen 1002
CALL SCREEN 1002.
WHEN 'EXIT'. "say you want to leave the program
*for EXIT button take function type as 'E'
LEAVE PROGRAM.
ENDCASE.
In PAI of screen 1002, you can handle the 'BACK' event and go back to screen 1001.
DATA : ok_code TYPE sy-ucomm.
ok-code = sy-ucomm.
CASE ok_code.
WHEN 'SF'. "say the button on which you goto screen 1003 for displaying SMARTFORM.
CALL SCREEN 1003.
WHEN 'BACK'. "say you want to leave the program
LEAVE TO SCREEN 0. "the initial screen of the program (i.e., first screen 1001)
WHEN 'EXIT'. "say you want to leave the program
*for EXIT button take function type as 'E'
LEAVE PROGRAM.
ENDCASE.
Hope this solves your problem.
Thanks & Regards
Tarun Gambhir