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

how to handle table control in module pool

Former Member
0 Likes
4,207

hi,

thanks

i am not able to use

table control in module pool

please tell me the document or link .

thanks

1 ACCEPTED SOLUTION
Read only

Former Member
3 REPLIES 3
Read only

Former Member
0 Likes
3,150

Check these standard programs..

RSDEMO_TABLE_CONTROL

DEMO_DYNPRO_TABLE_CONTROL_1

DEMO_DYNPRO_TABLE_CONTROL_2

RSDEMO_TABLE_CONTROL

RSDEMO02

http://help.sap.com/saphelp_45b/helpdata/en/d1/801bdf454211d189710000e8322d00/content.htm

http://sap.niraj.tripod.com/id29.html

Reward if useful

Read only

Former Member
Read only

Former Member
0 Likes
3,150

HI,

TABLE CONTROLS:

-


Table Control component is used to view the internal table contents in the screen.

Navigations to create Table control component:

-


1. Create an MPP program.

2. In Top include File, declare variables as follows:

DATA ITAB LIKE KNA1 OCCURS 0 WITH HEADER LINE.

DATA ITAB1 LIKE KNA1 OCCURS 0 WITH HEADER LINE.

CONTROLS TBCL TYPE TABLEVIEW USING SCREEN 100.

DATA CUR TYPE I VALUE 5.

-> Save -> Activate.

3. Create a Screen (100) -> Select Table control component from toolbar -> Double Click and specify name (TBCL) -> Press F6 and specify internal table name (ITAB) -> Select required fields -> Paste on the Table control -> To separate the fields, use Separators option in Table control Attributes -> Specify labels if necessary -> Create pushbuttons (FETCH, MODIFY, PRINT, EXIT) -> Save -> Flowlogic.

4. In PAI module, specify following code:

CASE SY-UCOMM.

WHEN 'FETCH'.

SELECT * FROM KNA1 INTO TABLE ITAB.

TBCL-LINES = SY-DBCNT. * To create Vertical Scrollbar

WHEN 'EXIT'.

LEAVE PROGRAM.

WHEN 'PRINT'.

GET CURSOR LINE CUR.

READ TABLE ITAB INDEX CUR.

LEAVE TO LIST-PROCESSING.

WRITE 😕 ITAB-KUNNR, ITAB-NAME1, ITAB-ORT01, ITAB-LAND1.

WHEN 'MODIFY'.

LOOP AT ITAB1.

MODIFY KNA1 FROM ITAB1.

IF SY-SUBRC = 0.

MESSAGE S002(ZMSG).

ELSE.

MESSAGE E003(ZMSG).

ENDIF.

ENDLOOP.

SELECT * FROM KNA1 INTO TABLE ITAB.

TBCL-LINES = SY-DBCNT.

ENDCASE.

5. In FlowLogic editor, specify following step loops:

PROCESS BEFORE OUTPUT.

MODULE STATUS_0100.

LOOP AT ITAB CURSOR CUR WITH CONTROL TBCL.

ENDLOOP.

PROCESS AFTER INPUT.

MODULE USER_COMMAND_0100.

LOOP AT ITAB.

MODULE NEW. * New module to move records from ITAB to ITAB1. Double click on Module Name (New) to create a new one.

ENDLOOP.

6. Specify following code in the NEW module:

MODULE NEW INPUT.

APPEND ITAB TO ITAB1.

ENDMODULE.

7. Create a Tcode -> Activate all -> Execute.

USING TABLE CONTROL WIZARD:

-


This is a predefined SAP-specific component to create table control using predefined navigations.

1. Create an executable program (Z_TABLEWIZARD) in SE38 editor. Write the following code:

CALL SCREEN 200.

-> Save -> Activate.

2. Goto SE51 -> Specify program name created earlier (Z_TABLEWIZARD) -> Specify Screen number (200) -> Layout -> Select Table Control (Wizard) component from toolbar -> Opens Table control Wizard -> Follow the navigations -> Save and Activate the table control.

3. Execute the program (Z_TABLEWIZARD).

Regards,

Priya.