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

table control in internal table

what will b the sequence to creat module pool

i.e topinclude , pbo ,pai , screen-layout, flow logic ,

i m confused which sequence i follow .

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Posted on Jan 31, 2008 at 05:13 PM

    Hi Ruchi

    <REMOVED BY MODERATOR>

    PROGRAM YMPSKEL MESSAGE-ID YL.
    *-----------------------------------------------------------------------
    * DESCRIPTION
    * written by !
    *-----------------------------------------------------------------------
    * TABLES:
    
    DATA: OK_CODE(4), " ok code - screen 1
    OK_CODE2(4).
    DATA C LIKE SY-INDEX. " Index for screen loop
    *&---------------------------------------------------------------------*
    *& Module USER_COMMAND_0100 INPUT
    *&---------------------------------------------------------------------*
    * process after input for screen 0100 *
    *----------------------------------------------------------------------*
    MODULE USER_COMMAND_0100 INPUT.
    
    CASE OK_CODE.
    WHEN 'SAVE'.
    *
    WHEN 'DISP'.
    *
    WHEN 'LIST'.
    C = 0. "reset loop control
    *
    WHEN OTHERS.
    *
    ENDCASE.
    CLEAR OK_CODE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *&---------------------------------------------------------------------*
    *& Module STATUS_0100 OUTPUT
    *&---------------------------------------------------------------------*
    * process before output for screen 0100 *
    *----------------------------------------------------------------------*
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'AMEND'. " set gui status
    SET TITLEBAR '100'. " set title
    ENDMODULE. " STATUS_0100 OUTPUT
    *&---------------------------------------------------------------------*
    *& Form SAVE data
    *&---------------------------------------------------------------------*
    * Save screen details
    *&---------------------------------------------------------------------*
    FORM SAVE.
    *
    CLEAR OK_CODE.
    ENDFORM.
    *&---------------------------------------------------------------------*
    *& Form DISPLAY
    *&---------------------------------------------------------------------*
    *----------------------------------------------------------------------*
    FORM DISPLAY.
    *
    *
    
    ENDFORM.
    *&---------------------------------------------------------------------*
    *& Module EXIT_COMMAND INPUT
    *&---------------------------------------------------------------------*
    * exit commands are processed before validation *
    * defined by E against function in menu painter(function list)
    *----------------------------------------------------------------------*
    MODULE EXIT_COMMAND INPUT.
    
    CASE OK_CODE.
    WHEN 'EXIT'. CLEAR OK_CODE. SET SCREEN 0. LEAVE SCREEN.
    WHEN 'CANC'. CLEAR OK_CODE. SET SCREEN 0. LEAVE SCREEN.
    WHEN 'BACK'. CLEAR OK_CODE. SET SCREEN 0. LEAVE SCREEN.
    ENDCASE.
    ENDMODULE. " EXIT_COMMAND INPUT
    *&---------------------------------------------------------------------*
    *& Form list
    *&---------------------------------------------------------------------*
    * text *
    *----------------------------------------------------------------------*
    FORM LIST.
    
    
    CLEAR OK_CODE. SET SCREEN 200. LEAVE SCREEN.
    
    ENDFORM. " LIST
    *&---------------------------------------------------------------------*
    *& Module EXIT_COMMAND_200 INPUT
    *&---------------------------------------------------------------------*
    * exit command processing for screen 200 *
    * defined by E against function in menu painter(function list)
    *----------------------------------------------------------------------*
    MODULE EXIT_COMMAND_200 INPUT.
    
    CASE OK_CODE2.
    WHEN 'EXIT'. CLEAR OK_CODE2. SET SCREEN 0. LEAVE SCREEN.
    WHEN 'CANC'. CLEAR OK_CODE2. SET SCREEN 0. LEAVE SCREEN.
    WHEN 'BACK'. CLEAR OK_CODE2. SET SCREEN 100. LEAVE SCREEN.
    ENDCASE.
    ENDMODULE. " EXIT_COMMAND_200 INPUT
    *&---------------------------------------------------------------------*
    *& Module STATUS_0200 OUTPUT
    *&---------------------------------------------------------------------*
    * process before output for screen 200 *
    *----------------------------------------------------------------------*
    MODULE STATUS_0200 OUTPUT.
    SET PF-STATUS 'POPUP'.
    * SET TITLEBAR 'xxx'.
    
    ENDMODULE. " STATUS_0200 OUTPUT

    Edited by: Alvaro Tejada Galindo on Jan 31, 2008 12:16 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 04:15 AM

    Hi,

    First create a screen.

    then PBO modules.

    PAI Modules...

    Pls refer to :

    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/frameset.htm

    Regards,

    Renjith Michael.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 04:21 AM

    Hi,

    In the Object Browser, the module pool code belongs to one of the following categories:

    Global fields: data declarations that can be used by all modules in the module pool

    PBO modules: modules that are called before displaying the screen

    PAI modules: modules that are called in response to the user input

    Subroutines: subroutines that can be called from any position within the module pool

    By default, the system divides a module pool into one or several include programs. An include program can contain several modules of the same type (only PBO modules or only PAI modules). The main program then consists of a sequence of INCLUDE statements that link the modules to the module pool:

    *&----


    *&

    *& Module pool SAPMTZ10

    *&

    *&----


    *&

    *& Display data of Table SPFLI

    *&

    *&----


    • Global data

    INCLUDE MTZ10TOP.

    • PAI modules

    INCLUDE MTZ10I01.

    • PBO modules

    INCLUDE MTZ10O01.

    In the ABAP/4 editor, you can display the code hidden behind the INCLUDE statements by choosing Edit ---> More functions ---> EXPAND include. With all INCLUDE statements expanded, the module pool looks like this:

    *&----


    *& Module pool SAPMTZ10

    *& FUNCTION: Display data from Table SPFLI

    *&

    *&----


    *----


    • INCLUDE MTZ10TOP (This is the TOP include:

    • the TOP module contains global data declarations)

    *----


    PROGRAM SAPMTZ10.

    TABLES: SPFLI.

    DATA OK_CODE(4).

    *----


    • INCLUDE MTZ10I01 (This is a PAI include.)

    *----


    *&----


    *& Module USER_COMMAND_0100 INPUT

    *&----


    • Retrieve data from SPFLI or leave transaction

    *----


    MODULE USER_COMMAND_0100 INPUT.

    CASE OK_CODE.

    WHEN 'SHOW'.

    CLEAR OK_CODE.

    SELECT SINGLE * FROM SPFLI WHERE CARRID = SPFLI-CARRID

    AND CONNID = SPFLI-CONNID.

    WHEN SPACE.

    WHEN OTHERS.

    CLEAR OK_CODE.

    SET SCREEN 0.

    LEAVE SCREEN.

    ENDCASE.

    ENDMODULE.

    *----


    • INCLUDE MTZ10O01 (This is a PBO include.)

    *----


    *&----


    *& Module STATUS_0100

    *&----


    • Specify GUI status and title for screen 100

    *----


    MODULE STATUS_0100.

    SET PF-STATUS 'TZ0100'.

    SET TITLEBAR '100'.

    ENDMODULE.

    You use the ABAP/4 Dictionary to store frequently used data declarations centrally. Objects defined in the Dictionary are known throughout the system. Active Dictionary definitions can be accessed by any application. Data defined in the Dictionary can be included in a screen or used by an ABAP/4 program. You declare global data in the TOP module of the transaction, using the TABLES, STRUCTURE, LIKE statements and others

    Cheers,

    vasu.

    kindly reward if helpful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 04:29 AM

    well in can send a mail to you with a presentation on table control as my presentation has also got screen shots.

    do lemme note you mail id.

    and plz reward if thats useful

    keep rockin

    vivek

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 05:43 AM

    Hi ruchi ,

    go to se38 create module pool type (do not write code ),

    then se35 there u create screen

    click on layout,. design then screen then clickon flow logic,it will automatically take you to the module poll which u designed in se38 to write code there u first choose PAI (Process After Input) that is after giving the inputs in selection screen wht should happen (code it there) then come back and then PBO(Process Before Output) that is wht process should be done before to disply output.

    Thats the basic idea and flow how to get easy interact with module pools ..

    hope its usefull

    if so reword accordingly.

    Best Regards

    SUNNY..

    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.