Want to create a module pool pr by se38..

hi everyone.. I want to create a module pool program by SE38 tr code n going by modular programm rather than executable pr..can anyone tell me from very begining how to do this... also send me screenshots regarding this or link..plz....

Hi Shekhar,
REPORT ZBHMOD1 .
DATA:OKCODE1 LIKE SY-UCOMM,
OKCODE2 LIKE SY-UCOMM.
DATA:N1(10) TYPE N,N2(10) TYPE N,RES(12) TYPE N.
MODULE USER_COMMAND_1000 INPUT.
CASE OKCODE1.
WHEN 'NEXT'.
RES = N1 + N2.
SET SCREEN 1001.
WHEN 'CLEA'.
CLEAR:N1,N2.
WHEN 'BACK'.
SET SCREEN '0'.
ENDCASE.
ENDMODULE. " USER_COMMAND_1000 INPUT
MODULE STATUS_1000 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'TIT1'.
ENDMODULE. " STATUS_1000 OUTPUT
MODULE USER_COMMAND_1001 INPUT.
CASE OKCODE2.
WHEN 'BACK'.
SET SCREEN 1000.
ENDCASE.
ENDMODULE. " USER_COMMAND_1001 INPUT
MODULE STATUS_1001 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'TIT2'.
ENDMODULE. " STATUS_1001 OUTPUT
FLOW LOGIC:
PROCESS BEFORE OUTPUT.
MODULE STATUS_1000.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_1000.
PROCESS BEFORE OUTPUT.
MODULE STATUS_1001.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_1001.
2)
REPORT ZBHMOD2.
DATA: OKCODE1 TYPE SY-UCOMM,
OKCODE2 TYPE SY-UCOMM,
ENAME(10) TYPE C,
DNAME(10) TYPE C.
MODULE STATUS_1000 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'TIT1'.
ENDMODULE. " STATUS_1000 OUTPUT
MODULE STATUS_1001 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'TIT2'.
ENDMODULE. " STATUS_1001 OUTPUT
MODULE USER_COMMAND_1000 INPUT.
CASE OKCODE1.
WHEN 'BACK'.
SET SCREEN '0'.
WHEN 'NEXT'.
DNAME = ENAME.
SET SCREEN '1001'.
ENDCASE.
ENDMODULE. " USER_COMMAND_1000 INPUT
MODULE USER_COMMAND_1001 INPUT.
CASE OKCODE2.
WHEN 'BACK'.
SET SCREEN '1000'.
ENDCASE.
ENDMODULE. " USER_COMMAND_1001 INPUT
FORM ON_CTMENU_FORM USING ZDEMO1 TYPE REF TO CL_CTMENU.
CALL METHOD ZDEMO1->LOAD_GUI_STATUS
EXPORTING
PROGRAM = 'ZDEMO1'
STATUS = 'ZDEMO1'
MENU = ZDEMO1.
ENDFORM. " ON_CTMENU_FORM
FLOW LOGIC:
PROCESS BEFORE OUTPUT.
MODULE STATUS_1000.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_1000.
PROCESS BEFORE OUTPUT.
MODULE STATUS_1001.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_1001.
Every Screen has a pbo and a pai.
Screen elements are the textbox, buttons, radio buttons and check boxes .....
If we want to pass data from a abap program to a screen element, we have to create a variable with the name we have given in the screen.So whatever the value is present in that variable is reflected on to the screen element.
Here is an example :
Using subscreens and some of the screen elements
REPORT demo_dynpro_subscreens.
DATA: ok_code TYPE sy-ucomm,
save_ok TYPE sy-ucomm.
DATA: number1(4) TYPE n VALUE '0110',
number2(4) TYPE n VALUE '0130',
field(10) TYPE c, field1(10) TYPE c, field2(10) TYPE c.
CALL SCREEN 100.
MODULE status_100 OUTPUT.
SET PF-STATUS 'SCREEN_100'.
ENDMODULE.
MODULE fill_0110 OUTPUT.
field = 'Eingabe 1'(001).
ENDMODULE.
MODULE fill_0120 OUTPUT.
field = field1.
ENDMODULE.
MODULE fill_0130 OUTPUT.
field = 'Eingabe 2'(002).
ENDMODULE.
MODULE fill_0140 OUTPUT.
field = field2.
ENDMODULE.
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE save_ok INPUT.
save_ok = ok_code.
CLEAR ok_code.
ENDMODULE.
MODULE user_command_0110 INPUT.
IF save_ok = 'OK1'.
number1 = '0120'.
field1 = field.
CLEAR field.
ENDIF.
ENDMODULE.
MODULE user_command_0130 INPUT.
IF save_ok = 'OK2'.
number2 = '0140'.
field2 = field.
CLEAR field.
ENDIF.
ENDMODULE.
MODULE user_command_100 INPUT.
CASE save_ok.
WHEN 'SUB1'.
number1 = '0110'.
WHEN 'SUB2'.
number1 = '0120'.
CLEAR field1.
WHEN 'SUB3'.
number2 = '0130'.
WHEN 'SUB4'.
number2 = '0140'.
CLEAR field2.
ENDCASE.
ENDMODULE.
flow logic for screen 100
PROCESS BEFORE OUTPUT.
MODULE STATUS_100.
CALL SUBSCREEN: AREA1 INCLUDING SY-REPID NUMBER1,
AREA2 INCLUDING SY-REPID NUMBER2.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
MODULE SAVE_OK.
CALL SUBSCREEN: AREA1,
AREA2.
MODULE USER_COMMAND_100.
flow logic for screen 110
PROCESS BEFORE OUTPUT.
MODULE FILL_0110.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0110.
flow logic for screen 120
PROCESS BEFORE OUTPUT.
MODULE FILL_0120.
PROCESS AFTER INPUT.
flow logic for screen 130
PROCESS BEFORE OUTPUT.
MODULE FILL_0130.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0130.
flow logic for screen 140
PROCESS BEFORE OUTPUT.
MODULE FILL_0140.
PROCESS AFTER INPUT.
Kindly Reward Points If You Found The Reply Helpful,
Cheers,
Chaitanya.

