Application Development 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: 

Module Pool

Former Member
0 Kudos

Can any body help me..I want to give input in table control(module pool programming) and it should come in our internal table. how it will come? pls give me solution.

Thanks,

Rakesh

5 REPLIES 5

Former Member
0 Kudos

Hi,

In the PBO loop at that internal table used for table control into a wa...

Then modify the itab taransporting the latest values...

See the sample program :

RSDEMO02

Regards,

Renjith Michael.

Former Member
0 Kudos

Hi Rahesh,

Table control is process of table. Its applied for internal table with PBO and PAI.

PBO--> Internal name with control looping.

PAI--> Internal name without control looping and only allow the loop.

Cheers,

S.Suresh.

<REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Apr 10, 2008 6:09 PM

Former Member
0 Kudos

Hi Rakesh,

Follow the steps.

1. Declare an internal table in your program

2. In the screen layout drag and drop the table control.

3 . Press F6 or use the icon Dictionary / program fields in the menu bar.

4. In the pop up that appears click the get from program button.

5. Select your internal table fields and drop it in the table control.

6. Declare a loop in PBO and PAI.

7. Then if you give value in the table control you can get it in the internal table .You can check it by debugging the prorgram.

Hope it helps.

Regards,

Charumathi.B

Former Member
0 Kudos

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.

Regards,

Priya.

Former Member
0 Kudos

hi,

u would have one module MODULE tab1_modify ON CHAIN-REQUEST in PAI...

PROCESS AFTER INPUT.

*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TAB1'

LOOP AT i_mat.

CHAIN.

FIELD i_mat-matnr.

FIELD i_mat-meins.

MODULE tab1_modify ON CHAIN-REQUEST.

ENDCHAIN.

ENDLOOP.

write this in that

MODULE tab1_modify INPUT.

APPEND i_mat.

ENDMODULE. "TAB1_MODIFY INPUT

here i_mat is my internal table from which i have created table control ( using wizard ) and tab1 is my table control name...

<REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Apr 10, 2008 6:09 PM