<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: tabstrip controls in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/tabstrip-controls/m-p/1750425#M325364</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Iam sorry,i misinterpreted your question to be table control..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is for tabstrip --&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Choose the Tabstrip Wizard in the screen and place it in the screen and ´give continue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will ask for the number of tabs. Default is 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then Name the tabs according to ur requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in the PBO &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CAll subscreen sub1 including the sy-repid '0100'.&lt;/P&gt;&lt;P&gt;and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is enough for u to create a tabstrip with wizard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will automatically writes the code for u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAMPLE CODE -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;[code]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;REPORT demo_dynpro_tabstrip_server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTROLS mytabstrip TYPE TABSTRIP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ok_code TYPE sy-ucomm,&lt;/P&gt;&lt;P&gt;      save_ok TYPE sy-ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA  number TYPE sy-dynnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mytabstrip-activetab = 'PUSH2'.&lt;/P&gt;&lt;P&gt;number = '0120'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE status_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'SCREEN_100'.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE cancel INPUT.&lt;/P&gt;&lt;P&gt;  LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command INPUT.&lt;/P&gt;&lt;P&gt;  save_ok = ok_code.&lt;/P&gt;&lt;P&gt;  CLEAR ok_code.&lt;/P&gt;&lt;P&gt;  IF save_ok = 'OK'.&lt;/P&gt;&lt;P&gt;    MESSAGE i888(sabapdocu) WITH 'MYTABSTRIP-ACTIVETAB ='&lt;/P&gt;&lt;P&gt;                                  mytabstrip-activetab.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    mytabstrip-activetab = save_ok.&lt;/P&gt;&lt;P&gt;    CASE save_ok.&lt;/P&gt;&lt;P&gt;      WHEN 'PUSH1'.&lt;/P&gt;&lt;P&gt;        number = '0110'.&lt;/P&gt;&lt;P&gt;      WHEN 'PUSH2'.&lt;/P&gt;&lt;P&gt;        number = '0120'.&lt;/P&gt;&lt;P&gt;      WHEN 'PUSH3'.&lt;/P&gt;&lt;P&gt;        number = '0130'.&lt;/P&gt;&lt;P&gt;    ENDCASE.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.sap.com/code"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;pankaj singh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Dec 2006 14:02:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-12T14:02:50Z</dc:date>
    <item>
      <title>tabstrip controls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tabstrip-controls/m-p/1750421#M325360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello all,&lt;/P&gt;&lt;P&gt;can some ne tellme abt the concept of tabstrip controls. i want even the material for studying.&lt;/P&gt;&lt;P&gt;thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;seenu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 13:50:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tabstrip-controls/m-p/1750421#M325360</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T13:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: tabstrip controls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tabstrip-controls/m-p/1750422#M325361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe this will help you out:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/00/deb23789e95378e10000009b38f8cf/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/00/deb23789e95378e10000009b38f8cf/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/selscr/selscr_tabstrip.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/selscr/selscr_tabstrip.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 13:52:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tabstrip-controls/m-p/1750422#M325361</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T13:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: tabstrip controls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tabstrip-controls/m-p/1750423#M325362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through the following Document for Creation of Table Controls&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Screen tables&lt;/P&gt;&lt;P&gt;A table can be created in transaction. These tables, when designed on the screen are called as SCREEN TABLES. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are of two types.&lt;/P&gt;&lt;P&gt;Table Controls and Step loops&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These tables are treated as Loops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)Features of Table Controls&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data is displayed in the form of table.&lt;/P&gt;&lt;P&gt;Table control gives user the feeling of an actual table.&lt;/P&gt;&lt;P&gt;You can scroll through the table vertically as well as horizontally.&lt;/P&gt;&lt;P&gt;You can select rows and columns.&lt;/P&gt;&lt;P&gt;You can resize the with of columns.&lt;/P&gt;&lt;P&gt;You can have separator lines between rows and columns.&lt;/P&gt;&lt;P&gt;Automatic resizing of the table when the user resizes the window.&lt;/P&gt;&lt;P&gt;You can update information in the table control and it can be updated in the database table by writing code for it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)Steps for creating table control&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declaration of table control in module pool program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Designing of table controls on the screen.&lt;/P&gt;&lt;P&gt;Passing data to table control in flow logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4)Declaration of TC in MPP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;controls &amp;lt;name of table control&amp;gt; type tableview using screen &amp;lt;&amp;#129;escreen no.&amp;#129;f&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5)Designing Table control on screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Click on Table in Control bar and place it on the screen. You can adjust the length and width of the Table Control.&lt;/P&gt;&lt;P&gt;Name the table control.(same name as given in data declaration).&lt;/P&gt;&lt;P&gt;From dictionary object OR from program fields select the fields and place them in the table control&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6)Passing data to table control&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Usually transfer of data from program to screen is automatic.&lt;/P&gt;&lt;P&gt;In case of TC, you need to explicitly transfer the data to table control.&lt;/P&gt;&lt;P&gt;ABAP/4 provides Loop statement, which is associated with flow logic to transfer the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7)Passing of data contd.&lt;/P&gt;&lt;P&gt;PBO.&lt;/P&gt;&lt;P&gt;Loop at &amp;lt;name of internal table&amp;gt; with control &amp;lt;name of table control&amp;gt; cursor &amp;lt;scroll variable&amp;gt;.&lt;/P&gt;&lt;P&gt;module&amp;#129;c&amp;#129;c.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;PAI.&lt;/P&gt;&lt;P&gt;Loop at &amp;lt; name of internal table&amp;gt;.Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8)Scroll variables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Top_line : the row of table where the screen display starts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current_line : the row currently being processed inside a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9)Transfer of data from prg to TC.&lt;/P&gt;&lt;P&gt;With &amp;#129;eLoop at &amp;#129;c&amp;#129;f statement, the first row is placed in the header of internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any module is specified between Loop and End loop, it will be executed. In this module, generally we will be assigning this internal table fields to table control screen fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The row in internal table is transferred to the TC as stated in the &amp;#129;eLoop at&amp;#129;c..&amp;#129;f statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system encounters the &amp;#129;eEndloop&amp;#129;f statement and control is passed back to the next line of internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the same way all the records of the internal table are passed to the TC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;following is the example code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES : mska, mchb.

