Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Re: Tab strip control

Former Member
0 Likes
597

Hi all ,

Can any one give me a real time senario of tabstrip control , plss explain the functionality, with the coding, I will give u full points.

Thanks&regards

Bhushan

Hi all ,

Can any one give me a real time senario of tabstrip control , plss explain the functionality, with the coding, I will give u full points.

Thanks&regards

Bhushan

3 REPLIES 3
Read only

Former Member
0 Likes
568

hi bhushan,

hope fully this code will help you.

just check it.

zreport.

TABLES: ekko, ekpo, eket, marc, t134h.

----


  • Tab Strips 1

----


SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK vendor WITH FRAME TITLE text-t00.

SELECT-OPTIONS vendor FOR ekko-lifnr.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT (10) text-m01.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN SKIP.

SELECT-OPTIONS vplant FOR ekko-reswk.

SELECTION-SCREEN END OF BLOCK vendor.

SELECTION-SCREEN END OF SCREEN 101.

----


  • Tab Strips 2

----


SELECTION-SCREEN BEGIN OF SCREEN 102 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK data1 WITH FRAME TITLE text-t02.

SELECT-OPTIONS: busarea FOR t134h-gsber,

plant FOR ekpo-werks,

puorg FOR ekko-ekorg.

SELECTION-SCREEN END OF BLOCK data1.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN BEGIN OF BLOCK data2 WITH FRAME TITLE text-t03.

SELECT-OPTIONS sched FOR ekko-ebeln.

SELECT-OPTIONS matl FOR ekpo-matnr.

SELECTION-SCREEN END OF BLOCK data2.

SELECTION-SCREEN END OF SCREEN 102.

----


  • Tab Strips 3

----


SELECTION-SCREEN BEGIN OF SCREEN 103 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK rype WITH FRAME TITLE text-t04.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS del RADIOBUTTON GROUP one.

SELECTION-SCREEN COMMENT 4(35) text-c05 FOR FIELD del.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS fix RADIOBUTTON GROUP one.

SELECTION-SCREEN COMMENT 4(35) text-c06 FOR FIELD fix.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK rype.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN BEGIN OF BLOCK interval WITH FRAME TITLE text-t05.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS mon RADIOBUTTON GROUP two.

SELECTION-SCREEN COMMENT 4(15) text-c01 FOR FIELD mon.

PARAMETERS evalmon TYPE spbup.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS wek RADIOBUTTON GROUP two.

SELECTION-SCREEN COMMENT 4(15) text-c02 FOR FIELD wek.

PARAMETERS evalweek TYPE sptag.

SELECTION-SCREEN COMMENT 35(30) text-i01.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK interval.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN BEGIN OF BLOCK type WITH FRAME TITLE text-t01.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS ext RADIOBUTTON GROUP thr.

SELECTION-SCREEN COMMENT 4(15) text-c08 FOR FIELD int.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS int RADIOBUTTON GROUP thr.

SELECTION-SCREEN COMMENT 4(15) text-c07 FOR FIELD ext.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK type.

SELECTION-SCREEN BEGIN OF BLOCK pre WITH FRAME TITLE text-t06.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS vn RADIOBUTTON GROUP slv.

SELECTION-SCREEN COMMENT 4(15) text-c09 FOR FIELD vn.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS bp RADIOBUTTON GROUP slv.

SELECTION-SCREEN COMMENT 4(17) text-c10 FOR FIELD bp.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK pre.

SELECTION-SCREEN END OF SCREEN 103.

SELECTION-SCREEN BEGIN OF TABBED BLOCK uno FOR 20 LINES.

SELECTION-SCREEN TAB (15) name1 USER-COMMAND ucomm1

DEFAULT SCREEN 101.

SELECTION-SCREEN TAB (17) name2 USER-COMMAND ucomm2

DEFAULT SCREEN 102.

SELECTION-SCREEN TAB (23) name3 USER-COMMAND ucomm3

DEFAULT SCREEN 103.

SELECTION-SCREEN END OF BLOCK uno.

INITIALIZATION.

name1 = text-n01.

name2 = text-n02.

name3 = text-n03.

reward if useful

regards,

sohi

Read only

harimanjesh_an
Active Participant
0 Likes
568

hi bhushan,

A tabstrip control is like a card index file that contains various screens belonging to a single application. Unlike normal screen sequences, the user can always see the names of the other screens to which he or she can jump immediately. This makes tabstrip controls an easy way to define several components of an application on a single screen and to navigate between them.

<b>You can use tabstrip controls:</b>

To give complex applications a uniform structure and make it easier for users to navigate between their components.

To make the structure of the application easier for users to learn and understand.