Similar Messages

  • I wanted to create a module pool which accepts a table n flag

    i wanted to create a module pool which accepts a table n flag.
    and based on flasg value it allows the table to get into edit or display mode.
    the table has to use table control to display for user
    and it should be able to edit the table as well as append if the flag value is edit.
    the table which has been change should be passed back.

    HI Shailesh ,
          On your screen which contains the table control , you can definately  put the flag . Now use 2 conditions , one for change n other for display mode .Initialize the value of the flag to be "X" and based on the flag valu design your table .
    lets say u have a screen 0100 ,
    at the begining put FLAG = 'X'.
    lets say , this is for your change screen  .
    then loop at the table control and allow the fields for fields input . all you should do in the PBO only .
    next in PAI , fill the table control with the changed values .
    and in PAI , in AT-user command module , code for the flag ( / push button  ) . and pass the values when the user clicks on the button .or else here you can check whether the value of the flag is  "X" ( for change mode )  or " " .
    if it  is " "   then loop at the screen and make all the fields inactive for input ( Display mode )
    Inactivation of the fields should be done in the PBO based on the conditions .
    Revert back if you need further clarification .
    This logic should  definately work .
    Reward if helpful .
    Thanks
    Ranjita

  • How to create a module pool program

    Dear Guru
    I want to know know how to create a module pool program from se80 step by step. I want to know the steps where i will get the four includes like form routines, PAI, PBO, and global data please its very urgent.
    Thanks & regards
    Saifur Rahaman

    hi Saifur Rahaman,
    goto se80 then click find program,
    next u want any name of the program enter as,
    Attribute type as find Module pool click it.
    next u want any package and save and activate.
    program name with create screen with any number then
    click layout and u want any object and save , actived.
    click flow logic , four types as PBO and PAI and POV, POH.
    PBO---> Trigger is before screen.
    its applied for display screen and inactive or no display screen only
    PAI--->Trigger is after screen
    when u want button then its processed.
    POV--> Value requested for F4.
    POH-->Help requested for F1.
    Reward if useful,
    S.Suresh.

  • Does anyone have any notes on how to create a module pool?

    Hi,
    I have created a new task type called "Notice Period Change Date" which I need to default in a task date of 5 years service (from their hiring date). Having read up on this I think I need to create a module pool and link via the dynamic action but I am a bit unsure on how to do this.
    Any assistance would be greatly appreciated.
    Thanks
    Hannah

    I think that you could use a dynamic action to create this new task date.
    Create the dynamic action on the infotype 0000 when the action type (MASSN) = hiring,
    Call infotype 0019 with the subtype = your new task type.
    Then call a function (F) to add 5 years to the hire date (P0000-BEGDA) and put the result into the task date field P0019-TERMN
    Take a look at the dynamic actions table T588Z - there are probably some examples already there.
    Mark

  • Creating a module pool screen and upload the data entered,

    Dear Experts,
    As i am new to this area, can any one suggest me how can i design a module screen and also the data entered in the screen should be saved in Ztable.
    It would be of great help if any one provides material sort of thing.
    Thanks in advance..

    Hi
    Goto SE51 and design your screen.
    For each control specify the name. For a few controls you need to specify the function codes as well. Until you specify all the mandatory details the controls will remain pink.
    When you are done, Save and Activate.
    Click on Flow Logic button.
    Specify the modules you want to use in PBO and PAI.
    In the program declare data objects having same name as your screen fields.
    When you enter data in the screen fields, the values are automatically stored in the data objects you declared having the same name.
    If you want to insert the details into a ztbl, simply use insert queries and pass data using the data objects you have defined.
    If you are going for BDC:
    First ensure that your screens and code work correctly. Then do the BDC recording for one value. Modify the recorded program according to your requirement.
    Hope this helps
    Regards,
    Jayanthi.K

  • I am not able to close the popup screen which i created using module pool

    Hi,
    I had written the following code in my PBO of the screen
    PROCESS BEFORE OUTPUT.
    MODULE status_0300.
      MODULE call_list_0300.
    PROCESS AFTER INPUT.
      MODULE exit AT EXIT-COMMAND.
    MODULE USER_COMMAND_0300.
    *&      Module  call_list_300 OUTPUT
    MODULE call_list_0300 OUTPUT.
      LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
      SET PF-STATUS '300'.
      SUPPRESS DIALOG.
      PERFORM get_document_text.
    ENDMODULE.
    *& FORM get_document_text.
    FORM get_document_text.
    ENDFORM
    when i execute... since the screen is directed to list processing, when i click the close button the popup window is not getting closed
    what should i do to close the list processing screen

    If your screen is popup screen than your PF-Status must be type of "Dialog Box".
    Than you will get the buttons at the bottom part of your pop-up which will allow you to interact with your PAI.
    Regards,
    Naimesh Patel

  • 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^

  • Getting Error when createing Table control in Module Pool.

    Hi expert ,
    i am creating a module pool program . i want to crate line item value for that i have created table control  on screen 200 .
    but when i am activation to that giving error below mention.
    The field "ZFBDCHALLAN-EBELN" is not assigned to a loop. "LOOP ...ENDLOOP" must appear in "PBO" and "PAI".
    thanks
    chandra

    Its mandatory to have loop endloop in both events
    PBO and PAI
    loop your internal table similarly.
    Please check it should be below format
    PROCESS BEFORE OUTPUT.
    * Set PF Status for screen 100.
      MODULE status_0200.
    * This module will initialize the field
      MODULE init_0100.
      LOOP AT t_custmat_asg INTO w_custmat_asg
          WITH CONTROL tc_1
          CURSOR tc_1-current_line.
    * It will count the record in internal table
        MODULE set_linecount.
    * Screen Modifications
        MODULE status_check.
      ENDLOOP.
    PROCESS AFTER INPUT.
    * Module AT EXIT-COMMAND
      MODULE exit_0200 AT EXIT-COMMAND.
      LOOP AT t_custmat_asg .
        CHAIN.
          FIELD :
          w_custmat_asg-check,
                  w_custmat_asg-kunnr,
                  w_custmat_asg-name1,
                  w_custmat_asg-asgtyp,
                  w_custmat_asg-productcls,
                  w_custmat_asg-sctegry,
                  w_custmat_asg-ctegry,
                  w_custmat_asg-parent,
                  w_custmat_asg-frmdate,
                  w_custmat_asg-todate,
                  w_custmat_asg-frecster,
                  w_custmat_asg-salesrep,
                  w_custmat_asg-flag,
                  w_custmat_asg-username,
                  w_custmat_asg-udate.
    * Validation For Forecaster.
          MODULE validate_forecaster.
    * Validation For Salesrep.
          MODULE valiate_salesrep.
    * Validation for Customer
          module validate_customer.
    * Validate null value
          module validate_null_vals.
    * Validation For Data Changed On The Screen
          MODULE data_changed_0200 ON CHAIN-REQUEST.
        ENDCHAIN.
      ENDLOOP.
    Regards
    Satish Boguda

  • Module pool to create goods mvt by using Bapi

    Hi can any one help me to develop a module pool program to create goods movement by using BAPI. Pls give me guidelines to proceed further...
    i should be grateful to you people for proving help...
    thank you
    with regards
    bheem

    Why do you want to develop a module pool to do this?  There are standard transactions to do goods movement (MB01, MB1A, MB1B, MIGO, etc.)
    Not sure why you want to development something that is already there.  Granted, if you are interfacing to an external system.
    Albert

  • How to configure Application module pooling?

    I want to know wheather bc4j container itself manages Application module pooling if yes then please tell me is there any file to set parameters for congiguration like one which we have for apache web server.
    If no then please let me know how to create applicatiom module pooling.
    Thanks in advance.

    Application module pooling is configurable through an application module configuration. In order to edit an application module configuration you may right click an application module and select Configurations...
    The BC4J data web beans and the BC4J JSP datatags are both application pool clients. The BC4J documentation includes descriptions of the application pool properties. The documentation also includes a code sample which illustrates how to write your own pool client.

  • Error in module pool program

    Hi All,
    I have created 1 module pool program with screen no. 0100. But the statement CALL SCREEN 0100 is not getting executing its showing error i.e ' statement cannot be accessable' even i have created and activated the sceen 0100.
    Thanks...
    kiran

    Hi kiran,
    Open you program in se38 menu bar -> GOTO   -> ATTRIBUTES and check wheather it is  executable program or module pool program.
    if it is exeutable program then u can call the screen 0100 as ur intial screen. if not ur given type as module pool then u have to create a transaction in SE93 and give the screen name in that and prgoram name then it will display the screen which u hv created .
    if you want to show the screen 0100 as ur initial sceen in module pool program without using transaction it is not possible so use either executable program and use the stament call screen 0100.
    <b>reward if useful </b>
    Regards,
    sunil kairam.

  • For module pool

    Hiiiiiiiii
    friends i wanna discuss that
    i had created a module pool with tabstrip and calling 7 subscreens in that
    i had save button for that
    lets suppose 0001 is main screen
    0002,0003,00034,0005,0006,0007,0008,0009 are subscreens that r called in module pool main screen 0001.
    Now i want that for updating that module pool i shuld run a different transaction
    so friends i had to make a different screen in which update code is to be written and rest same
    means subscreens should also be called up in different main screen
    or their is some other way out else creating screen
    reply
    me waiting
    With Best Regards
    Ruby

    Hi
    go to the following link:
    http://sapmaterial.com/dialog_programming.html
    Reward points if helpful.
    Srikanta gope

  • Module pool / Screen Prog is there any standard SAP functionality ?

    Hi I am creating a Module pool / Screen Prog. On this screen I have nearly 100 fileds , now I want to take print out of all the information shown on the screen for the same is there any standard SAP functionality ?
    Does SAP provides any standarar ready made functionality for the same. ?

    No, there is no standard functionality for this.  dynpros are not designed to "print out".  This is what list displays are for.  That said, you will need to write your logic to kick off  a list display with all of your field values there,  then the user can print.
    Regards,
    Rich Heilman

  • How to access screen field value in a module pool programming?

    Hi Experts,
       I have create a module pool program SAPMYDLG. It contains two screens 100 and 200.
       The first screen contains Employee_ID field. This field is not a dictionary field.
       In the second screen 200, I want to access the value of Employee_ID field from first screen.
       For this I created a global variable v_empid in TOP include.
       Then in the PAI of the screen 100 I have assigned the screen field value to global variable.
       v_empid = Employee_ID.
       But this gives an error saying " Field  Employee_ID not defined".
       What am I doing wrong? How can I access the screen field value?
    Thanks
    Gopal

    Hi,
    Employee_ID field also must u define in the top include when u define that 100 screen and 200 screen will access.
    regards,
    muralii

  • How to highlight a modified row in module pool

    hi frnds,
         Is it possible to highlight a row that is modified in a  ztable using module pool...

    I have created a ztable-'zpk_table' from which i take the values  n pass it to an internal table-'itab'...
    i modify these values using a modify screen created in module pool..
    after modifying i want the modified row to be highlighted in the next table control screen...

Maybe you are looking for