data : begin of t_batch occurs 0,
matnr like mska-matnr,
werks like mska-werks,
lgort like mska-lgort,
charg like mska-charg,
vbeln like mska-vbeln,
clabs like mchb-clabs,
end of t_batch.

start-of-selection.
call screen 100.


* DECLARATION OF TABLECONTROL 'TAB_CONTROL' ITSELF
CONTROLS: TAB_CONTROL TYPE TABLEVIEW USING SCREEN 0100.

* LINES OF TABLECONTROL 'TAB_CONTROL'
DATA: G_TAB_CONTROL_LINES LIKE SY-LOOPC.

DATA: OK_CODE LIKE SY-UCOMM.

* OUTPUT MODULE FOR TABLECONTROL 'TAB_CONTROL':
* GET LINES OF TABLECONTROL
MODULE TAB_CONTROL_GET_LINES OUTPUT.
G_TAB_CONTROL_LINES = SY-LOOPC.
ENDMODULE.

* INPUT MODULE FOR TABLECONTROL 'TAB_CONTROL': PROCESS USER COMMAND
MODULE TAB_CONTROL_USER_COMMAND INPUT.
PERFORM USER_OK_TC USING 'TAB_CONTROL'
'T_BATCH'
' '
CHANGING OK_CODE.
ENDMODULE.

*----------------------------------------------------------------------*
* INCLUDE TABLECONTROL_FORMS *
*----------------------------------------------------------------------*

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Form USER_OK_TC *
*&amp;amp;---------------------------------------------------------------------*
FORM USER_OK_TC USING P_TC_NAME TYPE DYNFNAM
P_TABLE_NAME
P_MARK_NAME
CHANGING P_OK LIKE SY-UCOMM.

*-BEGIN OF LOCAL DATA--------------------------------------------------*
DATA: L_OK TYPE SY-UCOMM,
L_OFFSET TYPE I.
*-END OF LOCAL DATA----------------------------------------------------*

* Table control specific operations *
* evaluate TC name and operations *
SEARCH P_OK FOR P_TC_NAME.
IF SY-SUBRC &amp;lt;&amp;gt; 0.
EXIT.
ENDIF.
L_OFFSET = STRLEN( P_TC_NAME ) + 1.
L_OK = P_OK+L_OFFSET.
* execute general and TC specific operations *
CASE L_OK.
WHEN 'INSR'. "insert row
PERFORM FCODE_INSERT_ROW USING P_TC_NAME
P_TABLE_NAME.
CLEAR P_OK.

