How to execute module pool (Dialog programs)

hai gurus,
i have  created one module pool prm using se38,
and using se51 i had design two push buttons in Layout.
and the PAI flow logic i have written the code like ...
CASE : SY-UCOMM.
WHEN 'DISP'.
MESSAGE  I001 WITH 'DISPLAY BUTTON PRESSED'.
WHEN 'EXIT'.
MESSAGE I002 WITH 'EXIT BUTTON PRESSED'.
LEAVE PROGRAM.
ENDCASE.
as the same code will work for executable program and this is not working Module Pool program why .
and How can i execute with the use of module pool program
please help me

hi
good
go through these links which ll give you complete idea about the module pool programmin and the relation between module pool programming and ABAP.
http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm
http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
reward point if helpful.
thanks
mrutyun^

Similar Messages

  • How to debug module pool program

    Hi everybody,
    How to debug module pool program ,please send any material for module pool programming .
    Thanks & Regards,
    Siddivinesh.Jogu
    [email protected]

    Hi
    Check the below link:
    http://wiki.ittoolbox.com/index.php/FAQ:What_is_module_pool_program_in_abap%3F
    http://help.sap.com/saphelp_46c/helpdata/en/35/26b1aaafab52b9e10000009b38f974/content.htm
    http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm
    http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
    http://www.geocities.com/ZSAPcHAT
    http://www.allsaplinks.com/files/using_table_in_screen.pdf
    http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    http://www.sap-img.com/
    http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
    http://www.sapgenie.com/links/abap.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
    You can also check the transaction ABAPDOCU which gives you lot of sample programs.
    Also you can see the below examples...
    Go to se38 and give demodynpro and press F4.
    YOu will get a list of demo module pool programs.
    One more T-Code is ABAPDOCU.
    YOu can find more examples there.
    See the prgrams:
    DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement
    DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB
    http://www.geocities.com/ZSAPcHAT
    http://www.allsaplinks.com/files/using_table_in_screen.pdf
    Debugging
    Refer to this thread
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    Debugging
    Check these documents.
    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
    http://help.sap.com/saphelp_nw04/helpdata/en/5a/4ed93f130f9215e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/84/1f624f4505144199e3d570cf7a9225/frameset.htm
    http://help.sap.com/saphelp_bw30b/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
    ABAP Debugging
    http://www.saplinks.net/index.php?option=com_content&task=view&id=24&Itemid=34
    Look at the SAP help link below
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    Regards
    Anji

  • Mss reports - add module pool (dialog) to the list

    Hi experts,
    I need to add new reports to MSS reporting.
    Is it possible to add module pool (dialog) to the MSS reports list?
    I got an error when executing the program " no object stored within selected period".
    The portal seems like it cannot trigger the data from backend.
    Is it related to dialog program that we use?
    What is the best solution because we need the manager to choose from dropdown button through the MSS reports.
    Rgds,
    Nanie Arianie

    Solved
    Program error

  • Differance between module pool & report programming

    hi can any 1 tell me what is a big difference between module pool & report programs why is the need of module pool if we can do all the things with report program, please tell me technically how it behave
    Please search for available information before posting
    Edited by: kishan P on Sep 6, 2010 11:22 AM

    Hi, Ashwinv
    Welcome to SCN
    Please Search Before Posting any More
    Please read "The Forum Rules of Engagement" before posting!  HOT NEWS!!
    Thanks and Regards,
    Faisal

  • How to use module pool program in my custom report?

    Hi,
    I am developing a custom report in abap. I want to fetch data from a standard module pool program.I want output of this standard module pool program to be used in my standad report.Submit cannot be used with module pool programs. How can i do this?Can u please suggest?

    HI friend,
    For this you can directly use the table fields i.e. each and every module pool screen fields will be having the table name along with its fields (which you can see by double clicking the field and selecting technical settings button) and since it is a standard module pool program that will get populated directly. So you can get the screen field values directly from the table. I think this will help. Please try and let us know wheather it is solved.
    Thanks and regards,
    Sri Hari Anand Kumar
    Edited by: srihari.kumar on Apr 6, 2011 3:31 PM

  • How to write a module pool (M) program for the DEMO_DYNPRO_TABSTRIP_server

    Hi,
    How does someone write a module pool program (type m ) like the one which is given as an example for tabstrip control (paging through the app.server which is a report program). Please check the code given in the abap tutorial by sap below.
    REPORT DEMO_DYNPRO_TABSTRIP_server.
    CONTROLS MYTABSTRIP TYPE TABSTRIP.
    DATA: OK_CODE TYPE SY-UCOMM,
    SAVE_OK TYPE SY-UCOMM.
    DATA NUMBER TYPE SY-DYNNR.
    MYTABSTRIP-ACTIVETAB = 'PUSH2'.
    NUMBER = '0120'.
    CALL SCREEN 100.
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    MODULE CANCEL INPUT.
    LEAVE PROGRAM.
    ENDMODULE.
    MODULE USER_COMMAND INPUT.
    SAVE_OK = OK_CODE.
    CLEAR OK_CODE.
    IF SAVE_OK = 'OK'.
    MESSAGE I888(SABAPDOCU) WITH 'MYTABSTRIP-ACTIVETAB ='
    MYTABSTRIP-ACTIVETAB.
    ELSE.
    MYTABSTRIP-ACTIVETAB = SAVE_OK.
    CASE SAVE_OK.
    WHEN 'PUSH1'.
    NUMBER = '0110'.
    WHEN 'PUSH2'.
    NUMBER = '0120'.
    WHEN 'PUSH3'.
    NUMBER = '0130'.
    ENDCASE.
    ENDIF.
    ENDMODULE.
    I am finding the problem with the below statements .
    MYTABSTRIP-ACTIVETAB = 'PUSH2'.
    NUMBER = '0120'.
    CALL SCREEN 100.
    how do I write them in a module and how I can ensure that the functionality is not changed?
    Thanks in advance,
    Ajith c

    Hi
    All Tabstribs use the same subarea SUB (see the dynpro 100), in PBO it needs to indicate the program and subscreen number have to be loaded in that subarea.
    In PBO of screen 100 you can see the line:
    CALL SUBSCREEN SUB INCLUDING SY-REPID NUMBER.
    The variable NUMBER is managed in the USER_COMMAND:
      save_ok = ok_code.
      CLEAR ok_code.
      IF save_ok = 'OK'.
        MESSAGE i888(sabapdocu) WITH 'MYTABSTRIP-ACTIVETAB ='
                                      mytabstrip-activetab.
      ELSE.
        mytabstrip-activetab = save_ok.
        CASE save_ok.
          WHEN 'PUSH1'.
            number = '0110'.
          WHEN 'PUSH2'.
            number = '0120'.
          WHEN 'PUSH3'.
            number = '0130'.
        ENDCASE.
      ENDIF.
    But this module is triggered as soon as you press a button on screen 100 (you have to considere the label of tabstrip is a pushbutton),
    so it needs to initialize the variable NUMBER for the first time screen 100 is called, that mean it needs to indicate which is the first tab has to be shown at the beginning, so you have the code:
    mytabstrip-activetab = 'PUSH2'.  
    number = '0120'.
    CALL SCREEN 100.
    The same code can be included in the PBO in the following way:
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_0100.
      MODULE INIT_TABSTRIP. "<--- New Module
      CALL SUBSCREEN SUB INCLUDING SY-REPID NUMBER.
    PROCESS AFTER INPUT.
      MODULE CANCEL AT EXIT-COMMAND.
      CALL SUBSCREEN SUB.
      MODULE USER_COMMAND.
    MODULE INIT_TABSTRIP.
      IF NUMBER IS INITIAL.
        mytabstrip-activetab = 'PUSH2'.  
        number = '0120'.
      ENDIF.
    ENDMODULE.
    The line:
    mytabstrip-activetab = 'PUSH2'. 
    is to indicate which tabstrip has to be placed in foreground (remember every tabstrip is a pushbutton, so every tabstrip has an own ok_code)
    Max

  • How to download Module-pool program

    Hi,
    I am having one module-pool program in quality system, how to download the same
    and upload into Sandbox.
    Any suggestions
    Regards
    VENk@

    HI venkat,
         Please follow the below steps to resolve your problem.
        1 ) go to the screen painter
        2) go to the Utilities->upload /  download -> download
             --  provide name to the file and save it in local drive.
        3) in Sandbox create the program in se51 and go to the screen painter
        4) Utilities->upload /  download -> upload
             --  choose the correct file name from the local drive.
        5) rest of the Program coding you proceed to copy into flow login and driver program as well.
        then save the program and activate
    all the very best
    sreenivasa sarma

  • How to write module pool program

    hai,
    what is the module -pool program ?
    what are the procedures to write the module-pool program.
    plz give the simple program for module-pool programs?
    regards
    surender

    Hi
    This component though is not attached to the screen painter, plays important role in transaction. Normally, for reports, on line executable programs are written but for transaction, Module Pool Programs are written. The module pool program contains only modules to handle various events associated with screen and data declaration statements.
    System divides the module pool program into several include program. These are global field, PBO modules, and PAI modules. It is entirely user’s decision whether to use these modules or write directly into main program.
    Creation of Module Pool Program
    You can create module pool program either through
    Object browser
    System automatically creates the module pool program and for these program which are created through object browser, system creates the include modules.
    Or
    ABAP/4 editor
    It is similar to normal program creation. Type of program should be given ‘M’ and is not created by system.
    Communication between Dynpro and Module Program
    For each screen, the system executes the flow logic, which contains corresponding events. The control is passed to Module Pool Program. Module Pool Program handles the code for these events and again passes back control to the flow logic and finally to screen. Unlike on line program, in this case, the control remains with flow logic. The switching of control between flow logic and module pool program and back is common process when user executes transaction.
    Creation of a Complete Transaction
    Steps involved to create a complete transaction
    •     Create module pool program.
    •     From screen painter create screens.
    •     Write flow logic for each screen.
    •     Write code for all the events in module pool program.
    •     Check for any error in screen and flow logic.
    •     Generate each and every component of screen i.e. flow logic and screen.
    •     Single screen can be tested using Screen Painter.
    •     Create transaction code through object browser.
    •     Generate the transaction code.
    •     User can execute the transaction by entering the transaction code in the command field.
    Handling Function Code
    The function code or OKCODE is the last field of Field list. Function code can be handled as follows:
    During the Designing of the screen, a function code is assigned to pushbutton.
    •     In field list, developer needs to specify OKCODE as last field.
    •     In module program it is a global field and can be evaluated in the PAI event.
    •     A function code is treated in the same way, regardless it comes from pushbutton, menu item or any other GUI element.
    When the user clicks on the Display button, you want to display details of sflight, with corresponding carrid and connid (which is entered by the user).
    Module pool program to handle this particular screen is as follows:
    Program YVTEST7.
    TABLES: SFLIGHT.
    DATA: OKCODE (4).
    MODULE INPUT1 INPUT,
    CASE OKCODE.
       WHEN ‘DISP’.
         SELECT * FROM SFLIGHT
                WHERE CARRID =  SFLIGHT – CARRID AND
                               CONNID = SFLIGHT – CONNID.
         ENDSELECT.
         LEAVE TO SCREEN 200.
       WHEN ‘EXIT’.  LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.               “INPUT1 INPUT
    MODULE USER_COMMAND_0200 INPUT.
    CASE OKCODE.
    WHEN ‘BACK’. LEAVE TO SCREEN 100.
    ENDCASE.
    ENDMODULE.                    “USER_COMMAND_0200 INPUT
    When the user clicks on display, control is transferred to screen no. 200 on which you display sflight details & on the same screen, when user clicks on BACK button, he comes back to main screen.
    Flow logic for screen 100 is as follows:
    PROCESS AFTER INPUT.
    MODULE INPUT.
    Flow logic for screen 200
    PROCESS AFTER INPUT.
    USER_COMMAND_0200.
    MODULES: Modules are handled in module pool program.
    You need to write flow logic for screen 200 and design screen 200.
    In case of transaction transfer of data from program to screen is automatic i.e. you need not transfer the data from program to screen explicitly. The fields, which you define in the screen receives the data from program and displays the same.
    The Field Checks
    As already mentioned Transaction is the only method, which SAP recommends to update the database tables. Data entered in the database table should be valid and correct. Data entered is validated at each and every point. ABAP/4 offers various methods to validate data and those are as follows:
    •     Automatic field checks
    •     Checks performed in the flow logic
    •     Checks performed in the ABAP/4 module pool program
    Automatic Field Checks
    These checks are based on the field information stored in the dictionary. These checks are performed by the system automatically when the user enters the data for the screen field. System performs these checks before PAI event is triggered. Types of field checks performed by system are as follows:
    •     Required input
    While designing the screen, for particular screen field if you click the Req. Entry checkbox, the field becomes mandatory. When the transaction is executed if user leaves this particular field blank, the system displays error message. User cannot proceed until the user enters some data.
    •     Proper Data Format
    Each field has its own data format whether it is table field or screen field. Whenever data is entered, system checks for the proper format of the data. For example date. Each user has its own format for date, which is defined in the user master record. If the date defined in the user master record is in the format DD/MM/YYYY, if the user enters the date, say, in YY/DD/MM, the user displays the error message. System also checks for the value of month or days. For example if month entered is greater than twelve then the error message is displayed.
    •     Valid Value for the Field
    In data dictionary two tables are related by Primary key-Foreign key relationship.  Whenever the user enters the data, the system checks for the check table values.   Also in Domain, if you have fixed values, then the system checks for these values.
    Automatic field checks are repeated each time the user enters the data.
    About at Exit – Command
    Automatic field checks can be avoided by AT EXIT-COMMAND, which works exactly the same way as Cancel works on application tools bar. In the R/3 screen, if you want to quit the processing of that particular screen without entering the mandatory fields, user can click the Cancel button. Same functionality can be incorporated in the user-defined transaction by using AT EXIT-COMMAND. This module can be called before the system executes the automatic field checks and it goes without saying that before PAI event. Code for AT EXIT-COMMAND in flow logic and in module pool program can be written as follows:
    In Flow Logic
    Process After Input.
    Module exit AT EXIT-COMMAND.
             In module pool program.
    Module exit.
    Case okcode.
    When ‘Exit’.
    Leave to screen 0.
    To achieve this kind of functionality a pushbutton or menu item should be assigned a function type ‘E’. It tells the system to process this particular module before carrying out any field checks.
    Flow Logic Validations
    Consider the case where you want user to enter only ‘LH’ and ‘SQ’ for sflight-carrid. In this case, you are restricting value of a screen field. This cannot be achieved by automatic field check. Hence there is a need of additional validation. It can be done in flow logic by using following statement:
    Field -
    Values
    Syntax
    PAI.
    Field sflight-carrid values (‘LH’).
    For multiple values
    PAI.
    Field sflight-carrid values (‘LH’ ‘SQ’).
    Field sflight-price values (between 1000 and 2000).
    In this case when the user enters the value, PAI is triggered  and field is checked for  that particular value. If the value entered happens to be wrong, that field is enabled for user to enter. If you have multiple Field statements in your flow logic, it is sequential execution.
    Consider the following case:
    PAI.
    Module  assign.
    Field sflight-carrid values (‘LH’ ‘SQ’).
    In ABAP/4
    Module  assign.
    Data: carrid1 like sflight-carrid.
    Carrid1 = sflight-carrid.
    Endmodule.
    In this case, Sflight-carrid is used in the flow logic before the field statement. The system will give invalid value or some previous value as the field sflight-carrid is used in module before it is checked i.e., field statement is after the module in which sflight-carrid is being used. The field is not available to the system unless it executes the field statement. Field statement transfers the values to the program and is done only once. If you don’t have Field statement in your flow logic, transfer of values takes place in PAI event.
    Consider one more case where you have multiple field statement
    PAI.
    Field Sflight-carrid values (‘LH’).
    Field Sflight-connid values (‘0400’ ‘0500’).
    In this case if the user enters only carrid wrong, then this particular field is enabled and rest of the fields are disabled for user to input. Many times if the user enters wrong value for one field, then you might want to give option to user to enter all the fields, which is not possible by using Field statement only. This functionality can be achieved by CHAIN – ENDCHAIN.
    Syntax
    Chain.
    Field sflight-carrid value (‘LH’).
         Field sflight-connid values (between ‘200’ and ‘500’).
    Endchain.
    Field sflight-price values (‘100’ ‘1000’).
    In this case, if the user enters wrong value only for carrid, both the fields i.e. carrid and connid are enabled as they are grouped together in the Chain statement. The field price will be disabled for input. Usually, logically related fields are grouped together with Chain-Endchain statement.
    Module Pool Program Validations
    Checking fields ABAP/4 program includes
    •     Field statement in flow logic.
    •     Module statement in ABAP/4 module pool Program.
    Syntax
    PAI.
    Field sflight-carrid module <name>.
    This module can be handled in the main program i.e. module pool program.
    In ABAP/4 program
    Module Check.
    Select single * from sflight where carrid = sflight-carrid.
    If sy-subrc ne 0.
         Message e001.
    Endif.
    In this case, field sflight-carrid is checked in the table for its existence.
    Dynamically Calling the Screens
    About Displaying Next Screen
    Transaction is a sequence of screens, which are displayed one after the other. The next screen displayed depends upon the attributes of first screen. In attributes you need to give Next Screen number i.e. if next screen displayed should be 200 screen, then this number should be given in next Screen attributes. These are static attributes of the screen. By default, if nothing is specified in the program, the system branches out to the screen number, which is specified in the attribute screen.
    In this case, if user selects MARA pushbutton, then fields from Mara table are displayed. When the user clicks on the MARD, then the fields from MARD table are displayed. Depending upon users selection, the screen is branched out and this has to be done during runtime. This functionality can be achieved by dynamically calling the screen in module pool program.
    The screen can branch out to new screen depending upon user selection. Following command in module pool program can do this:
    •     SET SCREEM
    •     CALL SCREEN
    •     LEAVE TO SCREEN <NUMBER>
    All these commands override the specifications given in the attributes. This overriding is temporary. The values stored in the attribute are not changed.
    Set Screen
    Syntax
    Set screen <number>.
    In module pool program
    Case okcode.
         When  ‘DISP’.
              Set screen 200.
         When ‘LIST’.
              Set screen 300.
    Endcase.
    In this case, the entire processing of current screen takes place and then the system branches out to next screen. If you want to branch out to the next screen without processing the current screen, LEAVE SCREEN should be used along with the SET SCREEN.
    For Example:
    Case okcode..
         When  ‘DISP’.
              Set screen 200.
              Leave Screen.
         When ‘LIST’.
              Set screen 300.
              Leave Screen.
    Endcase.
    When SET SCREEN is used, control cannot be transferred to the main screen or previous screen, unless you write code for the same.
    Call Screen
    Usually used for pop up screens. Many times, there is a need for user to enter additional information or secondary information on another screen or pop up screen. Once the user enters the data, he should be able to go back to main screen or to the screen where he started. This is not possible by using SET SCREEN. CALL SCREEN achieves this functionality.
    Syntax
    Call Screen 200.
    Will simply call a screen number 200 from a main screen. Once the screen is displayed the user can enter all the data and return to the main screen by clicking BACK button.
    To call screen as pop up screen the syntax is
    Call screen starting at <col.no.> <line no>
                         Ending at <col no> <line no>.
    In this case window will be popped as window and user can close it by using BACK button.
    Leave to screen
    To SET a new screen without processing current screen, you need to use the following two statements together:
    SET SCREEN 200.
    LEAVE SCREEN.
    Or a Single statement
    LEAVE TO SCREEN 200.

  • How to call module pool through interactive ALV

    Moderator message: do not post in ALL CAPITALS.
    Hi all,
    I want to create an interactive report in which some parameters on selection-screen when i fill those & press f8  then an alv list is generated from ddic and when user double click on any row then a tcode get call which call a module pool program how can i do so please help me for that
    Ketan pande
    Abap consultant.
    Edited by: Matt on Feb 13, 2009 1:33 PM - Switched to sentence case
    Edited by: Matt on Feb 13, 2009 1:34 PM

    Modify this code to add Hot spots or double click action.
    This code will dynamically list the data of any DB table.
    REPORT yptc_dynamic_alv_table_display .
    TABLES: dd02t.
    TYPE-POOLS: slis. " ALV Global Types*data declaration for dynamic
    * internal table and alv
    DATA: l_structure                TYPE REF TO data,
          l_table                    TYPE REF TO data,
          struc_desc                 TYPE REF TO cl_abap_structdescr,
          lt_layout                  TYPE slis_layout_alv,
          ls_lvc_fieldcatalogue      TYPE lvc_s_fcat,
          lt_lvc_fieldcatalogue      TYPE lvc_t_fcat,
          ls_fieldcatalogue          TYPE slis_fieldcat_alv,
          lt_fieldcatalogue          TYPE slis_t_fieldcat_alv,
          g_repid                    LIKE sy-repid,
          g_list_top_of_page         TYPE slis_t_listheader,
          g_events                   TYPE slis_t_event,
          g_events_ex                TYPE slis_t_event_exit.
    *field symbols declaration
    FIELD-SYMBOLS :
      <it_table> TYPE STANDARD TABLE,
      <dyn_str> TYPE ANY,
      <str_comp> TYPE abap_compdescr.
    *declarations for grid title
    DATA : t1(30),
           t2(10),
           t3(50).
    *selection screen declaration for table input
    PARAMETERS : p_table LIKE dd02l-tabname.
    *initialization event
    INITIALIZATION.
    *start of selection event
    START-OF-SELECTION.
    *texts for grid title
      t1 = 'Dynamic ALV display for table'.
      t2 = p_table. CONCATENATE t1 t2 INTO t3 SEPARATED BY space.
    * dynamic  creation of a structure
      CREATE DATA l_structure TYPE (p_table).
      ASSIGN l_structure->* TO <dyn_str>.
    * fields structure
      struc_desc ?= cl_abap_typedescr=>describe_by_data( <dyn_str> ).
      LOOP AT struc_desc->components ASSIGNING <str_comp>.
    *    build fieldcatalog
        ls_lvc_fieldcatalogue-fieldname = <str_comp>-name.
        ls_lvc_fieldcatalogue-ref_table = p_table.
        APPEND ls_lvc_fieldcatalogue TO lt_lvc_fieldcatalogue.
    *    build fieldcatalog
        ls_fieldcatalogue-fieldname = <str_comp>-name.
        ls_fieldcatalogue-ref_tabname = p_table.
        APPEND ls_fieldcatalogue TO lt_fieldcatalogue.
      ENDLOOP.
    *  create internal table dynamic
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = lt_lvc_fieldcatalogue
        IMPORTING
          ep_table = l_table.
      ASSIGN l_table->* TO <it_table>.
    * read data from the table selected.
      SELECT * FROM (p_table)
        INTO CORRESPONDING FIELDS OF TABLE <it_table>.
    * alv layout
      lt_layout-zebra = 'X'.
      lt_layout-colwidth_optimize = 'X'.
      lt_layout-window_titlebar = t3.
    * Events
      PERFORM eventtab_build     USING g_events[]
                                       g_events_ex[].
      g_repid = sy-repid.
    *alv output
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program       = g_repid
                is_layout     = lt_layout
                it_fieldcat   = lt_fieldcatalogue
                it_events     = g_events[]
    *            it_excluding  = g_exclude
           TABLES
                t_outtab      = <it_table>
           EXCEPTIONS
                program_error = 1
                OTHERS        = 2.
      IF sy-subrc NE 0.
    *    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    *    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    *       FORM eventtab_build                                           *
    FORM eventtab_build
        USING e03_lt_events TYPE slis_t_event
              e03_lt_events_ex TYPE slis_t_event_exit.
      CONSTANTS:
        gc_formname_top_of_page   TYPE slis_formname VALUE 'TOP_OF_PAGE',
        gc_formname_user_command   TYPE slis_formname VALUE 'USER_COMMAND'.
      DATA: ls_event      TYPE slis_alv_event,
            ls_event_exit LIKE LINE OF e03_lt_events_ex.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                i_list_type = 1
           IMPORTING
                et_events   = e03_lt_events.
      READ TABLE e03_lt_events
           WITH KEY name = slis_ev_top_of_page
           INTO ls_event.
      IF sy-subrc = 0.
        MOVE gc_formname_top_of_page TO ls_event-form.
        APPEND ls_event TO e03_lt_events.
      ENDIF.
    ENDFORM.                    " build_events_table
    *       FORM top_of_page                                              *
    FORM top_of_page.
      DATA: ls_line TYPE slis_listheader.
      SELECT SINGLE * FROM dd02t
        WHERE tabname = p_table
          AND ddlanguage = sy-langu.
      CLEAR g_list_top_of_page[].
      CLEAR ls_line.
      ls_line-typ  = 'H'.
      CONCATENATE p_table '-' dd02t-ddtext INTO ls_line-info
        SEPARATED BY space.
    *  ls_line-info = p_table.
      APPEND ls_line TO g_list_top_of_page.
      PERFORM build_sub_headings
          USING g_list_top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
                it_list_commentary = g_list_top_of_page[].
    ENDFORM.                    " top_of_page
    *       FORM build_sub_headings                                       *
    *  -->  E07_TOP_OF_PAGE                                               *
    FORM build_sub_headings
            USING e07_top_of_page TYPE slis_t_listheader.
      DATA: ls_line TYPE slis_listheader.
      CLEAR ls_line.
      ls_line-typ  = 'S'.
      ls_line-key = 'Run Info'.
      CONCATENATE  sy-sysid sy-uname sy-mandt
            INTO ls_line-info
            SEPARATED BY space.
      APPEND ls_line TO e07_top_of_page.
    ENDFORM.                    "build_sub_headings

  • Step by step procedure in module pool..programming

    hi
         can any one give me the step by step procedure of module pool programming .. at present iam in mm module pool programming...urgent..
    regards
    veera

    Check the below link:
    http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
    Simple program to create module pool.
    http://wiki.ittoolbox.com/index.php/FAQ:What_is_module_pool_program_in_abap%3F
    http://help.sap.com/saphelp_46c/helpdata/en/35/26b1aaafab52b9e10000009b38f974/content.htm
    http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm
    http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
    You can also check the transaction <b>ABAPDOCU</b> which gives you lot of sample programs.
    Regards,
    Prakash,.

  • How to call module pool  from Bussiness event.

    Hi SDN,
    I have a reqd where ....through a business transaction event..I need to call a module pool screen.
    I will also need to pass few internal tables present in the business event to the module pool screen.
    Please tell me the steps or a code segment
    Regards
    Bidyut
    Edited by: bidyut dutta on Nov 25, 2008 8:34 AM

    Hi Bidyut,
    You mean to say that you would like to call a module pool program in thsi event....?
    Can you please elobrate your requirement....
    If you need to call a module pool program then you can call that program by using the satement called SUbmit.
    Give some condition like
    If it is true
    Submit the Zmodulepool program.....
    Regards,
    Kittu

  • Urgent : Smartforms: Direct printing from module pool/dialog screen

    Hi all,
    i have a module pool screen where in from a screen i have some inputs from the user and after saving user wud click on a button called print which shud print a slip containing the screen data.now for this purpose i have made a smartform which on execution of it's driver program fetches data from DB table and puts on to SF.
    NOW MY ISSUE IS AS SOON AS THE USER PRESSES PRINT THE SMARTFORM SHUD DIRECTLY GET PRINTED.
    WAITING FOR ANSWERS
    THANKS AND REGARDS,
    SSACHIN SONI

    cool dude that wrked,thx giving u full points.i have on emore issue if u can  help:
    this driver program needs an input for which i've made a selection screen for testing but as i need to launch it frm mod pool screen i want that this program shud automatically get data(thr's only 1 field ) and shud nt get stopped at the selection screen.
    thanks
    sachin

  • How to copy module pool prog one server to another server

    hi Experts,
    hi how to copy  the module pool prog(mpp)  one server to another server , like download and upload , in this i have 10 screen pbo , pai, includes , , in  this mpp
    will have other tcodes also ..
    is this possible ,  if yes how give me step by step process
    pls do help me in this requirment .
    thanks in advance ,
    m venu

    Do you have the ability to import a transport into your second server?  The easiest way to accomplish this is to create a Transport Request in your originating system, release the transport, and have you basis admins import it into the second server.
    Regards,
    Chris H.

  • Please help me out... provide me your module pools simple programs

    Dear Friends,
    Can you please help me out in getting some simple module pool programs like
    using
    INSERT
    UPDATE
    BACK
    commands....

    Dear Hazi Valli,
    Post your queries in relevant Forum. You could post queries related to module pool in UI Programming Forum of ABAP Development. Search the Forum for generic queries.
    Visit following links:
    http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e4/2adbef449911d1949c0000e8353423/content.htm
    http://www.thespot4sap.com/Articles/SAP_Design_Dynpro.asp
    Regards,
    Naveen.

  • How to capture the selected values from module pool dialog list box !

    Hi experts,
    Can anyone help me out in capturing the values from the list box.
    i am able to set the values in the list box.But i am not able to capture the selected value from the list box. Always the list box name is getting as "space"
    I also tried in using the FM "VRM_GET_VALUES" but it is retireving all the values. Is there is any flag for filttering out the selected value.
    Your inputs are appreciated.
    Thanks,
    Vijay.

    Along with the PBO and PAI event, add a POV event in the flow logic of the screen
    DEMO_DROPDOWN_LIST_BOX -is a good demo example.
    PROCESS ON VALUE-REQUEST.
    FIELD structure_name-field_name MODULE create_dropdown_box.
    In the report :
    MODULE create_dropdown_box INPUT.
      SELECT carrid carrname
                    FROM scarr
                    INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'CARRID'
                value_org       = 'S'
           TABLES
                value_tab       = itab_carrid
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc <> 0.
      ENDIF.
    ENDMODULE.
    In the layout, assign a Function Code , for eg : 'SELECTED' to the listbox and lets say name of the field is SDYN_CONN-CARRID. So in the PAI module,
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'SELECTED'.
          MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
      ENDCASE.
    ENDMODULE.
    sdyb_conn-carrid will contain your selected field

Maybe you are looking for

  • Win 8.1 PRO: Internet Explorer and integrated Adobe Flash Player no hardware acceleration on GMA

    HI, i have a little problem with your latest release. I have make a total update of the system today (win 8.1 pro 23 March 2014) and i saw that hardware decoding is not working on Internet explorer (the option is not available in the adobe tool: righ

  • Will connecting my nano to a comp without my songs delete them????

    i want to update my nano but was told if i plug it into a different computer all my songs will be deleted? is this true? or is there a way around it??? please help!!!!

  • Broken Links Index Keyword

    Hello All, I have a bunch of index keywords that show up under Broken Links and I can't seem to resolve them. RoboHelp help has a topic, "Removing topic references from keywords" but their procedure doesn't work for me. If anyone has figured out a fi

  • How to move multiple clips with transitions?

    Im still transitioning from FCP7 to FCP 10.1.2 and can't believe I have missed the lesson that explains how to move multiple clips with transitions. Up till now I have tried several work arounds including deleting all the transitions then using the (

  • Where is the duplicate?

    I have attempted to import a photo to iPhoto... but iPhoto informs me that the photo is a duplicate and already resides in my iPhoto library! Regrettably... no hint is volunteered as to where that duplicate can be found! How can I locate that photo?