Regarding module pool with alv

hi experts,
              i have developed a module pool program in which the data is coming  in the table control ,what the user wants that on clicking one push button a alv report will come depending upon the data which i enterd in the selection screen of the module pool,,for this what sud i write under the push button plz help me....

Hi
In the table control keep a Button
First select the Records in the tables control into an Internal table
when you press that REPORT button in the table control screen these Selected records data which is in Internal table has to be displayed in a ALV report.
Hope when the data is internal tables just call the fun module of ALV
In the PAI of table control screen
case ok_code.
when 'REPT'.
  loop at itab where v_chk = 'X'.
   ...append the selected records to another ITAB1.
  endloop.
leave to list-processing
perform_display_report.
endcase.
In the perform you process the internal table, build the field catalog and display the ALV report
Reward points for useful Answers
Regards
Anji

Similar Messages

  • Hi i need material for module pool and alv's.

    hi
      i need material for module pool and ALV's(not object oriented) if any one have pls do send that to my
    ID [email protected]
    thanx in advance.

    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
    ALV
    ABAP List Viewer
    The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).
    This helps us to implement all the features mentioned very effectively.
    Using ALV, We can have three types of reports:
    1. Simple Report
    2. Block Report
    3. Hierarchical Sequential Report
    There are some function modules which will enable to produce the above reports without much effort.
    All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.
    1. SIMPLE REPORT.
    The important function modules are
    a. Reuse_alv_list_display
    b. Reuse_alv_fieldcatalog_merge
    c. Reuse_alv_events_get
    d. Reuse_alv_commentary_write
    e. Reuse_alv_grid_display
    A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.
    The important parameters are :
    I. Export :
    i. I_callback_program : report id
    ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status
    iii. I_callback_user_command : routine where the function codes are handled
    iv. I_structure name : name of the dictionary table
    v. Is_layout : structure to set the layout of the report
    vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE
    vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.
    II. Tables :
    i. t_outtab : internal table with the data to be output
    B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
    The Important Parameters are :
    I. Export :
    i. I_program_name : report id
    ii. I_internal_tabname : the internal output table
    iii. I_inclname : include or the report name where all the dynamic forms are handled.
    II Changing
    ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is
    declared in the type pool SLIS.
    C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type
    Parameters :
    I. Import :
    Et_Events : The event table is returned with all possible CALLBACK events
    for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV.
    II. Export :
    I_List_type :
    0 = simple list REUSE_ALV_LIST_DISPLAY
    1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY
    2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND
    3 = hierarchical-sequential block list
    REUSE_ALV_BLOCK_LIST_HS_APPEND
    D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.
    Parameters :
    I. it_list_commentary : internal table with the headings of the type slis_t_listheader.
    This internal table has three fields :
    Typ : ‘H’ – header, ‘S’ – selection , ‘A’ - action
    Key : only when typ is ‘S’.
    Info : the text to be printed
    E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.
    Parameters : same as reuse_alv_list_display
    This is an example for simple list.
    2. BLOCK REPORT
    This is used to have multiple lists continuously.
    The important functions used in this report are:
    A. REUSE_ALV_BLOCK_LIST_INIT
    B. REUSE_ALV_BLOCK_LIST_APPEND
    C. REUSE_ALV_BLOCK_LIST_HS_APPEND
    D. REUSE_ALV_BLOCK_LIST_DISPLAY
    A. REUSE_ALV_BLOCK_LIST_INIT
    Parameters:
    I. I_CALLBACK_PROGRAM
    II. I_CALLBACK_PF_STATUS_SET
    III. I_CALLBACK_USER_COMMAND
    This function module is used to set the default gui status etc.
    B. REUSE_ALV_BLOCK_LIST_APPEND
    Parameters :
    Export :
    I. is_layout : layout settings for block
    II. it_fieldcat : field catalog
    III. i_tabname : internal table name with output data
    IV. it_events : internal table with all possible events
    Tables :
    i. t_outtab : internal table with output data.
    This function module adds the data to the block.
    Repeat this function for all the different blocks to be displayed one after the other.
    C. REUSE_ALV_BLOCK_LIST_HS_APPEND
    This function module is used for hierarchical sequential blocks.
    D. REUSE_ALV_BLOCK_LIST_DISPLAY
    Parameters : All the parameters are optional.
    This function module display the list with data appended by the above function.
    Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.
    3. Hierarchical reports :
    Hierarchical sequential list output.
    The function module is
    A. REUSE_ALV_HIERSEQ_LIST_DISPLAY
    Parameters:
    I. Export:
    i. I_CALLBACK_PROGRAM
    ii. I_CALLBACK_PF_STATUS_SET
    iii. I_CALLBACK_USER_COMMAND
    iv. IS_LAYOUT
    v. IT_FIELDCAT
    vi. IT_EVENTS
    vii. i_tabname_header : Name of the internal table in the program containing the
    output data of the highest hierarchy level.
    viii. i_tabname_item : Name of the internal table in the program containing the
    output data of the lowest hierarchy level.
    ix. is_keyinfo : This structure contains the header and item table field
    names which link the two tables (shared key).
    II. Tables
    i. t_outtab_header : Header table with data to be output
    ii. t_outtab_item : Name of the internal table in the program containing the
    output data of the lowest hierarchy level.
    slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using ‘REUSE_ALV_FIELDCATALOG_MERGE’.
    Important Attributes :
    A. col_pos : position of the column
    B. fieldname : internal fieldname
    C. tabname : internal table name
    D. ref_fieldname : fieldname (dictionary)
    E. ref_tabname : table (dictionary)
    F. key(1) : column with key-color
    G. icon(1) : icon
    H. symbol(1) : symbol
    I. checkbox(1) : checkbox
    J. just(1) : (R)ight (L)eft (C)ent.
    K. do_sum(1) : sum up
    L. no_out(1) : (O)blig.(X)no out
    M. outputlen : output length
    N. seltext_l : long key word
    O. seltext_m : middle key word
    P. seltext_s : short key word
    Q. reptext_ddic : heading (ddic)
    R. ddictxt(1) : (S)hort (M)iddle (L)ong
    S. datatype : datatype
    T. hotspot(1) : hotspot
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    Go thru these programs they may help u to try on some hands on
    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100
    Reward points if useful
    Regards
    Anji

  • Sort up and sort Down push buttons in module pool with table control wizard

    hi,
    i have created 2 buttons for Sort up and sort Down push buttons in module pool with table control wizard
    please any one can help me.
    regards

    Hi
    Following code is to enable and disable the tbl control using two buttons. Just alter the code and for each button write the sort code.
    REPORT  YJAN27_SCREEN                                               .
    TABLES: SFLIGHT, YFLIGHT_28.
    TYPES: BEGIN OF struct1,
          carrid like sflight-carrid,
          connid like sflight-connid,
          fldate like sflight-fldate,
           END OF struct1.
    CONTROLS TBL1 TYPE TABLEVIEW USING SCREEN 2700.
    DATA: OK_CODE LIKE SY-UCOMM,
          CARRID LIKE SFLIGHT-CARRID,                                    "cols in tbl ctrl
          CONNID LIKE SFLIGHT-CONNID,
          FLDATE LIKE SFLIGHT-FLDATE,
          itab TYPE TABLE OF STRUCT1 WITH HEADER LINE,
          cols like line of TBL1-COLS,
          FLAG TYPE I.
    FLAG = 1.
    CALL SCREEN 2700.
    *&      Module  STATUS_2700  OUTPUT
    *       text
    MODULE STATUS_2700 OUTPUT.
      SET PF-STATUS 'BACK'.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_2700  OUTPUT
    *&      Module  USER_COMMAND_2700  INPUT
    *       text
    MODULE USER_COMMAND_2700 INPUT.
    OK_CODE = SY-UCOMM.
    CASE OK_CODE.
      WHEN 'BACK'.
        LEAVE PROGRAM.
      WHEN 'DIS'.                                                         "write code for sort up
        loop AT TBL1-COLS INTO COLS.
           COLS-SCREEN-INPUT = 0.
            MODIFY TBL1-COLS FROM COLS.
        ENDLOOP.
        FLAG = 2.
      WHEN 'ENA'.                                                       "write code for sort down
        loop AT TBL1-COLS INTO COLS.
            COLS-SCREEN-INPUT = 1.
            MODIFY TBL1-COLS FROM COLS.
        ENDLOOP.
        FLAG = 1.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_2700  INPUT
    *&      Module  GET_DATA  OUTPUT
    *       text
    MODULE GET_DATA OUTPUT.
      select carrid connid fldate from SFLIGHT into table itab.
    ENDMODULE.                 " GET_DATA  OUTPUT
    *&      Module  POPULATE_TBL  OUTPUT
    *       text
    MODULE POPULATE_TBL OUTPUT.
        MOVE-CORRESPONDING ITAB TO SFLIGHT.
    ENDMODULE.                 " POPULATE_TBL  OUTPUT
    *&      Module  CHANGE_SCREEN  OUTPUT
    *       text
    MODULE CHANGE_SCREEN OUTPUT.    " use this module if you want to hide the other button
    CASE FLAG.
      WHEN 1.
        LOOP AT SCREEN.
          IF SCREEN-NAME = 'B_ENA'.
            SCREEN-INVISIBLE = 1.
             MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
        LOOP AT SCREEN.
          IF SCREEN-NAME = 'B_DIS'.
            SCREEN-INVISIBLE = 0.
             MODIFY SCREEN.
          ENDIF.
       ENDLOOP.
      WHEN 2.
        LOOP AT SCREEN.
          IF SCREEN-NAME = 'B_DIS'.
            SCREEN-INVISIBLE = 1.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
        LOOP AT SCREEN.
          IF SCREEN-NAME = 'B_ENA'.
            SCREEN-INVISIBLE = 0.
             MODIFY SCREEN.
          ENDIF.
       ENDLOOP.
    ENDCASE.
    ENDMODULE.                 " CHANGE_SCREEN  OUTPUT
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_2700.
    MODULE CHANGE_SCREEN.     " use this if you want to display one button at a time
    MODULE GET_DATA.
    loop at itab WITH control TBL1.
        MODULE POPULATE_TBL.       " populate tbl ctrl
    endloop.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_2700.    " do the sort operations
    loop at itab.
      endloop.
    Hope this helps
    Regards,
    Jayanthi.K

  • Module pool  with object oriented programming

    can anyone send me links for module pool with object oriented programming.

    hi,
    some helful links.
    Go through the below links,
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    <u>Sample std pgms.</u>
    ABAP_OBJECTS_ENJOY_0           Template for Solutions of ABAP Object Enjoy Course
    ABAP_OBJECTS_ENJOY_1           Model Solution 1: ABAP Objects Enjoy Course      
    ABAP_OBJECTS_ENJOY_2           Model Solution 2: ABAP Objects Enjoy Course      
    ABAP_OBJECTS_ENJOY_3           Model Solution 3: ABAP Objects Enjoy Course      
    ABAP_OBJECTS_ENJOY_4           Model Solution 4: ABAP Objects Enjoy Course      
    ABAP_OBJECTS_ENJOY_5           Model Solution 5: ABAP Objects Enjoy Course      
    DEMO_ABAP_OBJECTS              Complete Demonstration for ABAP Objects          
    DEMO_ABAP_OBJECTS_CONTROLS     GUI Controls on Screen                           
    DEMO_ABAP_OBJECTS_EVENTS       Demonstration of Events in ABAP Objects          
    DEMO_ABAP_OBJECTS_GENERAL      ABAP Objects Demonstration                       
    DEMO_ABAP_OBJECTS_INTERFACES   Demonstration of Interfaces in ABAP Objects      
    DEMO_ABAP_OBJECTS_METHODS      Demonstration of Methods in ABAP Objects         
    DEMO_ABAP_OBJECTS_SPLIT_SCREEN Splitter Control on Screen
    Rgds
    Reshma

  • Regarding Module Pool Screen Painter

    Dear All,
    Hi all. When i am using 4.7 i am able to see all the icons like check box .radio buttons,push buttons ,table control and all . There i can drag  and drop on the screen easily . I can see this all icons on the left side in the screen painter.  In ecc  i tried to create a module pool program. In that screen painter i am not able to see these icons in that screen .
    When i am clicking on layout on initial screen it is showing ''''EU_SCRP_WN32 : timeout during allocate / CPIC-CALL: 'ThSAPCMRCV' '''' . That is also in text format with some lines and all.  I was totally struck here . Please help me in  this .
    Regards,
    Madhu.

    How can you solve the problem ? Please explain it.

  • Select-option in module pool  with table Control

    HI,
    How to use the select-option in Module Pool and how Can i use the Table control in it.
    Can any body give me some Clues.
    with rgds
    Ranjith

    Hi ..
    PBO.
    LOOP at <table contriol>
    module --- Inside the module
    DATA: g_uti TYPE REF TO cl_fobu_input_util.
      if rollname <> space.
         CREATE OBJECT g_uti
           EXPORTING typename =rollname.
    *....convert to external pattern
         CALL METHOD g_util->output_convert
           EXPORTING
             field_value_int = p_value                 " This is Tablecontrol-low
           IMPORTING
             field_value_ext = p_value.              " Retrun value for Low
    ENDLOOP.
    lly you have code in PAI
    DATA: g_util_1 TYPE REF TO cl_fobu_input_util.
      if rollname <> space.
         CREATE OBJECT g_util_1
           EXPORTING typename = rollname.
    *....convert to internal pattern
         CALL METHOD g_util_1->input_convert
           EXPORTING
             field_value_ext   = p_value
           IMPORTING
             field_value_int_c = p_value.
    The above code should be written for tablecontrol-high aswell..
    you can also refer: Inlcude LSE16NF10 line no 341 & 434 (SE16n)
    Nag

  • Problem in module pool with table control scrolling

    hi,
    i am using the table control in module pool,in the table control i have radion button for all the rows.
    After i got the data into the table control ,if i select radio button and if i press vertical scroll bar button, that radio button is deselecting,how to solve this issue.
    Please help me.

    Hi
    Generally we don't keep radiobuttons in table control for selecting the records
    We keep check boxes for selecting the records
    Radio button is used to select a single from a group of records and at a time only one is selected, where as checkboxes at a time you can select a single or multiple.
    So use checkboxes and code correctly see the doc for Table control
    syntax:
    CONTROLS .
    if you only want to determine the row of the table control. SY´-SUBRC allows you to check if the cursor is placed in a row of a table control.
    u need to comment the performs of table control fields and write ur own perform statements. And u have to declare the table control fields as separate internal tables.
    Go through this urls.
    www.****************
    www.sap-img.com
    Check the below links.
    http://www.planetsap.com/howdo_a.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac5135c111d1829f0000e829fbfe/content.htm
    http://sap.niraj.tripod.com/id25.html
    Reward points if useful
    Regards
    Anji

  • Module Pool with select options

    Hi,
    I have created select-option and radio button in Module pool. My req is that I when the user enters any value and click on the radio button the respective programs should be executed.
    Thanks
    Hari

    Hi Hariharan,
    I would recommend you to use primarily use push button and then after SUBMIT statement, and also the example for the same is provided below:
    *Code used to execute a report
    SUBMIT Zreport.
    *Code used to populate 'select-options' & execute report
    DATA: seltab type table of rsparams,
          seltab_wa like line of seltab.
      seltab_wa-selname = 'PNPPERNR'.
      seltab_wa-sign    = 'I'.
      seltab_wa-option  = 'EQ'.
    * load each personnel number accessed from the structure into
    * parameters to be used in the report
      loop at pnppernr.
        seltab_wa-low = pnppernr-low.
        append seltab_wa to seltab.
      endloop.
      SUBMIT zreport with selection-table seltab
                                    via selection-screen.
    *Code used to populate 'parameters' & execute report
    SUBMIT zreport with p_param1 = 'value'
                    with p_param2 = 'value'.
    Please validate the same at your end as well, please come back, if inputs are required.
    BR/Thanks
    Pranav Agrawal

  • Module pool with table controlls

    Hi all.
    I have an  Issue in module pool program.
    I am developing it to update a d/b table.in that I have
    a total of 40 fields are there.in those 10 are to be entered and save.
    I am using table controlls.Can any body help me to solve
    1.the manual entry fields are date fields.I am getting those from my internal table.I want f4 help for those date filds.it is not comming here.
    but in the d/b table fot that corresponding field it is comming.
    2.in the attributes of the table controll ,it is giving the option to freeze the number of columns.but this numbering is from left to right.
    but I want to freeze coloumns in between.
    is it possible.
    3.can any body tell me the logic for table controll to update the d/b table.Because there is no row selection(left side pushbuttons to the table controll).
    how to capture the data what I entered in the rows.
    Thanks in advance,
    Regards,
    Eswar

    venkat,
    We cannot freeze the columns in the middle.
    Check for F4 what attribute is set for the field in screen layout. ( field attributes programs tab->Poss. entries)
    Refer this example for tablecontrol
    http://www.sappoint.com/abap/dptc1.pdf
    Regds
    Man

  • Module Pool with Selection Screen

    I have a module pool in which I've created a sub screen to accommodate select-options.
    SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.
    select-options: r_matnr for mara-matnr.
    selection-screen end of screen 1010.
    I've put this selection screen in an include of the module pool.
    Now I can't seem to see my variable, r_matnr, in the program. How to I pass the value to the program and what have I done wrong. Perhaps where I placed the selection-screen.
    Any help would be appreciated.
    PS... I can see my screen but when I put the debug on, no value is in r_matnr.
    Thanks Marianne

    Hi Mariane,
    Placing the selection screen declarations in an include does not make any issues. Can you please check your code. For your reference, I am placing a simple piece of code, in which I am also calling a selection screen from within a module pool and displaying the output of the select options. Execute this code and check what is the difference between your code and this.
    REPORT zabi_test04.
    INCLUDE zabi_test04_i001.
    INCLUDE zabi_test04_i002.
    START-OF-SELECTION.
       CALL SCREEN 9000.
    *&      Module  STATUS_9000  OUTPUT
    *       text
    MODULE status_9000 OUTPUT.
       SET PF-STATUS 'STAT9000'.
       SET TITLEBAR 'TL1'.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9000  INPUT
    *       text
    MODULE user_command_9000 INPUT.
       save_ok = ok_code.
       CLEAR ok_code.
       CASE save_ok.
         WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
           LEAVE PROGRAM.
         WHEN '&SELECT'.
           lv_dynnr  = '1001'.
           CALL SCREEN 9001.
       ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT
    *&      Module  STATUS_9001  OUTPUT
    *       text
    MODULE status_9001 OUTPUT.
       SET PF-STATUS 'STAT9001'.
       SET TITLEBAR 'TL2'.
    ENDMODULE.                 " STATUS_9001  OUTPUT
    *&      Module  USER_COMMAND_9001  INPUT
    *       text
    MODULE user_command_9001 INPUT.
       save_ok = ok_code.
       CLEAR ok_code.
       CASE save_ok.
         WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
           LEAVE TO SCREEN 0.
         WHEN '&EXECUTE'.
           WRITE s_matnr-low.
           LEAVE TO  LIST-PROCESSING.
       ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9001  INPUT
    *&  Include           ZABI_TEST04_I001
    TABLES : mara.
    DATA : ok_code    TYPE sy-ucomm,
            save_ok    TYPE sy-ucomm,
            lv_dynnr   TYPE sy-dynnr VALUE '1001'.
    *&  Include           ZABI_TEST04_I002
    SELECTION-SCREEN BEGIN OF SCREEN 1001 AS SUBSCREEN.
    *PARAMETERS p_werks  TYPE t001w-werks.
    SELECT-OPTIONS s_matnr FOR mara-matnr.
    SELECTION-SCREEN END OF SCREEN 1001.
    Regards,
    Abijith

  • Doubt regarding module pool program

    Hi experts,
    I need to use bapi in module pool program
    can we use it ? I hope we can use,
    Please any body give some sample code
    Thanks in advance
    Ranga

    bapi like another function module can be used in module pool based ojn ur desire
    a sample code is :
    case sy-ucomm.
    when 'create'
    call bapi u require
    end case
    hope it gives u an idea
    regards
    navjot
    reward accordingly

  • Exporting Module pool with screen

    Hi,
    I want to export module pool that I created to a file and import it back later. I could find a SAP Program RSTXSCRP to export SAPscript but no success in exporting a function module. Please help.
    Regards,
    Nikhil

    Hi Nikhil!
    If you just want to do this once, you can use transaction SE80 and menu point Utilities - More utilities - download (for each include / component).
    Otherwise a special program is easier to use, take e.g. this one:
    http://www.members.tripod.com/abap4/Upload_and_Download_ABAP_Source_Code.html
    Regards,
    Christian
    P.S.: or these one:
    ... or this one:
    http://sap.ittoolbox.com/code/d.asp?d=1623&a=s
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/finding your code in bsp applications.article
    http://www.geocities.com/rmtiwari/Resources/Utilities/WebViewer.html
    Message was edited by: Christian Wohlfahrt

  • Regarding Module Pool's Cancel button

    Hi Guys,
    Please help me I have created on Module Pool and now this module pool is called through a a UserExit .
    now the thing is if i cancel button which is placed on my popup screen then it is still going into the output which is wrong it should show up the previous screen.
    My code for the Sy-ucomm = cancel is
    IF SY-UCOMM = 'CANC'.
        SET SCREEN 0.
        LEAVE SCREEN.
      ENDIF.
    Can you please provide me some code by which i can go to the previous screen.

    I am calling the Module pool through User exit and inside user exit i am calling FM which calls my screen.
    Userexit -> FM -> ModulePool
    here is the code :
    ***INCLUDE LZRMA_NOTIFO01 .
    *&      Module  STATUS_0150  OUTPUT
    *       text
    MODULE STATUS_0150 OUTPUT.
    *  SET PF-STATUS SY-DYNNR.
    *  SET TITLEBAR SY-DYNNR.
    ENDMODULE.                 " STATUS_0150  OUTPUT
    *&      Module  CUA_STATUS  OUTPUT
    *       text
    MODULE CUA_STATUS OUTPUT.
    *  SET PF-STATUS SY-DYNNR.
    *  SET TITLEBAR SY-DYNNR.
    ENDMODULE.                 " CUA_STATUS  OUTPUT
    *&      Module  EXIT_SCREEN  INPUT
    *       text
    MODULE EXIT_SCREEN INPUT.
      DATA:      C_FCODE_ABBR   LIKE SY-PFKEY  VALUE 'ABBR' .
    break-point.
      CASE OK-CODE.
        WHEN C_FCODE_ABBR.
    *-- Abbrechen
    *   Daten zurücknehmen
          CLEAR RQM01.
    *      RAISE CANCEL.
          set screen 0.
          LEAVE TO SCREEN 0.
            call transaction 'QM01'.
      ENDCASE.
    IF SY-UCOMM = 'CANC'. "  Here is the SY-UCOMM Where i have to handle the CANC BUTTON
    *    SET SCREEN 0.
    *    LEAVE SCREEN.
       LEAVE PROGRAM.
      ENDIF.
    ENDMODULE.                 " EXIT_SCREEN  INPUT
    *&      Module  CHECK_NOTIF_NO  INPUT
    *       text
    MODULE CHECK_NOTIF_NO INPUT.
    *& Below condition checks if the user enter a Notification Num and Porduction
    *  Order Then Message comees Please enter a Prod Order or RMA Notif Num only
    *  Process cannot accept both.
      IF NOT VIQMEL-QMNUM IS INITIAL.
        IF NOT RQM01-FERTAUFNR IS INITIAL.
          MESSAGE E904(QM).    "  Please enter a Prod order or RMA Notif Num only.
                                  "  Process can't accept both
        ENDIF.
      ENDIF.
    *& If Production order is entered, then check if the Order type is 'AES1' or *
    *&  'AES3'AES2,AES4, AES5, AES6,ICSO, PM01, PM02, RMA, SM01, SM02, ZEXR,
    *&   Message flashes ' Please enter only enter RMA Notif Number.       *
      data: v_dauat like afpo-dauat.
      SELECT SINGLE DAUAT INTO V_DAUAT FROM AFPO WHERE AUFNR = RQM01-FERTAUFNR.
      if sy-subrc = 0.
        IF V_DAUAT = 'AES1' OR V_DAUAT = 'AES3' OR
           V_DAUAT = 'AES2' OR V_DAUAT = 'AES4' OR
           V_DAUAT = 'ICSO' OR V_DAUAT = 'PM01' OR
           V_DAUAT = 'PM01' OR V_DAUAT = 'RMA' OR
           V_DAUAT = 'SM01' OR V_DAUAT = 'SM02' OR V_DAUAT = 'ZEXR'..
          MESSAGE E905(QM).    " Please Only enter a RMA Notif Number.
        ENDIF.
      endif.
    ENDMODULE.                 " CHECK_NOTIF_NO  INPUT
    *&      Module  FEAUF_SAAUF_CHECK  INPUT
    *       text
    MODULE FEAUF_SAAUF_CHECK INPUT.
      OK-CODE = SY-UCOMM.
    *Added by CChauhan
      IF VIQMEL-QMNUM IS INITIAL.
    *& End of Addition by CChauhan
        IF  NOT RQM01-FERTAUFNR IS INITIAL
        AND ( NOT RQM01-VERID IS INITIAL
             OR NOT RQM01-RM_WERKS IS INITIAL
             OR NOT RQM01-RM_MATNR IS INITIAL ).
    *   only production order or manufacturing version meaningfully
          MESSAGE E902(QM).
        ENDIF.
    *Added by CChauhan
      ENDIF.
    *& End of Addition by CChauhan
    ENDMODULE.                 " FEAUF_SAAUF_CHECK  INPUT
    *&      Module  FEAUF_FEPOS_CHECK  INPUT
    *       text
    MODULE FEAUF_FEPOS_CHECK INPUT.
      IF VIQMEL-QMNUM = ''.
        IF      RQM01-FERTAUFNR = ''
        AND RQM01-FERTVORNR <> ''.
          MESSAGE E903(QM).
        ENDIF.
      ENDIF.
      IF SY-UCOMM = 'CANC'.
        LEAVE SCREEN.
      ENDIF.
    ENDMODULE.                 " FEAUF_FEPOS_CHECK  INPUT
    *&      Module  FAUF_LESEN  INPUT
    *       text
    MODULE FAUF_LESEN INPUT.
    *& Added by CChauhan  Date: 01/23/2007
    *& Execute further if RMa_Notif(VIQMEL-QMNUM)ield is blank.
    IF VIQMEL-QMNUM IS INITIAL.
    *&End by CChauhan     Date: 01/23/2007
        PERFORM FAUF_LESEN USING RQM01-FERTAUFNR
                                 RQM01-FERTVORNR
                        CHANGING CAUFV
                                 AFVC.
    *   Belegdaten an Qualitätsmeldung übergeben
        PERFORM FAUF_TO_QMEL USING CAUFV
                                   AFVC
                          CHANGING RQM01.
    *& Added by CChauhan  Date: 01/23/2007
    ENDIF.
    *&End by CChauhan     Date: 01/23/2007
    ENDMODULE.                 " FAUF_LESEN  INPUT
    *&      Form  FAUF_LESEN
    *       text
    *      -->P_RQM01_FERTAUFNR  text
    *      -->P_RQM01_FERTVORNR  text
    *      <--P_CAUFV  text
    *      <--P_AFVC  text
    FORM FAUF_LESEN USING VALUE(P_AUFNR) LIKE RQM01-FERTAUFNR
                          VALUE(P_VORNR) LIKE RQM01-FERTVORNR
                 CHANGING VALUE(P_CAUFV) LIKE CAUFV
                          VALUE(P_AFVC)  LIKE AFVC .
      CALL FUNCTION 'QMHL_HELP_FAUF'
        EXPORTING
          I_AUFNR             = P_AUFNR
          I_VORNR             = P_VORNR
          I_FOLGE             = G_FOLGE
        IMPORTING
          E_CAUFV             = P_CAUFV
          E_AFVC              = P_AFVC
        EXCEPTIONS
          ORDER_NOT_FOUND     = 1
          OPERATION_NOT_FOUND = 2
          OTHERS              = 3.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " FAUF_LESEN
    *&      Form  FAUF_TO_QMEL
    *       text
    *      -->P_CAUFV  text
    *      -->P_AFVC  text
    *      <--P_RQM01  text
    FORM FAUF_TO_QMEL USING VALUE(P_CAUFV) LIKE CAUFV
                            VALUE(P_AFVC)  LIKE AFVC
                   CHANGING       P_RQM01  LIKE RQM01.
    * zunächst Berechtigung für Meldungsart/Werk prüfen
      PERFORM CHECK_QAUT_QMEL USING SY-TCODE
                                    TQ80-QMART
                                    P_CAUFV-WERKS.
    * Materialnummer des Fertigprodukts ermitteln
      SELECT * FROM AFPO
      WHERE AUFNR = P_CAUFV-AUFNR.
    * Materialnummer steht in der ersten Auftragsposition
        EXIT.
      ENDSELECT.
      IF SY-SUBRC IS INITIAL.
    *   Materialnummer übernehmen
        P_RQM01-MATNR  = AFPO-MATNR.
        IF NOT AFPO-MATNR IS INITIAL.
          PERFORM MATERIAL_CHECK USING AFPO-MATNR.
        ENDIF.
    *   Charge
        P_RQM01-CHARG     =  AFPO-CHARG.
    *--- Lieferantencharge bestimmen
        IF NOT P_RQM01-CHARG IS INITIAL.
          SELECT SINGLE * INTO MCHA FROM MCHA
                  WHERE MATNR =  P_RQM01-MATNR
                  AND   WERKS =  P_RQM01-MAWERK
                  AND   CHARG =  P_RQM01-CHARG.
          IF SY-SUBRC EQ 0.
            MOVE MCHA-LICHA TO P_RQM01-LICHN.
          ENDIF.
        ENDIF.
        P_RQM01-LGORTCHAR =  AFPO-LGORT.
      ENDIF.
      P_RQM01-MAWERK    =  P_CAUFV-WERKS.
      IF NOT AFPO-MATNR IS INITIAL
        AND  NOT P_CAUFV-WERKS IS INITIAL.
        PERFORM MATERIAL_WERK_CHECK USING AFPO-MATNR
                                          P_CAUFV-WERKS.
      ENDIF.
    * Revisionsstand
      P_RQM01-REVLV     =   P_CAUFV-REVLV.
    * reklamierte Menge
      P_RQM01-RKMNG     =   P_CAUFV-GAMNG - P_CAUFV-GASMG.
      P_RQM01-BZMNG     =   P_CAUFV-GAMNG - P_CAUFV-GASMG.
      P_RQM01-MGEIN     =   P_CAUFV-GMEIN.
    * Arbeitsplatz
      P_RQM01-ARBPL = P_AFVC-ARBID.
    * eindeutiger Schluessel fuer Vorgang
      P_RQM01-FERTAUFPL = P_AFVC-AUFPL.
      P_RQM01-PNLKN     = P_AFVC-APLZL.
    * Info über automatische Datenübernahme
      MESSAGE S026(QM) WITH P_CAUFV-AUFNR RQM01-FERTVORNR.
    ENDFORM.                    " FAUF_TO_QMEL
    *&      Form  CHECK_QAUT_QMEL
    *       text
    *      -->P_SY_TCODE  text
    *      -->P_TQ80_QMART  text
    *      -->P_P_CAUFV_WERKS  text
    FORM CHECK_QAUT_QMEL USING VALUE(P_TCODE)
                               VALUE(P_QMART)
                               VALUE(P_WERK).
      CHECK NOT P_WERK IS INITIAL.
      MOVE-CORRESPONDING RQM01 TO H_VIQMEL.
      CALL FUNCTION 'QAUT_QMEL'
        EXPORTING
          I_WERKS  = P_WERK
          I_QMART  = P_QMART
          I_TCODE  = P_TCODE
          I_VIQMEL = H_VIQMEL.
    ENDFORM.                    " CHECK_QAUT_QMEL
    *&      Form  MATERIAL_CHECK
    *       text
    *      -->P_AFPO_MATNR  text
    FORM MATERIAL_CHECK USING  VALUE(P_MATNR).
    *-- lokale Daten
      DATA : BEGIN OF L_DUMMY_TAB OCCURS 0,
               DUMMY(1),
             END   OF L_DUMMY_TAB.
    * Prüfung nur, falls Materialnummer und Werk gefüllt
      CHECK NOT P_MATNR IS INITIAL.
    * Verprobung auf MARA-Segment
      MOVE C_MARA_SEGMENT TO MTCOM-KENNG.
      MOVE P_MATNR        TO MTCOM-MATNR.
      TABLES: MTCOR.
      CALL FUNCTION 'MATERIAL_READ'
        EXPORTING
          SCHLUESSEL           = MTCOM
        IMPORTING
          MATDATEN             = MARA
          RETURN               = MTCOR
        TABLES
          SEQMAT01             = L_DUMMY_TAB
        EXCEPTIONS
          ACCOUNT_NOT_FOUND    = 01
          BATCH_NOT_FOUND      = 02
          FORECAST_NOT_FOUND   = 03
          LOCK_ON_ACCOUNT      = 04
          LOCK_ON_MATERIAL     = 05
          LOCK_ON_PLANT        = 06
          LOCK_ON_SALES        = 07
          LOCK_ON_SLOC         = 08
          LOCK_SYSTEM_ERROR    = 09
          MATERIAL_NOT_FOUND   = 10
          PLANT_NOT_FOUND      = 11
          SALES_NOT_FOUND      = 12
          SLOC_NOT_FOUND       = 13
          SLOCNUMBER_NOT_FOUND = 14
          SLOCTYPE_NOT_FOUND   = 15
          TEXT_NOT_FOUND       = 16
          UNIT_NOT_FOUND       = 17.
      CASE SY-SUBRC.
        WHEN C_RC00.
    *       alles o.k.
          RQM01-MATKL = MARA-MATKL.
          RQM01-PRDHA = MARA-PRDHA.
        WHEN C_RC10.
          MESSAGE E005(QM) WITH P_MATNR.
      ENDCASE.
    * Beim Material sitzt Loeschvormerkung.
      IF NOT MTCOR-LVORM IS INITIAL.
        MESSAGE W008(M3).
      ENDIF.
    ENDFORM.                    " MATERIAL_CHECK
    *&      Form  MATERIAL_WERK_CHECK
    *       text
    *      -->P_AFPO_MATNR  text
    *      -->P_P_CAUFV_WERKS  text
    FORM MATERIAL_WERK_CHECK USING VALUE(P_MATNR)
                                   VALUE(P_WERK).
    *-- local data
      DATA : BEGIN OF L_DUMMY_TAB OCCURS 0,
               DUMMY(1),
             END   OF L_DUMMY_TAB.
    * Examination only, if materials number and work filled
      CHECK (    NOT P_MATNR IS INITIAL
             AND NOT P_WERK  IS INITIAL ).
    * Checking on MARC segment
      MOVE C_MARC_SEGMENT TO MTCOM-KENNG.
      MOVE P_MATNR        TO MTCOM-MATNR.
      MOVE P_WERK         TO MTCOM-WERKS.
      CALL FUNCTION 'MATERIAL_READ'
        EXPORTING
          SCHLUESSEL           = MTCOM
        IMPORTING
          MATDATEN             = MARC
        TABLES
          SEQMAT01             = L_DUMMY_TAB
        EXCEPTIONS
          ACCOUNT_NOT_FOUND    = 01
          BATCH_NOT_FOUND      = 02
          FORECAST_NOT_FOUND   = 03
          LOCK_ON_ACCOUNT      = 04
          LOCK_ON_MATERIAL     = 05
          LOCK_ON_PLANT        = 06
          LOCK_ON_SALES        = 07
          LOCK_ON_SLOC         = 08
          LOCK_SYSTEM_ERROR    = 09
          MATERIAL_NOT_FOUND   = 10
          PLANT_NOT_FOUND      = 11
          SALES_NOT_FOUND      = 12
          SLOC_NOT_FOUND       = 13
          SLOCNUMBER_NOT_FOUND = 14
          SLOCTYPE_NOT_FOUND   = 15
          TEXT_NOT_FOUND       = 16
          UNIT_NOT_FOUND       = 17.
      CASE SY-SUBRC.
        WHEN C_RC00.
    *       alles o.k.
          RQM01-KZDKZ = MARC-KZDKZ.
          RQM01-KZKRI = MARC-KZKRI.
        WHEN C_RC11.
          MESSAGE E004(QM) WITH P_MATNR
                                P_WERK.
        WHEN C_RC10.
          MESSAGE E005(QM) WITH P_MATNR.
      ENDCASE.
    ENDFORM.                    " MATERIAL_WERK_CHECK
    *&      Module  FCODE  INPUT
    *       text
    MODULE FCODE INPUT.
    *& Inserted by CC  01/24/2007
      II_VIQMEL-FERTAUFNR = RQM01-FERTAUFNR.
    *& End by CC   01/24/2007
      PERFORM FCODE USING OK-CODE.
    ENDMODULE.                 " FCODE  INPUT
    *&      Form  FCODE
    *       text
    *      -->P_OK_CODE  text
    FORM FCODE USING VALUE(P_FCODE) LIKE SY-TCODE.
      CASE P_FCODE.
        WHEN C_FCODE_ENT1.
    *-- Weiter
          SET SCREEN 0.
          LEAVE SCREEN.
      ENDCASE.
      IF SY-UCOMM = 'CANC'.
        SET SCREEN 0.
        LEAVE SCREEN.
      ENDIF.
    ENDFORM.                    " FCODE

  • Regarding Module Pool Text Field

    Hi,
         Can any body tell , is there any possiblity to change the font style and size of the Module pool text field.( Because I want a Heading in the screen)
    Regards
    Prashanth

    Hi,
    Goto the Layout Editor of your Screen.
    Double click on the text field .. Double clk the text fild, and from the Botton right u can see an arrow icon -> click on that > will open a Popup > in that <b> set Area Title to TRUE </b>.
    Rgds,
    Jothi.
    Do Award pts for helpful answers.

  • Regarding Module Pool program!

    Hi experts,
    I have the following issue.
    in my first screen there is username and password input field and two push button. 1. logn .2. change password.
    I am getting succesfully logon. and when i click change pwd button it will get old pwd, newpwd, and confirm new pwd in the another screen. (upto this also i am having no issue.)but  when giving old pwd , new pwd  and confirm new pwd i. in the input field i am unable to change the password moreover getting the error msg what I have handled.I have given the necessary codes.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    field zpasswords-psw module validate_logon_details.
    module exit_from_prog AT EXIT-COMMAND.
    MODULE USER_COMMAND_0100.
    MODULE VALIDATE_LOGON_DETAILS INPUT.
      SELECT * FROM ZPASSWORDS INTO WA_PSW WHERE PSW = ZPASSWORDS-PSW.
        ENDSELECT.
        IF SY-SUBRC <> 0.
          MESSAGE E000(ZSMSG).
          ENDIF.
    ENDMODULE.
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'LOGON'.
          SELECT * FROM ZPASSWORDS INTO WA_PSW WHERE PSW = ZPASSWORDS-PSW.
          ENDSELECT.
          IF SY-SUBRC = 0.
            CALL SCREEN 300.
          ENDIF.
        WHEN 'PSW'. "For change password pushbutton.
          SELECT * FROM ZPASSWORDS INTO WA_PSW WHERE PSW = ZPASSWORDS-PSW.
          ENDSELECT.
          IF SY-SUBRC = 0.
            CALL SCREEN 200.
          ELSE.
            MESSAGE E000(ZSMSG)." wrong entry
          ENDIF.
          CLEAR SY-UCOMM.
      ENDCASE.
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_0200.
    PROCESS AFTER INPUT.
      CHAIN.
      FIELD : OLDPSW , NEWPSW , CONFIRMPSW
                MODULE VALIDATE_PASSWORD.
      ENDCHAIN.
      MODULE EXIT_FROM_PROG AT EXIT-COMMAND.
      MODULE USER_COMMAND_0200.
    MODULE USER_COMMAND_0200 INPUT.
      CASE SY-UCOMM.
        WHEN 'SAVE'.
          UPDATE ZPASSWORDS SET PSW = NEWPSW WHERE PSW = OLDPSW.
          IF SY-SUBRC = 0.
            MESSAGE S001(ZSMSG).  "Password Changed Successfully
          ENDIF.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
      CLEAR SY-UCOMM.
    MODULE VALIDATE_PASSWORD INPUT.
      SELECT * FROM ZPASSWORDS INTO WA_PSW WHERE PSW = OLDPSW.
        ENDSELECT.
        IF SY-SUBRC = 0.
          IF NEWPSW <> CONFIRMPSW.
            MESSAGE E003(ZSMSG).
            ENDIF.
            ELSE.
              MESSAGE E004(ZSMSG).
              ENDIF.
    ENDMODULE.
    N.B. Points are assured in case of of helpful  reply.
    Thanks&Regards
    Sarkar
    Moderator Message: Use a more meaningful title. Do not tempt responders with points. Put your code between code tags.
    Edited by: kishan P on Feb 16, 2011 4:56 PM
    Edited by: kishan P on Feb 16, 2011 4:58 PM

    hI...
    There is no FM to Refresh the Fields in a Screen.
    Use the CLEAR statement to Clear each variable.
    In the PBO module of the Screen use this code.
      IF OK_CODE = 'REFRESH'.
        CLEAR : WA.
      ENDIF.
    <b>Reward if Helpful</b>

Maybe you are looking for