Problem with Table control lines

Hi Friends,
This is the problem with table control lines:
I have screen with table control and I would like change the table control lines dynamicaly.
Exp:
In my PBO the Internal table which I am using to loop the TC is havig 7 records and its displayed with 7 records, now I have added one more record into my ITAB and now ITAB is having 8 records, when I am looping this ITAB with TC its taking the TC lines 7 only.
here is the code:
Initial values in gt_scr400 = 8
Initial values in tc_scr400 = 8
Now added one more recor into gt_scr400 , now gt_scr400  = 9.
  LOOP AT   gt_scr400
       INTO wa_scr400
       WITH CONTROL tc_scr400
       CURSOR tc_scr400-current_line.
  ENDLOOP.
I have used this logic :
  DESCRIBE TABLE gt_scr400 LINES g_rec_300 .
  tc_scr300-lines = g_rec_300.
but its not modifying the lines in my table control.
How to change the TC lines based on ITAB total records.
Thanks,
Sridhar

there is a field in TableViewName-xxx
don't remember the exact field name for (total no of records)
you can check it in debug.  when you add records in Internal table, u need to modify this field which is set at the first time when table control is populated.

Similar Messages

  • Problem with table control

    Hi all,
    I am able to loop two items for the sales order using table control.But I am not able to populate more than 2 items. Can anybody explain what exactly is the problem.
    I am including my code below.
    DATA: BEGIN OF ITAB OCCURS 0,
          KUNNR(255) TYPE C,
       END OF ITAB.
    DATA :BEGIN OF ITAB1 OCCURS 0,
          KUNNR1(10) TYPE C,
          KUNNR2(10) TYPE C,
          KETDAT(8) TYPE C,
          DWERK(4) TYPE C,
          ZTERM(4) TYPE C,
          INCO1(3) TYPE C,
          INCO2(16) TYPE C,
          AUDAT(8) TYPE C,
          VKBUR(4) TYPE C,
          BZIRK(3) TYPE C,
          END OF ITAB1.
    DATA : BEGIN OF ITAB2 OCCURS 0,
           KUNNR1(10) TYPE C,
           MABNR(8) TYPE C,
           KWMENG(1) TYPE C,
          END OF ITAB2.
    include bdcrecx1.
    PARAMETERS PATH(128) DEFAULT 'C:\SALES1.TXT'.
    DATA : FNAM(20) TYPE C,
           IDX      TYPE C.
    start-of-selection.
      CALL FUNCTION 'WS_UPLOAD'
       EXPORTING
         FILENAME                      = PATH
         FILETYPE                      = 'ASC'
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      LOOP AT ITAB.
       itab1-kunnr1 = itab2-kunnr1.
        ITAB1-KUNNR1 = ITAB-KUNNR+0(10).
        ITAB1-KUNNR2 = ITAB-KUNNR+10(10).
        ITAB1-KETDAT = ITAB-KUNNR+20(8).
        ITAB1-DWERK = ITAB-KUNNR+28(4).
        ITAB1-ZTERM = ITAB-KUNNR+32(4).
        ITAB1-INCO1 = ITAB-KUNNR+36(3).
        ITAB1-INCO2 = ITAB-KUNNR+39(16).
        ITAB1-AUDAT = ITAB-KUNNR+55(8).
        ITAB1-VKBUR = ITAB-KUNNR+63(4).
        ITAB1-BZIRK = ITAB-KUNNR+67(3).
       ITAB2-KUNNR1 = ITAB-KUNNR+0(10).
        ITAB2-MABNR = ITAB-KUNNR+70(8).
        ITAB2-KWMENG = ITAB-KUNNR+78(1).
        APPEND ITAB1.
        CLEAR ITAB1.
        APPEND ITAB2.
        CLEAR ITAB2.
      ENDLOOP.
      perform open_group.
      loop at itab1.
        perform bdc_dynpro      using 'SAPMV45A' '0101'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'VBAK-AUART'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '/00'.
        perform bdc_field       using 'VBAK-AUART'
                                      'ZOR'.
        perform bdc_field       using 'VBAK-VKORG'
                                      '1000'.
        perform bdc_field       using 'VBAK-VTWEG'
                                      '10'.
        perform bdc_field       using 'VBAK-SPART'
                                      '10'.
        perform bdc_dynpro      using 'SAPMV45A' '4001'.
        perform bdc_field       using 'BDC_OKCODE'
                                      'KKAU'.
        perform bdc_field       using 'KUAGV-KUNNR'
                                       itab1-kunnr1.
        perform bdc_field       using 'KUWEV-KUNNR'
                                      itab1-kunnr2.
        perform bdc_field       using 'RV45A-KETDAT'
                                      itab1-ketdat.
        perform bdc_field       using 'RV45A-KPRGBZ'
                                      'D'.
        perform bdc_field       using 'VBKD-PRSDT'
                                      '11/21/2005'.
        perform bdc_field       using 'VBKD-ZTERM'
                                      itab1-zterm.
        perform bdc_field       using 'VBKD-INCO1'
                                      ITAB1-INCO1.
        perform bdc_field       using 'VBKD-INCO2'
                                      ITAB1-INCO2.
        perform bdc_dynpro      using 'SAPMV45A' '4002'.
        perform bdc_field       using 'BDC_OKCODE'
                                         '=T\05'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'VBKD-BZIRK'.
        perform bdc_field       using 'VBAK-AUDAT'
                                      ITAB1-AUDAT.
        perform bdc_field       using 'VBAK-VKBUR'
                                      ITAB1-VKBUR.
        perform bdc_field       using 'VBAK-WAERK'
                                      'USD'.
        perform bdc_field       using 'VBKD-PRSDT'
                                      '11/21/2005'.
        perform bdc_field       using 'VBKD-BZIRK'
                                      ITAB1-BZIRK.
        perform bdc_dynpro     using 'SAPLV60F' '4001'.
        perform bdc_field       using 'BDC_OKCODE'
                                     '=T\06'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'FPLT-AFDAT(05)'.
        perform bdc_field       using 'FPLA-BEDAT'
                                      '11/21/2005'.
        perform bdc_field       using 'FPLA-BEDAR'
                                      '01'.
        perform bdc_field       using 'FPLA-RFPLN'
                                      '0000000042'.
        perform bdc_field       using 'FPLT-AFDAT(01)'
                                      '11/21/2005'.
        perform bdc_field       using 'FPLT-AFDAT(02)'
                                      '11/21/2005'.
        perform bdc_field       using 'FPLT-AFDAT(03)'
                                      '11/21/2005'.
        perform bdc_field       using 'FPLT-AFDAT(04)'
                                      '11/21/2005'.
        perform bdc_field       using 'FPLT-AFDAT(05)'
                                      '11/21/2005'.
        perform bdc_dynpro      using 'SAPMV45A' '4002'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=T\09'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'VBKD-ZLSCH'.
        perform bdc_field       using 'VBKD-KTGRD'
                                      '01'.
        perform bdc_field       using 'VBKD-ZLSCH'
                                      'C'.
        perform bdc_field       using 'VBAK-ZUONR'
                                     'Open Sales order'.
        perform bdc_dynpro      using 'SAPMV45A' '4002'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=T\11'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'GVS_TC_DATA-REC-PARTNER(05)'.
        perform bdc_field       using 'GV_FILTER'
                                      'PARALL'.
        perform bdc_field       using 'GVS_TC_DATA-REC-PARTNER(05)'
                                      '3838'.
        perform bdc_dynpro      using 'SAPMV45A' '4002'.
        perform bdc_field       using 'BDC_OKCODE'
                                       '=T\14'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'VBKD-BSARK'.
        perform bdc_field       using 'VBKD-BSARK'
                                      'CU01'.
        perform bdc_field       using 'VBKD-IHREZ'
                                       '12134'.
        perform bdc_dynpro      using 'SAPMV45A' '4002'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '/EBACK'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'VBAK-ZZLEAT'.
        perform bdc_field       using 'VBAK-ZZWARR'
                                      '12346C'.
        perform bdc_field       using 'VBAK-ZZFABW'
                                      'F14689'.
        perform bdc_field       using 'VBAK-ZZWARX'
                                      '12012005'.
        perform bdc_field       using 'VBAK-ZZLEAT'
                                      'CGUYFIU'.
        perform bdc_dynpro      using 'SAPMV45A' '4001'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=PKO1'.
        perform bdc_field       using 'KUAGV-KUNNR'
                                      itab1-kunnr1.
        perform bdc_field       using 'KUWEV-KUNNR'
                                      itab1-kunnr2.
        perform bdc_field       using 'RV45A-KETDAT'
                                      itab1-ketdat.
        perform bdc_field       using 'RV45A-KPRGBZ'
                                      'D'.
        perform bdc_field       using 'VBKD-PRSDT'
                                      '11/21/2005'.
        perform bdc_field       using 'VBKD-ZTERM'
                                      itab1-zterm.
        perform bdc_field       using 'VBKD-INCO1'
                                      ITAB1-INCO1.
        perform bdc_field       using 'VBKD-INCO2'
                                      ITAB1-INCO2.
    perform bdc_field       using 'BDC_CURSOR'
                                      'RV45A-ccode(idx)'.
      MOVE 1 TO IDX.
        LOOP AT ITAB2 WHERE KUNNR1 = ITAB2-KUNNR1.
          CONCATENATE 'RV45A-MABNR(' IDX ')' INTO FNAM.
          perform bdc_field       using FNAM
                                  ITAB2-MABNR.
          CONCATENATE 'RV45A-KWMENG(' IDX ')' INTO FNAM.
          perform bdc_field       using FNAM
                                  ITAB2-KWMENG.
          IDX = IDX + 1.
    ENDLOOP.
        perform bdc_dynpro      using 'SAPMV45A' '4001'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=PKO1'.
        perform bdc_field       using 'KUAGV-KUNNR'
                                      itab1-kunnr1.
        perform bdc_field       using 'KUWEV-KUNNR'
                                      itab1-kunnr2.
        perform bdc_field       using 'RV45A-KETDAT'
                                      itab1-ketdat.
        perform bdc_field       using 'RV45A-KPRGBZ'
                                      'D'.
        perform bdc_field       using 'VBKD-PRSDT'
                                      '11/21/2005'.
        perform bdc_field       using 'VBKD-ZTERM'
                                      itab1-zterm.
        perform bdc_field       using 'VBKD-INCO1'
                                      ITAB1-INCO1.
        perform bdc_field       using 'VBKD-INCO2'
                                      ITAB1-INCO2.
        perform bdc_field       using 'RV45A-VBAP_SELKZ(01)'
                                      'X'.
        perform bdc_dynpro      using 'SAPMV45A' '5003'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '/EBACK'.
        perform bdc_dynpro      using 'SAPMV45A' '4001'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=SICH'.
        perform bdc_field       using 'KUAGV-KUNNR'
                                      itab1-kunnr1.
        perform bdc_field       using 'KUWEV-KUNNR'
                                      itab1-kunnr2.
        perform bdc_field       using 'RV45A-KETDAT'
                                      ITAB1-KETDAT.
        perform bdc_field       using 'RV45A-KPRGBZ'
                                      'D'.
        perform bdc_field       using 'VBKD-PRSDT'
                                      '11/21/2005'.
        perform bdc_field       using 'VBKD-ZTERM'
                                      ITAB1-ZTERM.
        perform bdc_field       using 'VBKD-INCO1'
                                       ITAB1-INCO1.
        perform bdc_field       using 'VBKD-INCO2'
                                      ITAB1-INCO2.
        perform bdc_field       using 'BDC_CURSOR'
                                        'RV45A-MABNR(idx)'.
        perform bdc_transaction using 'VA01'.
      endloop.
      Perform close_group.

    Answered the other post. 
    <i>
    I think i see the problem,
    LOOP AT ITAB2 WHERE KUNNR1 = <b>ITAB2</b>-KUNNR1.
    CONCATENATE 'RV45A-MABNR(' IDX ')' INTO FNAM.
    perform bdc_field using FNAM
    ITAB2-MABNR.
    CONCATENATE 'RV45A-KWMENG(' IDX ')' INTO FNAM.
    perform bdc_field using FNAM
    ITAB2-KWMENG.
    IDX = IDX + 1.
    ENDLOOP.
    I think that it should be .....
    LOOP AT ITAB2 WHERE KUNNR1 = <b>ITAB1</b>-KUNNR1.
    </i>
    Regards,
    Rich Heilman

  • Problem with Table control & i/o field

    hi experts,
    i have a problem with both table control and i/o field.
    2 i/o fields and 1 table control.
    i/o field are common for table control data.
    when i am inserting ata from here to database table, table control data are inserted successfully, but from i/o field data are not inserted.
    kind regards,
    debendra

    Hi
    You must create data objects in your ABAP code having same name as your screen i/o fields. Now these objects will contain the data entered in your screen. Use these objects to insert data in your db table.
    Hope this helps
    Regards,
    Jayanthi.K

  • STRANGE PROBLEM WITH TABLE CONTROL

    Hi all,
    I am having a strange problem.
    I have a table control in which i have a sort button .WHEN I PLACE THE CURSOR AND CLICK SORT BUTTON,IT WOULD SORT THE RECORDS IN ASCENDING BASED ON THAT COLUMN.
    THE PROBLEM IS THAT WHEN I SCROLL DOWN THE WINDOW USING MY MOUSE ,IAM LOSING THE SORT AND THE RECORDS COME TO ORGINAL WAY THAT ARE BEING READ FROM DATABASE.i WANTED TO MAINTAIN THE RECORDS IN THE SORTED WAY EVEN THOUGH I SCROLL DOWN THROUGH MY MOUSE .
    PLEASE TELL ME IF I MISS ANY TRICK

    Hello,
    You may get your data again in the PBO section. So, get all your data before the PBO .
    regards,
    Naimesh

  • Problem with Table control in BDC

    Hi Experts,
    I have dought regarding Table control i.e How to handle Table control in BDC? i need explanation for handling TC and senario for using T C in BDC?
      regards,
    Sudha.

    Hello,
    This is the bdc to update the XK01 transaction code (Vendor Creation).
    Here we will use table controls for bankings. Here Iam sending the coding and text files.
    Coding
    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.
    Intial screen data file.
    1     63190      0001     0001     0001     mr     bal188     b     in     31000     a1     inr
    2     63191      0001     0001     0001     mr     bal189     b     in     31000     a1     inr
    Table control Data:
    1     in     sb     11000
    1     in     sb     12000
    1     in     sb     13000
    1     in     sb     14000
    1     in     sb     15000
    1     in     sb     16000
    1     in     sb     17000
    1     in     sb     18000
    1     in     sb     19000
    1     in     sb     20000
    1     in     sb     21000
    1     in     sb     22000
    2     in     sb     21000
    2     in     sb     22000
    Thanks,
    Vasanth

  • Problem with table controle

    hai experts
    how should i implement a table control in LSMW please send me u r seggassions and code also
    Message was edited by:
            venkat rathnam

    hai experts my question has not been answered yet please send me answer

  • Problem with table control adding new line

    Dear friends,
    i am working with the VA01 upload program.
    when i am uploading the multiple line items i am getting the error.
    i resoved the error and successfully upload the data for 3 line items.
    when i am upload the data for 10line items it was showing the error as the screen field doesn't exists.
    here i am attaching the logic
    DATA: V_MABNR(20) TYPE C,
          V_KWMENG(20) TYPE C,
          V_KBETR(20) TYPE C,
          VAL(03) TYPE N VALUE 01.
    include bdcrecx1.
    start-of-selection.
    perform open_group.
    LOOP AT IT_FINAL INTO WA_FINAL.
    perform bdc_dynpro      using 'SAPMV45A' '0101'.
    perform bdc_field       using 'BDC_CURSOR'                              'VBAK-AUART'.
    perform bdc_field       using 'BDC_OKCODE'                              '/00'.
    perform bdc_field       using 'VBAK-AUART'                              WA_FINAL-AUART."'OR'.
    perform bdc_field       using 'VBAK-VKORG'                              WA_FINAL-VKORG."'1000'.
    perform bdc_field       using 'VBAK-VTWEG'                              WA_FINAL-VTWEG."'12'.
    perform bdc_field       using 'VBAK-SPART'                              WA_FINAL-SPART."'00'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'                              '/00'.
    perform bdc_field       using 'BDC_CURSOR'                              'VBKD-BSTDK'.
    perform bdc_field       using 'VBKD-BSTKD'                              WA_FINAL-BSTKD."'PO TEST'.
    perform bdc_field       using 'VBKD-BSTDK'                              WA_FINAL-BSTDK."'03.02.2012'.
    perform bdc_field       using 'KUAGV-KUNNR'                             WA_FINAL-KUNAG." '1033'.
    perform bdc_field       using 'KUWEV-KUNNR'                             WA_FINAL-KUNWE." '1033'.
    LOOP AT IT_FINAL1 INTO WA_FINAL1.
    CONCATENATE 'RV45A-MABNR(' '0' VAL ')' INTO V_MABNR.
    CONCATENATE 'RV45A-KWMENG(' '0' VAL ')' INTO V_KWMENG.
    CONCATENATE 'KOMV-KBETR(' '0' VAL ')' INTO V_KBETR.
    perform bdc_field using 'BDC_CURSOR'                                    V_KBETR."v_kwmeng.
    perform bdc_field using v_mabnr                                         WA_FINAL1-MATNR."wa_item-matnr.
    perform bdc_field using v_kwmeng                                        WA_FINAL1-KWMENG."wa_item-kwmeng.
    perform bdc_field using v_kbetr                                         WA_FINAL1-KBETR."wa_item-kwmeng.
    perform bdc_dynpro using 'SAPMV45A' '4001'.
    perform bdc_field using 'BDC_OKCODE'                                    '/00'.
    VAL = VAL + 1.
    endloop.
    *VAL = 01.
    perform bdc_dynpro using 'SAPMV45A' '4001'.
    perform bdc_field using 'BDC_OKCODE'                                    '=SICH'.
    ENDLOOP.
    perform bdc_transaction using 'VA01'.
    perform close_group.
    i searched in SDN i found a lot of links but i can't find the proper document.
    can any one explain me clearly about adding the N line items and screen resolution logic.
    Thanks,
    karunakar

    Hi,
    For screen resolution logic, you can pass the value 'X' into the variable CTU_PARAMS-DEFSIZE in the OPTIONS parameter of CALL TRANSACTION using BDC DATA.
          CALL TRANSACTION TCODE USING BDCDATA
                                                         MODE   CTUMODE
                                                         UPDATE CUPDATE
                                                         OPTIONS FROM OPT
                                                         MESSAGES INTO MESSTAB.
    DEFSIZE - Selects whether the screens of the called transaction are displayed in the standard screen size. Values: "X" (standard size), " " (current size).

  • Problem with table line (footer)  in smartform

    Hey guys and gals !!!
             I have got this problem with the footer line in my smartform.I have checked the <i>no pagebreak</i> option for this line but still some contents are getting truncated instead of being shown totally on one page.
    The line has two cells.The first cell has 4 text nodes and the second cell has 1 text node.
    I am able to see just the text from the 1st text nodes while the others are getting truncated.
    Please suggest a solution.Your help will be greatly appreciated.
    Kind regards,
    Greenidge Gonsalves
    SAP Technical Consultant

    Hello,
    The problem is not clearly explained.
    However, I assume that you have a footer which is NOT a part of MAIN Window and a table has been defined and only the contents of the First TEXT node is getting printed while others are getting truncated.
    If my understanding is right,
    1. It is getting truncated because the text is more than the size of the window that has been defined.
    2. I suggest you, if the contents (size) of the footer varies from output to output, then better to shift the footer to the MAIN Window so that you will see the complete text.
    I hope this helps you.
    Regards, Murugesh AS

  • Table control line selection issue

    HI im facing a problem in table control.
    I have a table control with selection column ( single ).
    First time when i select a row its is marked X in the internal table,
    Now again when i select another row .. The old row still holds the value X and the new row is gettign marked as X.
    The problem here is the old selection is not getting cleared in the internal table.
    This is the statement used in PAI
    MODIFY gt_header INDEX tbl_header-current_line FROM wa_header .
    Here the previous value is not getting cleared.

    KSD,
    During PAI Loop, the screen flow logic loops only through the visible table control lines. In your case, the user has scrolled down and seeing line 30 to 40 (say for example) after selecting a line in first page view. This is very common with any table control.
    Now user is viewing 1 to 10 lines of the TC and have selected 3rd line. User then scrolls down by pressing page-down - now PAI is triggered and the internal table's 3rd line is modified with MARK='X'. User then views lines 30 to 40 and selects 33rd line. Now table control will automatically clear the MARK in 3rd line in the Table Control only. But it is the responsibility of the developer written code to clear the same in the Internal Table.
    So within PAI Table Loop, you have to check the MARK which is coming from Screen to ABAP program every-time and if it is 'X', you have to clear any other line's MARK. Remeber you should not do this for multi-select. There is an attribute of the table control LINE_SEL_MODE. The above logic of clearing other lines' MARK should be implemented only after checking this attribute.
    So incidentally your solution was the appropriate one.
    Cheers,
    Suresh

  • Table control lines cannot be controlled in Batch Input session ?

    I am using a program which creates Batch Input sessions for the transaction FCHR (Online cashed checks) . The second screen is that of a table control where the check number is entered.
         I observed that while doing SHDB, if we tick the default size then changing the desktop resolution has no effect on the number of lines in table control - we see 14 lines in both cases.However, when the batch input session is processed, the number of table control lines varies according to the resoution(9 lines for 800600 and approx 15 for 1024768). Selecting the 'Dynpro standard size' option while processing the session has no effect.
      I know call transaction with 'default' parameter in optparam will take care of this problem. But I want to know whether Batch Input Session is known to have a problem with different resolutions.

    HI..
    i had the same problem once.... i dealt in the following way
    while entering values in table control
    1) enter value in the first line
    2) look for button on application toolbar using which you can increment line
    3) you will not find difference for first line but you will find it when you insert second line and go for next line.
    4) now for every increment you will get table conrol as (02) if you are going for recording.
    this will surely solve all issue related to table control as it solved for me
    regards
    Edited by: Mohit Kumar on Feb 19, 2009 12:04 PM

  • Strange issue with table control in dialog programming! Please help!

    Hello everyone:
                I have a table control on screen painter and I have atleast 10 rows on display when user calls the screen. If I have 15 columns then ofcourse user has to scroll down to see extra rows. I have line selection set to "single" for table control so that user can select only one row at a time. This works fine when user does not have to scroll to see extra rows. It is tough for me to explain i.e., if the table control displays 10 rows when the screen opens up then they can only select single row at a time (rows 1 -10). For example user selected row 7 and now they scroll down to see extra rows (for example 13) then it lets them select row 13 also even though I set line selection to "single" in the properties for table control! They should be able to select only one row at a time. Is this some limitation with table control in SAP? Please give me any information you have.
    Thanks.
    Mithun

    Hi,
    As you suspected, this is a limitation in the table control.  You need to take care of the single-selection functionality yourself except for the rows that are actually being displayed.  See [Note 588284|https://service.sap.com/sap/support/notes/588284] for the official SAP explanation.
    Regards,
    Jamie

  • Problem with tables -- need help!

    I am having problems with table formatting, when using
    Preformatted text. The tables look fine in the WYSIWYG editor, but
    have lots of extra space above and below the text when looking at
    the output files.
    I will attach the code from one of the HTML files from my
    project, so you can see what I'm talking about.
    Thanks.

    Well, if you're talking about the single-celled table with
    the line:
    <p class=Preformatted>[assembly:
    Ace.AceAssembly]</p>
    </pre>
    ... you can eliminate the <P> tags. that will give you
    one line less. Otherwise, your remaining space is the result of the
    <PRE> tag. It, like the <XMP> tag, gives it one line of
    space beneath as well.
    Your alternative beyond that would be to, when needed, wrap
    up the script in Javascript. That line, for instance, wouldn't need
    it.

  • ABAP HR How to create infotype with table control in it like Infotype 0008

    Hi Experts.
    I need help from u guys. My client requirement is to create custom infotype just like 0008 infotype which contain table control to save amount and wage types. I try to create infotype with table control using PM01, but that table control is in display mode only, i almost search every where to create custom infotype with table control but what ever threads in forum all are they unanswered and most of the threads for creating infotype. But i already done with infotype , but my main problem is table control.
    If any one have some suggestion for this please share with me.
    <removed by moderator> i am looking for positive reply.
    Edited by: Thomas Zloch on Aug 30, 2011 12:54 PM

    Hi
    I've created several infotypes with a Table Control and it is always the same story. You have to create a custom Z table to store the Table Control data (if you can have unlimited records), so in the PSXXXX structure you need to add a TABNR field to link the PAXXXX table and the Z one, just like the type table OM infotypes.
    Then in your code you have to control every possible operation, INS, MOD, DEL... and update the Z table accordingly (the standard code won't do that)
    If your TC fields appear in display mode, take a look at the Groups 1 and 3 in your fields, the must be set with the usual values for a PA infotype.
    If you have more questions, just ask,
    Regards

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

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

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

  • Problem with table paging [PDK for NET]

    Hi All,
    I have a problem with table paging in PDK for .NET (ver 2).
    The Table has 14 visible rows.
    The lead selection is set to "SINGLE"
    When the user selects a row I can use
    Table1.SelectedKeys(0) Mod Table1.VisibleRowCount
    in order to get the info of the selected row.
    If I will page using the "Prev/Next" page of the Table UI element it will also work.
    However, when I press "Prev/Next" item and then select a row it chooses the wrong row.
    (See picture: http://img509.imageshack.us/img509/3882/table5tq.jpg)
    What can I do in order to solve the problem?
    Thanks,
    Omri

    Hi Omri,
    how are you doing ?
    The SAPTable is similar to a DataGrid control and need to be bound to the datasource on every postback
    a good idea is to keep the dataset available in the page or on the server ( so that you dont need to keep making expensive fetch operations
    The selected row is affected by the recordset (dataset) and needs additional programming
    A work around for the selected row issue is to save it in a server side hidden variable (or anything that will persist) and read and set the value in the page / next button handler
    with respect,
    amit

Maybe you are looking for

  • Re: Config MRP , Re-order point

    Can you please explain how to config MRP ,re-order point Thanks

  • Project Types Missing

    I cannot discover a way to create a new project. The only options that are available to be are to use projects with existing ant build files? WHY?

  • All my div s pile up in the upper left-hand corner

    Trying my hand at following Dreamweaver tutorial instructions for making a CSS layout with absolute positioning, rather than starting with pre-tested code, and not having much luck. Page looks fine in DW 8.0.2/Mac Design window. However when previewi

  • Q about unsent email alerts

    Hi! I have a question about unsent emails After changing of IP address on SCSM server Exchange server wont to accept email from new IP address ( its normal) After i configured Exch to accept email from new SCSM IP all new emails delivered ok But wher

  • Applying patchset 10.2.0.3 to 10.2.0.1 Oracle client on Linux

    Hi folks, I want to apply patchset 10.2.0.3 to a 10.2.0.1 Oracle "Client" on Linux (both 32bit and 64bit). So, I started with the 64bit Linux. 1. installed the 10.2.0.1 Client, 2. downloaded the patchset 10.2.0.3 (5337014) for 64bit Linux, 3. read th