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

problem in tab-strip

Former Member
0 Likes
550

Hello,

How to display the table control in the tab-strip.

waiting for reply

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
518

Hi,

Let's say you created your tabstrip control TABSTRIP1

with three tabs BUT1, BUT2 and BUT3. You assign subscreens SUBSCR1 to BUT1, SUBSCR2 to BUT2 and SUBSCR3 to BUT3. (In the Screen Painter on your element list, the 'References' tab , the reference field for BUT1 should be SUBSCR1, for BUT2 should be SUBSCR2 etc.)

You have included the following code in your PBO flow logic:

call subscreen SUBSCR1

including syst-cprog '1001'.

call subscreen SUBSCR2

including syst-cprog '1002'.

call subscreen SUBSCR3

including syst-cprog '1003'.

and in your PAI flow logic:

call subscreen SUBSCR1.

call subscreen SUBSCR2.

call subscreen SUBSCR3.

Then you create your subscreens 1001, 1002 and 1003 with Screen Painter and you simply put your table controls on them with the Graphical Layout Editor or such.

good luck,

Hello,

How to display the table control in the tab-strip.

waiting for reply

3 REPLIES 3
Read only

Former Member
0 Likes
518

Create a Subscreen with the table control on it and when the tab is pushed have it call that subscreen.

Read only

Former Member
0 Likes
518

Hi,

Here Is the Code For, How to display the table control in the tab-strip

Tabstrips with sub screen area Main Screen-screen Painter-say 1000

PROCESS BEFORE OUTPUT.

  • MODULE STATUS_1000.

*

CALL SUBSCREEN: LFA1_REF1 INCLUDING 'ZTABSTRIP_TBCONTROL' SNO,

KNA1_REF1 INCLUDING 'ZTABSTRIP_TBCONTROL' SNO.

PROCESS AFTER INPUT.

MODULE USER_COMMAND_1000.

CALL SUBSCREEN: LFA1_REF1,

KNA1_REF1.

CREATE A Table Control Screen say 200 screen

PROCESS BEFORE OUTPUT.

MODULE STATUS_0200.

LOOP AT IT_KNA1 WITH CONTROL TBCONTROL CURSOR TBCONTROL-CURRENT_LINE.

MODULE ASSIGN_DATA.

ENDLOOP.

PROCESS AFTER INPUT.

  • MODULE USER_COMMAND_0200.

LOOP AT IT_KNA1.

ENDLOOP.

create like Subcreen say 100 screen

like cutomer number : -


(From Dictionary)

country : -


(From Dictionary)

name : -


(From Dictionary)

PROCESS BEFORE OUTPUT.

MODULE STATUS_0100.

PROCESS AFTER INPUT.

  • MODULE USER_COMMAND_0100.

-


UPTO THIS PART IS SCREEN PAINTER

-


ITS A DRIVER PROGRAM FOR ABOVE

&----


*& Module pool ZTABSTRIP_TBCONTROL

*&

&----


*&

*&

&----


PROGRAM ZTABSTRIP_TBCONTROL.

TABLES: LFA1,KNA1.

DATA: BEGIN OF IT_LFA1 OCCURS 0,

LIFNR LIKE LFA1-LIFNR,

NAME1 LIKE LFA1-NAME1,

LAND1 LIKE LFA1-LAND1,

END OF IT_LFA1,

BEGIN OF IT_KNA1 OCCURS 0,

KUNNR LIKE KNA1-KUNNR,

LAND1 LIKE KNA1-LAND1,

NAME1 LIKE KNA1-NAME1,

END OF IT_KNA1.

CONTROLS: TBSTRIP TYPE TABSTRIP,

TBCONTROL TYPE TABLEVIEW USING SCREEN 200.

DATA: FILL TYPE I,

SNO TYPE SY-DYNNR VALUE 100.

DATA:TEST TYPE CHAR1.

&----


*& Module USER_COMMAND_1000 INPUT

&----


  • text

----


MODULE USER_COMMAND_1000 INPUT.

CASE SY-UCOMM.

WHEN 'VEND'.

SNO = 100.

TBSTRIP-ACTIVETAB = 'VEND'.

WHEN 'CUST'.

SELECT KUNNR

LAND1

NAME1

FROM KNA1

INTO TABLE IT_KNA1

WHERE LAND1 = 'IN'.

IF SY-SUBRC = 0.

SNO = 200.

TBSTRIP-ACTIVETAB = 'CUST'.

ENDIF.

WHEN 'EXIT'.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE. " USER_COMMAND_1000 INPUT

&----


*& Module STATUS_0100 OUTPUT

&----


  • text

----


MODULE STATUS_0100 OUTPUT.

  • SET PF-STATUS 'xxxxxxxx'.

  • SET TITLEBAR 'xxx'.

SELECT LIFNR

NAME1

LAND1

FROM LFA1

INTO TABLE IT_LFA1.

READ TABLE IT_LFA1 INDEX 5.

LFA1-LIFNR = IT_LFA1-LIFNR.

LFA1-NAME1 = IT_LFA1-NAME1.

LFA1-LAND1 = IT_LFA1-LAND1.

ENDMODULE. " STATUS_0100 OUTPUT

&----


*& Module assign_data OUTPUT

&----


  • text

----


MODULE ASSIGN_DATA OUTPUT.

IF TEST = 'X'.

MOVE-CORRESPONDING IT_KNA1 TO KNA1.

ENDIF.

ENDMODULE. " assign_data OUTPUT

&----


*& Module STATUS_0200 OUTPUT

&----


  • text

----


MODULE STATUS_0200 OUTPUT.

  • SET PF-STATUS 'xxxxxxxx'.

  • SET TITLEBAR 'xxx'.

DESCRIBE TABLE IT_KNA1 LINES FILL.

TBCONTROL-LINES = FILL.

ENDMODULE. " STATUS_0200 OUTPUT

Reward Points If Usefull

Regards

Fareeads

Edited by: Fareeda Tabassum S on Apr 25, 2008 12:01 PM

Read only

Former Member
0 Likes
519

Hi,

Let's say you created your tabstrip control TABSTRIP1

with three tabs BUT1, BUT2 and BUT3. You assign subscreens SUBSCR1 to BUT1, SUBSCR2 to BUT2 and SUBSCR3 to BUT3. (In the Screen Painter on your element list, the 'References' tab , the reference field for BUT1 should be SUBSCR1, for BUT2 should be SUBSCR2 etc.)

You have included the following code in your PBO flow logic:

call subscreen SUBSCR1

including syst-cprog '1001'.

call subscreen SUBSCR2

including syst-cprog '1002'.

call subscreen SUBSCR3

including syst-cprog '1003'.

and in your PAI flow logic:

call subscreen SUBSCR1.

call subscreen SUBSCR2.

call subscreen SUBSCR3.

Then you create your subscreens 1001, 1002 and 1003 with Screen Painter and you simply put your table controls on them with the Graphical Layout Editor or such.

good luck,