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.

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

  • 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

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

  • 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

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

  • Bdc in table control

    hi friends,
    can any body plz send me one example in table contols in bdc.STEP BY STEP.
    thanks & regards
    ram

    hi,
    Here is the code.
    report zmm_update_contracts_cpy no standard page heading
                                    line-count 45
                                    line-size  115
                                    message-id zmm.
    *                  Types Declarations                                 
    types: begin of ty_ekko,
            ebeln type ekko-ebeln,
            bukrs type ekko-bukrs,
            kdate type ekko-kdate,
            kdatb type ekko-kdatb,
           end of   ty_ekko,
    *-- Structure for success and failed records
           begin of ty_status,
            bukrs type ekko-bukrs,
            ebeln type ekko-ebeln,
            kdate type ekko-kdate,
            kdatb type ekko-kdatb,
           end   of ty_status.
    *                  Internal Table Declarations                         *
    data : it_ekko    type standard table of ty_ekko    with header line,
           it_ekpo    type standard table of ekpo       with header line,
           it_success type standard table of ty_status  with header line,
           it_fail    type standard table of ty_status  with header line,
           bdcdata    type standard table of bdcdata    with header line,
           msgtab     type standard table of bdcmsgcoll with header line.
    *                  Structure  Declarations                             *
    *-- Structure for Parameter string for runtime of CALL TRANSACTION
    data : x_ctu_params type ctu_params.
    *                  Data Declarations                                   *
    data : v_bukrs      type ekko-bukrs, "Company code
           v_ebeln      type ekko-ebeln, "Contract no
           v_ekorg      type ekko-ekorg, "Purchasing Org
           v_bsart      type ekko-bsart, "Document Type
           v_kdatb      type ekko-kdatb,
           v_counter(2) type n ,"value '01',
           v_first(5)   type n,
           v_field      type string.
    *                        Selection Screen                              *
    *-- Selection screen Details
    selection-screen begin of block b1 with frame title text-001.
    select-options :
       s_bukrs for v_bukrs obligatory default '0111', "Company code
       s_ebeln for v_ebeln obligatory,                "Contract no
       s_ekorg for v_ekorg,
       s_bsart for v_bsart,
       s_dats  for v_kdatb.
    selection-screen end of block b1.
    *               Start-of-Selection                                     *
    start-of-selection.
    *-- Get data from DB table ekko based on selection-screen
      perform fetch_data.
    *-- for each record found process BDC
      perform process_bdc.
      perform init_page_head.
    *               End-of-Selection                                     *
    end-of-selection.
    *-- Display report
      perform display_report.
    *                      Top-of-page
    top-of-page.
    *--  Subroutine to print header on top of the page
      perform print_header.
      skip.
      uline.
    *&      Form  fetch_data
    *       text
    form fetch_data.
      select ebeln bukrs kdate kdatb
        from ekko
        into table it_ekko
        where ebeln in s_ebeln
          and bukrs in s_bukrs
          and bstyp = 'K'
          and bsart in s_bsart
          and ekorg in s_ekorg
          and kdatb in s_dats
          and kdate in s_dats.
      if sy-subrc <> 0.
        exit.
      else.
        select * from ekpo
          into table it_ekpo
          for all entries in it_ekko
          where ebeln = it_ekko-ebeln
            and bukrs = it_ekko-bukrs.
    *        and loekz = ''.
      endif.
    endform.                    " fetch_data
    *&      Form  process_bdc
    *       text
    form process_bdc.
      sort it_ekko by ebeln.
      sort it_ekpo by ebeln ebelp.
      loop at it_ekko.
        clear   : bdcdata.
    *              v_counter.
        refresh : bdcdata.
        perform fill_bdctable.
      endloop.
    endform.                    " process_bdc
    *        Start new screen                                              *
    form bdc_dynpro using program dynpro.
      clear bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = 'X'.
      append bdcdata.
    endform.
    *        Insert field                                                  *
    form bdc_field using fnam fval.
      if fval <> ' '.
        clear bdcdata.
        bdcdata-fnam = fnam.
        bdcdata-fval = fval.
        append bdcdata.
      endif.
    endform.
    *&      Form  fill_bdctable
    *       text
    form fill_bdctable.
    * To have default screen size, mode and update
      x_ctu_params-defsize = 'X'.
      x_ctu_params-dismode = 'E'.
      x_ctu_params-updmode = 'S'.
      v_first = 1.
      shift v_first left DELETING leading '0'.
      perform bdc_dynpro      using 'SAPMM06E' '0205'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'RM06E-EVRTN'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '/00'.
      perform bdc_field       using 'RM06E-EVRTN'
                                    it_ekko-ebeln.
    *reading item data table based on header data table
      loop at it_ekpo where ebeln = it_ekko-ebeln.
        clear v_field.
        v_counter = v_counter + 1.
    *Page Down
        if v_counter = '15' .
          v_counter = '01'.
          concatenate 'RM06E-EVRTP('
                      v_counter
                      into v_field.
          perform bdc_dynpro      using 'SAPMM06E' '0220'.
          perform bdc_field       using 'BDC_CURSOR'
                                         v_field.
          perform bdc_field       using 'BDC_OKCODE'
                                        '=P+'.
          perform bdc_field       using 'RM06E-EBELP'
                                         v_first.
          v_first = v_first + 14.
    *Compare first entry in table control with line item
    *As there are some missing line items in Purchasing Document Item table
          IF V_FIRST <> IT_EKPO-EBELP.
            V_FIRST = IT_EKPO-EBELP.
          ENDIF.
        endif.
    * Check for deletion indicator
        if it_ekpo-loekz is initial.
          concatenate 'RM06E-EVRTP('
                      v_counter
                      into v_field.
          perform bdc_dynpro      using 'SAPMM06E' '0220'.
          perform bdc_field       using 'BDC_CURSOR'
                                         v_field.
          perform bdc_field       using 'BDC_OKCODE'
                                        '=DETZ'.
          perform bdc_field       using 'RM06E-EBELP'
                                         v_first."it_ekpo-ebelp.
          clear v_field.
          concatenate 'RM06E-TCSELFLAG('
                      v_counter
                      into v_field.
          perform bdc_field       using v_field
                                        'X'.
          perform bdc_dynpro      using 'SAPMM06E' '0212'.
          perform bdc_field       using 'BDC_CURSOR'
                                        'EKPO-BRGEW'.
          perform bdc_field       using 'BDC_OKCODE'
                                        '=BACK'.
          perform bdc_field       using 'EKPO-NTGEW'    "netweight
                                        '0'.
          perform bdc_field       using 'EKPO-GEWEI'    "unit
                                        'LB'.
          perform bdc_field       using 'EKPO-BRGEW'    "gross weight
                                        '0'.
        endif.
      endloop.
      perform bdc_dynpro      using 'SAPMM06E' '0220'.
      concatenate 'RM06E-EVRTP('
                  v_field
                  into v_field.
      perform bdc_field       using 'BDC_CURSOR'
                                    v_field.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=BU'.
      perform bdc_dynpro      using 'SAPLSPO1' '0300'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=YES'.
    *  PERFORM BDC_FIELD       USING 'RM06E-EBELP'
    *                                '10'.
      call transaction 'ME32K' using bdcdata
                          options from x_ctu_params
                            messages into msgtab.
      clear v_counter.
      if sy-subrc = 0.
    *-- populate the success records
        clear it_success.
        it_success-ebeln = it_ekko-ebeln.
        it_success-bukrs = it_ekko-bukrs.
        it_success-kdate = it_ekko-kdate.
        it_success-kdatb = it_ekko-kdatb.
        append it_success.
      else.
    *-- populate the error records
        clear it_fail.
        it_fail-ebeln = it_ekko-ebeln.
        it_fail-bukrs = it_ekko-bukrs.
        it_fail-kdate = it_ekko-kdate.
        it_fail-kdatb = it_ekko-kdatb.
        append it_fail.
      endif.
    endform.                    " fill_bdctable
    *&      Form  display_report
    *       text
    form display_report.
      data : lv_success type i,
             lv_failure type i,
             lv_lines   type i.
      clear : lv_success,
              lv_failure,
              lv_lines.
      describe table it_success lines lv_success.
      describe table it_fail    lines lv_failure.
      lv_lines = lv_failure + lv_success.
      write : / 'Total no of records uploaded :'(002) .
      write : lv_lines.
      write : / 'Total no of successes        :'(003).
      write : lv_success.
      write : / 'Total no of errors           :'(004).
      write : lv_failure.
      if not it_success[] is initial.
        sort it_success by bukrs.
        skip 2.
        write : / 'Success Records'(005).
        loop at it_success.
          at new bukrs.
            write : /    'Company Code '(006) , it_success-bukrs.
            write : /1   'Contract'(007),
                     13  'Validity Dates'(008).
          endat.
          write : /1  it_success-ebeln,
                   13 it_success-kdatb,
                   26 it_success-kdate.
        endloop.
      endif.
      if not it_fail[] is initial.
        sort it_fail by bukrs.
        skip 2.
        write : / 'Error Records'(009).
        loop at it_fail.
          at new bukrs.
            write : /    'Company Code '(006) , it_fail-bukrs.
            write : /1   'Contract'(007),
                     13  'Validity Dates'(008).
          endat.
          write : /1  it_fail-ebeln,
                   13 it_fail-kdatb,
                   26 it_fail-kdate.
        endloop.
      endif.
    endform.                    " display_report
    Regards,
    Richa

  • How to handle Table control  (pls read question)

    Hi All,
          I am writing code for CA21 Tcode , i am getting values into table control using P+ successfully but problem is i have to select 1st entry in table control and it will go to other screen and come back and select 2nd entry ....like that it will do until all entries in table control is over .
    Can any one pls send any code for this logic.
    Regards,
    Sudhakar Reddy.A

    Hi ,
    This should done dynamically with out user interaction .
    Regards,
    Sudhakar Reddy A

