on 12-06-2005 9:12 AM
Hi...
can any one please tell me how to add a sub screen to a tabstrip control?
i have a subscreen named sub1, and please tell me how to add this sub screen to a tab strip.
thank you,
Prasad Babu.
Hi Prasad,
Steps to create Tab strip in the screen:
1) Create tabstrip control and give the no of tabs
you want in the attributes.
2) Create subscreen area SCA in the tab strip.
3) Assign user commands for each tab and give Ref.Field
as SCA.
4) Then in the Flow logic:
Declarations :
CONTROLS: TAB TYPE TABSTRIP.
DATA: BEGIN OF G_TAB,
SUBSCREEN LIKE SY-DYNNR,
PROG LIKE SY-REPID VALUE 'YMAIN',
PRESSED_TAB LIKE SY-UCOMM VALUE C_MAMU-TAB6,
END OF g_TAB.
FUNCTION CODES FOR TABSTRIP
CONSTANTS: BEGIN OF C_MAMU,
TAB1 LIKE SY-UCOMM VALUE 'FC1',
TAB2 LIKE SY-UCOMM VALUE 'FC2',
TAB3 LIKE SY-UCOMM VALUE 'FC3',
END OF C_MAMU.
PROCESS BEFORE OUTPUT.
* PBO FLOW LOGIC FOR TABSTRIP 'TAB'
MODULE ACTIVE_TAB_SET.
CALL SUBSCREEN SCA
INCLUDING PROG SUBSCREEN.
MODULE STATUS_0001.
*
PROCESS AFTER INPUT.
MODULE EXIT AT EXIT-COMMAND.
* PAI FLOW LOGIC FOR TABSTRIP 'TAB'
CALL SUBSCREEN SCA.
MODULE ACTIVE_TAB_GET.
MODULE USER_COMMAND_0001.
In the program
MODULE MAMU_ACTIVE_TAB_SET OUTPUT.
G_TAB-ACTIVETAB = G_TAB-PRESSED_TAB.
CASE G_TAB-PRESSED_TAB.
WHEN C_MAMU-TAB6.
G_TAB-SUBSCREEN = '0007'.
WHEN C_MAMU-TAB7.
G_TAB-SUBSCREEN = '1007'.
WHEN C_MAMU-TAB8.
G_TAB-SUBSCREEN = '1008'.
WHEN OTHERS.
* DO NOTHING
ENDCASE.
ENDMODULE.
MODULE MAMU_ACTIVE_TAB_GET INPUT.
* CASE OK_CODE.
CASE SY-UCOMM.
WHEN C_MAMU-TAB1.
G_TAB-PRESSED_TAB = C_MAMU-TAB1.
WHEN C_MAMU-TAB2.
G_TAB-PRESSED_TAB = C_MAMU-TAB2.
WHEN OTHERS.
* DO NOTHING
ENDCASE.
ENDMODULE.
In screen painter create your subscreens.
Hope this will help you.
Thanks & Regards,
Siri.
Message was edited by: Srilatha T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You should design your TABSTRIP and then add the the subarea to it by screen painter.
In your flow logic you manage which subscreen has to be loaded in the sub area.
PROCESS PBO.
MODULE INIT_TABSTRIP.
CALL SUBSCREEN SUB1 USING SY-REPID SUB_SCREEN.
PROCESS PAI.
MODULE USER_COMMAND.
MODULE INIT_TABSTRIP.
IF SUB_SCREEN IS INITIAL.
SUB_SCREEN = XXXX
TABSTRIP-ACTIVETAB = 'TAB1'.
ENDIF
ENDMODULE.
MODULE USER_COMMAND.
CASE OK_CODE.
WHEN 'TAB1'.
SUB_SCREEN = XXXX
TABSTRIP-ACTIVETAB = 'TAB1'.
WHEN 'TAB2'.
SUB_SCREEN = YYYY
TABSTRIP-ACTIVETAB = 'TAB2'.
WHEN 'TABN'.
SUB_SCREEN = ZZZZ
TABSTRIP-ACTIVETAB = 'TABN'.
ENDCASE.
ENDMODULE.
Max
Message was edited by: max bianchi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prasad,
Once you have ctreated tabstrip, Then create subscreen.
Maintain its attributes as subscreen.
Then declare your tabstrip in your main program.
Then write flow logic for your main screen .
PROCESS BEFORE OUTPUT.
CALL SUBSCREEN: SUB1 INCLUDING SY-REPID '1001'.
MODULE STATUS_1000.
PROCESS AFTER INPUT.
CALL SUBSCREEN SUB1.
MODULE USER_COMMAND_1000.
Please call your screen number in above statement.
Then write code for your main screen PAI event
like this. to trigger events on tabstrip and make default active tab.
CASE SY-UCOMM.
WHEN 'MAT'.
MYTAB-ACTIVETAB = 'MAT'.
NUMBER = '1001'.
MAT is tab name.
Hope this will work.
Dhananjay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.