You should consider using tabstrip controls whenever a single object or application has different components or logical views that users need to navigate between. Property sheets are typically used to enter the attributes of complex objects.

Example program,

<b>

REPORT DEMO_DYNPRO_TABSTRIP_LOCAL.

CONTROLS MYTABSTRIP TYPE TABSTRIP.

DATA: OK_CODE TYPE SY-UCOMM,

SAVE_OK TYPE SY-UCOMM.

MYTABSTRIP-ACTIVETAB = 'PUSH2'.

CALL SCREEN 100.

MODULE STATUS_0100 OUTPUT.

SET PF-STATUS 'SCREEN_100'.

ENDMODULE.

MODULE CANCEL INPUT.

LEAVE PROGRAM.

ENDMODULE.

MODULE USER_COMMAND INPUT.

SAVE_OK = OK_CODE.

CLEAR OK_CODE.

IF SAVE_OK = 'OK'.

MESSAGE I888(SABAPDOCU) WITH 'MYTABSTRIP-ACTIVETAB ='

MYTABSTRIP-ACTIVETAB.

ENDIF.

ENDMODULE.

PROCESS BEFORE OUTPUT.

MODULE STATUS_0100.

CALL SUBSCREEN: SUB1 INCLUDING SY-REPID '0110',

SUB2 INCLUDING SY-REPID '0120',

SUB3 INCLUDING SY-REPID '0130'.

PROCESS AFTER INPUT.

MODULE CANCEL AT EXIT-COMMAND.

CALL SUBSCREEN: SUB1,

SUB2,

SUB3.

MODULE USER_COMMAND.</b>

check these links,

<b>Creating a Tabstrip Control :</b>

http://help.sap.com/saphelp_47x200/helpdata/en/d1/801bd2454211d189710000e8322d00/frameset.htm

<b>Another Example program:</b>

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/022ba607-0301-0010-e382-fdedca55...

Reward me if useful,

Harimanjesh AN

Message was edited by:

Harimanjesh AN

Read only

Former Member
0 Likes
568

tables: mara.

  • SELECTION SCREEN

  • Report 1 --- Z13365_ITAB_MODIFY

selection-screen begin of screen 0100 as subscreen.

selection-screen begin of block b1 with frame title text-001.

select-options : s_matnr for mara-matnr,

s_mtart for mara-mtart.

selection-screen end of block b1.

selection-screen end of screen 0100.

  • Report 2 --- Z13365_SCRIPTS

selection-screen begin of screen 0200 as subscreen.

selection-screen begin of block b2 with frame title text-002.

select-options : s_matr for mara-matnr.

selection-screen end of block b2.

selection-screen end of screen 0200.

controls mytabstrip type tabstrip.

data: ok_cd type sy-ucomm,

save_ok type sy-ucomm,

number(4) type n value 0100.

  • START OF SELECTION.

start-of-selection.

mytabstrip-activetab = 'BUTN1'.

call screen 1000.

&----


*& Module STATUS_1000 OUTPUT

&----


  • text

----


module status_1000 output.

set pf-status 'SCREEN_1000'.

  • SET TITLEBAR 'Z13362_TABSTRIP_MP'.

endmodule. " STATUS_1000 OUTPUT

&----


*& Module USER_COMMAND_1000 INPUT

&----


  • text

----


module user_command_1000 input.

save_ok = ok_cd.

clear ok_cd.

case save_ok.

when 'BUTN1'.

mytabstrip-activetab = save_ok.

number = 0100.

when 'BUTN2'.

mytabstrip-activetab = save_ok.

number = 0200.

when 'P_EXT'.

if number = 0100.

submit z13365_itab_modify with s_matnr in s_matnr

with s_mtart in s_mtart

and return.

endif.

if number = 0200.

submit z13365_scripts with s_matr in s_matr

and return.

endif.

endcase.

endmodule. " USER_COMMAND_1000 INPUT

&----


*& Module cancel INPUT

&----


  • text

----


module cancel input.

leave program.

endmodule. " cancel INPUT

at selection-screen.

message s888(sabapdocu) with text-030 sy-dynnr.

tables: mara.

  • SELECTION SCREEN

  • Report 1 --- Z13365_ITAB_MODIFY

selection-screen begin of screen 0100 as subscreen.

selection-screen begin of block b1 with frame title text-001.

select-options : s_matnr for mara-matnr,

s_mtart for mara-mtart.

selection-screen end of block b1.

selection-screen end of screen 0100.

process before output.

module status_1000.

call subscreen ref1 including sy-repid number.

*

process after input.

module cancel at exit-command.

call subscreen ref1.

module user_command_1000.