Maybe you are looking for

  • Photoshop EPS Won't Open/Distorted When Opened

    The two problems I'm having revolve around Photoshop EPSs and Illustrator CS4. I created a very high resolution file in Photoshop which included some vector shapes & text. My client wanted the files delivered in EPS format, so I exported them as Phot

  • Access refused in public folders when user is in a Group

    Hi,  We have a Exchange 2003 server and an Exchange 2010 server The Public folders are on the 2003. Since 2 or 3 days, there is a access issue in juste ONE public folder: SOME users cannot access to the folder anymore if there are in a group (it asks

  • No Broadband

    I am new to BT (around 3-4 months). Now on my 2nd Hub & the last few weeks my broadband has been up & down. More often orange light flashing & cannot go on to the internet that day. Have went through all the instructions on BT help, phoned a very hel

  • Imac only has 2 resolutions

    My wife's Mac changed resolutions - possibly as a result of running a full-screen game.   She says it has happened before.   I told her to reboot and let me know if that helped. It didn't, so I went to settings to change its resolution, seeing only 2

  • Database upgrade - Oracle 10g r2 ,RAC(2 Nodes with ASM) upgrade from HP-UX to RHEL 5.9

    Hi All I am planning to upgrade our RAC database 2 nodes with ASM from HP-UX to RHEL 5.9. Following is our setup Current setup: Oracle Database 10g r2 (10.2.0.5.0) RAC database. Nodes: 2 Storage: ASM OS: HP-UX ia64 Database Size: 1.2 TB New Setup: Or