Module Pool - Pop-Up Input Screen

Hi Experts,
  I have this scenario:
     I have a table control and two radio buttons say R1 and R2.
     R1 -> Single
First Requirement-> When R2 is clicked, a button to its adjacent position should become visible and activated.
Second Requirement-> When the above button is clicked, a new table control should get displayed as a pop-up window type, and user can enter more data or more rows.
Please share code
Thanks
Chandan

Hi Chandan,
double click on the radoi button and create a function code for the radio button.
In rhe PBO write the code for function code..
case sy-ucomm.
when 'Function for radio button1'.
        table-control-1-invisible = 'X'.   "table control1 invisible is set to 'X" then the table control is not cisible on the screen.
table-control-2-invisible = ' '.   "Table control 2 is visible on the screen.
when 'Function for radio button2'.
       table-control-2-invisible = 'X'.   "table control2 invisible
        table-control-1-invisible = ' '.   "Table control 1 is visible on the screen.
endcase.
if you need pop with alv format to diaply data use this fm ..but iw will allow you to selct and not to edit..
CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
    EXPORTING
      i_title               = 'Batch Number Selection'
      i_selection           = 'X'
      i_screen_start_column = 5
      i_screen_start_line   = 5
      i_screen_end_column   = 70
      i_screen_end_line     = 20
      i_tabname             = 'T_BATCH'
      it_fieldcat           = gt_fieldcat_drd[]                  "field catalog for internal table
    IMPORTING
      es_selfield           = gc_selfield            "if you select field on the pop-up the selcted field and index is captured
    TABLES
      t_outtab              = t_batch                 "internal Table values want to show on the POP-Up
    EXCEPTIONS
      program_error         = 1
      OTHERS                = 2.
  IF sy-subrc <> 0.
  ENDIF.
Regards,
Prabhudas

