How to update a dbtab via table contols in module pool programs ?

HI All ,
     I am creating a transaction with 2 screens.the 2nd screen displays the list of a dbtable according to some of the selections made on the 1st screen. In my 2nd screen I want to provide the option to the user to update the db table with a new row. Can anyone guide me in solving the problem?
Thanks  in Advance ...
Ranjita

You can use the following code in the PAI of the screen.
LOOP AT itab.
  MODULE modify_from_screen.
ENDLOOP.
MODULE modify_from_screen INPUT.
  MODIFY itab FROM wa INDEX tctrl-current_line.
  IF sy-subrc NE 0.
    APPEND wa TO itab.
  ENDIF.
ENDMODULE.
itab - The Internal table.
wa - The name of the structure on the screen
tctrl - Name of the table control
Use this itab to save to your database table using the statement:
MODIFY dbtab FROM TABLE itab.
Regards,
Manoj

Similar Messages

  • How to insert data into a  Ztable by using module pool programming??

    Hi,
    I am new to ABAP, Actually I have made a Ztable now I want to insert data by using the module pool programming. In which there are all field in the first screen and there is a save button. So when ever i press SAVE button it shud update the Ztable with new entries.But actually I am not getting How can i update that??can you please send me the code for inserting data.
    Thanks in Advance.
    Edited by: Swapna Ram on Feb 17, 2008 12:01 AM

    Swapna,
    Check this thread...
    Custom Table updation thru table control
    ALso check this..
    Dialog programming

  • Use of "Pool Table(s)" in Module Pool Program

    Hi,
    I often see/hear that Pool tables play an important role in Module Pool Programs.
    anybody please explain me how Pool tables are used in Module Pools?? => Did you look for any documentation?
    if possible with code snippets. =>NO.
    Thanks,
    Kranthi.
    Edited by: kishan P on Nov 14, 2010 7:23 PM

    Hi,
    I often see/hear that Pool tables play an important role in Module Pool Programs.
    anybody please explain me how Pool tables are used in Module Pools?? => Did you look for any documentation?
    if possible with code snippets. =>NO.
    Thanks,
    Kranthi.
    Edited by: kishan P on Nov 14, 2010 7:23 PM

  • Table Control in Module Pool Programming

    In my Module Pool program I have created a Table Control on my screen. In my Table one column is the Checkbox. When I make changes in any of the Checkbox and scroll the Table or scroll with mouse,the data is lost.I am updating the database table and for that I have created a 'SAVE' button.But to make the changes I have to Scroll the Table on the screen and the changed data is lost.
    Please guide me or if possible then tell me the Flow Logic of Module Pool with Table Control??
    Thanks for the Help....

    PROCESS BEFORE OUTPUT.
    MODULE INITIALIZE.
    *&spwizard: pbo flow logic for tablecontrol 'TBLALLOC_CYC'
      module TBLALLOC_CYC_change_tc_attr.
    *&spwizard: module TBLALLOC_CYC_change_col_attr.
      loop at   GT_NEW_ALLOC
           into GT_NEW_ALLOC_WA
           with control TBLALLOC_CYC
           cursor TBLALLOC_CYC-current_line.
        module TBLALLOC_CYC_get_lines.
    *&spwizard:   module TBLALLOC_CYC_change_field_attr
      endloop.
    MODULE STATUS_9003.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_9003.
    *MODULE USER_COMMAND_9003.
    *&spwizard: pai flow logic for tablecontrol 'TBLALLOC_CYC'
      loop at GT_NEW_ALLOC.
        chain.
          field GT_NEW_ALLOC_WA-/BIC/ZALLOCCYC.
          field GT_NEW_ALLOC_WA-/BIC/UFACT_FLG.
          field GT_NEW_ALLOC_WA-CHANGEDBY.
          field GT_NEW_ALLOC_WA-CH_ON.
          field GT_NEW_ALLOC_WA-/BIC/ECHAT.
          module TBLALLOC_CYC_modify on chain-request.
        endchain.
      endloop.
    module TBLALLOC_CYC_user_command.
    *&spwizard: module TBLALLOC_CYC_change_tc_attr.
    *&spwizard: module TBLALLOC_CYC_change_col_attr.
    module TBLALLOC_CYC_user_command.
    MODULE USER_COMMAND_9003.
    MODULE INITIALIZE OUTPUT.
    At the time of initialization of the screen data is to be displayed
    by calling Function Module ZUFACTS_FETCH_ALLOC_CYC.
    CALL FUNCTION 'ZUFACTS_FETCH_ALLOC_CYC'
      TABLES
        T_ALLOC       = GT_NEW_ALLOC
    Pass the value displayed in Internal Table GT_OLD_ALLOC.
    GT_OLD_ALLOC[] = GT_NEW_ALLOC[].
    MOVE GT_OLD_ALLOC TO GT_OLD_ALLOC.
    *****Initialize the ok_code.
    CLEAR OK_CODE .
    ENDMODULE.                 " INITIALIZE  OUTPUT
    MODULE USER_COMMAND_9003 INPUT.
    CASE : OK_CODE.
      WHEN 'SAVE'.
        CALL FUNCTION 'ZUFACTS_UPDATE_ALLOC_CYC'
          TABLES
            T_OLD_ALLOC                 = GT_OLD_ALLOC
            T_NEW_ALLOC                 = GT_NEW_ALLOC
          EXCEPTIONS
            NO_FIELD_UPDATED            = 1
            UNSUCCESSFUL_UPDATION       = 2
            OTHERS                      = 3
        IF SY-SUBRC = 1.
          MESSAGE I005 .
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        IF SY-SUBRC = 2.
          MESSAGE E006.
        ENDIF.
      WHEN 'CANCEL' OR 'BACK' OR '%EX' OR 'RW'.
        LEAVE TO SCREEN 0.
      ENDCASE.
      CLEAR OK_CODE.
    ENDMODULE.                 " USER_COMMAND_9003  INPUT

  • How to Draw a graph Using layout In a module pool Program

    Hello Friends
                   How to Represent a Graph in the layout  in a module pool program.
    Plz suggest me.
    Thanking you all
    lavanya

    THIS IS AN EXAMPLE PROGRAM FOR GRAPHICS.
    Run this program & see whether it will be useful for u or not.
    before running dont forget to set the pf status.
    after copying double click the pf status & in application tool bar. give function code like this.
    PF07 - for 2d graph.
    PF06 - for 3d
    PF05 - for 4d
    DATA: BEGIN OF DATA OCCURS 1,
            P TYPE P,
          END OF DATA.
    --- options-table -
    DATA: BEGIN OF OPTS OCCURS 1,
             C(80) TYPE C,
          END OF OPTS.
    DATA: BEGIN OF TDIM1 OCCURS 1,
             C(80) TYPE C,
          END OF TDIM1.
    DATA: BEGIN OF TDIM2 OCCURS 1,
             C(80) TYPE C,
          END OF TDIM2.
    DATA: BEGIN OF TDIM3 OCCURS 1,
             C(80) TYPE C,
          END OF TDIM3.
    DATA: BEGIN OF MAX OCCURS 1,
             D1(3) TYPE P VALUE 4,
             D2(3) TYPE P VALUE 5,
             D3(3) TYPE P VALUE 6,
          END OF MAX.
    DATA: TYEAR1(5) VALUE '#1991',
          TYEAR2(5) VALUE '#1992',
          TYEAR3(5) VALUE '#1993',
          TYEAR4(5) VALUE '#1994'.
    DATA: TPROD1(9),
          TPROD2(9),
          TPROD3(9),
          TPROD4(9),
          TPROD5(9).
    TPROD1 = TEXT-P01.
    TPROD2 = TEXT-P02.
    TPROD3 = TEXT-P03.
    TPROD4 = TEXT-P04.
    TPROD5 = TEXT-P05.
    DATA: TLAND1(20),
          TLAND2(20),
          TLAND3(20),
          TLAND4(20),
          TLAND5(20),
          TLAND6(20).
    TLAND1 = TEXT-L01.
    TLAND2 = TEXT-L02.
    TLAND3 = TEXT-L03.
    TLAND4 = TEXT-L04.
    TLAND5 = TEXT-L05.
    TLAND6 = TEXT-L06.
    DATA: INDEX     LIKE  SY-INDEX.
    DATA: MAXD(3)    TYPE  P.
    DATA: TYP.
    FIELD-SYMBOLS: <F>.
    SET PF-STATUS 'GRAF'.
    PERFORM FILL_DATA.
    MAXD = MAX-D1 * MAX-D2.
    *{listdisplay
    display of a list:                                                   *
    for 5 countries each 4 colums (years) and 5 lines (products)
    WRITE: / TLAND1.
    INDEX = 1.
    PERFORM LISTE.
    SKIP.
    ULINE.
    WRITE: / TLAND2.
    INDEX = MAXD + 1.
    PERFORM LISTE.
    NEW-PAGE.
    WRITE: / TLAND3.
    INDEX = 2 * MAXD + 1.
    PERFORM LISTE.
    SKIP.
    ULINE.
    WRITE: / TLAND4.
    INDEX = 3 * MAXD + 1.
    PERFORM LISTE.
    NEW-PAGE.
    WRITE: / TLAND5.
    INDEX = 4 * MAXD + 1.
    PERFORM LISTE.
    SKIP.
    ULINE.
    WRITE: / TLAND6.
    INDEX = 5 * MAXD + 1.
    PERFORM LISTE.
    PF05: 4D-graphic, general function-module                            *
    AT PF05.
      REFRESH OPTS.
    --- first screen: selection -
      WRITE 'FIFRST = PU' TO OPTS-C. APPEND OPTS.
    --- 2D-graphic-type: perspective bars -
      WRITE 'P2TYPE = TD' TO OPTS-C. APPEND OPTS.
    --- kind of colours: regular  -
      WRITE 'P3CTYP = PL' TO OPTS-C. APPEND OPTS.
    *--- dimension 1
      REFRESH TDIM1.
      MOVE TYEAR1 TO TDIM1.
      APPEND TDIM1.
      MOVE TYEAR2 TO TDIM1.
      APPEND TDIM1.
      MOVE SPACE  TO TDIM1.
      APPEND TDIM1.
      MOVE TYEAR4 TO TDIM1.
      APPEND TDIM1.
    *--- dimension 2
      REFRESH TDIM2.
      MOVE SPACE  TO TDIM2.
      APPEND TDIM2.
      MOVE TPROD2 TO TDIM2.
      APPEND TDIM2.
      MOVE TPROD3 TO TDIM2.
      APPEND TDIM2.
      MOVE TPROD4 TO TDIM2.
      APPEND TDIM2.
      MOVE SPACE  TO TDIM2.
      APPEND TDIM2.
    *--- dimension 3
      REFRESH TDIM3.
      MOVE TLAND1 TO TDIM3.
      APPEND TDIM3.
      MOVE SPACE  TO TDIM3.
      APPEND TDIM3.
      MOVE TLAND3 TO TDIM3.
      APPEND TDIM3.
      MOVE TLAND4 TO TDIM3.
      APPEND TDIM3.
      MOVE SPACE  TO TDIM3.
      APPEND TDIM3.
      MOVE SPACE  TO TDIM3.
      APPEND TDIM3.
      CALL FUNCTION 'GRAPH_MATRIX'
           EXPORTING
                TITL  = TEXT-VGL
                VALT  = 'DM'
                DIM1  = TEXT-J00
                DIM2  = TEXT-P00
                DIM3  = TEXT-L00
           TABLES
                DATA  = DATA
                TDIM1 = TDIM1
                TDIM2 = TDIM2
                TDIM3 = TDIM3
                OPTS  = OPTS.
    PF06: 3D-graphic general function-module                             *
    AT PF06.
      REFRESH OPTS.
    --- first screen: selection -
      WRITE 'FIFRST = PU' TO OPTS-C. APPEND OPTS.
    --- 2D-graphic-Type: perspective bars -
      WRITE 'P2TYPE = TD' TO OPTS-C. APPEND OPTS.
    --- kind of colours: regular -
      WRITE 'P3CTYP = PL' TO OPTS-C. APPEND OPTS.
    *--- dimension 1
      REFRESH TDIM1.
      MOVE TYEAR1 TO TDIM1.
      APPEND TDIM1.
      MOVE SPACE  TO TDIM1.
      APPEND TDIM1.
      MOVE TYEAR3 TO TDIM1.
      APPEND TDIM1.
      MOVE TYEAR4 TO TDIM1.
      APPEND TDIM1.
    *--- dimension 2
      REFRESH TDIM2.
      MOVE TPROD1 TO TDIM2.
      APPEND TDIM2.
      MOVE SPACE  TO TDIM2.
      APPEND TDIM2.
      MOVE TPROD3 TO TDIM2.
      APPEND TDIM2.
      MOVE SPACE  TO TDIM2.
      APPEND TDIM2.
      MOVE TPROD5 TO TDIM2.
      APPEND TDIM2.
      REFRESH TDIM3.
      CALL FUNCTION 'GRAPH_MATRIX'
           EXPORTING
                TITL  = TEXT-VGL
                VALT  = 'DM'
                DIM1  = TEXT-J00
                DIM2  = TEXT-P00
           TABLES
                DATA  = DATA
                TDIM1 = TDIM1
                TDIM2 = TDIM2
                TDIM3 = TDIM3
                OPTS  = OPTS.
    PF07: 2D-graphic general function-module                             *
    AT PF07.
      REFRESH OPTS.
    --- first screen: selection -
      WRITE 'FIFRST = PU' TO OPTS-C. APPEND OPTS.
    --- 2D-graphic-type perspective bars -
      WRITE 'P2TYPE = TD' TO OPTS-C. APPEND OPTS.
    --- kind of colour: regular -
      WRITE 'P3CTYP = PL' TO OPTS-C. APPEND OPTS.
    *--- dimension 1
      REFRESH TDIM1.
      MOVE TYEAR1 TO TDIM1.
      APPEND TDIM1.
      MOVE SPACE  TO TDIM1.
      APPEND TDIM1.
      MOVE TYEAR3 TO TDIM1.
      APPEND TDIM1.
      MOVE TYEAR4 TO TDIM1.
      APPEND TDIM1.
      REFRESH TDIM2.
      REFRESH TDIM3.
      CALL FUNCTION 'GRAPH_MATRIX'
           EXPORTING
                TITL  = TEXT-VGL
                VALT  = 'DM'
                DIM1  = TEXT-J00
           TABLES
                DATA  = DATA
                TDIM1 = TDIM1
                TDIM2 = TDIM2
                TDIM3 = TDIM3
                OPTS  = OPTS.
          FORM LISTE                                                    *
          displays a list with turnover figures                         *
          (products and years)                                          *
    FORM LISTE.
      DATA: CNT_MOD LIKE SY-TABIX.
      DATA: CNT_DIV LIKE SY-TABIX.
      WRITE: / TEXT-P00,22 TYEAR1,39 TYEAR2,56 TYEAR3, 73 TYEAR4.
      SKIP 2.
      DO MAXD TIMES.
        READ TABLE DATA INDEX INDEX.
        IF SY-SUBRC NE 0. EXIT. ENDIF.
        INDEX = INDEX + 1.
        CNT_MOD = SY-INDEX MOD MAX-D1.
        CNT_DIV = SY-INDEX DIV MAX-D1.
        IF CNT_MOD EQ 1.
          CASE CNT_DIV.
            WHEN 0.
              WRITE: / TPROD1, ' '.
            WHEN 1.
              WRITE: / TPROD2, ' '.
            WHEN 2.
              WRITE: / TPROD3, ' '.
            WHEN 3.
              WRITE: / TPROD4, ' '.
            WHEN 4.
              WRITE: / TPROD5, ' '.
          ENDCASE.
        ENDIF.
        WRITE: DATA-P.
      ENDDO.
    ENDFORM.
          FORM FILL_DATA                                                *
          fills the datatable                                           *
    FORM FILL_DATA.
      DATA-P = 153470.
      APPEND DATA.
      DATA-P = 243470.
      APPEND DATA.
      DATA-P = 124567.
      APPEND DATA.
      DATA-P = 179037.
      APPEND DATA.
      DATA-P = 234980.
      APPEND DATA.
      DATA-P = 287513.
      APPEND DATA.
      DATA-P = 253430.
      APPEND DATA.
      DATA-P = 223440.
      APPEND DATA.
      DATA-P =  24567.
      APPEND DATA.
      DATA-P = 180037.
      APPEND DATA.
      DATA-P = 129830.
      APPEND DATA.
      DATA-P = 145530.
      APPEND DATA.
      DATA-P = 132470.
      APPEND DATA.
      DATA-P = 453470.
      APPEND DATA.
      DATA-P =  24456.
      APPEND DATA.
      DATA-P = 119807.
      APPEND DATA.
      DATA-P = 288710.
      APPEND DATA.
      DATA-P = 166656.
      APPEND DATA.
      DATA-P = 300430.
      APPEND DATA.
      DATA-P = 723110.
      APPEND DATA.
      DATA-P =  22767.
      APPEND DATA.
      DATA-P = 195522.
      APPEND DATA.
      DATA-P =  38970.
      APPEND DATA.
      DATA-P =  89635.
      APPEND DATA.
      DATA-P = 166970.
      APPEND DATA.
      DATA-P = 401470.
      APPEND DATA.
      DATA-P =  29967.
      APPEND DATA.
      DATA-P = 112957.
      APPEND DATA.
      DATA-P =  37860.
      APPEND DATA.
      DATA-P =  77450.
      APPEND DATA.
      DATA-P = 253150.
      APPEND DATA.
      DATA-P = 343570.
      APPEND DATA.
      DATA-P = 768867.
      APPEND DATA.
      DATA-P = 236790.
      APPEND DATA.
      DATA-P = 122750.
      APPEND DATA.
      DATA-P = 328760.
      APPEND DATA.
      DATA-P = 292150.
      APPEND DATA.
      DATA-P = 356570.
      APPEND DATA.
      DATA-P = 268867.
      APPEND DATA.
      DATA-P =  36790.
      APPEND DATA.
      DATA-P = 125680.
      APPEND DATA.
      DATA-P = 178893.
      APPEND DATA.
      DATA-P = 333150.
      APPEND DATA.
      DATA-P = 373570.
      APPEND DATA.
      DATA-P = 168867.
      APPEND DATA.
      DATA-P = 226790.
      APPEND DATA.
      DATA-P = 278940.
      APPEND DATA.
      DATA-P = 177784.
      APPEND DATA.
      DATA-P = 234150.
      APPEND DATA.
      DATA-P = 296570.
      APPEND DATA.
      DATA-P = 233867.
      APPEND DATA.
      DATA-P =  16790.
      APPEND DATA.
      DATA-P = 125590.
      APPEND DATA.
      DATA-P = 208760.
      APPEND DATA.
      DATA-P = 113150.
      APPEND DATA.
      DATA-P = 388570.
      APPEND DATA.
      DATA-P = 565867.
      APPEND DATA.
      DATA-P = 211790.
      APPEND DATA.
      DATA-P = 277480.
      APPEND DATA.
      DATA-P = 277489.
      APPEND DATA.
      DATA-P = 53470.
      APPEND DATA.
      DATA-P = 321560.
      APPEND DATA.
      DATA-P = 452456.
      APPEND DATA.
      DATA-P = 174695.
      APPEND DATA.
      DATA-P = 277590.
      APPEND DATA.
      DATA-P = 177490.
      APPEND DATA.
      DATA-P = 153470.
      APPEND DATA.
      DATA-P = 467560.
      APPEND DATA.
      DATA-P = 222456.
      APPEND DATA.
      DATA-P = 198695.
      APPEND DATA.
      DATA-P =  99470.
      APPEND DATA.
      DATA-P = 100340.
      APPEND DATA.
      DATA-P = 11470.
      APPEND DATA.
      DATA-P = 323560.
      APPEND DATA.
      DATA-P = 434456.
      APPEND DATA.
      DATA-P = 224695.
      APPEND DATA.
      DATA-P = 277490.
      APPEND DATA.
      DATA-P = 467890.
      APPEND DATA.
      DATA-P = 953470.
      APPEND DATA.
      DATA-P =  67560.
      APPEND DATA.
      DATA-P = 298456.
      APPEND DATA.
      DATA-P =  98695.
      APPEND DATA.
      DATA-P = 577900.
      APPEND DATA.
      DATA-P = 199490.
      APPEND DATA.
      DATA-P = 18470.
      APPEND DATA.
      DATA-P = 390560.
      APPEND DATA.
      DATA-P = 411456.
      APPEND DATA.
      DATA-P =  94695.
      APPEND DATA.
      DATA-P = 182000.
      APPEND DATA.
      DATA-P = 260570.
      APPEND DATA.
      DATA-P = 367356.
      APPEND DATA.
      DATA-P = 231850.
      APPEND DATA.
      DATA-P = 436645.
      APPEND DATA.
      DATA-P = 346650.
      APPEND DATA.
      DATA-P =  82500.
      APPEND DATA.
      DATA-P = 300560.
      APPEND DATA.
      DATA-P = 467109.
      APPEND DATA.
      DATA-P = 161850.
      APPEND DATA.
      DATA-P = 356470.
      APPEND DATA.
      DATA-P = 198840.
      APPEND DATA.
      DATA-P = 199000.
      APPEND DATA.
      DATA-P = 340570.
      APPEND DATA.
      DATA-P = 127356.
      APPEND DATA.
      DATA-P = 591850.
      APPEND DATA.
      DATA-P = 287460.
      APPEND DATA.
      DATA-P = 299770.
      APPEND DATA.
      DATA-P =  12500.
      APPEND DATA.
      DATA-P = 230560.
      APPEND DATA.
      DATA-P = 437109.
      APPEND DATA.
      DATA-P = 191850.
      APPEND DATA.
      DATA-P =  36780.
      APPEND DATA.
      DATA-P =  78789.
      APPEND DATA.
      DATA-P = 282000.
      APPEND DATA.
      DATA-P = 270570.
      APPEND DATA.
      DATA-P = 567356.
      APPEND DATA.
      DATA-P =  31850.
      APPEND DATA.
      DATA-P = 92410.
      APPEND DATA.
      DATA-P = 121350.
      APPEND DATA.
      DATA-P = 67356.
      APPEND DATA.
      DATA-P = 431891.
      APPEND DATA.
    ENDFORM.

  • How to get the cursor position from screen in module pool program

    Hi,
    I am doing the module pool program, I have one table control in one screen.
    I have to give functionality to the user that when the user enters first record in the table control and after filling the last field
    when he presses enter the cursor will have to come in the starting field of the second record.
    I know the logic , but i m bit confused.
    Can any body help me to solve this....
    thanks

    Hi,
    Check this code,
    Write it in the PBO
    MODULE SET_CURSOR_WERTKONTRAKT.
    MODULE SET_CURSOR_WERTKONTRAKT OUTPUT.
      PERFORM SET_CURSOR USING 'VBAP-ZWERT'.
    ENDMODULE.                 " SET_CURSOR_WERTKONTRAKT  OUTPUT
    FORM SET_CURSOR USING US_FELDNAME.
      DATA: DA_TFILL LIKE SY-TFILL.
      DESCRIBE TABLE IVBAP LINES DA_TFILL.
    FCODE 'Create Position':
    ==> Cursor to the first free line set to make the new position
    Can be created directly
        IF DA_TFILL EQ 0.
          SET CURSOR FIELD US_FELDNAME LINE 1.   -> set cursor position
        ELSE.
          SET CURSOR FIELD US_FELDNAME LINE 2.
        ENDIF.
    Product proposal actively
    Set ==> cursor in the first row
      IF DPP_ACTIVE   EQ CHARX AND
         XVBAP_UMFANG_OPV IS INITIAL.
    in the 'target volume' if available
        IF KOPGR_MIT_ZMENG CS TVAK-KOPGR.
            SET CURSOR FIELD 'VBAP-ZMENG' LINE 1.
            EXIT.
        ELSE.
    Else in the field 'Order quantity'
          SET CURSOR FIELD 'RV45A-KWMENG' LINE 1.
          EXIT.
        ENDIF.
      ENDIF.
    Hope it helps you,
    Regards,
    Abhijit G. Borkar

  • How to create selections-screens to display PO using module pool program

    All,
    I'm new to module pool programming. Can any one please provide me where to create selections screens to display existing purchase orders using the below selection criteria in thr module pool program.,
    SELECT-OPTIONS : S_LIFNR FOR EKKO-LIFNR,
                     S_BSART FOR EKKO-BSART,
                     S_BUKRS FOR EKKO-BUKRS,
                     S_WERKS FOR EKPO-WERKS OBLIGATORY,
                     S_BEDAT FOR SY-DATUM,
                     S_EINDT FOR EKET-EINDT,
                     S_EBELN FOR EKKO-EBELN,
                     S_MATNR FOR EKPO-MATNR.
    provide me step by step to do this.

    Hi,
    Thanks for the reply can you please let me know.
    How can I create the ranges
    like low and high in the selection.
    Using se51 i was able to do only one i,e
    example I need
    purchase order number----
    f4 -
    f4
    Can please tell me how to do this

  • Table controlls in module pool programming

    Hi all.
    I have an issue in module pool program.
    I created a table controll in the screen through table controll wizard.
    In that if I enter the data for 10 records(more than 1),then I(pressed)clicked on ENTER . then only first record is staying in the table controll.all other recods are
    going(disappering) from the table controll.
    Can any body help me to solve this problem.
    Thanks in Advance,
    Regards.
    Eswar

    you are not storing the entries given in the table control.
    i can give you an idea.
    declare an internal table which has the same structure as of the table control.
    in the PAI event, refresh the internal talbe.
    loop at the table control. move all the entries of the table control to the internal table.
    in the PBO event, refresh the table control. count the number of lines in table control. insert all the lines of internal table to the table control one after another.
    hope this helps you.
    thanks
    pavan

  • Table control of Module Pool Program

    Hi,
    I need a help in the table control of Module pool.
    Here I am using 40 columns in the table control. Out of 40, 30 columns are numeric type.
    Now the client need only 5 columns total in the last row. I made it as per requirement.
    But it is giving 5 columns total and the remaining 25 columns are filled zero value of total row.
    Now the client doesn’t want to display the zero for these 25 columns in the Total row.
    It’s very urgent. Please help on this.
    Reward points will be providing for useful answers.
    Advance Thanks 4 all.
    Regards,
    KBS REDDY

    Hi,
    In your PBO, inside LOOP ENDLOOP, have a module for screen modifications and for the last row that has totals, you set screen-invisible = 1 inside LOOP AT SCREEN. ENDLOOP.
    For example,
    If your screen has following PBO Logic,
      MODULE ...
      MODULE ...
      LOOP ...
    ****New module here for screen modification if does not ****exist already.
        MODULE modify_screen.
      ENDLOOP.
    and then in MODULE modify_screen.
      MODULE modify_screen.
    ****Basically check MATNR EQ 'TOTAL' or some thing like ****that
        IF <your condition for totals line>.
          LOOP AT SCREEN.
    ****Note instead of screen-name, you can assign a screen ****group to all columns w/o totals and then use
    ****SCREEN-GROUP1 EQ <your grp> logic
            IF screen-name EQ <your column name w/o totals>.
              screen-invisible = 1.
              MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDMODULE.
    On another note, since you are already disabling this fields in the last row, you have all the screen modification logic already I guess, so just add SCREEN-INVISIBLE = 1 for all fields w/o totals..
    Hope this helps..
    Sri
    Message was edited by: Srikanth Pinnamaneni

  • Table control in Module pool Program

    Hi All,
    here i have a small requirement on module pool application.
    i will explain my scenario more in detail.Here i have one delivery number.if i give this delivery number and click on capture it will capture all the materials for that delivery numeber in a table control.here the material may be one or more than one.we can select table control records.so if the material is more than one user has to select only one material once.if he will try to select the second material we want to display an error message will display.how to handle this requirement.
    please give me suggestions regarding coding also.
    Thanks in advance,
    swami
    Edited by: swaminath kamasani on Oct 1, 2008 11:50 PM

    Do you need to know how to display an error message if multiple lines are selected or the coding for the entire requirnment??
    For error message part:
    Dont set the Table control attributes - multiple selection.

  • CURRENCY FIELD IN TABLE CONTROLLS OF MODULE POOL PROGRAM

    Hi All.
    I am fasing an issue in module pool.
    I am using a table controll to display the data on the screen.
    There is  one field of currency type .
    the amount in that field is -ve(Negative) then the program giving a short dump by saying that the problem is  in the conversion.
    if the field is + ve(means  no sign) it's executing fine.
    Can any body help me to solve this issue,
    Thanks in advance,
    regards,
    venkat

    Hi Venkat,
    Open the screen painter (SE51) and go to the currency field in the table control on the screen. In the "TEXT" field in the toolbar, delete a character (_) and type in "V" as the last character. The issue should be solved.
    Regards,
    Manoj

  • How to use table control in module pool programming

    Hi
    I want to use a table control to fetch some data from mara table.
    Please guide me with the procedure and the steps which I can follow to complete my program correctly.
    thanks
    Lalit Gupta

    As [vinraaj|http://forums.sdn.sap.com/profile.jspa?userID=3968041] wrote, call transaction SE51, there is a Wizard to help you generate the table control, it will create the table control and some includes with PBO/PAI modules > Read [Using the Table Control Wizard|http://help.sap.com/saphelp_bw/helpdata/en/6d/150d67da1011d3963800a0c94260a5/frameset.htm]
    Also there is a tutorial in the wiki, read [Learn Making First Table Control |http://wiki.sdn.sap.com/wiki/display/ABAP/LearnMakingFirstTableControl] by [Krishna Chauhan|http://wiki.sdn.sap.com/wiki/display/~nc0euof]
    Regards,
    Raymond

  • How can we select multiple rows in table control for module pool program?

    hi guru's
                 i cannt able to select multiple table control rows for deletion of records please give any code to select rows?
    regrards,
    satheesh.

    On the Table Control attributes there is a "Selectability" option where you choose one of: None, Single, or Multiple.  In your code you then need to pick up which rows have the selection column set to 'X'.

  • Table controls in module pool programing

    hello all,
         i am a novice in ABAP. i am not able to save the details i gave in the table control. i am giving the material number(MATNR) in a seperate text box and the fileds like ERNAM,LAEDA,AENAM in the table control. but when i am saving i am able to find only the MATNR value in the mara table.
        what is the syntax to save the values of the table control into the MARA table.
    thanks & regards,
    seenu

    HI,
      Step 1 : TO move the values from the screen to ABAP Program.
    The values of all the input fields will be available in ABAP when PAI event is triggered. To access the values in a table control, you will need to follow the below mentioned procedure....
    <b>in PAI Event
    ( ITAB is Table Control and WA_ITAB is work area)</b>
    LOOP AT ITAB INTO WA_ITAB.
    MODULE READ_SCRN_VALUES
    ENDLOOP
    MODULE READ_SCRN_VALUES INPUT
    move  WA_ITAB to WS_ITAB.
    WS_ITAB is another Work area.
    ENDMODULE
    This way you can moves from screen to ABAP Program. Pass WS_ITAB and MATNR (Matnr - material number on the screen) to MARA.
    After updating MARA Table, check the table to view the values of the required fields.
    Click the link below to know more about Passing Values from Screen to Program.
    http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba9e735c111d1829f0000e829fbfe/content.htm
    To know about controlling the data transfer from Screen to Program
    http://help.sap.com/saphelp_47x200/helpdata/en/9f/dbabb035c111d1829f0000e829fbfe/content.htm
    Also check if you are using MODIFY or INSERT or UPDATE command in your program to update MARA Table, then click the link below to know more about these commands.
    Insert
    http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3a6d358411d1829f0000e829fbfe/content.htm
    Update
    http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3a94358411d1829f0000e829fbfe/content.htm
    Modify
    http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3ac8358411d1829f0000e829fbfe/content.htm
    Hope this answers your question.
    Regards,
    Vara

  • Search help in table view of Module pool programming

    Hi SAP all.
    here i have created one screen in se80 and i have created one table control.
    in the table control i have created one field ,for that field i just want to have the search help refer to C_KUNNR.
    when i entered C_KUNNR in the search help box and click on from dictionary it is raising error message saying that table not active in ABAP Dictionary.
    can any body help me in this.
    regards.
    Varma

    Hi,
    In the main screen-.Goto Flowlogic->Goto Layout-->U can give Standard search help name DEBI.
    else.
    Use the Process on Value Request
    Regards
    Arbind

Maybe you are looking for

  • How can I use multiple icloud Accounts with Fotos?

    Hello. Yesterday, my wife and I started using the new App "Fotos" on OSX and iOS. What I can't figure out, and where I would like to get some insight and help, is how we should use our icloud Accounts. How it is right now: - Wife (MacBook and iPhone)

  • Can't Save Photoshop file on Network Server

    To start of with some specs, im running Mac OS 10.5.3 and CS1 on a Dual 1.8GHz PowerPC G5, however the issue also exists on a MacMini running the same OS and CS1. I connect to a server at work via afp and that is where we store all of our files. We a

  • TM Error. An error occurred while linking files on the backup volume

    I have a 1TB Time Capsule. It's been working great for over a month. I'm now receiving an error. Time Machine Error Unable to complete backup. An error occurred while linking files on the backup volume. I don't know what has happened to cause this er

  • Sorting & Filtering in the same table

    Hello, i had table with 5 entries in it. First Column  -     a, ba, ab, aa, bb Second Column - 4, 2, 1, 3, 5 I had sucessfully implemented Sorting & Filtering functionality to that table. single Action: 1) when I sort 'First' column, as expected it i

  • Save More than 1000 chars in a field of (Z) Database Table?

    Hi Friends, I created a database table with few fields. In the table, one field is REMARKS which should save more than 1000 characters for every record. For that field,  I created domain & data element of char with 2000 length. But system gives an er