‎2009 May 03 11:34 AM
Hi expert ,
can u give me table strip tutorial.
how to make it and how to call in program .
i m using vbak table for it . in one tab i want to show 3 field and in another tab 3 fields.
how can i do it.
thanks .
ashish
Please search the forum before asking basic questions. Thread locked.
Edited by: Rob Burbank on May 3, 2009 4:57 PM
‎2009 May 03 4:23 PM
Hi Ashish,
I guess you are talking about Tab Strip Control here.
You can get the demo code along with some documentation in the ABAP Tcode ABAPDOCU. You will get an entire collection of Screen Programming codes here.
You can create a DYNPRO Program from either object navigator or SE51 Tcode. And then create a Transaction Code to execute the same.
You can also have a look at help.sap.com which will give you the entire technical details.
Hope this helps.
Thanks,
Samantak.
‎2009 May 03 5:13 PM
Hi Ashis
Look at the following sample codes for your requirements..
CONTROLS tabstrip TYPE TABSTRIP.
DATA: okcode TYPE sy-ucomm,
dynnr TYPE sy-dynnr,
flag type flag,
active like tabstrip-activetab .
call SCREEN 100.
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0100 INPUT.
data: lv_okcode type syucomm.
lv_okcode = okcode.
clear okcode.
case lv_okcode.
WHEN 'TAB1'.
dynnr = '0110'.
WHEN 'TAB2'.
dynnr = '0120'.
WHEN 'TAB3'.
dynnr = '0130'.
WHEN 'TAB4'.
dynnr = '0140'.
WHEN 'TAB5'.
"check authorization, if authorization fails
flag = 'X'. "set the global flag
active = 'TAB1'. "store active tab in global variable
dynnr = '0110'. "set the screen number
WHEN 'BACK' or 'EXIT'.
leave program.
ENDCASE.
IF lv_okcode(3) = 'TAB'.
tabstrip-activetab = lv_okcode.
ENDIF.
ENDMODULE. " USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'MAIN'.
* SET TITLEBAR 'xxx'.
IF tabstrip-activetab IS INITIAL OR
dynnr IS INITIAL.
tabstrip-activetab = 'TAB1'.
dynnr = '0110'.
ENDIF.
"set the activetab explicilty here
if flag eq 'X'. "from authorization failure
tabstrip-activetab = active. "'TAB1'
clear flag.
endif.
ENDMODULE. " STATUS_0100 OUTPUT
*& Use of TabStrip and SubScreen explained
*& ---- The report shows the material on one tab
*& and plant on one tab.Pressing the execute button will show
*& the description of the material or plant as the case is.
*& TEXT-002 = Material Number
*& TEXT-003 = Plant Number.
REPORT znr1 NO STANDARD PAGE HEADING
LINE-SIZE 80 LINE-COUNT 60.
TABLES : sscrfields.
DATA activetab(6) TYPE c .
DATA mat_des TYPE makt-maktx.
DATA pl_des TYPE t001w-name1 .
SELECTION-SCREEN BEGIN OF SCREEN 001 AS SUBSCREEN NO INTERVALS.
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-002 NO
INTERVALS.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 14(18) text-002 FOR FIELD matnr.
PARAMETERS matnr TYPE mara-matnr.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK block1.
SELECTION-SCREEN END OF SCREEN 001.
SELECTION-SCREEN BEGIN OF SCREEN 002 AS SUBSCREEN NO INTERVALS.
SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-003 NO
INTERVALS.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 14(18) text-003 FOR FIELD matnr.
PARAMETERS werks TYPE t001w-werks.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK block2.
SELECTION-SCREEN END OF SCREEN 002.
SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 5 LINES NO INTERVALS.
SELECTION-SCREEN TAB (15) tabs1 USER-COMMAND ucomm1
DEFAULT SCREEN 001.
SELECTION-SCREEN TAB (15) tabs2 USER-COMMAND ucomm2.
* DEFAULT SCREEN 002 .
SELECTION-SCREEN END OF BLOCK tabb1.
INITIALIZATION.
tabs1 = text-002.
tabs2 = text-003.
activetab = 'TABS1'.
AT SELECTION-SCREEN .
CASE sscrfields-ucomm.
WHEN 'UCOMM1'.
tabb1-prog = sy-repid.
tabb1-dynnr = 001.
tabb1-activetab = 'TABS1'.
activetab = 'TABS1' .
WHEN 'UCOMM2'.
tabb1-prog = sy-repid.
tabb1-dynnr = 002.
tabb1-activetab = 'TABS2'.
activetab = 'TABS2'.
ENDCASE.
START-OF-SELECTION.
CASE activetab.
WHEN 'TABS1'.
SELECT SINGLE maktx FROM makt INTO pl_des WHERE matnr = matnr.
WRITE: 'Material ' , matnr , mat_des .
WHEN 'TABS2'.
SELECT SINGLE name1 FROM t001w INTO pl_des WHERE werks = werks.
WRITE: 'Plant ' , werks ,pl_des.
Hope this helps.
P:S :- Lots of resources are there in sdn and google so it is better to search before posting.
Regards
Abhinab Mishra