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.

Similar Messages

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

  • How to call table control in subscreen in module pool program

    Hi all,
    I have req,need call table control in subscreen,but have done but when scroll bar value getting changed ,
    please guide how to do it.if its possable send the code.
    regards
    santosh

    Hi,
    The navigation happens like this.
    Consider you have a main screen and 2 subscreens.
    When you click or do some event in the Subscreen 2 (lets say this is the one that has the table control), this will first trigger PAI of the Main Screen. In the flow logic of the Main screen, you would have written call subscreen <subscreen area1> and call subscreen <subscreen area2>.
    Now the subscreens get triggered based on the order in which you have written in the flow logic.
    So, here the modules before the first call subscreen statement in the Main Screen PAI is all executed. Now, it goes to the subscreen on which you have triggered an event and executes the modules in the subscreen.
    This is how the execution goes when you have subscreens.
    So there is no problem with the navigation. You only have to worry about the screen where you have the table control. Just debug and find where data is getting changed or duplicated.

  • Table control with wizard in module pool

    Hi Gurus!!
    First I have an ztable for header and ztable for item of the purchase order. We have the requirement of first uploading the data into ztable and then perform bapi or bdc on it. So, before the data goes into the ztable we have to create screens to show the data,and if any error it should be corrected and then send it to the ztable.
    So,in the screen I created a table control using the wizard where I gave the internal table and work area I declared for the item ztable.
    Now, I need to give a condition to the table control such that only the details of a single vendor should be displayed in the table control but not all.
    Note: The vendor field in the item ztable is the value key and its check table is the header ztable.
    I am not able to give a condition in the PAI of the screen where the loop gets created for the table control.
    Could someone please help me with this issue.
    Thanks and Regards,
    Vishwa.

    Instead of putting a condition to the table control level u can do 1 thing ..create another internal table for ztable (lineitem). And based on ur condition populate this table from the main table and then display this table to the table control.
    Regards,
    Joy.

  • Table controls (scroll bars) with LSMW

    Hi,
    I have to fill a table control from a lsmw project, my problem appears when we need to scroll down table control because there are no more free lines.
    My question is if it's possible to manage table control scroll bars to scroll down when all rows will be taken, using lsmw.
    Any idea about it would be very appreciated
    Thanks in advance

    Hi Javier,
    I suggest you is that you should loop at the internal table from which you are filling the data into the table control or use a counter for number of rows comming up at a time in the table control. And then put code for ADD+ button. Do this till the end of file or table.
    I hope this helps.
    Also you can use TCode for the LSMW to upload one record at a time. U can try this also.
    Regards,
    Usha.

  • Problem in module pool with table control scrolling

    hi,
    i am using the table control in module pool,in the table control i have radion button for all the rows.
    After i got the data into the table control ,if i select radio button and if i press vertical scroll bar button, that radio button is deselecting,how to solve this issue.
    Please help me.

    Hi
    Generally we don't keep radiobuttons in table control for selecting the records
    We keep check boxes for selecting the records
    Radio button is used to select a single from a group of records and at a time only one is selected, where as checkboxes at a time you can select a single or multiple.
    So use checkboxes and code correctly see the doc for Table control
    syntax:
    CONTROLS .
    if you only want to determine the row of the table control. SY´-SUBRC allows you to check if the cursor is placed in a row of a table control.
    u need to comment the performs of table control fields and write ur own perform statements. And u have to declare the table control fields as separate internal tables.
    Go through this urls.
    www.****************
    www.sap-img.com
    Check the below links.
    http://www.planetsap.com/howdo_a.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac5135c111d1829f0000e829fbfe/content.htm
    http://sap.niraj.tripod.com/id25.html
    Reward points if useful
    Regards
    Anji

  • 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

  • Table control scroll bar issue

    how to set the scroll bar for table control for the transaction code va42 for billing plan tab.
    i have added few custom fileds for the table control, when i m re-arranging the columns for the table control, the scroll bar is fixed for one field( as standard) and the scroll bar starts from that place. how to fix the scroll bar or control the scroll bar and sets it position for the desired column.

    HI,
    Table control ahs a property called FIXED_COLS. You ave to pass the column number to this property.

  • Checkbox issue in module pool program

    Hi all,
    I have a small issue in a module pool program using checkboxes. The requirement is that my basic list should contain the data with checkboxes and as per the selection by the user, the selected records should appear in the next screen (secondary list). But after selection, all the records barring the last record is appearing in my secondary list. Below are the screenshots of my program:
    These are the global variables I declared:
    The layout for the  basic list is as shown. The function code is cbox for checkbox.
    The flow logic :
    The code for user-command:
    Now on executing the program,
    As you can see, sales orders 4970,4972,4974 and 4975 are selected. So after clicking NEXT, in the secondary list , the data for these selected sales orders from VBAP table should come up. But instead, the records from 4970, 4972 and 4974 are displayed except the last sales order which is 4975.
    This is happening for all the records. The last selected sales order is not getting selected. Why is it so?
    Thanks.
    Manish

    Hi Ali,
    I have modified the code but there are still a couple of things which are confusing me. In the below screenshot you can see the modified version of the code:
    Now to see what is going wrong, I tried to debug the code. I placed the breakpoint on 'NEXT' as shown. Then I selected the following sales orders and pressed NEXT.
    In the debugger, IT_VBAK1 correctly holds the 2 selected values:
    IT_VBAP displays the values correctly as well.
    Now, this is where the issue is. On clicking the BACK button and selecting another sales order (4974):
    IT_VBAK1 holds the additional sales order 4974 along with the previous ones as well:
    IT_VBAP also displays the values accordingly as per the debugger:
    But in the table control, the sales order 4974 is not displayed. Only the initial sales orders are displayed.
    1) There is nothing wrong with the code as the debugger shows the records are held and displayed correctly by the internal tables. So what could be the reason for the data not to be displayed correctly in the table control? I also tried refreshing IT_VBAP after the BACK button, but still it isnt working. 
    2) Also, another thing I've seen that is after clicking the BACK button, when I select the sales orders, only data from 2 sales orders are displayed in the secondary list.
    For example, if I select any number of sales orders and press NEXT, then all the data are displayed correctly in the secondary list. Once I click the BACK button and deselect all of them and then I checkbox 3 sales orders (more than 2), then only the records for 2 sales orders are displayed, not the 3rd one.   Why is this happening?
    Regards
    Manish.

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

  • BDC Recording For J1IG with Table Control Scroll bar

    Dear Friends,
    I am doing BDC program for J1IG Transaction after done recording.
    As you knows that, In J1IG transaction max. 11 materials are shows in table control at a time and if more records are there, then we have to scroll down manually so after that, we can see the records.
    Now my BDC program runs upto 11 materials but when more than 11 materials, selection is coming on first material only and cursor not showing 12th material.
    So i think page down is not working for that issue.
    I have seen lots of search forum for that but not getting the proper answer.
    Please reply.
    Regards,
    Shivam.

    Dear Dinu,
    For better understanding please see the code.
    So you suggest what should i have to do?.
    LOOP AT jtab INTO wb.
         LOOP AT itab INTO wa WHERE mblnr EQ wb-mblnr.
           CLEAR : flag.
           AT NEW mblnr.
             flag = 'X'.
             CLEAR : cnt, var1, var2.
           ENDAT.
           cnt = cnt + 1.
           IF flag EQ 'X'.
             PERFORM bdc_dynpro      USING 'SAPMJ1IG' '0100'.
             PERFORM bdc_field       USING 'BDC_OKCODE'
                                       '=ECAP'.
             PERFORM bdc_dynpro      USING 'SAPMJ1IG' '0200'.
             PERFORM bdc_field       USING 'BDC_CURSOR'
                                       'T_HEADER-EXDAT'.
             PERFORM bdc_field       USING 'BDC_OKCODE'
                                       '/00'.
             PERFORM bdc_field       USING 'J_1IEXCHDR-EXGRP'
                                       wa-exgrp.
             PERFORM bdc_field       USING 'T_HEADER-MBLNR'
                                       wa-mblnr.
             PERFORM bdc_field       USING 'T_HEADER-MJAHR'
                                       wa-mjahr.
             PERFORM bdc_field       USING 'T_HEADER-EXNUM'
                                       wa-exnum.
             PERFORM bdc_field       USING 'T_HEADER-EXDAT'
                                       wa-exdat.
             PERFORM bdc_dynpro      USING 'SAPMJ1IG' '0200'.
             PERFORM bdc_field       USING 'BDC_CURSOR'
                                       'J_1IEXCHDR-EXGRP'.
             PERFORM bdc_field       USING 'BDC_OKCODE'
                                       '=DETL'.
           ENDIF.
           CONCATENATE 'T_ITEM-ZEILE(' cnt ')'  INTO var1.
           CONCATENATE 'T_ITEM-SELECTION(' cnt ')'  INTO var2.
           PERFORM bdc_dynpro      USING 'SAPMJ1IG' '0300'.
           PERFORM bdc_field       USING 'BDC_CURSOR'
                                     var1.           "'T_ITEM-ZEILE(01)'.
           PERFORM bdc_field       USING 'BDC_OKCODE'
                                     '=MORE'.
           PERFORM bdc_field       USING var2 "'T_ITEM-SELECTION(01)'
                                     'X'. "record-selection_01_019.
           PERFORM bdc_dynpro      USING 'SAPMJ1IG' '0400'.
           PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'T_LOCAL_EXC-EXADDRATE1(01)'.
           PERFORM bdc_field       USING 'BDC_OKCODE'
                                     '/00'.
           PERFORM bdc_field       USING 'T_LOCAL_EXC-MENGE(01)'
                                     wa-menge.
           PERFORM bdc_field       USING 'T_LOCAL_EXC-EXBAS(01)'
                                     wa-exbas.
           PERFORM bdc_field       USING 'T_LOCAL_EXC-EXBED(01)'
                                     wa-exbed.
           PERFORM bdc_field       USING 'T_LOCAL_EXC-BEDRATE(01)'
                                     wa-bedrate.
           PERFORM bdc_field       USING 'T_LOCAL_EXC-EXAED(01)'
                                     wa-exaed.
           PERFORM bdc_field       USING 'T_LOCAL_EXC-AEDRATE(01)'
                                     wa-aedrate.
           PERFORM bdc_field       USING 'T_LOCAL_EXC-ECS(01)'
                                     wa-ecs.
           PERFORM bdc_field       USING 'T_LOCAL_EXC-ECSRATE(01)'
                                     wa-ecsrate.
           PERFORM bdc_field       USING 'T_LOCAL_EXC-EXADDTAX1(01)'
                                     wa-exaddtax1.
           PERFORM bdc_field       USING 'T_LOCAL_EXC-EXADDRATE1(01)'
                                     wa-exaddrate1.
           PERFORM bdc_dynpro      USING 'SAPMJ1IG' '0400'.
           PERFORM bdc_field       USING 'BDC_CURSOR'
                                     'T_LOCAL_EXC-RG23ASER(01)'.
           PERFORM bdc_field       USING 'BDC_OKCODE'
                                     '=BACK'.
         ENDLOOP.
         PERFORM bdc_dynpro      USING 'SAPMJ1IG' '0300'.
         PERFORM bdc_field       USING 'BDC_CURSOR'
                                   'T_ITEM-DOCNO(01)'.
         PERFORM bdc_field       USING 'BDC_OKCODE'
                                   '=SAVE'.
         CLEAR opt.
         opt-dismode = 'A'.
         opt-updmode = 'S'.
    *    opt-defsize = '12'.
    *    CLEAR: it_messages[], it_messages.
         CALL TRANSACTION 'J1IG' USING it_bdcdata OPTIONS FROM opt
                                       MESSAGES INTO it_messages.
         REFRESH it_bdcdata.
       ENDLOOP.
       CHECK it_messages[] IS NOT INITIAL.
       LOOP AT it_messages.
         PERFORM fill_messages USING it_messages-msgtyp
                                     it_messages-msgid
                                     it_messages-msgnr
                                     it_messages-msgv1
                                     it_messages-msgv2
                                     it_messages-msgv3
                                     it_messages-msgv4.
       ENDLOOP.
       PERFORM display_messages TABLES tmsg.

  • Table Control Scroll Bar inactive

    Hi All,
    I am facing a strange problem. I have placed a table control on my screen and have added the columns. Rest of the functionality is also fine. However, even when the number of rows in the table exceeds its height, the Vertical Scroll bar is inactive and I cannot scroll down to the hidden line items. The horizontal scroll bar is working perfectly.The color of the Vertical Scroll bar is also Dark grey (as in inactive.)
    I fail to understand what could be the reason for this? Helpful answers will be suitably rewarded
    Regards,
    Madhur

    Hi Madur,
    Try this code :
    (assume that the name of your table control is T1)
    In the screen logic you will have:
                    Loop with control T1.
                       module get_Looplines.
                    Endloop.
                        Module get_looplines.
                          Looplines = sy-loopc.
                        Endmodule.
    In the PBO of the screen you will have a module that loads the itab and determines the total number of lines read.
                   Module load_itab.
                    .      (select database table and
    append to itab)
                    describe table itab lines linecount.
                   Endmodule.
    We now have all the values to construct a scroll module.
    MODULE SCROLL INPUT.
    CASE SAVE_OK_CODE.
    WHEN 'P--'.
       T1-TOP_LINE = 1.
    WHEN 'P-'.
       T1-TOP_LINE = T1-TOP_LINE - LOOPLINES.
         IF T1-TOP_LINE < 1.
            T1-TOP_LINE = 1.
         ENDIF.
    WHEN 'P+'.
       T1-TOP_LINE = T1-TOP_LINE + LOOPLINES.
         IF T1-TOP_LINE > LINECOUNT.
            T1-TOP_LINE = LINECOUNT - LOOPLINES + 1.
         ENDIF.
    WHEN 'P++'.
       T1-TOP_LINE = LINECOUNT - LOOPLINES + 1.
    ENDCASE.
    ENDMODULE.                 " SCROLL  INPUT
        WHEN 'P--'.
          CLEAR SY-UCOMM.
          CTR1-TOP_LINE = 1.
        WHEN 'P-'.
          CLEAR SY-UCOMM.
          CTR1-TOP_LINE = CTR1-TOP_LINE - LINECOUNT1.
          IF CTR1-TOP_LINE < 1.
            CTR1-TOP_LINE = 1.
          ENDIF.
        WHEN 'P+'.
          DESCRIBE TABLE ITAB1 LINES N1.
          CTR1-TOP_LINE = CTR1-TOP_LINE + LINECOUNT1.
          IF CTR1-TOP_LINE > N1.
            CTR1-TOP_LINE = N1.
          ENDIF.
          CLEAR SY-UCOMM.
        WHEN 'P++'.
          DESCRIBE TABLE ITAB1 LINES N1.
          CLEAR SY-UCOMM.
          CTR1-TOP_LINE = N1.
    Cheers
    Sunny
    Rewrd points, if helpful

  • Vertical Scroll Bar in module pool

    Hi,
    I am doing the module pool program in ECC 6.0 when i have more than 10 records in my internal table the tablecontrol wizard is showing only 5 records which are visible. when i hit the vertical scroll bar
    all the records are getting refershed and unable to get single record.
    Please suggest me how to get all 10 records and how the vertical scroll bar works properly
    Regards
    Edited by: Rasheed salman on Dec 6, 2008 5:35 AM

    Hi
    Try include this code in PAI
    loop at itab.
    module modify_tab
    endloop
    in program
    module modify_tab
    describe table itab lines tc-liens
    if tc-current_line > tc-lines
    append itab
    else
    modify itab index tc-current_line
    endmodule
    if it is not resolved  please post your coding in PAI part and PBO part
    if at all you are using any loop statements any other part of the code let us know
    regards
    Ramchander Rao.K

  • Problem with a Table Control Scroll Down.

    Hi,
    I´m working with a table control in which I select one of the many lines the table contains and I move it into a structure, I delete the data of the table control internal table and I move the selected line back into the internal table to show only that record. My problem is the following:
    Whenever I have to scroll down to select a line, the selected line doesn´t appear afterwards. I believe that it´s because the scroll bar disappears and keeps on showing the line where the record I selected used to be and because the selected record is added in the fist line of the TC.
    Is there any way of avoiding the disappearrance of the vertical scroll bar? Or how can I show the record added in the first line if the TC only displays the position where the selected record used to be?
    This is the logic I use to show the single record.
      READ TABLE TI_ASIGLOT WITH KEY PUSH = 'X'.
      IF SY-SUBRC = 0.
        MOVE-CORRESPONDING TI_ASIGLOT TO ST_ASIG.
        CLEAR TI_ASIGLOT.
        REFRESH TI_ASIGLOT.
        MOVE-CORRESPONDING ST_ASIG TO TI_ASIGLOT.
        ST_ASIG-CPEND = ST_ASIG-GAMNG.
        MOVE ST_ASIG-CPEND TO TI_ASIGLOT-CPEND.
        APPEND TI_ASIGLOT.
    Thank´s and regards.
    Lucila

    Well, I´m going to anwser my own question. The problem was that in my TC the top field value was the line number of the record I've selected. So the only thing I had to do to fix it was to asign 1 to the field TC-top_line inside the form where I select the record.
      READ TABLE TI_ASIGLOT WITH KEY PUSH = 'X'.
      IF SY-SUBRC = 0.
        MOVE-CORRESPONDING TI_ASIGLOT TO ST_ASIG.
        CLEAR TI_ASIGLOT.
        REFRESH TI_ASIGLOT.
        MOVE-CORRESPONDING ST_ASIG TO TI_ASIGLOT.
        ST_ASIG-CPEND = ST_ASIG-GAMNG.
        MOVE ST_ASIG-CPEND TO TI_ASIGLOT-CPEND.
        APPEND TI_ASIGLOT.
        W_INI = 1.
      ELSE.
        MESSAGE I889(100) WITH TEXT-T07.
        EXIT.
      ENDIF.
    z_result-top_line = 1.
    (z_result is my TC )
    Best regards,
    Lucila

  • Selection screen regeneration issue in Module pool

    Hi experts,
    I have designed a module pool in which i have included a selection screen as sub screen , and for the scenario i need to give custom f4 help for the selection  field for that i have included logic ,My issue is when ever i am changing other code in the programs (other screen logic) the selection screen  is reverting back to normal ...again i have to do the flow logic and screen change of selection screen.
    Suggest me how i can avoid this .
    Regards,
    Siva Prasad.

    and for the scenario i need to give custom f4 help for the selection  field for that i have included logic
    was the error, use some AT SELECTION-SCREEN ON VALUE-REQUEST FOR {para|selcrit-low|selcrit-high} or PARAMETERS/SELECT-OPTIONS MATCHCODE OBJECT search_help  statement, and your problem will vanish... (Edition of a generated object is hardly ever a good idea and never good practice)
    Regards,
    Raymond