WHEN 'DELE'. "delete row
PERFORM FCODE_DELETE_ROW USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME.
CLEAR P_OK.

WHEN 'P--' OR "top of list
'P-' OR "previous page
'P+' OR "next page
'P++'. "bottom of list
PERFORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
L_OK.
CLEAR P_OK.
* WHEN 'L--'. "total left
* PERFORM FCODE_TOTAL_LEFT USING P_TC_NAME.
*
* WHEN 'L-'. "column left
* PERFORM FCODE_COLUMN_LEFT USING P_TC_NAME.
*
* WHEN 'R+'. "column right
* PERFORM FCODE_COLUMN_RIGHT USING P_TC_NAME.
*
* WHEN 'R++'. "total right
* PERFORM FCODE_TOTAL_RIGHT USING P_TC_NAME.
*
WHEN 'MARK'. "mark all filled lines
PERFORM FCODE_TC_MARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME .
CLEAR P_OK.

WHEN 'DMRK'. "demark all filled lines
PERFORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME .
CLEAR P_OK.

* WHEN 'SASCEND' OR
* 'SDESCEND'. "sort column
* PERFORM FCODE_SORT_TC USING P_TC_NAME
* l_ok.

ENDCASE.

ENDFORM. " USER_OK_TC

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Form FCODE_INSERT_ROW *
*&amp;amp;---------------------------------------------------------------------*
FORM fcode_insert_row
USING P_TC_NAME TYPE DYNFNAM
P_TABLE_NAME .

*-BEGIN OF LOCAL DATA--------------------------------------------------*
DATA L_LINES_NAME LIKE FELD-NAME.
DATA L_SELLINE LIKE SY-STEPL.
DATA L_LASTLINE TYPE I.
DATA L_LINE TYPE I.
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS &amp;lt;TC&amp;gt; TYPE CXTAB_CONTROL.
FIELD-SYMBOLS &amp;lt;TABLE&amp;gt; TYPE STANDARD TABLE.
FIELD-SYMBOLS &amp;lt;LINES&amp;gt; TYPE I.
*-END OF LOCAL DATA----------------------------------------------------*

ASSIGN (P_TC_NAME) TO &amp;lt;TC&amp;gt;.

* get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO &amp;lt;TABLE&amp;gt;. "not headerline

* get looplines of TableControl
CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_LINES_NAME.
ASSIGN (L_LINES_NAME) TO &amp;lt;LINES&amp;gt;.

* get current line
GET CURSOR LINE L_SELLINE.
IF SY-SUBRC &amp;lt;&amp;gt; 0. " append line to table
L_SELLINE = &amp;lt;TC&amp;gt;-LINES + 1.
* set top line and new cursor line *
IF L_SELLINE &amp;gt; &amp;lt;LINES&amp;gt;.
&amp;lt;TC&amp;gt;-TOP_LINE = L_SELLINE - &amp;lt;LINES&amp;gt; + 1 .
L_LINE = 1.
ELSE.
&amp;lt;TC&amp;gt;-TOP_LINE = 1.
L_LINE = L_SELLINE.
ENDIF.
ELSE. " insert line into table
L_SELLINE = &amp;lt;TC&amp;gt;-TOP_LINE + L_SELLINE - 1.
* set top line and new cursor line *
L_LASTLINE = L_SELLINE + &amp;lt;LINES&amp;gt; - 1.
IF L_LASTLINE &amp;lt;= &amp;lt;TC&amp;gt;-LINES.
&amp;lt;TC&amp;gt;-TOP_LINE = L_SELLINE.
L_LINE = 1.
ELSEIF &amp;lt;LINES&amp;gt; &amp;gt; &amp;lt;TC&amp;gt;-LINES.
&amp;lt;TC&amp;gt;-TOP_LINE = 1.
L_LINE = L_SELLINE.
ELSE.
&amp;lt;TC&amp;gt;-TOP_LINE = &amp;lt;TC&amp;gt;-LINES - &amp;lt;LINES&amp;gt; + 2 .
L_LINE = L_SELLINE - &amp;lt;TC&amp;gt;-TOP_LINE + 1.
ENDIF.
ENDIF.
* insert initial line
INSERT INITIAL LINE INTO &amp;lt;TABLE&amp;gt; INDEX L_SELLINE.
&amp;lt;TC&amp;gt;-LINES = &amp;lt;TC&amp;gt;-LINES + 1.
* set cursor
SET CURSOR LINE L_LINE.

