Differance between module pool & report programming

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

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

Similar Messages

  • Differences between Module Pool Programming and Reports and Scripts

    Hi,
    please tell me the Differences between Module Pool Programming , Reports and Scripts .
    Thanks nad Regards ,
    PavanKumar

    Hi
    Type 1 - is a report programming it can be executed by both transaction and program (F8). Hence its is also called as Executable program.You can start logical databases together with reports.
    Type M - Its a module pool program which is executed only by transaction code.
    Scripts - report with GUI interface. we can have graphics, watermark .
                SAPscript is a client dependent one.the Transaction for script is SE71.

  • Difrence between module pool and dialog programming

    Hi abapers,
    can plz tell me difrence between module pool and dialog programming.

    Hi,
    Actually Dialog Programming is Module pool Programming.
    Please go thru this , see if your dbout gets clear.
    Basic components of dialog program?
    - Screens (Dynpros)
    - Each dialog in an SAP system is controlled by dynpros.A dynpros consists of a screen
    And its flow logic and controls exactly one dialog step.
    - ABAP/4 module Pool.
    Each dynpro refers to exactly one ABAP/4 dialog program .Such a dialog program is also called a module pool ,since it consists of interactive modules.
    Regards,
    Priyanka.

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

  • Module pool report

    Hi
    Can any one give me brief idea about Module pool reporting
    Regards
    Sandhya
    SAP-ABAP Consultant

    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
    Try like this
    parameters :
    table1(30) type c,
    input(30) type c.
    data w_flag type i.
    at selection-screen output.
    if w_flag eq 1.
    clear w_flag.
    loop at screen.
    if screen-name = 'INPUT'.
    %_INPUT_%_APP_%-TEXT = TABLE1.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ENDIF.
    at selection-screen.
    w_flag = 1.
    start-of-selection.
    write input.
    Use GET PF-STATUS to Gets the current GUI status.
    Syntax
    GET PF-STATUS <f> [PROGRAM <prog>] [EXCLUDING <itab>].
    Returns the name of the current GUI status (the same as SY-PFKEY) into the variable <f>. The PROGRAM addition writes the name of the ABAP program to which the status belongs into the variable <prog>. The EXCLUDING addition returns a list of all currently inactive function codes into the internal table <itab>.
    Then use SET PF-STATUS Sets the GUI status
    Syntax
    SET PF-STATUS <stat> [EXCLUDING <f>|<itab>]
    [IMMEDIATELY] [OF PROGRAM <prog>].
    Sets the GUI status <stat> for the subsequent screens. The EXCLUDING addition allows you to deactivate functions dynamically. The IMMEDIATELY addition sets the GUI status of the list currently displayed. The OF PROGRAM addition allows you to use a GUI status from another program.
    Here you can use the Excluding option to exclude the ICONS
    Sample coding
    *& Include MZ_TABLEO01 *
    *& Module STATUS_0100 OUTPUT
    text
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'MYSTATUS'.
    SET TITLEBAR 'TITLE-001'.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module POPULATE_IT OUTPUT
    text
    MODULE populate_it OUTPUT.
    IF ok_code NE 'ADD' AND
    ok_code NE 'DEL'.
    IF flag NE 'X'.
    SELECT * FROM ztest_so INTO TABLE it_populate.
    flag = 'X'.
    ENDIF.
    ENDIF.
    ENDMODULE. " POPULATE_IT OUTPUT
    *& Module set_lines OUTPUT
    text
    MODULE set_lines OUTPUT.
    DESCRIBE TABLE it_populate LINES sy-tfill.
    so_tbl_ctrl-lines = sy-tfill.
    ENDMODULE. " set_lines OUTPUT
    *& Module move_values_to_tbl_ctrl OUTPUT
    text
    MODULE move_values_to_tbl_ctrl OUTPUT.
    MOVE : it_populate-vbeln TO ztest_so-vbeln,
    it_populate-bukrs TO ztest_so-bukrs,
    it_populate-kunnr TO ztest_so-kunnr,
    it_populate-erdat TO ztest_so-erdat.
    ENDMODULE. " move_values_to_tbl_ctrl OUTPUT
    *& Module set_select_status OUTPUT
    text
    MODULE set_select_status OUTPUT.
    READ TABLE it_selected WITH KEY vbeln = it_populate-vbeln.
    IF sy-subrc EQ 0.
    line_sel_col = 'X'.
    ELSE.
    line_sel_col = space.
    ENDIF.
    ENDMODULE. " set_select_status OUTPUT
    *& Module clear_okcode OUTPUT
    text
    module clear_okcode output.
    CLEAR OK_CODE.
    endmodule. " clear_okcode OUTPUT
    and in PAI
    *& Include MZ_TABLEI01 *
    *& Module USER_COMMAND_0100 INPUT
    text
    module USER_COMMAND_0100 input.
    case ok_code.
    when 'BACK' or 'CANC' or 'EXIT'.
    leave to screen 0.
    when 'SELALL'.
    clear IT_selected.
    refresh IT_selected.
    loop at IT_POPULATE.
    move-corresponding IT_POPULATE to IT_selected.
    append IT_selected.
    endloop.
    when 'DESELALL'.
    clear IT_selected.
    refresh IT_selected.
    when 'SAVE'.
    LOOP AT IT_SELECTED.
    MODIFY ZTEST_SO FROM IT_SELECTED.
    ENDLOOP.
    LOOP AT IT_DELETED.
    DELETE FROM ZTEST_SO WHERE VBELN = IT_DELETED-VBELN.
    ENDLOOP.
    commit work.
    when 'DEL'.
    LOOP AT IT_SELECTED.
    MOVE-CORRESPONDING IT_SELECTED
    TO
    IT_DELETED.
    APPEND IT_DELETED.
    Also delete it from T_SO.
    DELETE IT_POPULATE WHERE VBELN = IT_SELECTED-VBELN.
    ENDLOOP.
    CLEAR IT_SELECTED.
    REFRESH IT_SELECTED.
    endcase.
    endmodule. " USER_COMMAND_0100 INPUT
    *& Module get_selected_so INPUT
    text
    module get_selected_so input.
    If ok_code ne 'SELALL'.
    IF line_sel_col EQ 'X'.
    Read table IT_selected with key vbeln = IT_POPULATE-vbeln.
    If sy-subrc ne 0.
    MOVE-CORRESPONDING ztest_so TO IT_selected.
    Append IT_selected.
    Else.
    MOVE-CORRESPONDING ztest_so TO IT_selected.
    Modify IT_selected index sy-tabix.
    Endif.
    Else.
    Read table IT_selected with key vbeln = IT_POPULATE-VBELN.
    If sy-subrc eq 0.
    Delete IT_selected where VBELN = IT_POPULATE-VBELN.
    Endif.
    Endif.
    ENDIF.
    endmodule. " get_selected_so INPUT
    check these links, it may be helpful to u.
    this link contains information about :
    1)Table Controls in ABAP Programs
    2)Looping Through an Internal Table
    3)Table Controls: Examples with Scrolling
    http://help.sap.com/saphelp_47x200/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm
    process before output.
    *&spwizard: pbo flow logic for tablecontrol 'MY_TAB'
      module my_tab_change_tc_attr.
    *&spwizard: module MY_TAB_change_col_attr.
      loop at   it_item
           into wa_item
           with control my_tab
           cursor my_tab-current_line.
        module my_tab_get_lines.
    *&spwizard:   module MY_TAB_change_field_attr
      endloop.
      module status_0100.
      module set_curson.
      module get_date.
      module ok_code.
    process after input.
    *&spwizard: pai flow logic for tablecontrol 'MY_TAB'
      loop at it_item.
        chain.
          field wa_item-zeile.
          field wa_item-matnr.
          field wa_item-maktx.
          field wa_item-meins.
          field wa_item-menge.
          field wa_item-rflag.
          module my_tab_modify on chain-request.
        endchain.
      endloop.
      module my_tab_user_command.
    *&spwizard: module MY_TAB_change_tc_attr.
    *&spwizard: module MY_TAB_change_col_attr.
      module get_vendor_name.
      module user_command_0100.
    For second screen
    PROCESS BEFORE OUTPUT.
    *&spwizard: pbo flow logic for tablecontrol 'CON_TAB'
      module CON_TAB_change_tc_attr.
    *&spwizard: module CON_TAB_change_col_attr.
      loop at   IT_DB_ITEM
           into WA_DB_ITEM
           with control CON_TAB
           cursor CON_TAB-current_line.
        module CON_TAB_get_lines.
    *&spwizard:   module CON_TAB_change_field_attr
      endloop.
    MODULE STATUS_0110.
    PROCESS AFTER INPUT.
    *&spwizard: pai flow logic for tablecontrol 'CON_TAB'
      loop at IT_DB_ITEM.
        chain.
          field WA_DB_ITEM-ZEILE.
          field WA_DB_ITEM-MATNR.
          field WA_DB_ITEM-MAKTX.
          field WA_DB_ITEM-MEINS.
          field WA_DB_ITEM-MENGE.
          field WA_DB_ITEM-RFLAG.
        endchain.
      endloop.
      module CON_TAB_user_command.
    *&spwizard: module CON_TAB_change_tc_attr.
    *&spwizard: module CON_TAB_change_col_attr.
    MODULE USER_COMMAND_0110.
    Regards
    Pavan

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

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

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

  • Step by step procedure in module pool..programming

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

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

  • Using Text module in report programs

    Hi All,
    Is it possible to use Text modules created in Smartforms in our report programs. if yes, please share some details on the same.
    Regards,
    Booma Ganesan

    i am giving you a test data for READ_TEXT.
    pass as per your requirements.
    Function module              READ_TEXT
      Import parameters               Value
      CLIENT                          400
      ID                              F29
      LANGUAGE                        EN
      NAME                            320000128500003
      OBJECT                          EKPO
      Export parameters               Value
      HEADER                             EKPO      320000128500003                      F29 EN
      Tables                          Value
      LINES                              0 Entries
                       Result:           1 Entry

  • What is dfference between module pool and executable

    Hi experts,
    I want to create transaction(dialog programming).
    i am confusing what's the program type i need to enter.
    what is difference .
    please help..

    Hi Ramesh,
    As how others said .. A Module pool programming(Dialog programming) cannot be executed directly. A transaction code has to be assigned to it (in SE93)
    So ur program type will be - M
    Execution can be done accordingly
    1. goto SE93.
    2. Type in the Dialog programming name
    3. Click Create
    4. Give any transaction text
    5. Give the program Name ( ur dialog programing name)
    6. Give the screen number ( the first screen which u want the users to see and enter the data )
    then for running/executing the program give the transaction code ....
    All the best
    Cheers,
    R.Kripa.

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

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

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

  • Revenue Amount are different between P&L report and ARInvoice Query

    Hi ,
      I pull data from AR Invoice by "posting date" (oinv.docdate) that are include [INV1] detail information for last year. then
    compare with Profit and Loss statement, but total amount has almost 370K different. does anybody can let me know did the query
    has wrong ?
    Thanks.
    SELECT T0.[DocNum] as InvNo, T0.[DocStatus], T0.[DocDate] as InvDocDate, Year(T0.[DocDate]) as InvYear, T0.[CardCode], T1.[BaseRef] as DRNo, T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[ShipDate] as DRShipDate, T1.[OpenQty] as InvOpenQty, T1.[LineTotal] as InvTotal, T2.[Segment_0], T2.[Segment_1], T3.[Quantity] as DRShipQty, T3.[OpenQty] as DROpenQty, T3.[LineTotal] as DRTotal FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OACT T2 ON T1.AcctCode = T2.AcctCode INNER JOIN DLN1 T3 ON (T1.BaseEntry = T3.DocEntry and T1.ItemCode = T3.ItemCode) WHERE T0.[CANCELED] = 'N' and   T0.[DocType] = 'I'

    Hi,
    You need to include Credit Memo and Manual JE into the query to make the end meet.
    Thanks,
    Gordon

  • Dialog & Report Programming!

    Hi Experts,
    Can you please explain what is the different between
    <b>Dialog & Report Programming</b>
    Thanks in Advance,
    Guru.

    hi
    <b>Here is that difference</b>
    <b>Report Programs:</b>
    1. Reports are stand alone programs.
    2. We use reports to read data base tables & represent results in Lists
    3. Reports are collection of processing blocks, controlled by System calls depending on events.
    4. Reports can use LDBs or SELECT STATEMENTS
    defined by DEVELOPER.
    5.Reports can call Dialogue programs and vice versa.
    <b>Dialog Programming</b>
    1.Dialogue programs are not stand alone programs. (we
    have to link the dialogue programs to at least one or
    more SCREENS & TRANSACTION CODES)
    2. We use Dialogue Programs to read & change
    Database tables.
    3.Dialogue programs are controlled by Screen flow logic.
    4.Dialogue program is also called as Module pool program
    or TRANSACTION.
    5.These module pools are separated in to PBO and PAI
    events.
    Re: Difference between Dialog programming and reports.
    regards
    vijay
    <b>plz dont forget to reward points if helpful</b>
    Regards,
    Santosh

  • Difference between dialog programming and module pool programming

    Hi all ,
             Is there any differnce between module pool programming and dialog programming .
      thanks in advance ,
        magesh anandan

    Mahesh,
        Both are same.
    MODULE POOL  : Through modules only we have access ABAP EDITOR
                                   from  FLOW LOGIC EDITOR .
    DIALOG PROGRAMING : We use to have dialogs(Screen process) to interact
                                           with user .    
    Pls. reward if useful

  • 'how to code for table control wizard in module pool program

    Hi Gurus,
    Please provide me a sample code of table control wizard...
    Thanks in advance!!!!
    Regards,
    Kranthi

    Hi Kranti,
    check this code... it should be helpful
    *& Module pool       Z_TABLE_CONTROL_WIZARD_DEMO                       *
    PROGRAM  z_table_control_wizard_demo             .
    DATA: BEGIN OF lt_vbak OCCURS 0,
           flag  TYPE c,
           vbeln TYPE vbeln_va,
           netwr TYPE netwr,
           kunnr TYPE kunnr,
          END OF lt_vbak.
    DATA: sfkunnr TYPE kunnr.
    *&spwizard: declaration of tablecontrol 'TCONTROL' itself
    CONTROLS: tcontrol TYPE TABLEVIEW USING SCREEN 9000.
    *&spwizard: lines of tablecontrol 'TCONTROL'
    DATA:     g_tcontrol_lines  LIKE sy-loopc.
    DATA:     ok_code LIKE sy-ucomm.
    *&spwizard: output module for tc 'TCONTROL'. do not change this line!
    *&spwizard: update lines for equivalent scrollbar
    MODULE tcontrol_change_tc_attr OUTPUT.
      DESCRIBE TABLE lt_vbak LINES tcontrol-lines.
    ENDMODULE.                    "TCONTROL_change_tc_attr OUTPUT
    *&spwizard: output module for tc 'TCONTROL'. do not change this line!
    *&spwizard: get lines of tablecontrol
    MODULE tcontrol_get_lines OUTPUT.
      g_tcontrol_lines = sy-loopc.
    ENDMODULE.                    "TCONTROL_get_lines OUTPUT
    *&spwizard: input module for tc 'TCONTROL'. do not change this line!
    *&spwizard: modify table
    MODULE tcontrol_modify INPUT.
      MODIFY lt_vbak
        INDEX tcontrol-current_line.
    ENDMODULE.                    "TCONTROL_modify INPUT
    *&spwizard: input modul for tc 'TCONTROL'. do not change this line!
    *&spwizard: mark table
    MODULE tcontrol_mark INPUT.
      DATA: g_tcontrol_wa2 LIKE LINE OF lt_vbak.
      IF tcontrol-line_sel_mode = 1.
        LOOP AT lt_vbak INTO g_tcontrol_wa2
          WHERE flag = 'X'.
          g_tcontrol_wa2-flag = ''.
          MODIFY lt_vbak
            FROM g_tcontrol_wa2
            TRANSPORTING flag.
        ENDLOOP.
      ENDIF.
      MODIFY lt_vbak
        INDEX tcontrol-current_line
        TRANSPORTING flag.
    ENDMODULE.                    "TCONTROL_mark INPUT
    *&spwizard: input module for tc 'TCONTROL'. do not change this line!
    *&spwizard: process user command
    MODULE tcontrol_user_command INPUT.
      ok_code = sy-ucomm.
      PERFORM user_ok_tc USING    'TCONTROL'
                                  'LT_VBAK'
                                  'FLAG'
                         CHANGING ok_code.
      sy-ucomm = ok_code.
    ENDMODULE.                    "TCONTROL_user_command INPUT
    *   INCLUDE TABLECONTROL_FORMS                                         *
    *&      Form  USER_OK_TC                                               *
    FORM user_ok_tc USING    p_tc_name TYPE dynfnam
                             p_table_name
                             p_mark_name
                    CHANGING p_ok      LIKE sy-ucomm.
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
      DATA: l_ok              TYPE sy-ucomm,
            l_offset          TYPE i.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
    *&SPWIZARD: Table control specific operations                          *
    *&SPWIZARD: evaluate TC name and operations                            *
      SEARCH p_ok FOR p_tc_name.
      IF sy-subrc <> 0.
        EXIT.
      ENDIF.
      l_offset = STRLEN( p_tc_name ) + 1.
      l_ok = p_ok+l_offset.
    *&SPWIZARD: execute general and TC specific operations                 *
      CASE l_ok.
        WHEN 'INSR'.                      "insert row
          PERFORM fcode_insert_row USING    p_tc_name
                                            p_table_name.
          CLEAR p_ok.
        WHEN 'DELE'.                      "delete row
          PERFORM fcode_delete_row USING    p_tc_name
                                            p_table_name
                                            p_mark_name.
          CLEAR p_ok.
        WHEN 'P--' OR                     "top of list
             'P-'  OR                     "previous page
             'P+'  OR                     "next page
             'P++'.                       "bottom of list
          PERFORM compute_scrolling_in_tc USING p_tc_name
                                                l_ok.
          CLEAR p_ok.
    *     WHEN 'L--'.                       "total left
    *       PERFORM FCODE_TOTAL_LEFT USING P_TC_NAME.
    *     WHEN 'L-'.                        "column left
    *       PERFORM FCODE_COLUMN_LEFT USING P_TC_NAME.
    *     WHEN 'R+'.                        "column right
    *       PERFORM FCODE_COLUMN_RIGHT USING P_TC_NAME.
    *     WHEN 'R++'.                       "total right
    *       PERFORM FCODE_TOTAL_RIGHT USING P_TC_NAME.
        WHEN 'MARK'.                      "mark all filled lines
          PERFORM fcode_tc_mark_lines USING p_tc_name
                                            p_table_name
                                            p_mark_name   .
          CLEAR p_ok.
        WHEN 'DMRK'.                      "demark all filled lines
          PERFORM fcode_tc_demark_lines USING p_tc_name
                                              p_table_name
                                              p_mark_name .
          CLEAR p_ok.
    *     WHEN 'SASCEND'   OR
    *          'SDESCEND'.                  "sort column
    *       PERFORM FCODE_SORT_TC USING P_TC_NAME
    *                                   l_ok.
      ENDCASE.
    ENDFORM.                              " USER_OK_TC
    *&      Form  FCODE_INSERT_ROW                                         *
    FORM fcode_insert_row
                  USING    p_tc_name           TYPE dynfnam
                           p_table_name             .
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
      DATA l_lines_name       LIKE feld-name.
      DATA l_selline          LIKE sy-stepl.
      DATA l_lastline         TYPE i.
      DATA l_line             TYPE i.
      DATA l_table_name       LIKE feld-name.
      FIELD-SYMBOLS <tc>                 TYPE cxtab_control.
      FIELD-SYMBOLS <table>              TYPE STANDARD TABLE.
      FIELD-SYMBOLS <lines>              TYPE i.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
      ASSIGN (p_tc_name) TO <tc>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
      CONCATENATE p_table_name '[]' INTO l_table_name. "table body
      ASSIGN (l_table_name) TO <table>.                "not headerline
    *&SPWIZARD: get looplines of TableControl                              *
      CONCATENATE 'G_' p_tc_name '_LINES' INTO l_lines_name.
      ASSIGN (l_lines_name) TO <lines>.
    *&SPWIZARD: get current line                                           *
      GET CURSOR LINE l_selline.
      IF sy-subrc <> 0.                   " append line to table
        l_selline = <tc>-lines + 1.
    *&SPWIZARD: set top line                                               *
        IF l_selline > <lines>.
          <tc>-top_line = l_selline - <lines> + 1 .
        ELSE.
          <tc>-top_line = 1.
        ENDIF.
      ELSE.                               " insert line into table
        l_selline = <tc>-top_line + l_selline - 1.
        l_lastline = <tc>-top_line + <lines> - 1.
      ENDIF.
    *&SPWIZARD: set new cursor line                                        *
      l_line = l_selline - <tc>-top_line + 1.
    *&SPWIZARD: insert initial line                                        *
      INSERT INITIAL LINE INTO <table> INDEX l_selline.
      <tc>-lines = <tc>-lines + 1.
    *&SPWIZARD: set cursor                                                 *
      SET CURSOR LINE l_line.
    ENDFORM.                              " FCODE_INSERT_ROW
    *&      Form  FCODE_DELETE_ROW                                         *
    FORM fcode_delete_row
                  USING    p_tc_name           TYPE dynfnam
                           p_table_name
                           p_mark_name   .
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
      DATA l_table_name       LIKE feld-name.
      FIELD-SYMBOLS <tc>         TYPE cxtab_control.
      FIELD-SYMBOLS <table>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <wa>.
      FIELD-SYMBOLS <mark_field>.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
      ASSIGN (p_tc_name) TO <tc>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
      CONCATENATE p_table_name '[]' INTO l_table_name. "table body
      ASSIGN (l_table_name) TO <table>.                "not headerline
    *&SPWIZARD: delete marked lines                                        *
      DESCRIBE TABLE <table> LINES <tc>-lines.
      LOOP AT <table> ASSIGNING <wa>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
        ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
        IF <mark_field> = 'X'.
          DELETE <table> INDEX syst-tabix.
          IF sy-subrc = 0.
            <tc>-lines = <tc>-lines - 1.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM.                              " FCODE_DELETE_ROW
    *&      Form  COMPUTE_SCROLLING_IN_TC
    *       text
    *      -->P_TC_NAME  name of tablecontrol
    *      -->P_OK       ok code
    FORM compute_scrolling_in_tc USING    p_tc_name
                                          p_ok.
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
      DATA l_tc_new_top_line     TYPE i.
      DATA l_tc_name             LIKE feld-name.
      DATA l_tc_lines_name       LIKE feld-name.
      DATA l_tc_field_name       LIKE feld-name.
      FIELD-SYMBOLS <tc>         TYPE cxtab_control.
      FIELD-SYMBOLS <lines>      TYPE i.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
      ASSIGN (p_tc_name) TO <tc>.
    *&SPWIZARD: get looplines of TableControl                              *
      CONCATENATE 'G_' p_tc_name '_LINES' INTO l_tc_lines_name.
      ASSIGN (l_tc_lines_name) TO <lines>.
    *&SPWIZARD: is no line filled?                                         *
      IF <tc>-lines = 0.
    *&SPWIZARD: yes, ...                                                   *
        l_tc_new_top_line = 1.
      ELSE.
    *&SPWIZARD: no, ...                                                    *
        CALL FUNCTION 'SCROLLING_IN_TABLE'
             EXPORTING
                  entry_act             = <tc>-top_line
                  entry_from            = 1
                  entry_to              = <tc>-lines
                  last_page_full        = 'X'
                  loops                 = <lines>
                  ok_code               = p_ok
                  overlapping           = 'X'
             IMPORTING
                  entry_new             = l_tc_new_top_line
             EXCEPTIONS
    *              NO_ENTRY_OR_PAGE_ACT  = 01
    *              NO_ENTRY_TO           = 02
    *              NO_OK_CODE_OR_PAGE_GO = 03
                  OTHERS                = 0.
      ENDIF.
    *&SPWIZARD: get actual tc and column                                   *
      GET CURSOR FIELD l_tc_field_name
                 AREA  l_tc_name.
      IF syst-subrc = 0.
        IF l_tc_name = p_tc_name.
    *&SPWIZARD: et actual column                                           *
          SET CURSOR FIELD l_tc_field_name LINE 1.
        ENDIF.
      ENDIF.
    *&SPWIZARD: set the new top line                                       *
      <tc>-top_line = l_tc_new_top_line.
    ENDFORM.                              " COMPUTE_SCROLLING_IN_TC
    *&      Form  FCODE_TC_MARK_LINES
    *       marks all TableControl lines
    *      -->P_TC_NAME  name of tablecontrol
    FORM fcode_tc_mark_lines USING p_tc_name
                                   p_table_name
                                   p_mark_name.
    *&SPWIZARD: EGIN OF LOCAL DATA-----------------------------------------*
      DATA l_table_name       LIKE feld-name.
      FIELD-SYMBOLS <tc>         TYPE cxtab_control.
      FIELD-SYMBOLS <table>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <wa>.
      FIELD-SYMBOLS <mark_field>.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
      ASSIGN (p_tc_name) TO <tc>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
      CONCATENATE p_table_name '[]' INTO l_table_name. "table body
      ASSIGN (l_table_name) TO <table>.                "not headerline
    *&SPWIZARD: mark all filled lines                                      *
      LOOP AT <table> ASSIGNING <wa>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
        ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
        <mark_field> = 'X'.
      ENDLOOP.
    ENDFORM.                                          "fcode_tc_mark_lines
    *&      Form  FCODE_TC_DEMARK_LINES
    *       demarks all TableControl lines
    *      -->P_TC_NAME  name of tablecontrol
    FORM fcode_tc_demark_lines USING p_tc_name
                                     p_table_name
                                     p_mark_name .
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
      DATA l_table_name       LIKE feld-name.
      FIELD-SYMBOLS <tc>         TYPE cxtab_control.
      FIELD-SYMBOLS <table>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <wa>.
      FIELD-SYMBOLS <mark_field>.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
      ASSIGN (p_tc_name) TO <tc>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
      CONCATENATE p_table_name '[]' INTO l_table_name. "table body
      ASSIGN (l_table_name) TO <table>.                "not headerline
    *&SPWIZARD: demark all filled lines                                    *
      LOOP AT <table> ASSIGNING <wa>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
        ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
        <mark_field> = space.
      ENDLOOP.
    ENDFORM.                                          "fcode_tc_mark_lines
    *&      Module  STATUS_9000  OUTPUT
    *       text
    MODULE status_9000 OUTPUT.
      SET PF-STATUS 'S9000'.
      SET TITLEBAR 'T9000'.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9000  INPUT
    *       text
    MODULE user_command_9000 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
          LEAVE TO SCREEN 0.
        WHEN 'DISP'.
          SELECT vbeln netwr kunnr INTO CORRESPONDING FIELDS OF TABLE lt_vbak
          FROM vbak
          WHERE kunnr = sfkunnr.
    *    LEAVE TO LIST-PROCESSING [AND RETURN TO SCREEN <nnnn>].
    *    By default, the dialog processor returns to the PBO processing of
    *    the screen from which the list processor was called. The optional
    *    addition AND RETURN TO SCREEN allows you to specify a different
    *    screen in the current screen sequence at whose PBO event you want
    *    to resume processing.
        when 'LIST'.
        LEAVE TO LIST-PROCESSING.
        WRITE:/ 'Time  :', SY-UZEIT.
        LOOP AT LT_VBAK.
        WRITE:/ LT_VBAK-VBELN,
                LT_VBAK-NETWR,
                LT_VBAK-KUNNR.
        ENDLOOP.
        WHEN 'SUBM'.
    *& You can call executable programs from other ABAP programs using the
    *& following statement:
    *& SUBMIT <rep>|(<field>) [AND RETURN] [<options>].
          SUBMIT z_submit_report VIA SELECTION-SCREEN AND RETURN.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT
                                                     TABLE CONTROL WIZARD SE51 CODE
    PROCESS BEFORE OUTPUT.
    *&spwizard: pbo flow logic for tablecontrol 'TCONTROL'
      module TCONTROL_change_tc_attr.
    *&spwizard: module TCONTROL_change_col_attr.
      loop at   LT_VBAK
           with control TCONTROL
           cursor TCONTROL-current_line.
        module TCONTROL_get_lines.
    *&spwizard:   module TCONTROL_change_field_attr
      endloop.
    MODULE STATUS_9000.
    PROCESS AFTER INPUT.
    *&spwizard: pai flow logic for tablecontrol 'TCONTROL'
      loop at LT_VBAK.
        chain.
          field LT_VBAK-VBELN.
          field LT_VBAK-NETWR.
          field LT_VBAK-KUNNR.
          module TCONTROL_modify on chain-request.
        endchain.
        field LT_VBAK-FLAG
          module TCONTROL_mark on request.
      endloop.
      module TCONTROL_user_command.
    *&spwizard: module TCONTROL_change_tc_attr.
    *&spwizard: module TCONTROL_change_col_attr.
    MODULE USER_COMMAND_9000.
    regards
    padma

  • Update statement is not working. module pool program,why? check this code

    *& Module Pool       ZCUST_CALL_REC
    PROGRAM  ZCUST_CALL_REC.
    TABLES: ZCUST_CALL_REC,ZREMARKS.
    data:  v_kun_low like ZCUST_CALL_REC-kunnr ,
           v_kun_high like ZCUST_CALL_REC-kunnr,
           v_bud_low like ZCUST_CALL_REC-budat,
           v_bud_high like ZCUST_CALL_REC-budat.
    ranges r_kunnr for ZCUST_CALL_REC-kunnr  .
    ranges r_budat for zcust_call_rec-budat.
    DATA: ITAB TYPE STANDARD TABLE OF ZCUST_CALL_REC WITH HEADER LINE,
          JTAB TYPE STANDARD TABLE OF ZREMARKS WITH HEADER LINE.
    *data:begin of itab occurs 0,
        MANDT LIKE ZCUST_CALL_REC-MANDT,
        kunnr like ZCUST_CALL_REC-kunnr,
        budat like ZCUST_CALL_REC-budat,
        code like ZCUST_CALL_REC-code,
        remarks like ZCUST_CALL_REC-remarks,
        end of itab.
    *data:begin of Jtab occurs 0,
        MANDT LIKE ZCUST_CALL_REC-MANDT,
        kunnr like ZCUST_CALL_REC-kunnr,
        budat like ZCUST_CALL_REC-budat,
        code like ZCUST_CALL_REC-code,
        remarks like ZCUST_CALL_REC-remarks,
        end of Jtab.
    CONTROLS:vcontrol TYPE TABLEVIEW USING SCREEN '9001'.
    CONTROLS:vcontrol1 TYPE TABLEVIEW USING SCREEN '9002'.
    *start-of-selection.
    *&      Module  USER_COMMAND_9000  INPUT
          text
    MODULE USER_COMMAND_9000 INPUT.
    CASE sy-ucomm.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
    SET SCREEN 0.
    LEAVE SCREEN.
    CLEAR sy-ucomm.
    WHEN 'ENQUIRY'.
    perform multiple_selection.
    perform append_CUSTOMER_code.
    PERFORM SELECT_DATA.
    call screen '9001'.
    WHEN 'UPDATE'.
          perform append_CUSTOMER_code.
          PERFORM SELECT_DATA.
          call screen '9002'.
          perform update on commit.
    WHEN 'DELETE'.
          perform append_CUSTOMER_code.
          PERFORM SELECT_DATA.
          call screen '9002'.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT
    *&      Module  STATUS_9000  OUTPUT
          text
    MODULE STATUS_9000 OUTPUT.
      SET PF-STATUS 'ZCUSTOMER'.
    SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9001  INPUT
          text
    MODULE USER_COMMAND_9001 INPUT.
    CASE sy-ucomm.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
    SET SCREEN 0.
    LEAVE SCREEN.
    CLEAR sy-ucomm.
    endcase.
    ENDMODULE.                 " USER_COMMAND_9001  INPUT
    *&      Module  STATUS_9001  OUTPUT
          text
    MODULE STATUS_9001 OUTPUT.
      SET PF-STATUS 'ZCUSTOMER'.
    SET TITLEBAR 'xxx'.
    move itab-MANDT   to zcust_call_rec-MANDT.
    move itab-kunnr   to zcust_call_rec-kunnr.
    move itab-budat   to zcust_call_rec-budat.
    move itab-code    to zcust_call_rec-code.
    move itab-remarks to zcust_call_rec-remarks.
    vcontrol-lines = sy-dbcnt.
    ENDMODULE.                 " STATUS_9001  OUTPUT
    *&      Module  USER_COMMAND_9002  INPUT
          text
    module  USER_COMMAND_9002 input.
    CASE sy-ucomm.
       WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
          SET SCREEN 0.
          LEAVE SCREEN.
          CLEAR sy-ucomm.
       WHEN 'UPDATE'.
             perform move_data.
         UPDATE ZCUST_CALL_REC FROM TABLE ITAB.
            IF SY-SUBRC = 0.
               MESSAGE I000(0) WITH 'RECORDS ARE UPDATED'.
             ELSE.
               MESSAGE E001(0) WITH 'RECORDS ARE NOT UPDATED'.
            ENDIF.
      WHEN 'DELETE'.
             perform move_data.
             DELETE ZCUST_CALL_REC FROM TABLE ITAB.
              IF SY-SUBRC = 0.
               MESSAGE I000(0) WITH 'RECORDS ARE DELETED'.
             ELSE.
               MESSAGE E001(0) WITH 'RECORDS ARE NOT DELETED'.
            ENDIF.
    endcase.
    endmodule.                 " USER_COMMAND_9002  INPUT
    *&      Module  STATUS_9002  OUTPUT
          text
    module STATUS_9002 output.
      SET PF-STATUS 'ZCUSTOMER1'.
    SET TITLEBAR 'xxx'.
    endmodule.                 " STATUS_9002  OUTPUT
    *&      Module  update_table  OUTPUT
          text
    module update_table output.
         move itab-MANDT   to zcust_call_rec-MANDT.
         move itab-kunnr   to zcust_call_rec-kunnr.
         move itab-budat   to zcust_call_rec-budat.
         move itab-code    to zcust_call_rec-code.
         move itab-remarks to zcust_call_rec-remarks.
    vcontrol-lines = sy-dbcnt.
    endmodule.                 " update_table  OUTPUT
    ***Selection Data
    FORM SELECT_DATA.
    SELECT  mandt kunnr budat code remarks  FROM zcust_call_rec INTO
                            table itab
                             WHERE kunnr IN r_kunnr AND BUDAT IN R_BUDAT.
    ENDFORM.
    ****append vendor code
    FORM APPEND_CUSTOMER_CODE.
    clear r_kunnr.
    clear itab.
    clear r_budat.
    refresh r_kunnr.
    refresh itab.
    refresh r_kunnr.
    IF r_kunnr  IS INITIAL
                  AND NOT v_kun_low IS INITIAL
                   AND NOT v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                       CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                  EXPORTING
                                      input         = v_kun_high
                                  IMPORTING
                                      OUTPUT        = r_kunnr-high.
                     r_kunnr-option = 'BT'.
                     r_kunnr-sign = 'I'.
                     append r_kunnr.
       PERFORM V_BUDAT.
    ELSEIF r_kunnr  IS INITIAL
                  AND NOT v_kun_low IS INITIAL
                   AND  v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                    r_kunnr-SIGN = 'I'.
                    r_kunnr-OPTION = 'EQ'.
                    APPEND r_kunnr.
       PERFORM V_BUDAT.
    ELSEIF r_kunnr IS INITIAL
                  AND  v_kun_low IS INITIAL
                   AND NOT v_kun_high IS INITIAL.
                        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                                    EXPORTING
                                       input         = v_kun_low
                                    IMPORTING
                                       OUTPUT        = r_kunnr-low.
                    r_kunnr-SIGN = 'I'.
                    r_kunnr-OPTION = 'EQ'.
                    APPEND r_kunnr.
          PERFORM V_BUDAT.
    ELSEIF r_kunnr IS INITIAL
                  AND  v_kun_low IS INITIAL
                   AND  v_kun_high IS INITIAL.
                        IF SY-SUBRC = 0.
                             MESSAGE I003(0) WITH 'ENTER CUSTOMER NUMBER'.
                              CALL SCREEN '9000'.
                        ENDIF.
    PERFORM V_BUDAT.
    ENDIF.
    ENDFORM.
    FORM V_BUDAT.
    IF  R_BUDAT IS INITIAL
                   AND NOT v_BUD_low IS INITIAL
                   AND NOT v_BUD_high IS INITIAL.
                     r_budat-low = v_bud_low.
                     r_budat-high = v_bud_high.
                     r_budat-option = 'BT'.
                     r_budat-sign = 'I'.
                     append r_budat.
             ELSEIF  R_BUDAT IS INITIAL
                   AND NOT v_BUD_low IS INITIAL
                   AND  v_BUD_high IS INITIAL.
                     r_budat-low = v_bud_low.
                     r_budat-high = v_bud_high.
                     r_budat-option = 'EQ'.
                     r_budat-sign = 'I'.
                     append r_budat.
             ELSEIF  R_BUDAT IS INITIAL
                   AND  v_BUD_low IS INITIAL
                   AND NOT v_BUD_high IS INITIAL.
                     r_budat-HIGH = v_bud_HIGH.
                     r_budat-option = 'EQ'.
                     r_budat-sign = 'I'.
                     append r_budat.
              ELSEIF  R_BUDAT IS INITIAL
                   AND  v_BUD_low IS INITIAL
                   AND  v_BUD_high IS INITIAL.
                   IF SY-SUBRC = 0.
                       MESSAGE I002(0) WITH 'ENTER POSTING DATE'.
                      CALL SCREEN '9000'.
                    r_budat-low = ''.
                    r_budat-option = ''.
                    r_budat-sign = ''.
                    ENDIF.
            ENDIF.
    ENDFORM.
    *&      Form  update
          text
    -->  p1        text
    <--  p2        text
    form update .
    commit work.
    endform.                    " update
    *&      Form  move_data
          text
    -->  p1        text
    <--  p2        text
    form move_data .
       clear itab.
      refresh itab.
           move-corresponding  zcust_call_rec to itab.
           MOVE ZCUST_CALL_REC-MANDT   TO ITAB-MANDT.
           MOVE ZCUST_CALL_REC-KUNNR   TO ITAB-KUNNR.
           MOVE ZCUST_CALL_REC-BUDAT   TO ITAB-BUDAT.
           MOVE ZCUST_CALL_REC-CODE    TO ITAB-CODE.
           MOVE ZCUST_CALL_REC-REMARKS TO ITAB-REMARKS.
         APPEND ITAB.
         delete itab where kunnr is initial.

    Hi,
      try to use
    start-of-selection.
    call screen 100.
    module pai input.
    endmodule
    <b>Reward points</b>
    Regards

Maybe you are looking for