Table Control Issue

Hi all,
          I had a issue where in when I display some records in the table control, it is showing the records and the rest of the records are going into grey mode.
For example, Iam getting 3 records into the table control.  From the fourth line of the table control, it is displaying the grey color.( I mean disable mode).
I have a requirement where the end user must have the facility to enter the records manually also.    
So, How to make the grids of the table control in such a way we can enter some data manually along with the imported data.
Please let me get some ideas.
thanks and regards
Murali Krishna Tatoju

Hi Murali,
I have the following logic in the PBO and it works fine,
DATA: tab_fill TYPE i,
        calc_fill TYPE i,
        add_fill type i,
        no_lines_add type i.
  CLEAR: tab_fill, calc_fill, add_fill, no_lines_add.
*check the current line number and the data filled.
  DESCRIBE TABLE g_tc_rate_card_itab LINES tab_fill.{color:red} "g_tc_rate_card_itab----> internal table{color}
  IF tab_fill GE 7.
    calc_fill = tab_fill MOD 7.   {color:red}" Initial 7 rows are available in the table for input u can change this as per you requirement or the no. of rows initially available in your screen{color}
    IF calc_fill = 0.
     add_fill = tab_fill / 7.
     add_fill = add_fill + 1.
     no_lines_add = 7 * add_fill.
      tc_rate_card-lines  =  no_lines_add.  {color; red}" tc_rate_card ----> Table control name{color}
    ENDIF.
  ENDIF.
By this way you can get rid of the ADD button since as soon as the 7th row is filled with data it adds up more 7 rows in the table control which are read for input.
Regards,
Abhijit G. Borakr

