Skip to Content
author's profile photo Former Member
Former Member

Module Pool

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 10, 2008 at 05:32 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 10, 2008 at 05:41 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 10, 2008 at 07:02 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 10, 2008 at 07:25 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 10, 2008 at 12:12 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.