ENDFORM. " FCODE_INSERT_ROW

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Form FCODE_DELETE_ROW *
*&amp;amp;---------------------------------------------------------------------*
FORM fcode_delete_row
USING P_TC_NAME TYPE DYNFNAM
P_TABLE_NAME
P_MARK_NAME .

*-BEGIN OF LOCAL DATA--------------------------------------------------*
DATA L_TABLE_NAME LIKE FELD-NAME.

FIELD-SYMBOLS &amp;lt;TC&amp;gt; TYPE cxtab_control.
FIELD-SYMBOLS &amp;lt;TABLE&amp;gt; TYPE STANDARD TABLE.
FIELD-SYMBOLS &amp;lt;WA&amp;gt;.
FIELD-SYMBOLS &amp;lt;MARK_FIELD&amp;gt;.
*-END OF LOCAL DATA----------------------------------------------------*

ASSIGN (P_TC_NAME) TO &amp;lt;TC&amp;gt;.

* get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO &amp;lt;TABLE&amp;gt;. "not headerline

* delete marked lines *
DESCRIBE TABLE &amp;lt;TABLE&amp;gt; LINES &amp;lt;TC&amp;gt;-LINES.

LOOP AT &amp;lt;TABLE&amp;gt; ASSIGNING &amp;lt;WA&amp;gt;.

* access to the component 'FLAG' of the table header *
ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE &amp;lt;WA&amp;gt; TO &amp;lt;MARK_FIELD&amp;gt;.

IF &amp;lt;MARK_FIELD&amp;gt; = 'X'.
DELETE &amp;lt;TABLE&amp;gt; INDEX SYST-TABIX.
IF SY-SUBRC = 0.
&amp;lt;TC&amp;gt;-LINES = &amp;lt;TC&amp;gt;-LINES - 1.
ENDIF.
ENDIF.
ENDLOOP.

ENDFORM. " FCODE_DELETE_ROW

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Form COMPUTE_SCROLLING_IN_TC
*&amp;amp;---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --&amp;gt;P_TC_NAME name of tablecontrol
* --&amp;gt;P_OK ok code
*----------------------------------------------------------------------*
FORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
P_OK.
*-BEGIN OF LOCAL DATA--------------------------------------------------*
DATA L_TC_NEW_TOP_LINE TYPE I.
DATA L_TC_NAME LIKE FELD-NAME.
DATA L_TC_LINES_NAME LIKE FELD-NAME.
DATA L_TC_FIELD_NAME LIKE FELD-NAME.

FIELD-SYMBOLS &amp;lt;TC&amp;gt; TYPE cxtab_control.
FIELD-SYMBOLS &amp;lt;LINES&amp;gt; TYPE I.
*-END OF LOCAL DATA----------------------------------------------------*

ASSIGN (P_TC_NAME) TO &amp;lt;TC&amp;gt;.
* get looplines of TableControl
CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_TC_LINES_NAME.
ASSIGN (L_TC_LINES_NAME) TO &amp;lt;LINES&amp;gt;.


* is no line filled? *
IF &amp;lt;TC&amp;gt;-LINES = 0.
* yes, ... *
L_TC_NEW_TOP_LINE = 1.
ELSE.
* no, ... *
CALL FUNCTION 'SCROLLING_IN_TABLE'
EXPORTING
ENTRY_ACT = &amp;lt;TC&amp;gt;-TOP_LINE
ENTRY_FROM = 1
ENTRY_TO = &amp;lt;TC&amp;gt;-LINES
LAST_PAGE_FULL = 'X'
LOOPS = &amp;lt;LINES&amp;gt;
OK_CODE = P_OK
OVERLAPPING = 'X'
IMPORTING
ENTRY_NEW = L_TC_NEW_TOP_LINE
EXCEPTIONS
NO_ENTRY_OR_PAGE_ACT = 01
NO_ENTRY_TO = 02
NO_OK_CODE_OR_PAGE_GO = 03
OTHERS = 99.
ENDIF.

