Transfer entries in Table Control

Plz tell me how can i transfter entries made in table control into an inertnal table.
so that I could save all entries of table control into database.
Regards....

hi,
The cells in table control should have the internal table field name.
then use,
modify wi_cust1 index tb-current_line.
        if sy-subrc = 0.
          modify zcust_master2 from table wi_cust1.
where,
wi_cust1 is the internal table and zcust_master2 is the database table.
hope this helps,
Regards,
Arunsri

Similar Messages

  • To delete multiple entries in table control in module pool

    Hi,
    Please help me out to know , <b>how to delete multiple entries from table control</b> when multiple lines in table control are selected.
    Regards,
    Irfan Hussain

    hai,
        you can do it inthis way.
    in the PAI event.
    loop at <table control name>
      module del_itab.
    endloop.
    in the nodule,write the folowing code.
    if <tablecontrol>-fieldname = 'X'.
    delete <tablecontrol-itab>
    endif.
    cheers

  • How to transfer data in table control in bdc

    hi
    how to transfer data in table control in bdc . I need the theory regarding this
    bye

    Hi,
    just check in the forum , there is many threads available to ur questions.
    Table control in BDC
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    You can even refer to these related threads
    bdc table control
    Re: table control in bdc
    table control in BDC
    Reward if helpful.
    Thanks
    Naveen khan

  • How to insert multiple entries in table control

    Hi All,
    I want to insert multiple entries in table control in BDC program.Can any body help in this regard.
    Thanks,
    Satish.

    Hi,
    Go through the following 2 example programs:
    THis is example to upload the Bank details of the Vendor which has the TC.
    REPORT zprataptable2
           NO STANDARD PAGE HEADING LINE-SIZE 255.
    DATA : BEGIN OF itab OCCURS 0,
            i1 TYPE i,
            lifnr LIKE   rf02k-lifnr,
            bukrs LIKE   rf02k-bukrs,
            ekorg LIKE   rf02k-ekorg,
            ktokk LIKE   rf02k-ktokk,
            anred LIKE lfa1-anred,
            name1 LIKE lfa1-name1,
            sortl LIKE lfa1-sortl,
            land1 LIKE lfa1-land1,
            akont LIKE lfb1-akont,
            fdgrv LIKE lfb1-fdgrv,
             waers LIKE lfm1-waers,
            END OF itab.
    DATA : BEGIN OF jtab OCCURS 0,
            j1 TYPE i,
            banks LIKE lfbk-banks,
            bankl LIKE lfbk-bankl,
            bankn LIKE lfbk-bankn,
             END OF jtab.
    DATA : cnt(4) TYPE n.
    DATA : fdt(20) TYPE c.
    DATA : c TYPE i.
    INCLUDE bdcrecx1.
    START-OF-SELECTION.
      CALL FUNCTION 'WS_UPLOAD'
        EXPORTING
          filename = 'C:\first1.txt'
          filetype = 'DAT'
        TABLES
          data_tab = itab.
      CALL FUNCTION 'WS_UPLOAD'
       EXPORTING
         filename                      = 'C:\second.txt'
         filetype                      = 'DAT'
        TABLES
          data_tab                      = jtab.
      LOOP AT itab.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF02K-KTOKK'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'RF02K-LIFNR'
                                      itab-lifnr.
        PERFORM bdc_field       USING 'RF02K-BUKRS'
                                      itab-bukrs.
        PERFORM bdc_field       USING 'RF02K-EKORG'
                                       itab-ekorg.
        PERFORM bdc_field       USING 'RF02K-KTOKK'
                                       itab-ktokk.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0110'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFA1-LAND1'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'LFA1-ANRED'
                                      itab-anred.
        PERFORM bdc_field       USING 'LFA1-NAME1'
                                      itab-name1.
        PERFORM bdc_field       USING 'LFA1-SORTL'
                                      itab-sortl.
        PERFORM bdc_field       USING 'LFA1-LAND1'
                                      itab-land1.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0120'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFA1-KUNNR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0130'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFBK-BANKN(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTR'.
        cnt = 0.
        LOOP AT jtab WHERE j1 = itab-i1.
          cnt = cnt + 1.
          CONCATENATE 'LFBK-BANKS(' cnt ')' INTO fdt.
          PERFORM bdc_field  USING fdt jtab-banks.
          CONCATENATE 'LFBK-BANKL(' cnt ')' INTO fdt.
          PERFORM bdc_field USING fdt jtab-bankl.
          CONCATENATE 'LFBK-BANKN(' cnt ')' INTO fdt.
          PERFORM bdc_field   USING fdt jtab-bankn.
          IF cnt = 5.
            cnt = 0.
            PERFORM bdc_dynpro      USING 'SAPMF02K' '0130'.
            PERFORM bdc_field       USING 'BDC_CURSOR'
                                          'LFBK-BANKS(01)'.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                          '=P+'.
            PERFORM bdc_dynpro      USING 'SAPMF02K' '0130'.
            PERFORM bdc_field       USING 'BDC_CURSOR'
                                          'LFBK-BANKN(02)'.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                          '=ENTR'.
          ENDIF.
        ENDLOOP.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0130'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFBK-BANKS(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0210'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFB1-FDGRV'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'LFB1-AKONT'
                                      itab-akont.
        PERFORM bdc_field       USING 'LFB1-FDGRV'
                                      itab-fdgrv.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0215'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFB1-ZTERM'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0220'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFB5-MAHNA'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0310'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFM1-WAERS'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'LFM1-WAERS'
                                      itab-waers.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0320'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF02K-LIFNR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM bdc_dynpro      USING 'SAPLSPO1' '0300'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=YES'.
        PERFORM bdc_transaction USING 'XK01'.
      ENDLOOP.
      PERFORM close_group.
    ABAP Name   :   ZMM_PR_UPLOAD_MAT
    Description :   PR Upload BDC Program(With Material)
    Created by  :   Anji Reddy V
    Created on  :   04/11/2004
    Description :   This Program is used to Upload the Purchase
                     Requisition data Using the Transaction ME51N.
      Modification Log:
      Date         Programmer          Correction    Description
      04/11/2004   Anji Reddy          Initial
    REPORT zmm_pr_upload_mat
           NO STANDARD PAGE HEADING
           LINE-SIZE 255.
    Standard Include for Selection Screen
    INCLUDE bdcrecx1.
    Internal Table for Upload Data
    DATA: BEGIN OF i_pr OCCURS 0,
    Header Screen
            sno(3),               " SNo
            bsart(004),           " PR Type
            epstp(001),           " Item Category
            knttp(001),           " Account Assignment
            eeind(010),           " Delivery Date
           lpein(001),          " Category of Del Date
            werks(004),           " Plant
            lgort(004),           " Storage Location
            ekgrp(003),           " Purchasing Group
            matkl(009),           " Material Group
            bednr(010),           " Tracking No
            afnam(012),            " Requisitioner
    Item Details
            matnr(018),           " Material No
            menge(017),           " Quantity
           badat(010),
           frgdt(010),
            preis(014),           " Valuation Price
           waers(005),           " Currency
           peinh(005),
           wepos(001),
           repos(001),
            sakto(010),           " GL Account
            kostl(010),           " Cost Center
           bnfpo(005),
          END OF i_pr.
    Internal Table for header Data
    DATA: BEGIN OF it_header OCCURS 0,
            sno(3),               " SNo
            bsart(004),           " PR Type
            epstp(001),           " Item Category
            knttp(001),           " Account Assignment
            eeind(010),           " Delivery Date
            werks(004),           " Plant
            lgort(004),           " Storage Location
            ekgrp(003),           " Purchasing Group
            matkl(009),           " Material Group
            bednr(010),           " Tracking No
            afnam(012),            " Requisitioner
          END OF it_header.
    Internal Table for Item Data
    DATA: BEGIN OF it_item OCCURS 0,
            sno(3),               " SNo
            matnr(018),           " Material No
            menge(017),           " Quantity
            preis(014),           " Valuation Price
            sakto(010),           " GL Account
            kostl(010),           " Cost Center
          END OF it_item.
    Data Variables & Constants
    CONSTANTS : c_x             VALUE 'X'.  " Flag
    DATA : v_l(2),                          " Counter
           v_rowno(5),                      " Row No
           v_2(2),                          " Counter
           v_rows LIKE sy-srows,            " Rows in TC
           v_field(45).                     " String
    Parameters
    PARAMETERS: p_file LIKE ibipparms-path.  " Filename
    At selection-screen on Value Request for file Name
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    Get the F4 Values for the File
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
        IMPORTING
          file_name     = p_file.
    Start of Selection
    START-OF-SELECTION.
    Open the BDC Session
      PERFORM open_group.
    Upload the File into internal Table
      CALL FUNCTION 'UPLOAD'
        EXPORTING
          filename                = p_file
          filetype                = 'DAT'
        TABLES
          data_tab                = i_pr
        EXCEPTIONS
          conversion_error        = 1
          invalid_table_width     = 2
          invalid_type            = 3
          no_batch                = 4
          unknown_error           = 5
          gui_refuse_filetransfer = 6
          OTHERS                  = 7.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      SORT i_pr BY sno.
      LOOP AT i_pr.
        MOVE-CORRESPONDING i_pr TO it_item.
        APPEND it_item.
        CLEAR it_item.
        AT END OF sno.
          READ TABLE i_pr INDEX sy-tabix.
          MOVE-CORRESPONDING i_pr TO it_header.
          APPEND it_header.
          CLEAR it_header.
        ENDAT.
      ENDLOOP.
      SORT it_header BY sno.
      SORT it_item BY sno.
      v_rows = sy-srows - 6.
    Upload the Data from Internal Table
      LOOP AT it_header.
    Header Data
        PERFORM bdc_dynpro      USING 'SAPMM06B' '0100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'EBAN-BEDNR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'EBAN-BSART'
                                      it_header-bsart.
        PERFORM bdc_field       USING 'RM06B-EPSTP'
                                      it_header-epstp.
        PERFORM bdc_field       USING 'EBAN-KNTTP'
                                      it_header-knttp.
        PERFORM bdc_field       USING 'RM06B-EEIND'
                                      it_header-eeind.
       PERFORM bdc_field       USING 'RM06B-LPEIN'
                                     it_header-lpein.
        PERFORM bdc_field       USING 'EBAN-WERKS'
                                      it_header-werks.
        PERFORM bdc_field       USING 'EBAN-LGORT'
                                      it_header-lgort.
        PERFORM bdc_field       USING 'EBAN-EKGRP'
                                      it_header-ekgrp.
        PERFORM bdc_field       USING 'EBAN-MATKL'
                                      it_header-matkl.
        PERFORM bdc_field       USING 'EBAN-BEDNR'
                                      it_header-bednr.
        PERFORM bdc_field       USING 'EBAN-AFNAM'
                                      it_header-afnam.
    Item Details
        v_l = 0.
    To add no. of rows
        v_2 = 0 .
    As the screen is showing 13 rows defaulted to 130
        v_rowno = 130 .
        LOOP AT it_item WHERE sno = it_header-sno.
          v_l = v_l + 1.
          IF v_l = 14 .
            IF v_2 = 12 .
              v_2 = 12 .
              v_l = 2 .
    From second time onwards it is displaying 12 rows only
              v_rowno = v_rowno + 120 .
              PERFORM bdc_dynpro      USING 'SAPMM06B' '0106'.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'RM06B-BNFPO'.
              PERFORM bdc_field       USING 'RM06B-BNFPO'
                                            v_rowno.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '/00'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                                '/00'.
            ELSE.
    V_2 initialized to 12 for second screen purpose
              v_2 = 12 .
              v_l = 2 .
              PERFORM bdc_dynpro      USING 'SAPMM06B' '0106'.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'RM06B-BNFPO'.
              PERFORM bdc_field       USING 'RM06B-BNFPO'
                                            v_rowno .
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '/00'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                                '/00'.
            ENDIF.
          ENDIF.
          PERFORM bdc_dynpro      USING 'SAPMM06B' '0106'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          CLEAR v_field.
          CONCATENATE 'EBAN-MATNR(' v_l ')' INTO v_field.
          PERFORM bdc_field   USING v_field it_item-matnr.
          CLEAR v_field.
          CONCATENATE 'EBAN-MENGE(' v_l ')' INTO v_field.
          PERFORM bdc_field   USING v_field it_item-menge.
          PERFORM bdc_dynpro      USING 'SAPMM06B' '0102'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'EBAN-PREIS'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'EBAN-PREIS'
                                      it_item-preis.
          PERFORM bdc_dynpro      USING 'SAPMM06B' '0505'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'EBKN-SAKTO'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=ENTE'.
          PERFORM bdc_field       USING 'EBKN-SAKTO'
                                      it_item-sakto.
    Cost Center
          PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'COBL-KOSTL'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=ENTE'.
          PERFORM bdc_field       USING 'COBL-KOSTL'
                                        it_item-kostl.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=ENTE'.
        ENDLOOP.
        PERFORM bdc_dynpro      USING 'SAPMM06B' '0106'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RM06B-BNFPO'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=BU'.
    Call The Transaction
        PERFORM bdc_transaction USING 'ME51'.
      ENDLOOP.
    Close the BDC Session
      PERFORM close_group.
    reward for useful answers.
    Regards,
    Anji

  • Dulicate entries in Table control

    Hiii
    How can I control the duplicate entries in the column in table control.
    Harman

    Harman,
      IF you are passing values to table controls through internal table then
    sort the internal table by key values.
    EX: SORT itab BY matnr.
    DELETE ADJACENT DUPLICATES FROM itab COMPARING matnr.
    Now it will work..
    Don't forget to reward if useful....

  • Unlimited entry in table control?

    Hi All
    I have a requirement where table control should not restrict no of entries.
    Initially i have coded
    PROCESS BEFORE OUTPUT.
    MODULE initialize.
    MODULE initialize OUTPUT.
    tablecontrol-lines = X. 'Number of entries
    Is unlimited entry in the table control is possible ? If yes how to implement it?
    Thanks,
    Shrinivas

    Hi Srinivas..
    Declare a Flag in TOP include.
    Use this statement in PBO module.
    if flag = 'X' . "First time
    tablecontrol-lines = 100.
      flag = ' '.
    else.
    tablecontrol-lines = tablecontrol-lines + 10.
    endif.
    reward if Helpful.

  • Add fields to CAT2 data entry area table control

    Hi All,
    I have a requirement where in I need to add a column after every day ( Moday , Tuesday.. ) in CAT2 to enable the user to enter short text description for the time entry accountabiity. For this I will have to add 7 additional columns to the table control of the data entry area one beside each day. The description entered by the user should be updated in the database.
    I am thinking of using screen exit CATS0012. But not very sure how to go about it.
    Pls help.
    Thanks in Advance.
    Regards,
    Joshi

    Thanks Ankush. I am going for the CATS0005 option. I have created a customer project TSHEET within an existing PS package on the system. The system prompted me to obtain a transport number which I guess will attach the new project to the package in future.
    Could you advise further on how to do this in practise? My instructions say 'on the initial project administration screen select the Enhancement components field and choose Change. In fact there appear to be 2 options - either Components or Enhancements assignement. If I choose Enhancements assignment I am prompted to enter the name of an exit. I entered CATS0005 as I have to bring this into the customer project somehow. Within package MY_CATS_INTERFACE appeared however CATS0005 was not recognised within this package. Likewise CI_CATSDB was not recognised.
    Any advise useful
    Thanks
    Rachel

  • Decimal Entry in Table control

    Hi,
      I need to insert currency value to my user table thro table control.
    My table name is ZUVRATE.
    Particular field name is
    DMBTR DMBTR  CURR  13  2
    Reference field is T001-waers.
    i have created one table control in screen painter with value column.
    My problem is, i cant enter the decimal value  in the table control.
    If i enter the decimal value, please enter numeric error is coming?
    what is the error?
    Thanks,
    Neptune.M

    Hi,
      Change your system settings
      System>user profile>Own data-->Defaults(tab)
      in that change the decimal Notification .
      The second one is what U want.
      U need to logoff and Logon to the server.
      Don't forget to reward points if helpful.
    Regards,
    GSR.

  • Regarding  decimal entry in table control

    Hi,
       i am using one screen which is containing a table control. In that one field is called value(Local Currency value)
      Before that i  have created one table called zuvrate.
    In zuvrate , i have declared 'value'(one field of my table) as dmbtr data type(currency with 13 , 2 ) and
    reference field is t001-waers.
       My problem is, if i enter decimal value in that particular column in my table control, 'please enter numeric value ' error is coming.
      for example if i give 23.34 then error is coming
       elseif i give 23 then ok no error.
      How to enter decimal value in my table control?

    Hi,
    The reference field you have specified i.e. waers has no decimal places. Give the reference field which has the same number of decimal places as you want.
    Hope it helps..
    Lokesh
    pls. reward appropriate points

  • Regarding duplicate entries in table control

    hi,
       i have created one table control in module pool. while entering values into the table control how can we validate the table control if we enter duplicate values.ie in the first line i entered 200 500 400
    again inthe second line i
    entered 200 500 400.
    validation should tabke place and error msg should be populated. pls help...
    i have used the below code.
    LOOP AT IT_TC2.
        CHAIN.
          FIELD:ZTC_ATMP-BUKRS,
                ZTC_ATMP-LEGACCNO,
                ZTC_ATMP-ZZDESKCODE,
                ZTC_ATMP-SAKNR.
          MODULE READ_TABLE_CONTROL.
         MODULE check_duplicates ON CHAIN-REQUEST.
        ENDCHAIN.
    ENDLOOP.
    but here module check_duplicates is not triggering why? any idea..

    Hi,
    you can try like this...
    LOOP AT IT_TC2.
    CHAIN.
    FIELD ZTC_ATMP-BUKRS module CHK1.
    FIELD ZTC_ATMP-LEGACCNO module CHK1.
    FIELD ZTC_ATMP-ZZDESKCODE module CHK1.
    FIELD ZTC_ATMP-SAKNR module CHK1.
    MODULE READ_TABLE_CONTROL.
    ENDCHAIN.
    ENDLOOP.
    Now write the validations for the corresopnding Fields in there Respective Modules.... for example Validation for  ZTC_ATMP-BUKRS  filed in module CHK1 and so on..
    Reward if helpful.
    Regards,
    Syed

  • Method to transfer data from Table control to Internal table

    hi,
    Hi,
    I´m working with CL_GUI_ALV_GRID and use the following methods:
    - CALL METHOD grid->set_table_for_first_display, to display my ALV;
    - CALL METHOD grid->get_selected_rows, to select the rows.
    But i have some fields that can suffer alterarions in the values...
    How can i recoup this values from the screen? Is there any method to do this?
    thnks.

    HI,
    You neeed to handle the change event.
    Example below...
    Definition.
    Code:
    CLASS lcl_event_handler DEFINITION.
      PUBLIC SECTION.
        METHODS:
              handle_data_changed
            FOR EVENT data_changed
            OF cl_gui_alv_grid
            IMPORTING er_data_changed.
    ENDCLASS.                    "lcl_event_handler DEFINITION
    Implement
    Code:
        CLASS lcl_event_handler IMPLEMENTATION.
      METHOD  handle_data_changed.
        CONSTANTS:
          lc_wa(11) TYPE c VALUE '<LW_SDITM>-'.
        DATA:
          l_subrc TYPE sy-subrc,
          l_variable TYPE string,
          lw_good TYPE lvc_s_modi.
        FIELD-SYMBOLS:
          <lw_sditm> TYPE /powercor/sditm,
          <lw> TYPE ANY. "Generic field symbol
        LOOP AT er_data_changed->mt_good_cells INTO lw_good.
        Update the internal table
          READ TABLE t_item_sel ASSIGNING <lw_sditm> INDEX lw_good-row_id.
          IF sy-subrc EQ 0.
            CONCATENATE lc_wa lw_good-fieldname INTO l_variable.
            ASSIGN (l_variable) TO <lw>.
            IF sy-subrc EQ 0.
              <lw> = lw_good-value.
            ENDIF.
         ENDIF.
         ENDLOOP.
      ENDMETHOD.                    "handle_data_changed
    ENDCLASS.                    "lcl_event_handler IMPLEMENTATION
    Set for your grid.
    Code:
      SET HANDLER g_handler->handle_data_changed FOR my_grid.
    Cheers,
    Chandra Sekhar.

  • How to make table control rows dynamic/unlimited using TC with Wizard

    Hi Friends ,
    I have designed a table control layout using table control with wizard.
    Now the problem is when we design a TC layout ,then we have to design it on the page . The page has upper & lower limits. so the maximum size & maximum rows in layout is limited. I have tried to create a TC layout with maximum size & maximum rows . Maximum rows created in Layout is 25.
    Now suppose if enduser wants 100 entries to enter by coping a file of 100 records in my TC present on entry screen , then ONLY 25 entries are displayed on entry scren before doing any user action or saving and after saving only these 25 entries are sved in DB. Means enrtries from 26 to 100 are not displayed on entry screen or saved in DB.
    So my requirement is to display all 100 entries at a time in entry screen before saving with scrolling up & down facility and these 100 entries should also get saved in DB after clicking save button. In short I want dynamic entry screen table control which can show/dieplay Any Number . of entries whatever the number may be entered by enduser .
    Plz note that I have used all 3 facilliteis i.e.
    1. Scrolling
    2. INSERT/DELETE
    3. SELECT/DESELECT
    while designing TC with wizard .
    Scrolling buttons like FIRST PAGE, PREV. PAGE, NEXT PAGE, LAST PAGE are displayed.
    BUT they are not functioning though there is system generated code present in both MPP and in PBO & PAI. After clicking any of them , data which is dislaying on entry screen ( Here it is 25 entries ) is getting cleared/disappeared from enry entry screen.
    Waiting for ur response & solutions.
    Thanks & Regards,
    Sudhir

    Hi Ashish ,
    Do one thing .
    At PAI of screen holding TC , there is module name tc_mark on request .
    in this module , there is work area declared g_tc_wa .
    Now go to tc_init module of pbo , where u have given your select command .
    select * from ........................................
    use this code .
    if g_tc_wa is initial .
       SELECT * FROm
       g_tc_wa = 'X'.
       REFRESH CONTROL 'TC' FROM SCREEN dynnr.
       ENDIF.
    Just do this , m sure all buttons, insert, delete , scroll bar.. everything will work .

  • Issue while  vertical scrolling in the table control

    Hi,
    i have my table control which can show 14 entries at a time. and i have almost 100 entries in table control.
    now if i selected 2 entries in the visible part.
    now scroll vertically.
    again come back to see the selected records now they are unselected.
    please respond soon.
    Thanks
    Malya

    Hi,
    I have redone the scenario and follow the steps it will work....
    STEP 1: Create an internal table with field for selection in table.
    STEP 2: Assign the selection field in the table control for the line selection.
    STEP 3: Now whenever the line is selected, the selection field will have a field 'X'.
    STEP 4: In PAI Modify the table fields those are selected with 'X'.
    STEP 5: Set a flag in PAI, flag = 'X'.
    STEP 6: In PBO set a condition .         " We set a flag so that we fetch the data only once.
    If flag NE 'X'.
    Fetch data.
    endif.
    Data:
          begin of ztable,
             ID type char4,
             Name type char30,
             Sel type c,
          end of ztable.
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_0100.
      LOOP AT ITAB INTO FS WITH CONTROL EMP CURSOR W_I.
        MODULE UPDATE.
      ENDLOOP.
    PROCESS AFTER INPUT.
      LOOP AT ITAB.
      MODULE APPEND.
      ENDLOOP.
      MODULE USER_COMMAND_0100.
    INCLUDE YMODTOP                                 .    " global Data
    *&      Module  UPDATE  OUTPUT
    *       text
    MODULE UPDATE OUTPUT.
      MOVE FS TO FS.
    ENDMODULE.                 " UPDATE  OUTPUT
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE STATUS_0100 OUTPUT.
      IF FL_FLAG <> 1.
        SELECT * FROM ZTABLE INTO CORRESPONDING FIELDS OF TABLE ITAB.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  append  INPUT
    *       text
    MODULE APPEND INPUT.
      MODIFY ITAB INDEX SY-STEPL FROM FS TRANSPORTING SEL .
      FL_FLAG = 1.
    ENDMODULE.
    Thanks&Regards
    Sarves

  • How to delete columns in table control (tab Services) for transaction ME51

    Hi, gurus!
    We're facing this problem in our upgrade: we have a batch input (ME51) in order to create purchase requisitions, but we get an error with the dynpro data (program: SAPMM06B, dynpro: 0102).
    We are sure we populate all the required fields in that screen.
    The only possible reason we find for that error is the fact  that we have two new entries in table control (in tab services=> Current settings there are 67 fixed columns)
    We had to add in table T162V (which previously had only 65 columns for each variant): ESLL-SRVMAPKEY y ESLL-EXTERNALID, as described on note 1382685, so table control and table T162V could have same number of fields.
    We guess we could solve the batch input error deleting those fields in both table control and T162V, but don't know how.
    We really would appreciate any clue.
    Thanks in advance.
    Best regards,
    J. Madariaga

    It's an own batch input.
    The error is: "Batch input information for dynpro SAPMM06B 0102 does not exist", but the fields in that screen are alright.
    And that batch input works fine in another client with same patch level, but without fields ESLL-SRVMAPKEY and ESLL-EXTERNALID in table T162V, so I guess that could be the problem (not sure about it, of course).
    Regards,
    J Madariaga

  • Unable to create new entry in table that has no primary key

    Hi
       I have a table which is required to have no primary key (except mandt). After i generate table maintanance, when I go to create new entries, the table control to enter the new values does not appear. When I click on edit->new entries, it goes back to the fields tab of the table. Same when i check through SM30.
    If i maintain atleast one primary key, I am able to get the table control in new entries screen. However the requirement permits no primary keys except mandt. How can this be resolved?
    Thanks
    NM

    Hi,
    THE PROBLEM WITH UR TABLE IS
    YOU HAD DECLARED MANDT AS THE PRIMARY KEY AND THERE IS NO OTHER KEY IN UR TABLE
    iT'S NOT ALLOWING YOU TO ADD NEW ENTRIES BECAUSE MANDT IS THE ONLY PRIMARY KEY IN YOUR TABLE AND IT WILL HAVE A DEFAULT VALUE BASED ON THE CLIENT. SO  IT'S NOT SHOWING YOU THE CREATE NEW ENTRIES OPTION.
    SO TRY TO PUT ONE MORE FIELD AS THE PRIMARY KEY SO THAT YOUR PROBLEM WILL SOLVE VERY EASILY  ALSO MAKE SURE THAT TABLE IS ACTIVATED.
    REVERT IF U NEED SOME MORE HELP
    Thanks &Regards.
    Pavan.

Maybe you are looking for