Similar Messages

  • ISSUE IN THE TABLE CONTROL

    HAI FRIENDS,
    I HAVE DISPLAYED THE VALUES IN THE TABLE CONTROL
    I HAVE DEFINED 'CHECK'  FOR  SELECTING  THE FIELDS OF TABLE CONTROL
    THE ISSUE STARTS HERE
    WHEN I CHECK TOP FIELDS OF TABLE CONTROL
    THEN SCROLLED  VERTICALLY, THE TABLE CONTROL TO SELECT I.E CHECK THE
    BOTTOM FIELDS OF TABLE CONTROL.
    THE TOP FIELDS WATEVER  CHECK  WHERE CHECKS DISPAPEARS FOR TOP FIELDS  .
    BY THIS  I UNABLE TO SELECT THE FIELDS OF TABLE.
    PLZ HELP ME URGENTLY NEEDED.
    MY MONDAY I NEEDED

    You use an internal table for values in table control..
    One of the fields( very first field) in that itab is used for check - uncheck..
    u have make it 'X' when u click any row...
    I think this might be the problem in ur case.. when u scroll PAI starts... in that PAI check the value of check box for that particular field...
    Regards
    Prax

  • Table control scrolling issue

    hi,
          I am having a issue with table control scrolling. When i was passing less number of records (say 19 records becuase table control is having 19 lines) to table control in BDC call transaction, everything is working fine. after filling the 19 line items its not taking the next line item the page is not scrolling down. T.code is <b>GS02</b>. please suggest me. following is my code
    REPORT ZLOCK_WBS_ELEMENTS  MESSAGE-ID ZFI_RESTMT.
                           TYPES                                         *
    *types declaration for final internal table
    types: begin of ty_final,
             ryear       like zupi5a-ryear,  "Fiscal year
             rbukrs      like zupi5a-rbukrs, "Company code
             racct       like zupi5a-racct,  "Account number
             rzzps_posid like zupi5a-rzzps_posid, "WBS element
             rzzmtit     like zupi5a-rzzmtit, "MPM title
             rzzmfor     like zupi5a-rzzmfor, "MPM format
             rzzmatnr    like zupi5a-rzzmatnr, "Material number
             rzzcou      like zupi5a-rzzcou, "Country
             rzzfow      like zupi5a-rzzfow,  "Financial owner
             rzzoow      like zupi5a-rzzoow,  "Operational owner
             rzzcon      like zupi5a-rzzcon,  "Licensee Contract
             rzzloc      like zupi5a-rzzloc, "Licensor Contract
             kostl       like zupi5a-kostl,  "Cost center
             zzfam       like zupi5a-zzfam,  "Fame Number
             zzfor       like zupi5a-zzfor,  "Format
             zzprd       like zupi5a-zzprd,  "Product Line
             zzwin       like zupi5a-zzwin,  "Window group
             zzwig       like zupi5a-zzwig,  "Window
             rtcur       like zupi5a-rtcur,  "Currency Key
             tsl         like zupi5a-tsl,  "Amount Transaction currency
             hsl         like zupi5a-hsl,  "Amount Co. code currency
             ksl         like zupi5a-ksl,  "Amount Group currency
             msl         like zupi5a-msl,  "Quantity
           end of ty_final.
    Data
    data:  j_final2      type standard table of ty_final,
           v_final2      type standard table of ty_final.
    data:  wa_final2     type ty_final.
    data:  bdcdata like bdcdata occurs 0 with header line,
           messtab like bdcmsgcoll occurs 0 with header line.
    data :begin of i_values occurs 0.
            include structure setvalues.
    data :end of i_values.
    data: v_counter(3) type n value '0',
          v_from    like rgsbl-from,
          V_FROM(30) TYPE C,
          v_setname like zfi_setid_cc-setid,
          v_setid like sethier-setid,
          n type i,
          l type i,
          k type i value '1',
          p_rbukrs like zupi5a-rbukrs.
    import p_rbukrs from memory id 'bukrsid'.
    import i_final2 to j_final2 from memory id 'table'.
    To eliminate duplicate WBS elements to be stored into the sets
    v_final2 = j_final2.
    sort v_final2 by rzzps_posid.
    delete adjacent duplicates from v_final2 comparing rzzps_posid.
    select single setid into v_setname
           from zfi_setid_cc
           where rbukrs EQ p_rbukrs.
    IF sy-subrc <> 0.
      MESSAGE E005.
    ENDIF.
    *write 'ZFIRESTATEMENT' to v_setname.
    call function 'G_SET_GET_ID_FROM_NAME'
         EXPORTING
              shortname = v_setname
         IMPORTING
              new_setid = v_setid.
    call function 'G_SET_TREE_IMPORT'
         EXPORTING
              client     = sy-mandt
              langu      = sy-langu
              setid      = v_setid
         TABLES
              set_values = i_values.
    describe table i_values lines n.
    describe table v_final2 lines l.
    write n to v_counter.
    clear bdcdata.
    refresh bdcdata.
    perform bdc_dynpro      using 'SAPMGSBM' '0105'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RGSBM-SHORTNAME'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    *perform bdc_field       using 'RGSBM-SHORTNAME'
                                 'ZFIRESTATEMENT'.
    perform bdc_field       using 'RGSBM-SHORTNAME'
                                  v_setname.
    loop at v_final2 into wa_final2.
       v_counter = v_counter + 1.
      perform bdc_dynpro      using 'SAPMGSBM' '0115'.
      concatenate 'RGSBL-FROM(' v_counter ')' into v_from.
      perform bdc_field     using 'BDC_CURSOR'
                                  v_from.
      perform bdc_field     using 'BDC_OKCODE'
                                  '/00'.
      perform bdc_field     using 'RGSBS-TITLE'
                                  'FI Restatement-WBS locking'.
      perform bdc_field     using v_from
                                   wa_final2-rzzps_posid.
    endloop.
    perform bdc_dynpro      using 'SAPMGSBM' '0115'.
    perform bdc_field       using 'BDC_CURSOR'
                                  v_from.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SAVE'.
    perform bdc_field       using 'RGSBS-TITLE'
                                  'FI Restatement-WBS locking'.
    perform bdc_dynpro      using 'SAPMGSBM' '0105'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/EBACK'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RGSBM-SHORTNAME'.
    call transaction 'GS02'
      using bdcdata
      mode 'A'
      update 'S'
      messages into messtab.
           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.
    this is working fine when they r less than 19 line items. please suggest me with the logic when it is more than 19 line items.

    Hi,
    Just try to increase the table control lines before display.
    v_counter = n + 10.

  • Issue with number of lines in Table control for an web transaction in ITS

    Hi,
    We have acustom web transaction ZC03 where we have used table controls. Recently a kernal patch has been installed and after that the number of lines appearing in table control has got changed. Earlier table control was coming with 5 lines and presently its coming with 3 lines. Can you please help me to fix the issue.
    The  code used in HTML template for table controi is given below:
    `SAP_DynproLayerBegin(005,013,067,006)`
      `SAP_TableControl("TC_TIME1")`
        `SAP_DynproLayerEnd()`
    I have tried other alternatives like  `SAP_DynproTableControl("TC_TIME1")`, `D_TableControl("TC_TIME1') but did n't get any fruitful result also.
    Thanks and Regards,
    Ranadev

    What where the precise Kernel updates? What where you on and what did you upgrade too?
    Did you apply any BASIS Support Pack corrections during the Kernel upgrade?
    If you applied a new BASIS support pack - check the following WIKI:
    [How to check the publishing Date of an Internet Service|http://wiki.sdn.sap.com/wiki/x/OYG8BQ ]
    if you need to republish - use the following WIKI:
    [How to activate, publish and test ITS services in the integrated ITS?|http://wiki.sdn.sap.com/wiki/x/kmE ]
    Regards,
    Oisin

  • Issue with input field in table control

    Hi,
    I have an issue with field acgl_item-rstgr in the table control.
    I have created a screen program with a table control.
    In the control i have added a dictionary field as acgl_item-rstgr.
    When i execute, do f4 on the input field, select a value and press enter, then it is showing me
    error as 'Entry 'val' does not exist in T053R (check entry). Its really weird to understand this. I have selected the value
    from f4 and even then it says this. Its working for all other columns, but not working only for RSTGR.
    Plz help me on this regard.
    Code is like this.
    TYPES : BEGIN OF ty_rstgr,
              rstgr TYPE RSTGR,
             END OF ty_rstgr.
    TABLES : ACGL_ITEM.
    DATA : it_rstgr TYPE TABLE OF ty_rstgr.
    DATA : wa_rstgr TYPE  ty_rstgr.
    CONTROLS : table TYPE TABLEVIEW USING SCREEN 100.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    LOOP AT it_rstgr INTO wa_rstgr WITH CONTROL TABLE.
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
      LOOP AT it_rstgr.
      ENDLOOP.
    Thanks,

    Hi Navitha,
    Its Check Table concepts for the error u stated. Please check wht the Search help ur using...Because for this field there is no search help at value table level...Use search help that hold all master data or create a custom search field in SE11 level or in program level.
    Cheers,
    Naveen

  • Issue in vertical scroolbar on the table control

    Hi All,
    I am not able to get the vertical scrollbar on the table control iuf line items increase in number. Please help me in solving the issue.
    Thanks
    K Sharma

    Hi,
    In se38
    CONTROLS: TCTRL_PHONELIST TYPE TABLEVIEW USING SCREEN 100.
    MODULE STATUS_0100 OUTPUT.
       DESCRIBE TABLE itab_PHONELIST LINES LIN.
      TCTRL_PHONELIST-lines = LIN.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    MODULE EXTRACT_USERDATA INPUT.
       lines = sy-loopc.
    ENDMODULE.                 " EXTRACT_USERDATA  INPUT
    In se51
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_0100.
    PROCESS AFTER INPUT.
      LOOP AT ITAB_PHONELIST .
                  MODULE EXTRACT_USERDATA.
      ENDLOOP.

  • Table control: Line selection single issue

    Hi experts,
    I have created a table control and in the screen painter I have defined the line selection as "Single" for table control.
    The table control can display upto 20 lines in a screen and i can select a single record only which pertains to my requirement. if I try to select two records it will not allow.
    Issue: consider  i select a single record from the first 20 lines displayed in screen, then i scroll the records in the table control so that it displays the records from 21 to 40. if I select a single record now from line 21 to 40, the first record that i selected is not getting deselected. That is, totally two lines are getting selected.
    How to overcome this issue
    Thanks in advance
    Regards
    Anand

    Ok
    The "problem" is here:
    Types: Begin of ty_ic,
      ic(20),
      desc(20),
      sel(1)                                 <--------------------------------
    End of ty_ic.
    You've ha a field for selected line and that field is used in table control definition as you've written:
    "Note: wa_ic is the structure used in table control and wa_ic-sel is the mark field defined the table control attributes"
    So you're using the structure WA_IC as header line of internal table IT_IC and also as input/put field of your table control (I mean the screen fields of table control are based on WA_IC).
    You don't need any code in PBO to move the data from internal table to table control, because the headerline of IT_IC and field of table control are the same, infact you've implemented only the code in PAI to save the data from table control to IT_IC:
    Loop at it_ic.
    Modify it_ic from wa_ic index tc_ic-current_line
    Endloop
    t's a good solution if it needs to transfer all data to table control automatically: it doesn't need any code in PBO
    but, of course, there'll be a problem when you don't need to display something, in this case you have to think a solution, I mean you have to write a code in order to avoid to display those data.
    It's the case of the selected line: in your situation all selected lines keep the selection, because the code to clear IT_IC-SEL is missing: only the user can deselect a line, but if he doesn't do it, the line will remain selected after navigation.
    So you make to be sure to clear all selected lines are not displayed.
    You need to create a code in PAI out of the loop of table control where you clear the flag SEL, in order to do it you need to consider:
    - The index of the first record displayed in table control is stored in field TC_IC-TOP_LINE
    - The index of the last record displayed in table control can be calculated: the variable SY-LOOPC indicates how many rows can be displayed in table control, so the last record will be: TC_IC-TOP_LINE + SY-LOOPC.
    So you need to clear the field SEL for all records not displayed, a code like this:
    PROCESS PAI.
      LOOP AT IT_IC.
         MODULE GET_LOOPC.
      ENDLOOP.
      MODULE CLEAR_SEL.
      MODULE GET_LOOPC..
          TOT_LINE_DISPLAYED = SY-LOOPC.
      ENDMODULE
      MODULE CLEAR_SEL.
    * Here you need to clear the selection of the records before of TOP_LINE
           IF TC_IC-TOP_LINE > 1.
              LOOP AT IT_IC INTO WA_IC  TO TC_IC-TOP_LINE.
                 CLEAR WA_IC-SEL.
                 MODIFY IT_IC FROM WA_IC.
              ENDLOOP.
         ENDIF.
    * Here you need to clear the selection of the records after the last one:
          LAST_INDEX = TOT_LINE_DISPLAYED + TC_IC-TOP_LINE.
         DESCRIBE TABLE IT_IC LINES SY-TABIX,
         IF SY-TABIX > LAST_INDEX.
              LOOP AT IT_IC INTO WA_IC  FROM LAST_INDEX.
                 CLEAR WA_IC-SEL.
                 MODIFY IT_IC FROM WA_IC.
              ENDLOOP.
         ENDIF.
      ENDMODULE.

  • Table Control Scrolling issue in Module Pool

    Hi,
    I've done table control. From Selection screen i've 3 buttons, if we'll press on one button one table control is visible. There if i do scrolling up to 10 records and i come back to selection and press another button again in table control scrolling is at previous place only. May be its nt refreshing.
    Kinldy help on this issue.
    With Regards,
    jack.

    hi,
    i've done like below. But no result.

  • Table control small Issues , Plz help in tracing the problem

    Hello John , Rich , Anand & all
    My sorting is working fine but thr is small problem
    1. user has habit of pressing enter after everything,
        after entering the values in editable fields in Table control , it doesnt retain the entered values but if he presses save button  immediately after entering values , it saves .
    how 2 hold the values after pressing enter  button
    2. Now with this code , it saves the table control content but doesnt display the latest values immediately on the screen .
    3. User doesnt want to press SAVE button , he wants save the Table control content by pressing ENTER button,
      What is the OK_CODE value for Enter Button plz ?
    Plllllzzzzz help me for god sake ASAP.
    <u><b>Everyone whoever make an attempt is going to get 10 pnts.</b></u>
    ==========================
    FLOW Logic
    PROCESS BEFORE OUTPUT.
    MODULE SET_STATUS.
    LOOP AT ITAB
    WITH CONTROL TCL1
    CURSOR TCL1-CURRENT_LINE .
    MODULE SET_LINE_COUNT .
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE GET_OK_CODE .
    MODULE EXIT_COMAND AT EXIT-COMMAND.
    MODULE SCROLL_SORT.
    LOOP AT ITAB.
    MODULE UPDATE_MOD.
    ENDLOOP.
    ==========================
    REPORT ZSD_REP_ORDER_BANK_CHANGE NO STANDARD PAGE HEADING LINE-SIZE 255.
    TABLES: VBAK,VBAP,VBRK,ZSD_TABL_ORDBANK,MARA,KONV.
    CONTROLS: TCL1 TYPE TABLEVIEW USING SCREEN 0200.
    DATA: ITAB LIKE ZSD_TABL_ORDBANK OCCURS 0 WITH HEADER LINE,
          WA_ITAB LIKE ZSD_TABL_ORDBANK,
          OK_CODE LIKE SY-UCOMM,
          SAVE_OK_CODE LIKE SY-UCOMM,
          UPD_OK_CODE LIKE SY-UCOMM,
          ANSWER TYPE C,
          I LIKE SY-LOOPC ,
          J LIKE SY-LOOPC,
          V_LINES LIKE SY-LOOPC,
          LINE_COUNT LIKE SY-LOOPC,
          STS  TYPE N,
          EMGRP LIKE MARA-EXTWG,
          QTY LIKE ZSD_TABL_ORDBANK-QTY,
          UPRICE LIKE ZSD_TABL_ORDBANK-UPRICE,
          TOT LIKE ZSD_TABL_ORDBANK-TOT,
          INO LIKE VBAP-POSNR,
          COL TYPE CXTAB_COLUMN,
          COPIED_ONCE ,
          FLDNAME(100),HELP(100).
    FIELD-SYMBOLS:
         <FS_ITAB> LIKE LINE OF ITAB,
         <FS_TCL1> LIKE LINE OF TCL1-COLS.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
      SELECT-OPTIONS: S_CCODE FOR ZSD_TABL_ORDBANK-CCODE
                              NO INTERVALS NO-EXTENSION  OBLIGATORY,
                      S_SORG  FOR ZSD_TABL_ORDBANK-SORG
                              NO INTERVALS NO-EXTENSION  OBLIGATORY,
                      S_DCHAN FOR ZSD_TABL_ORDBANK-DISTCHAN,
                      S_DIV FOR ZSD_TABL_ORDBANK-DIV,
                      S_MATNO FOR ZSD_TABL_ORDBANK-MATNO,
                      S_CUSTNO FOR ZSD_TABL_ORDBANK-CUSTNO ,
                      S_QTNO FOR ZSD_TABL_ORDBANK-QTNO,
                      S_QTDAT FOR ZSD_TABL_ORDBANK-QTDAT,
                      S_QTVDAT FOR ZSD_TABL_ORDBANK-QTVALDAT,
                      S_SONO   FOR ZSD_TABL_ORDBANK-SONO.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN.
       SELECT * FROM  ZSD_TABL_ORDBANK
                   INTO  TABLE ITAB
                   WHERE CCODE IN S_CCODE
                     AND SORG IN  S_SORG
                     AND DISTCHAN IN  S_DCHAN
                     AND DIV IN S_DIV
                     AND MATNO IN  S_MATNO
                     AND CUSTNO IN  S_CUSTNO
                     AND QTNO IN  S_QTNO
                     AND QTDAT IN  S_QTDAT
                     AND QTVALDAT IN  S_QTVDAT
                     AND SONO IN  S_SONO .
          IF SY-SUBRC EQ 0.
             REFRESH ITAB.
             CLEAR COPIED_ONCE.
             CALL SCREEN 0200.
          ELSE.
             MESSAGE E012(ZQOTBANK) .
          ENDIF.
    *&      Module  SET_STATUS  OUTPUT
          text
    MODULE SET_STATUS OUTPUT.
      SET PF-STATUS '0200'.
      SET TITLEBAR '0200'.
        IF COPIED_ONCE IS INITIAL.
          SELECT * FROM  ZSD_TABL_ORDBANK
                   INTO  TABLE ITAB
                   WHERE CCODE IN S_CCODE
                     AND SORG IN  S_SORG
                     AND DISTCHAN IN  S_DCHAN
                     AND DIV IN S_DIV
                     AND MATNO IN  S_MATNO
                     AND CUSTNO IN  S_CUSTNO
                     AND QTNO IN  S_QTNO
                     AND QTDAT IN  S_QTDAT
                     AND QTVALDAT IN  S_QTVDAT
                     AND SONO IN  S_SONO .
          IF SY-SUBRC EQ 0.
            DESCRIBE TABLE ITAB LINES V_LINES.
            TCL1-LINES = V_LINES.
          ENDIF.
          COPIED_ONCE = 'X'.
          REFRESH CONTROL 'TCL1' FROM SCREEN '0200'.
       ENDIF.
          LOOP AT ITAB.
             QTY = ITAB-QTY.
             UPRICE  = ITAB-UPRICE.
             TOT = QTY * UPRICE .
             ITAB-TOT = TOT .
             CLEAR: QTY, UPRICE, TOT.
             QTY = ITAB-CGL_QTY.
             UPRICE  = ITAB-CGL_UPRICE.
             TOT = QTY * UPRICE .
             ITAB-CGL_TOT = TOT .
             CLEAR: QTY, UPRICE, TOT.
             QTY = ITAB-BHEL_QTY.
             UPRICE  = ITAB-BHEL_UPRICE.
             TOT = QTY * UPRICE .
             ITAB-BHEL_TOT = TOT .
             CLEAR: QTY, UPRICE, TOT.
             QTY = ITAB-ALSTOM_QTY.
             UPRICE  = ITAB-ALSTOM_UPRICE.
             TOT = QTY * UPRICE .
             ITAB-ALSTOM_TOT = TOT .
             CLEAR: QTY, UPRICE, TOT.
             QTY = ITAB-SIEMENS_QTY.
             UPRICE  = ITAB-SIEMENS_UPRICE.
             TOT = QTY * UPRICE .
             ITAB-SIEMENS_TOT = TOT .
             CLEAR: QTY, UPRICE, TOT.
             QTY = ITAB-TELK_QTY.
             UPRICE  = ITAB-TELK_UPRICE.
             TOT = QTY * UPRICE .
             ITAB-TELK_TOT = TOT .
             CLEAR: QTY, UPRICE, TOT.
             QTY = ITAB-OTH_QTY.
             UPRICE  = ITAB-OTH_UPRICE.
             TOT = QTY * UPRICE .
             ITAB-OTH_TOT = TOT .
             CLEAR: QTY, UPRICE, TOT.
             MODIFY ITAB.
          ENDLOOP.
    ENDMODULE.                 " SET_STATUS  OUTPUT
    *&      Module  SET_LINE_COUNT  INPUT
          text
    MODULE SET_LINE_COUNT OUTPUT.
      LINE_COUNT = SY-LOOPC.
    ENDMODULE.                 " SET_LINE_COUNT  INPUT
    *&      Module  GET_OK_CODE  INPUT
          text
    MODULE GET_OK_CODE INPUT.
      IF OK_CODE = 'SAVE'.
         UPD_OK_CODE = OK_CODE.
      ENDIF.
    ENDMODULE.                 " GET_OK_CODE  INPUT
    *&      Module  EXIT_COMAND  INPUT
          text
    MODULE EXIT_COMAND INPUT.
    SAVE_OK_CODE = OK_CODE.
    CLEAR OK_CODE.
    CASE SAVE_OK_CODE.
        WHEN 'BACK'.
          CALL FUNCTION 'POPUP_TO_CONFIRM'
            EXPORTING
              TITLEBAR       = 'Order Bank Entry'
              TEXT_QUESTION  = 'Do you want to Go BacK ?'
              TEXT_BUTTON_1  = 'Yes'
              TEXT_BUTTON_2  = 'No'
              DEFAULT_BUTTON = '2'
            IMPORTING
              ANSWER         = ANSWER.
          IF ANSWER = '1'.
            LEAVE TO SCREEN 0.
          ELSE.
          ENDIF.
        WHEN '%EX'.
          CALL FUNCTION 'POPUP_TO_CONFIRM'
            EXPORTING
              TITLEBAR       = 'Order Bank Entry'
              TEXT_QUESTION  = 'Do you want to Exit ?'
              TEXT_BUTTON_1  = 'Yes'
              TEXT_BUTTON_2  = 'No'
              DEFAULT_BUTTON = '2'
            IMPORTING
              ANSWER         = ANSWER.
          IF ANSWER = '1'.
            LEAVE TO SCREEN 0.
          ELSE.
          ENDIF.
      ENDCASE.
    ENDMODULE.                 " EXIT_COMAND  INPUT
    *&      Module SCROLL INPUT
          text
    MODULE SCROLL_SORT INPUT.
    SAVE_OK_CODE = OK_CODE.
    CLEAR OK_CODE.
    CASE SAVE_OK_CODE.
      WHEN 'P--'.
          TCL1-TOP_LINE = 1.
      WHEN 'P-'.
          TCL1-TOP_LINE = TCL1-TOP_LINE - LINE_COUNT.
          IF TCL1-TOP_LINE LE 0.
             TCL1-TOP_LINE = 1.
          ENDIF.
      WHEN 'P+'.
          I = TCL1-TOP_LINE + LINE_COUNT.
          J = TCL1-LINES - LINE_COUNT + 1.
          IF J LE 0.
             J = 1.
          ENDIF.
          IF I LE J.
             TCL1-TOP_LINE = I.
          ELSE.
             TCL1-TOP_LINE = J.
          ENDIF.
      WHEN 'P++'.
          TCL1-TOP_LINE = TCL1-LINES - LINE_COUNT + 1.
          IF TCL1-TOP_LINE LE 0.
              TCL1-TOP_LINE = 1.
          ENDIF.
      WHEN 'SORTUP'.
          READ TABLE TCL1-COLS ASSIGNING <FS_TCL1> WITH KEY SELECTED = 'X'.
          IF SY-SUBRC = 0.
              SPLIT <FS_TCL1>-SCREEN-NAME AT '-' INTO HELP FLDNAME.
              SORT ITAB ASCENDING BY (FLDNAME).
          ENDIF.
      WHEN 'SORTDN'.
          READ TABLE TCL1-COLS ASSIGNING <FS_TCL1> WITH KEY SELECTED = 'X'.
          IF SY-SUBRC = 0.
              SPLIT <FS_TCL1>-SCREEN-NAME AT '-' INTO HELP FLDNAME.
              SORT ITAB DESCENDING BY (FLDNAME).
          ENDIF.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND  INPUT
    *&      Module  UPDATE_MOD  INPUT
          text
    MODULE UPDATE_MOD INPUT.
    CASE UPD_OK_CODE.
    WHEN 'SAVE'.
          UPDATE ZSD_TABL_ORDBANK FROM ITAB .
          STS = SY-SUBRC .
          IF STS NE 0.
               MESSAGE E003(ZQOTBANK) .
          ENDIF.
      ENDCASE.
    ENDMODULE.                 " UPDATE_MOD  INPUT
    Thnx
    Moni
    Message was edited by: md monirujjaman

    PROCESS BEFORE OUTPUT.
    MODULE SET_STATUS.
    LOOP AT      ITAB
          WITH    CONTROL TCL1
          CURSOR  TCL1-CURRENT_LINE .
       MODULE SET_LINE_COUNT .
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE GET_OK_CODE .
    MODULE EXIT_COMAND AT EXIT-COMMAND.
    MODULE SCROLL_SORT.
    LOOP AT ITAB.
          MODULE UPDATE_ITAB.
    ENDLOOP.
          MODULE UPDATE_TABLE.
    changed modules are ......
    *&      Module  UPDATE_MOD  INPUT
          text
    MODULE UPDATE_ITAB INPUT.
        MODIFY TABLE ITAB FROM ITAB.
    ENDMODULE.                 " UPDATE_MOD  INPUT
    *&      Module  TABL_UPD  INPUT
          text
      MODULE UPDATE_TABLE INPUT.
       CASE UPD_OK_CODE.
       WHEN 'SAVE'.
        UPDATE ZSD_TABL_ORDBANK FROM TABLE ITAB .
        IF SY-SUBRC NE 0.
             MESSAGE E003(ZQOTBANK) .
        ENDIF.
       ENDCASE.
      ENDMODULE.                 " TABL_UPD  INPUT
    now i m able 2 get the latest edited values from user immediately i press enter button and getting saved by pressing SAVE button but further problems are, i have one dropdown button for status 1 field , and  1 date field are not getting updated .
    So further help plz.

  • Issue with loop in table control

    Hello experts,
    I have 20 entries in my table control  but the loop is going through only for 10 entries..please help me?
    Thanks

    Hi
    In PBO
    module status_your_screen_number.
    loop at itab with control tc.
    endloop.
    in PAI.
    loop at itab.
    module modify_itab
    endloop.
    in Program
    Module status_your_screen_Number.
    describe table itab lines tc-lines -
    > THis will give you Scroll Bars for Table Control
    endmodule
    module modify_itab. -
    > If Required ( If you are modifying the Data of table control )
      DESCRIBE TABLE itab LINES lin.
      IF tc-current_line > lin.
        APPEND itab.
      ELSE.
        MODIFY itab INDEX tc-current_line. ---> This Ensures your data both Upward And Downward Scrolling
      ENDIF.
    endmodule
    Cheers
    Ram
    Edited by: Ramchander Krishnamraju on Oct 28, 2009 8:59 AM
    Edited by: Ramchander Krishnamraju on Oct 28, 2009 9:26 AM

  • 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

  • Issue in table control scroll bar

    Hi experts,
    In Table control I used the following code,
    Refresh control 'TCDATA' from screen '200'.
    If i use this code i cant able to  scroll the data when the table control having multiple lines.
    Can any one suggest me?. what i need to do for this..
    Edited by: sai.bala on Sep 17, 2010 12:22 PM

    Hi ,
    try this...
    Refresh control 'TCDATA' from screen '200'.
    "write this statement below refresh table control
    * Describe lines of internal table to extend the table control Vertical
    * scroll bar
      DESCRIBE TABLE <tablename> LINES TCDATA-lines.
    prabhudas

  • Issue in table control

    Hi All
    I have a table control in which there are three columns. I need a dropdown list box in one of the columns but the problem is i dont want dropdown in all the cells of that column.
               col 1     col2        col3
    row1
    row2
    row3                              *****
    As illustrated above , I want dropdown list box only at place specified by *****. Can i achieve this somehow.
    Any pointers to this will be appreciated.
    Thanks.

    Hi,
    In tcode se51 --> table control select the field Row3(according to your example) and
    double click it.Then a attributes window will be displayed.
    In tht window there will be a field called Dropdown..Choose list box from it and also click on Program tab>possible entries..
    Award points if useful..

  • Custom Table Control in VA21/22/23 Tranaction Issue

    Hi Friends,
    Working on SAP R/3 Release 4.6C.
    There is a custom Table Control in one of the screen of VA21 Transaction.
    My requirement is to insert one more Field/Column to this table Control.
    The following are the sequence of fields in Table Control.
    Column1
    Column2
    Column3
    Column4
    After Inserting the Field in the middle of Column1 and Column2.
    The Sequence of Table Control is getting Changed.
    The Table Control has to show like this.
    Column1
    Column2     "New Field which is added
    Column3
    Column4
    Column5
    But I'm getting as below
    Column5
    Column3
    Column2     "New Field which is added
    Column1
    Column4
    When executing the Table Control Screen in SE51 with Screen Name and Screen Number,I am getting the perfect output.
    When executing thro VA21/22/23, Iam getting sequence mismatch.
    Anyone come across this scenario. Please guide to solve this.
    Thanks.

    Solved.
    Thanks.

  • 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

Maybe you are looking for