* get actual tc and column *
GET CURSOR FIELD L_TC_FIELD_NAME
AREA L_TC_NAME.

IF SYST-SUBRC = 0.
IF L_TC_NAME = P_TC_NAME.
* set actual column *
SET CURSOR FIELD L_TC_FIELD_NAME LINE 1.
ENDIF.
ENDIF.

* set the new top line *
&amp;lt;TC&amp;gt;-TOP_LINE = L_TC_NEW_TOP_LINE.


ENDFORM. " COMPUTE_SCROLLING_IN_TC

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Form FCODE_TC_MARK_LINES
*&amp;amp;---------------------------------------------------------------------*
* marks all TableControl lines
*----------------------------------------------------------------------*
* --&amp;gt;P_TC_NAME name of tablecontrol
*----------------------------------------------------------------------*
FORM FCODE_TC_MARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME.
*-BEGIN OF LOCAL DATA--------------------------------------------------*
DATA L_TABLE_NAME LIKE FELD-NAME.

FIELD-SYMBOLS &amp;lt;TC&amp;gt; TYPE cxtab_control.
FIELD-SYMBOLS &amp;lt;TABLE&amp;gt; TYPE STANDARD TABLE.
FIELD-SYMBOLS &amp;lt;WA&amp;gt;.
FIELD-SYMBOLS &amp;lt;MARK_FIELD&amp;gt;.
*-END OF LOCAL DATA----------------------------------------------------*

ASSIGN (P_TC_NAME) TO &amp;lt;TC&amp;gt;.

* get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO &amp;lt;TABLE&amp;gt;. "not headerline

* mark all filled lines *
LOOP AT &amp;lt;TABLE&amp;gt; ASSIGNING &amp;lt;WA&amp;gt;.

* access to the component 'FLAG' of the table header *
ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE &amp;lt;WA&amp;gt; TO &amp;lt;MARK_FIELD&amp;gt;.

&amp;lt;MARK_FIELD&amp;gt; = 'X'.
ENDLOOP.
ENDFORM. "fcode_tc_mark_lines

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Form FCODE_TC_DEMARK_LINES
*&amp;amp;---------------------------------------------------------------------*
* demarks all TableControl lines
*----------------------------------------------------------------------*
* --&amp;gt;P_TC_NAME name of tablecontrol
*----------------------------------------------------------------------*
FORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME .
*-BEGIN OF LOCAL DATA--------------------------------------------------*
DATA L_TABLE_NAME LIKE FELD-NAME.

FIELD-SYMBOLS &amp;lt;TC&amp;gt; TYPE cxtab_control.
FIELD-SYMBOLS &amp;lt;TABLE&amp;gt; TYPE STANDARD TABLE.
FIELD-SYMBOLS &amp;lt;WA&amp;gt;.
FIELD-SYMBOLS &amp;lt;MARK_FIELD&amp;gt;.
*-END OF LOCAL DATA----------------------------------------------------*

ASSIGN (P_TC_NAME) TO &amp;lt;TC&amp;gt;.

* get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO &amp;lt;TABLE&amp;gt;. "not headerline

* demark all filled lines *
LOOP AT &amp;lt;TABLE&amp;gt; ASSIGNING &amp;lt;WA&amp;gt;.

* access to the component 'FLAG' of the table header *
ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE &amp;lt;WA&amp;gt; TO &amp;lt;MARK_FIELD&amp;gt;.