Similar Messages

  • How to take backup of an entire module pool program with code,screen,etc.

    Hi experts,
    I have some important data in the ides server for which i want to take backup of them.
    I have some question regarding the same.
    1.How to take backup/download of an entire module pool program with code,screen,etc.
    2.How can we take backup/download for a DB table with its structure?
    3.How can we take backup of a search help?
    Please give some suggestions abt the same.
    Regards,
    Ashesh.

    Hi,
    May be just for viewing, try downloading from SE80 transaction from the others option.
    Here just try issuing the print, it will generate the spool.
    Now using the spool, download to your desktop as required. It will have all the information regarding the attributes, fields, elements everything.
    The only issue is, may be you need to take all the screens separately.
    Regards,
    Santhosh.

  • Module pool to create input field dynamically.

    Hi All,
    I have a requirement in module pool programming,
    Where I have one input field,based on the value given in this input I have to get the
    input fields dynamically in the screen.
    Is it possible to achieve this?
    If yes, please do tell me the solution to approach this requirement.
    With Regards,
    S.Asha.

    Hi,
    You can use IMPORT DYNPRO / EXPORT DYNPRO.
    Please check this URL: [Import/Export dynpro not working|Import/Export dynpro not working]
    [EXPORT DYNPRO or GENERATE DYNPRO|EXPORT DYNPRO or GENERATE DYNPRO]
    Cheers,

  • Pop Up Input Screen

    Hi Experts,
       I have this requirement:
         Scenario: I have one table control, with two radio buttons say R1 and R2.
                        a) When R2 is selected, a button outside the table control should get activated.
                        b) On Click of that button, a POP-UP screen (Input Screen), which will be similar to a table
                            control should get displayed in order to take more inputs from the user. The Pop-Up Screen
                            will contain only two fields.
        Please share your experience and suggest me the solution.
       Thanks,
       Chandan

    Hi Chandan,
    In PBO
    If R1 = 'X'
    LOOP at screen.
    if screen-name = 'Your field"
    Screen-Input = 0.
    Screen-Invisible = 1.
    Modify Screen.
    Endloop.
    IN PAI
    Chain
    FIELD R1.
    FIeld r2.
    Module Call_same_screen_again.
    ENDCHAIN on chain-request.
    Try this code hope it will solve your problem.
    hope this will solve your problem.
    cheers,
    Suvendu

  • Module Pool Programming - Radio Buttons & Screen Field Invisible or Display

    Hi,
    I have 2 radio buttons in my screen and both of them are checked or on. Not sure how to make one of them is on and other is off at a time. If A is off, i need to make few screen fields invisible or display. if A is on, i need to make the screen field invisible or input enabled.
    Can  you please suggest me a suitable way to accomplish this task.
    Appreciate Your Help in Advance.
    Thanks,
    Kannan

    hi
    try this
    go to SE38 create a program of type M
    go to SE51,give a screen no (ex : 0800) and click on create
    then click on Layout in se51
    in the Layout select the Radiobutton icon and drag/drop it on the layout
    Define them as by double clicking on the radiobutton icon
    First Radiobutton name : RB1, Groups : u can see 4 boxes,in the first box give group as G1
    do the same for the Second Radiobutton RB2.
    Now select both the radiobuttons RB1,RB2 both at a time and right click the cursor
    Radiobutton - Define.
    Then drag and drop a i/o field name : wk_name. save & activate the layout.
    in se51
    PBO
    Module_status_0800.
    Module_screen_modif.
    PAI
    Module_user_command_0800.
    in se38
    data : wk_name(10) type c.
    data : rb1,rb2.
    Module_screen_modif_o/p.
    if RB1 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'WK_NAME'.
    SCREEN-INPUT = '1'.
    SCREEN-INVISIBLE = '0'.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    if RB2 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'WK_NAME'.
    SCREEN-INPUT = '0'.
    SCREEN-INVISIBLE = '1'.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    endmodule.
    Module_user_command_0800.
    case sy-ucomm.
    when 'EXIT' or 'BACK' or 'CANCEL'.
    LEAVE PROGRAM.
    endcase.
    Endmodule.
    Regards

  • Checking Records in multiple screens using module pool programming

    Hi,
        I created student registration form using module pool programming.In first SCREEN i designed like the Below.
              Name:     <INPUT/OUTPUT Field>
             Emailid:    <INPUT/OUTPUT Field>
             Password:<INPUT/OUTPUT Field>
              CREATE<Push Button>    SIGNIN<Push Button>       cancel<Push Button>
    in  screen 1000 I created like the above screen and i wrote the code for it.It's successfully inserted records in ZSTUDENT database.
    BUT
        when i call the second screen 2000.I design the screen like below.And database table is ZSTU_LOGIN.
          username : <INPUT/OUTPUT Field>
         password  : <INPUT/OUTPUT Field>
             LOGIN<push Button>   EXIT<Push Button>
    AND i created Third screen 3000.Like full of detail of student details like First Name,Last Name,DOB,Education Details,Contact Details etc...
    BUT I'm facing the pbm is
                  whatever the record is stored in table ZSTUDENT-Name & password when i call the screen 2000 that USERNAME & PASSWORD are same
    Then go to THIRD screen 3000.BUT i wrote the code for second screen 2000 by using SELECT statement.without my code check it will go to third
    screen 3000 By the Statement of Call screen 3000.
    PLZ any one help me HOW to CHECK the Exact Record From second Screen 2000 to First Screen 1000.
    HOW to Check the code AND can u provide me any code available.
    thanks,
    Anusha

    Hi vikram,
        I wrote the code for screen 2000 like below.
    MODULE STATUS_2000 OUTPUT.
    *  SET PF-STATUS 'xxxxxxxx'.
    *  SET TITLEBAR 'xxx'.
       TABLES : ZSTUDENT_ENTER.
      TYPES: BEGIN OF ST_TAB1,
          USERNAME TYPE ZSTUDENT_ENTER-USERNAME,
         PASSWORD1 TYPE ZSTUDENT_ENTER-PASSWORD1,
         END OF ST_TAB1.
       DATA : W_TAB1 TYPE ZSTUDENT_ENTER.
       DATA : IT_TAB1 TYPE STANDARD TABLE OF ZSTUDENT_ENTER.
       DATA : USERNAME TYPE CHAR50,
             PASSWORD1 TYPE CHAR25.
    ENDMODULE.                 " STATUS_2000  OUTPUT
    *&      Module  USER_COMMAND_2000  INPUT
    *       text
    MODULE USER_COMMAND_2000 INPUT.
    CLEAR W_TAB1.
       MOVE-CORRESPONDING W_TAB TO W_TAB1.
    IF SY-SUBRC EQ 0.
       SELECT SINGLE MAILID PASSWORD
         INTO CORRESPONDING FIELDS OF W_TAB
           FROM ZSTUDENT_INFO
           WHERE USERNAME = W_TAB-MAILID AND
                PASSWORD1 = W_TAB-PASSWORD.
           CALL SCREEN 2000.
           ENDSELECT.
                 ELSEIF SY-SUBRC NE 0.
               MESSAGE 'INVALID USERNAME/PASSWORD'.
               ELSEIF SY-UCOMM = 'LOGIN'.
                 CALL SCREEN 3000.
                 ENDIF.
    ENDMODULE.                 " USER_COMMAND_2000  INPUT
    But i could not found whether code is write or not.
    syntax error is USERNAME is Unknown.
    could solve me my pbm anybody.....
    Thanks,
    Anusha

  • Selection screen as subscreen in module pool main screen

    hello
    i having problem with a module pool  and a selection screen subscreen , i have my main screen 100 in my module pool
    i create a sub screen area , then in my top include i define a seleccion screen as subscreen  150
    i define some paramets and select-options ( for the select-options feature is because i choose use the subscreen )
    so far here is OK , the problem is when i fill the subscreen data and press a pushbutton define in the main screen ( 100 )
    the field are getting cleared ( BTW i call the subscreen in the PBO of the main screen ( 100 ) using call SUBSCREEN SUB_AREA INCLUDING SY-REPID '150'. ) so my question is how i can do for save the data filled in the subscreen ?
    thanks

    i find the solution of my own question:
    in the first line of the PAI event of the main screen ( where you call the subscreen ) need add 'call subscreen SUB_AREA_NAME_HERE.

  • At Selection Screen in Module Pool

    Hi,
       I am doing an Module pool which has 2 screens.
    First screen has a table control.
    When user double clicks any record in the table control I have to process further with value of the clicked record.
    Can anyone let me know how the At Line Selection works in Module pool.
    Thanks & Regards,
    Sandeep

    hi
    u have to make field of table control <b>respond to double click</b> in attributes of that field.
    make one button 'PICK' and assign recommended key 'F2' in GUI Status (Its Compulsary to give 'F2')
    now in User_command of PAI
    case sy-ucomm.
    when 'PICK'.
    endcase.
    Message was edited by:
            Dhwani shah

  • Module pool screen I/P Validation info req?

    hi
    please tel  me how to validate a screen I/P in module pool.
    i had a screen:1000.
    there in an I/P date from:         date to:
    user wants,if any one puts date to < date from,there shd be an error msg,i had done it,but after it,all other fileds are disabled,but i want after error msg,it shd allow me to do the modification.
    please tell how to do.
    vipin

    Keep the validation in one module, say, m_validate.
    write the following code in screen flow logic.
    CHAIN.
    FIELD: date_from,
               date_to.
    MODULE m_validate.
    ENDCHAIN .

  • Total screen shots for module pool programming

    Hi Abapers,
    Any one could send me the screen shots for the module pool programming with multiple screens.
    Thanks in advance.
    Regards
    Yubi

    You can check the transaction ABAPDOCU for sample programs..
    Check  the prgrams:
    DEMO_DYNPRO_TABLE_CONTROL_1  Table Control with LOOP Statement
    DEMO_DYNPRO_TABLE_CONTROL_2  Table Control with LOOP AT ITAB
    Also chk this thread.
    Urgent: : Requiremnt on module pool

  • I have design one screen in Module pool

    Hi,
    I created one screen and i have taken 6 push buttons which is select all , Dselect all ,create new row,delete new row,Asending and Desendinf order  How to write a code for these push buttons.
    regards

    Hi,
    It is absolutely possible to perform a BDC operation in a module pool program irrespective any screen you are.
    In the PAI, after capturing the appropriate ok_code (sy-ucomm), you branch to the SAVE option. There you call out a subrotuine. say PERFORM bdc_save_VF21.
    Inside this subroutine write your logic. What happens is the transaction VF21 gets updated with your bdc code with the help of CALL TRANSACTION. Check out in debugging.
    Also you can see by making the mode in call transaction to All screen mode 'A'.
    Please let me know if you can succeed in this.
    Award me if this is helpful to you!
    If you require further help, please send me your mail id.. i'll send some code to you.
    Regards,
    Ananth
    Edited by: Anantharamakrishnan Venkatesan on Jan 9, 2008 5:31 PM

  • Data entry in module pool screen

    Hi all,
    I have created a module pool program. on the screen of the program, i have entered a dictionary field KNA1-KUNNR. On the second field on the screen, i have coded a search help to generate the F4 help based on the entries in the first field. Now the problem is that the entry made in the first screen is not available in the code, i.e. when i have entered a value in the first screen, in the debugger it shows the field as empty. i tried declaring a variable of the same name as the field, but it gives me error that the variable is already declared. any help will be appreciated.
    regards,
    hamza

    Hi,
    You can write like:
      DATA :  TB_DYNPFIELDS LIKE DYNPREAD OCCURS 0 WITH HEADER LINE.   "internal table declared
      CLEAR:   TB_DYNPFIELDS.
      REFRESH: TB_DYNPFIELDS.
      MOVE 'ZTG_EMP-HLTH_PLAN' TO TB_DYNPFIELDS-FIELDNAME.  " fieldname whose value needs to be catched dynamically
    APPEND TB_DYNPFIELDS.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          DYNAME                               = 'SAPMZTG01'   *"program name *
          DYNUMB                               = '1010'               "screen number
      TRANSLATE_TO_UPPER                   = ' '
      REQUEST                              = ' '
      PERFORM_CONVERSION_EXITS             = ' '
      PERFORM_INPUT_CONVERSION             = ' '
      DETERMINE_LOOP_INDEX                 = ' '
      START_SEARCH_IN_CURRENT_SCREEN       = ' '
      START_SEARCH_IN_MAIN_SCREEN          = ' '
      START_SEARCH_IN_STACKED_SCREEN       = ' '
      START_SEARCH_ON_SCR_STACKPOS         = ' '
      SEARCH_OWN_SUBSCREENS_FIRST          = ' '
      SEARCHPATH_OF_SUBSCREEN_AREAS        = ' '
        TABLES
          DYNPFIELDS                           = TB_DYNPFIELDS     "internal table to be passed
    EXCEPTIONS
      INVALID_ABAPWORKAREA                 = 1
      INVALID_DYNPROFIELD                  = 2
      INVALID_DYNPRONAME                   = 3
      INVALID_DYNPRONUMMER                 = 4
      INVALID_REQUEST                      = 5
      NO_FIELDDESCRIPTION                  = 6
      INVALID_PARAMETER                    = 7
      UNDEFIND_ERROR                       = 8
      DOUBLE_CONVERSION                    = 9
      STEPL_NOT_FOUND                      = 10
      OTHERS                               = 11
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE TB_DYNPFIELDS INDEX 1.
      IF SY-SUBRC EQ 0.
        PLAN_ID = TB_DYNPFIELDS-FIELDVALUE.   *"internal table passed in the funcn module has one field as fieldvalue which will catch that fields value dynamically *
      ENDIF.
    Hope it helps you
    Regrds
    Mansi

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

  • Module pool  tips

    hai to al.
        iam creating transaction screens .
        in that i want to create , change  and display the screen .
        for that iam creating  a screen .
         what are the function modules to save the data .
        can any body suggest the module pool tips for creating screen.

    Read this it will help u.
    Screen Flow Logic
    Screen flow logic contains the procedural part of a screen. You create it in the flow logic editor in the Screen Painter, which is very similar to the ABAP Editor. The language used to program screen flow logic has a similar syntax to ABAP, but is not part of ABAP itself. It is sometimes referred to as screen language.
    Unlike ABAP programs, screen flow logic contains no explicit data declarations. You define screen fields by placing elements on the screen mask.
    The screen flow logic is like an ABAP program in that it serves as a container for processing blocks. There are four event blocks, each of which is introduced with the screen keyword PROCESS:
    PROCESS BEFORE OUTPUT.
    PROCESS AFTER INPUT.
    PROCESS ON HELP-REQUEST.
    PROCESS ON VALUE-REQUEST.
    As in ABAP, the event block is introduced by the corresponding keyword statement, and it concludes either when the next block is introduced, or at the end of the program. The first two statements are created automatically by the Screen Painter when you create a new screen. The corresponding events are triggered by the runtime environment:
    · PROCESS BEFORE OUTPUT (PBO) is automatically triggered after the PAI processing of the previous screen and before the current screen is displayed. You can program the PBO processing of the screen in this block. At the end of the PBO processing, the screen is displayed.
    · PROCESS AFTER INPUT (PAI) is triggered when the user chooses a function on the screen. You can program the PAI processing of the screen in this block. At the end of the PAI processing, the system either calls the next screen or carries on processing at the point from which the screen was called.
    · PROCESS ON HELP-REQUEST (POH) and PROCESS ON VALUE-REQUEST (POV) are triggered when the user requests field help (F1) or possible values help (F4) respectively. You can program the appropriate coding in the corresponding event blocks. At the end of processing, the system carries on processing the current screen.
    As is normal with events, you must only program event blocks for the events to which you want the flow logic to react. However, the screen flow logic must contain at least the two statements PROCESS BEFORE OUTPUT and PROCESS AFTER INPUT in the correct order.
    Example of Flow Logic Example
    The following example shows some use of screen flow logic:
    Sample Code
    *Processing Before Screen Output
    PROCESS BEFORE OUTPUT.
      MODULE INIT_FIELDS.
    Self-programmed F1 Help
    PROCESS ON HELP-REQUEST.
      FIELD GSSG-BUKRG MODULE V-BUKRG.
    Processing after user input
    PROCESS AFTER INPUT.
    Lock customer master record
    CHAIN.
      FIELD GSSG-KTNRG
         MODULE ENQUEUE_CUSTOMER_MASTER.
    Read customer master record
      MODULE READ_CUSTOMER_MASTER.
    Read business area
      MODULE READ_GSSG.
    ENDCHAIN.
    Process function code
    FIELD OK-CODE MODULE OKCODE ON INPUT.
    regards,
    sunil kairam.

  • IS it Possiblity of BDC in Module pool programming

    Hi All,
                   i have design 2 screens with module pool program.in one screen some input fields are there,once enter input  and press buttoon,it will go to 2nd screen in this data is displayed in table control .once selected some rows in table control, that rows are captured(selected rows are storing in serperate internal table), now once he selected some rows and press save button, it should do BDC for VF21 transaction.
    It means in 2nd screen of PAI module some function code(save) is executed,at that point BDC code is written.
    Is it possible to handle the BDC in 2 nd screen of PAI Module.
    If  we write code in 2nd scren of PAI module through some function code,again when PBO of 2nd scren is loaded,it will refresh table control but not go to Do  BDC forVF21 transaction.
    so How can we handle this?
    Useful Answers will be rewarded
    Regards

    Hi,
    It is absolutely possible to perform a BDC operation in a module pool program irrespective any screen you are.
    In the PAI, after capturing the appropriate ok_code (sy-ucomm), you branch to the SAVE option. There you call out a subrotuine. say PERFORM bdc_save_VF21.
    Inside this subroutine write your logic. What happens is the transaction VF21 gets updated with your bdc code with the help of CALL TRANSACTION. Check out in debugging.
    Also you can see by making the mode in call transaction to All screen mode 'A'.
    Please let me know if you can succeed in this.
    Award me if this is helpful to you!
    If you require further help, please send me your mail id.. i'll send some code to you.
    Regards,
    Ananth
    Edited by: Anantharamakrishnan Venkatesan on Jan 9, 2008 5:31 PM

Maybe you are looking for

  • Oracle 10g Startup problem on SuSE 9.1

    Hello everyone, I am new to Linux. And i have installed oracle 10g on SuSE Linux 9.1. I am able to install it properly, now i want to start my database. So, what steps i need to follow. I tried as follows      1. Login as oracle and start the termina

  • Connect Macbook to HD TV

    I have a mid 2007 macbook which I want to connect to an HD TV. The macbook has a mini DVI output. The TV has both DVI and HDMI inputs. I have previously tried connecting to the HDMI input, and I got a good quality picture, but obviously no sound, sin

  • Printing Photos

    I am using a Canon MP530 to print my photos from IPhoto. All my blacks have purple in them. The Canon staff worked with me and it is not the printer, as when I print from Photo Elements, it doesn't happen. Does anyone have any suggestions?

  • Accounting clerk in Correspondence (Customer account statement)

    Hi, A user wants me to change the name of the person which is printed on the account statement (via transaction FB12). But I am not allowed to change the accounting clerk. I don't think that is possible. I think that the name on the account statement

  • Opening a new tab in the terminal in the same directory as the current tab?

    Hi, Is it possible to setup the terminal to open a new tab in the same directory as the current tab? Regards, Ken