Maybe you are looking for

  • Tune up and upgrade or buy new?

    I have a iBook G4. It is starting to show wear and age. It needs a new battery (doesn't hold any charge)and a new power cord (fraying at the barrel). I have very little memory left and it runs very slow at times. I was thinking of buying a new batter

  • SPD 2013 WorkFlow Status Column: Status Not Updated

    We are having an issue with the status display of the SPD Designer Workflow status column which is a read only column added by SharePoint to show the status of the workflow. We have some SharePoint 2013 Workflows built using SharePoint Designer that

  • Arrear Amount Not adding in Total Earning

    Dear All, When we are generating pay slip by PC00_m40_cedt and with simulation PC00_M40_Calc_SIMU then Stat.net subs.adjustment i.e. /552 component is not adding in Total Earning field , please help from where we can also show that amount in Total Ea

  • Why no indication of 5.0.1 on Help About Firefox?

    I had 5.0 installed a check of Help About Firefox showed it as up to date. Checking FileHippo.com showed 5.0.1, How come no indication of this in Help About Firefox? Thanks

  • SAP GRC AC10 Common Practices on Mitigation Control

    Hi all, Currently, our company is implementing the GRC tool globally and we are required to set up mitigation control. I would like to get some ideas about what structures are used in various companies. And are those mitigation control align with the