2009 Apr 30 6:48 AM
Hi,
I have a subroutine which is being called from the 2 PAI modules of the different screens.The subroutine has two queries which are the same for both the modules , the only difference I want is that after the queries there is a call to a new screen.I want different screens to be called for both the PAI modules.Please suggest what should I pass to the subroutine so that different screens can be called based on the PAI module.
Hi,
I have a subroutine which is being called from the 2 PAI modules of the different screens.The subroutine has two queries which are the same for both the modules , the only difference I want is that after the queries there is a call to a new screen.I want different screens to be called for both the PAI modules.Please suggest what should I pass to the subroutine so that different screens can be called based on the PAI module.
2009 Apr 30 6:50 AM
you can use the following
PERFORM F_CALL using G_SCRN_NUMBER
Regards,
Mansi.
2009 Apr 30 7:00 AM
Hi Sunil ,
You can use the same subroutine along with the using .
You need to call the same subroutine with different interface parameter.
In the interface parameter you need to specify the screen no (For example).
Check the code as a example --
perform screen using '100'.
perform screen using '101'.
*&---------------------------------------------------------------------*
*& Form SCREEN
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_0006 text
*----------------------------------------------------------------------*
form SCREEN using value(p_scrno).
call screen p_scrno.
endform. " SCREENRegards
Pinaki
2009 Apr 30 7:04 AM
Hi,
For your requirement you must get the Current screen number. Current screen number always in Sy-DYNNR. Use this field as input you can get the required functionality.