09-17-2016 2:04 PM
i created one module pool program .when ever i click on tabs in screen it will go to default tab?
09-17-2016 2:12 PM
I hope you have maintained function code for each tab , then you would have handled the code in PAI section .
Please follow the below code ..
MODULE USER_COMMAND_0100 INPUT.
CASE OK_CODE.
WHEN 'TAB1'.
TABSTRIP-ACTIVETAB = 'TAB1'.
WHEN 'TAB2'.
TABSTRIP-ACTIVETAB = 'TAB2'.
WHEN 'TAB3'.
TABSTRIP-ACTIVETAB = 'TAB3'.
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
Regards,
Amaresh
09-17-2016 2:12 PM
I hope you have maintained function code for each tab , then you would have handled the code in PAI section .
Please follow the below code ..
MODULE USER_COMMAND_0100 INPUT.
CASE OK_CODE.
WHEN 'TAB1'.
TABSTRIP-ACTIVETAB = 'TAB1'.
WHEN 'TAB2'.
TABSTRIP-ACTIVETAB = 'TAB2'.
WHEN 'TAB3'.
TABSTRIP-ACTIVETAB = 'TAB3'.
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
Regards,
Amaresh
09-17-2016 2:26 PM
THANKS FOR YOUR REPLY.
I CREATED 3 TABS, FIRST AND THIRD TAB IS WORKING BUT WHEN I SELECT SECOND TAB IT GOES TO THIRD TAB?
09-19-2016 7:32 AM
Hi,
When you click on 2nd TAB, make sure to activate the 2nd TAB to tabstrip-activetab.
i think currently you would have set it to 3rd TAB hence it's picking 3rd one.
Regards,
Raghavendra
09-19-2016 10:31 AM
Hi,
you are having 3 subscreen for tab strip ie. 9001,9002,9003,
and call them dynamically by provide the variable ile LV_DYNNR which holds screen number for the active tab.
TAB1 TAB2 TAB3 are name and Function code of Tabs in tabstrip :
check out this code :
IN PBO .
MODULE get_screen.
CALL SUBSCREEN <SUBSCREENAREA> INCLUDING sy-repid lv_dynnr . " variable which holds screen Number
MODULE GET_SCREEN_0100 OUTPUT.
CASE TABSTRIP-ACTIVETAB.
WHEN 'TAB1'.
LV_DYNNR = '9001'. " screen number
WHEN 'TAB2'.
LV_DYNNR = '9002. " screen number
WHEN 'TAB3'.
LV_DYNNR = '9003'. " screen number
WHEN OTHERS.
LV_DYNNR =9001." number this will be default screen of tabstrip.
ENDMODULE.
********************************IN PAI*******************************************
MODULE USER_COMMAND_0100 INPUT.
MODULE USER_COMMAND_0100 INPUT.
CASE OK_CODE.
WHEN 'TAB1'.
TABSTRIP-ACTIVETAB = 'TAB1'.
WHEN 'TAB2'.
TABSTRIP-ACTIVETAB = 'TAB2'.
WHEN 'TAB3'.
TABSTRIP-ACTIVETAB = 'TAB3'.
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE.
thank you!!
09-19-2016 8:14 AM
Hi ,
write the code as Amaresh said,
adding to that also check whether you defined the Functioncode for each tab or not
also call subscreen properly as shown,
follow these things you will not get any problem...
regards ,
vinay..
09-19-2016 10:59 AM
Hi,
you are having 3 sub screens for tab strip ie. 9001,9002,9003,
and call them dynamically by provide the variable ile LV_DYNNR which holds screen number for the active tab.
TAB1 TAB2 TAB3 are name and Function code of Tabs in tabstrip :
check out this code :
IN PBO .
MODULE get_screen.
CALL SUBSCREEN <SUBSCREENAREA> INCLUDING sy-repid lv_dynnr . " variable which holds screen Number
MODULE GET_SCREEN_0100 OUTPUT.
CASE TABSTRIP-ACTIVETAB.
WHEN 'TAB1'.
LV_DYNNR = '9001'. " screen number
WHEN 'TAB2'.
LV_DYNNR = '9002. " screen number
WHEN 'TAB3'.
LV_DYNNR = '9003'. " screen number
WHEN OTHERS.
LV_DYNNR =9001." number this will be default screen of tabstrip.
ENDMODULE.
********************************IN PAI*******************************************
MODULE USER_COMMAND_0100 INPUT.
MODULE USER_COMMAND_0100 INPUT.
CASE OK_CODE.
WHEN 'TAB1'.
TABSTRIP-ACTIVETAB = 'TAB1'.
WHEN 'TAB2'.
TABSTRIP-ACTIVETAB = 'TAB2'.
WHEN 'TAB3'.
TABSTRIP-ACTIVETAB = 'TAB3'.
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE.
thank you!!
09-19-2016 11:46 AM
thanks for all your replies.Problem is solved as i entered function type as 'P' for all tabs.