&amp;lt;MARK_FIELD&amp;gt; = SPACE.
ENDLOOP.
ENDFORM. "fcode_tc_mark_lines&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope it will help u, here we use internal table t_batch for making Table control from wizard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For documentation you can go to saphelp.com&lt;/P&gt;&lt;P&gt;and for another example you can goto transaction code  abapdocu &lt;/P&gt;&lt;P&gt;then screens - complex screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pankaj Singh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;***** Reward all helpful answers&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 13:55:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tabstrip-controls/m-p/1750423#M325362</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T13:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: tabstrip controls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tabstrip-controls/m-p/1750424#M325363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Iam sorry,i misinterpreted your question to be table control..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is for tabstrip --&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Choose the Tabstrip Wizard in the screen and place it in the screen and ´give continue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will ask for the number of tabs. Default is 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then Name the tabs according to ur requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in the PBO &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CAll subscreen sub1 including the sy-repid '0100'.&lt;/P&gt;&lt;P&gt;and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is enough for u to create a tabstrip with wizard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will automatically writes the code for u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAMPLE CODE -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;[code]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;REPORT demo_dynpro_tabstrip_server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTROLS mytabstrip TYPE TABSTRIP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ok_code TYPE sy-ucomm,&lt;/P&gt;&lt;P&gt;      save_ok TYPE sy-ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA  number TYPE sy-dynnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mytabstrip-activetab = 'PUSH2'.&lt;/P&gt;&lt;P&gt;number = '0120'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE status_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'SCREEN_100'.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE cancel INPUT.&lt;/P&gt;&lt;P&gt;  LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command INPUT.&lt;/P&gt;&lt;P&gt;  save_ok = ok_code.&lt;/P&gt;&lt;P&gt;  CLEAR ok_code.&lt;/P&gt;&lt;P&gt;  IF save_ok = 'OK'.&lt;/P&gt;&lt;P&gt;    MESSAGE i888(sabapdocu) WITH 'MYTABSTRIP-ACTIVETAB ='&lt;/P&gt;&lt;P&gt;                                  mytabstrip-activetab.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    mytabstrip-activetab = save_ok.&lt;/P&gt;&lt;P&gt;    CASE save_ok.&lt;/P&gt;&lt;P&gt;      WHEN 'PUSH1'.&lt;/P&gt;&lt;P&gt;        number = '0110'.&lt;/P&gt;&lt;P&gt;      WHEN 'PUSH2'.&lt;/P&gt;&lt;P&gt;        number = '0120'.&lt;/P&gt;&lt;P&gt;      WHEN 'PUSH3'.&lt;/P&gt;&lt;P&gt;        number = '0130'.&lt;/P&gt;&lt;P&gt;    ENDCASE.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.sap.com/code"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;pankaj singh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 14:01:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tabstrip-controls/m-p/1750424#M325363</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T14:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: tabstrip controls</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tabstrip-controls/m-p/1750425#M325364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Iam sorry,i misinterpreted your question to be table control..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is for tabstrip --&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Choose the Tabstrip Wizard in the screen and place it in the screen and ´give continue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will ask for the number of tabs. Default is 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then Name the tabs according to ur requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in the PBO &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CAll subscreen sub1 including the sy-repid '0100'.&lt;/P&gt;&lt;P&gt;and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is enough for u to create a tabstrip with wizard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will automatically writes the code for u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAMPLE CODE -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;[code]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;REPORT demo_dynpro_tabstrip_server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTROLS mytabstrip TYPE TABSTRIP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ok_code TYPE sy-ucomm,&lt;/P&gt;&lt;P&gt;      save_ok TYPE sy-ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA  number TYPE sy-dynnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mytabstrip-activetab = 'PUSH2'.&lt;/P&gt;&lt;P&gt;number = '0120'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE status_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'SCREEN_100'.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE cancel INPUT.&lt;/P&gt;&lt;P&gt;  LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command INPUT.&lt;/P&gt;&lt;P&gt;  save_ok = ok_code.&lt;/P&gt;&lt;P&gt;  CLEAR ok_code.&lt;/P&gt;&lt;P&gt;  IF save_ok = 'OK'.&lt;/P&gt;&lt;P&gt;    MESSAGE i888(sabapdocu) WITH 'MYTABSTRIP-ACTIVETAB ='&lt;/P&gt;&lt;P&gt;                                  mytabstrip-activetab.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    mytabstrip-activetab = save_ok.&lt;/P&gt;&lt;P&gt;    CASE save_ok.&lt;/P&gt;&lt;P&gt;      WHEN 'PUSH1'.&lt;/P&gt;&lt;P&gt;        number = '0110'.&lt;/P&gt;&lt;P&gt;      WHEN 'PUSH2'.&lt;/P&gt;&lt;P&gt;        number = '0120'.&lt;/P&gt;&lt;P&gt;      WHEN 'PUSH3'.&lt;/P&gt;&lt;P&gt;        number = '0130'.&lt;/P&gt;&lt;P&gt;    ENDCASE.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.sap.com/code"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;pankaj singh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 14:02:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tabstrip-controls/m-p/1750425#M325364</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-12T14:02:50Z</dc:date>
    </item>
  </channel>
</rss>

