2009 May 28 7:23 AM
Hi All,
Can any one give me sample code on how to create tabstrip on selection screen.
2009 May 28 7:27 AM
Hi Ramya,
You can search for this in code samples in SDN.Any way i am giving you the following sample code for tabstrip in selection screen.
TABLES: mara, lfa1, ekpo.
*---------------------------------------------------------------------*
* selection screen *
*---------------------------------------------------------------------*
* Define screen 101 as subscreen
SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t00.
SELECT-OPTIONS matnr FOR mara-matnr.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 101.
* Define screen 102 as subscreen
SELECTION-SCREEN BEGIN OF SCREEN 102 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
SELECT-OPTIONS: kunnr FOR lfa1-kunnr.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF SCREEN 102.
* Define screen 103 as subscreen
SELECTION-SCREEN BEGIN OF SCREEN 103 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
PARAMETERS werks LIKE ekpo-werks.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN END OF SCREEN 103.
* Define tab screen
SELECTION-SCREEN BEGIN OF TABBED BLOCK t1 FOR 20 LINES.
SELECTION-SCREEN TAB (10) name1 USER-COMMAND ucomm1 DEFAULT SCREEN 101.
SELECTION-SCREEN TAB (20) name2 USER-COMMAND ucomm2 DEFAULT SCREEN 102.
SELECTION-SCREEN TAB (30) name3 USER-COMMAND ucomm3 DEFAULT SCREEN 103.
SELECTION-SCREEN END OF BLOCK t1.
INITIALIZATION.
name1 = text-n01. "Material
name2 = text-n02. "Vendor
name3 = text-n03. "Planthope it will help you.
Hi All,
Can any one give me sample code on how to create tabstrip on selection screen.
2009 May 28 7:26 AM
2009 May 28 7:27 AM
Hi Ramya,
You can search for this in code samples in SDN.Any way i am giving you the following sample code for tabstrip in selection screen.
TABLES: mara, lfa1, ekpo.
*---------------------------------------------------------------------*
* selection screen *
*---------------------------------------------------------------------*
* Define screen 101 as subscreen
SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t00.
SELECT-OPTIONS matnr FOR mara-matnr.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 101.
* Define screen 102 as subscreen
SELECTION-SCREEN BEGIN OF SCREEN 102 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
SELECT-OPTIONS: kunnr FOR lfa1-kunnr.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF SCREEN 102.
* Define screen 103 as subscreen
SELECTION-SCREEN BEGIN OF SCREEN 103 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
PARAMETERS werks LIKE ekpo-werks.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN END OF SCREEN 103.
* Define tab screen
SELECTION-SCREEN BEGIN OF TABBED BLOCK t1 FOR 20 LINES.
SELECTION-SCREEN TAB (10) name1 USER-COMMAND ucomm1 DEFAULT SCREEN 101.
SELECTION-SCREEN TAB (20) name2 USER-COMMAND ucomm2 DEFAULT SCREEN 102.
SELECTION-SCREEN TAB (30) name3 USER-COMMAND ucomm3 DEFAULT SCREEN 103.
SELECTION-SCREEN END OF BLOCK t1.
INITIALIZATION.
name1 = text-n01. "Material
name2 = text-n02. "Vendor
name3 = text-n03. "Planthope it will help you.
2009 May 28 7:50 AM
Hi,
Could please see the link :http://www.sapdev.co.uk/reporting/selscr/selscr_tabstrip.htm
2009 May 28 7:56 AM
hi
try this
in se38
tables : mara.
selection-screen : begin of screen 0800 as subscreen.
select-options : s_matnr for mara-matnr.
selection-screen : end of screen 0800.
start-of-selection.
call screen 8000.
in se51
enter the se38 program name and screen no 8000 and click on layout
select the subscreen icon and drag and drop it on the layout
name it as sub1
PBO
Module_status_8000.
call subsreen sub1 including sy-repid '0800'.
PAI
Module_user_command_8000.
Regards
2009 May 28 8:05 AM
Hi Dude,
Go through this code
Report TABSTRIP.
TABLES: sscrfields.
* SUBSCREEN 1 For Tabstrip BUTTON1
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: p1(10) TYPE c,
p2(10) TYPE c,
p3(10) TYPE c.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 100.
* SUBSCREEN 2 For Tabstrip BUTTON2
SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
PARAMETERS: q1(10) TYPE c OBLIGATORY,
q2(10) TYPE c.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF SCREEN 200.
* Go to tcode SE51 Create screen no 0300
* with screen type = subscreen
* STANDARD SELECTION SCREEN
PARAMETERS: h1(10) TYPE c.
SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
TAB (20) button1 USER-COMMAND push1
DEFAULT SCREEN 100,
TAB (20) button2 USER-COMMAND push2
DEFAULT SCREEN 200,
TAB (20) button3 USER-COMMAND push3
DEFAULT SCREEN 300,
END OF BLOCK mytab.
INITIALIZATION.
button1 = 'This is sel-screen 100'.
button2 = 'This is sel-screen 200'.
button3 = 'This is screen 300'.
mytab-prog = sy-repid.
mytab-dynnr = 100.
mytab-activetab = 'BUTTON1'.
AT SELECTION-SCREEN.
CASE sy-dynnr.
WHEN 1000.
WHEN 100.
IF p1 IS INITIAL.
sscrfields-ucomm = 'PUSH1'.
MESSAGE I888(sabapdocu) WITH 'Make an entry in P1'.
ENDIF.
WHEN 200.
MESSAGE s888(sabapdocu) WITH 'Validation on' sy-dynnr.
ENDCASE.
START-OF-SELECTION.
WRITE: / 'P1:', p1,'Q1:', q1,
/ 'P2:', p2,'Q2:', q2,
/ 'P3:', p3.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |