Could you help me about table control .. ?

Dear All,
I've a problem in table Control.
I put table control inside tab control (there are many tab in one screen where one tab has one table control).
The schenario of the program, i wanna use table control to maintain the value from some table.
So certainly it has insert/add, delete function.
As we know to do one function in those e.g. add record button, we need specify some code on that button.
So ..
Once when that button is pressed, we can check what button is being pressed using that code.
And it can run well.
But this is the strange one, if i have schenario like this :
1. I click add record button
    I will get the add code through ok_code/SY-UCOMM variable.
2. I scroll down/up the table control.
    (THIS IS THE WEIRD), the ok_code/SY-UCOMM variable still keep having add code. So every we scroll down/up, application also will add one record.
Could you help me to make ok_code/SY-UCOMM blank in every time i scroll down/up the table control ??
Or could you help me how to i specify the code for scroll down/up the table control so I can identify when user is scrolling down/up the table control??
I really need  your guidance/suggestion how to overcome it .. ?
Many tks for all your attention.
Best regards,
Daniel N.

Following is a sample code of handling table control in BDC.
REPORT Y730_BDC5 .
*HANDLING TABLE CONTROL IN BDC
DATA : BEGIN OF IT_DUMMY OCCURS 0,
       DUMMY(100) TYPE C,
       END OF IT_DUMMY.
DATA : BEGIN OF IT_XK01 OCCURS 0,
       LIFNR(10) TYPE C,
       BUKRS(4)  TYPE C,
       EKORG(4)  TYPE C,
       KTOKK(4)  TYPE C,
       NAME1(30) TYPE C,
       SORTL(10) TYPE C,
       LAND1(3)  TYPE C,
       SPRAS(2)  TYPE C,
       AKONT(6)  TYPE C,
       FDGRV(2)  TYPE C,
       WAERS(3)  TYPE C,
       END OF IT_XK01,
       BEGIN OF IT_BANK OCCURS 0,
       BANKS(3)  TYPE C,
       BANKL(10) TYPE C,
       BANKN(10) TYPE C,
       KOINH(30) TYPE C,
       LIFNR(10) TYPE C,
       END OF IT_BANK.
DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
       IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
   FILENAME                      = 'C:\VENDOR.TXT'
   FILETYPE                      = 'ASC'
TABLES
   DATA_TAB                      = IT_DUMMY.
LOOP AT IT_DUMMY.
  IF IT_DUMMY-DUMMY+0(2) = '11'.
    IT_XK01-LIFNR = IT_DUMMY-DUMMY+2(10).
    IT_XK01-BUKRS = IT_DUMMY-DUMMY+12(4).
    IT_XK01-EKORG = IT_DUMMY-DUMMY+16(4).
    IT_XK01-KTOKK = IT_DUMMY-DUMMY+20(4).
    IT_XK01-NAME1 = IT_DUMMY-DUMMY+24(30).
    IT_XK01-SORTL = IT_DUMMY-DUMMY+54(10).
    IT_XK01-LAND1 = IT_DUMMY-DUMMY+64(3).
    IT_XK01-SPRAS = IT_DUMMY-DUMMY+67(2).
    IT_XK01-AKONT = IT_DUMMY-DUMMY+69(6).
    IT_XK01-FDGRV = IT_DUMMY-DUMMY+75(2).
    IT_XK01-WAERS = IT_DUMMY-DUMMY+77(3).
    APPEND IT_XK01.
  ELSE.
    IT_BANK-BANKS = IT_DUMMY-DUMMY+2(3).
    IT_BANK-BANKL = IT_DUMMY-DUMMY+5(10).
    IT_BANK-BANKN = IT_DUMMY-DUMMY+15(10).
    IT_BANK-KOINH = IT_DUMMY-DUMMY+25(30).
    IT_BANK-LIFNR = IT_DUMMY-DUMMY+55(10).
    APPEND IT_BANK.
  ENDIF.
ENDLOOP.
LOOP AT IT_XK01.
REFRESH IT_BDCDATA.
perform bdc_dynpro      using 'SAPMF02K' '0100'.
perform bdc_field       using 'BDC_CURSOR'
                              'RF02K-REF_LIFNR'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'RF02K-LIFNR'
                              IT_XK01-LIFNR.
perform bdc_field       using 'RF02K-BUKRS'
                              IT_XK01-BUKRS.
perform bdc_field       using 'RF02K-EKORG'
                              IT_XK01-EKORG.
perform bdc_field       using 'RF02K-KTOKK'
                              IT_XK01-KTOKK.
perform bdc_dynpro      using 'SAPMF02K' '0110'.
perform bdc_field       using 'BDC_CURSOR'
                              'LFA1-TELX1'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'LFA1-NAME1'
                              IT_XK01-NAME1.
perform bdc_field       using 'LFA1-SORTL'
                              IT_XK01-SORTL.
perform bdc_field       using 'LFA1-LAND1'
                              IT_XK01-LAND1.
perform bdc_field       using 'LFA1-SPRAS'
                              IT_XK01-SPRAS.
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-KOINH(02)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=ENTR'.
DATA : FNAM(20) TYPE C,
       IDX      TYPE C.
  MOVE 1 TO IDX.
LOOP AT IT_BANK WHERE LIFNR = IT_XK01-LIFNR.
  CONCATENATE 'LFBK-BANKS(' IDX ')' INTO FNAM.
  perform bdc_field       using FNAM
                                IT_BANK-BANKS.
  CONCATENATE 'LFBK-BANKL(' IDX ')' INTO FNAM.
  perform bdc_field       using FNAM
                                IT_BANK-BANKL.
  CONCATENATE 'LFBK-BANKN(' IDX ')' INTO FNAM.
  perform bdc_field       using FNAM
                                IT_BANK-BANKN.
  CONCATENATE 'LFBK-KOINH(' IDX ')' INTO FNAM.
  perform bdc_field       using FNAM
                                IT_BANK-KOINH.
  IDX = IDX + 1.
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'
                              IT_XK01-AKONT.
perform bdc_field       using 'LFB1-FDGRV'
                              IT_XK01-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'
                              IT_XK01-WAERS.
perform bdc_dynpro      using 'SAPMF02K' '0320'.
perform bdc_field       using 'BDC_CURSOR'
                              'WYT3-PARVW(01)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=ENTR'.
perform bdc_dynpro      using 'SAPLSPO1' '0300'.
perform bdc_field       using 'BDC_OKCODE'
                              '=YES'.
CALL TRANSACTION 'XK01' USING IT_BDCDATA
                        MODE  'A'
                       UPDATE 'S'
                     MESSAGES INTO IT_BDCMSGCOLL.
ENDLOOP.
FORM BDC_DYNPRO USING PROG SCR.
  CLEAR IT_BDCDATA.
  IT_BDCDATA-PROGRAM = PROG.
  IT_BDCDATA-DYNPRO  = SCR.
  IT_BDCDATA-DYNBEGIN = 'X'.
  APPEND IT_BDCDATA.
ENDFORM.
FORM BDC_FIELD USING FNAM FVAL.
  CLEAR IT_BDCDATA.
  IT_BDCDATA-FNAM = FNAM.
  IT_BDCDATA-FVAL  = FVAL.
  APPEND IT_BDCDATA.
ENDFORM.
points plz (if this information is usefull).
Regard's
Raghunath.S

Similar Messages

  • Could you help me about c:forEach JSTL tag!

    hi everybody!
    Well I'm having a trouble when I use <jsp:forEach> tag to write the elements of object from a ArraylList:
    that is the object I store in the data froom the bank to be shown:
    package teste;
    public class Detalhes {
        private String titulo;
        private String autor;
        private Double preco;
        private int codigo;
        public Detalhes(String titulo, String autor, Double preco, int codigo) {
            this.titulo = titulo;
            this.autor = autor;
            this.preco = preco;
            this.codigo = codigo;
        public String getTitulo(){
            return titulo;
        public String getAutor(){
            return autor;
        public Double getPreco(){
            return preco;
        public int getCodigo(){
            return codigo;
    }and that is the class where I get the data from the database, store it in a object (Detalhes) and get the arrayList (list);
    package teste;
    public class Data {
        Connection con;
        Detalhes detalhes;
        ArrayList list;
        int codigo;
        public Data()throws Exception {       
            try {
                Class.forName("org.gjt.mm.mysql.Driver");
                con = DriverManager.getConnection("jdbc:mysql://127.0.0.1/Loja?user=root&password=131283");            
            } catch (Exception ex) {
                throw new Exception(" Database not found!!" +
                    ex.getMessage());
        public ArrayList getList(){
            try {
                String selectStatement = "select * from produto";
                PreparedStatement prepStmt = con.prepareStatement(selectStatement);
                ResultSet rs = prepStmt.executeQuery();
                while(rs.next()){
                     detalhes = new Detalhes(rs.getString(1), rs.getString(2), rs.getDouble(3), rs.getInt(4));          
                     list.add(detalhes);
                prepStmt.close();
                Collections.sort(list);
            }catch(Exception e){
           return list;
    }    the piece of my jsp page is that:
    <p><b><h1>Resultado:</h1></b></p><br>
    <jsp:useBean id="dataSource" class="teste.Data" scope="page" >
           <jsp:setProperty name="dataSource" property="codigo" value="${param.theCode}"/>          
    </jsp:useBean>
    <c:forEach var="book" begin="0" items="${dataSource.list}">
        <p><b><h1><font color="red">${book.titulo}<h1></b></p>        
    </c:forEach>The result is a blank jsp with no data, have you any advice?
    What's wrong? I'll greatfull!!!!

    First thing to do is to store the result of the list call to a variable so you don't call the getList method all the time:
    <c:set var="bookList" value="${datasource.list}"/>
    <c:forEach var="book" items="${bookList}">
    Check if anything is added to the List, or if the List is null:
    <c:out value=${bookList}"/>
    And assume that you are getting an error in your SQL, which you are catching and ignoring when you do:
            }catch(Exception e){
            }            Instead of doing nothing, report the error some-how. Maybe using System.err or System.out (or better yet a real log). Then look at your Server's standard output log to see what may be happening.
    If all else fails, don't catch the exceptions - throw them so you get an error in your default server logs or on the web page itself.

  • Apple Mobile Device USB Driver is listed in device manager, but has a yellow  "!".  I try reinstall,disable,enable the drivers but the problem persist. Could you help me ?

    Hi
    I connect my ipad to my pc (Windows xp SP3) and I can see my ipad and photos in my computer. When I install the itunes 11 , after installation , I can't connect the ipad again or any other apple device. The Apple Mobile Device USB Driver is listed in device manager, but has a yellow  "!".
    I have try to reinstall the drivers from c:\progamfiles\common files\apple\... but the problem persist. Could you help anyone about this ?

    You need to completely uninstall iTunes from your computer and then download and install it again.
    You do know that Microsoft has a web site, right?

  • Could you explain me about TEDS sensor section from NI9233?

    hi
          here is the TEDS sensor part's pic from NI 9233 getting started .Could you explain me about this part ? what does it support to do ?
    thank you
    roxy

    Hi Roxylat,
    TEDS is a compact set of data describing transducer characteristics. This link will give you more information on what a TEDS sensor is and how it works. Hope this helps.
    Ipshita C. 
    National Instruments
    Applications Engineer

  • Could you please explain about the  chain and end chain and module

    hi experts
    could you please explain about the  chain and end chain and module keywords?

    Hi Naresh,
    Conditions for Multiple Screen Fields
    To ensure that one or more PAI modules are only called when several screen fields meet a particular condition, you must combine the calls in the flow logic to form a processing chain. You define processing chains as follows:
    CHAIN.
    ENDCHAIN.
    All flow logic statements between CHAIN and ENDCHAIN belong to a processing chain. The fields in the various FIELD statements are combined, and can be used in shared conditions.
    CHAIN.
    FIELD: <f1>, <f 2>,...
    MODULE <mod1> ON CHAIN-INPUT|CHAIN-REQUEST.
    FIELD: <g1>, <g 2>,...
    MODULE <mod2> ON CHAIN-INPUT|CHAIN-REQUEST.
    ENDCHAIN.
    The additions ON CHAIN-INPUT and ON CHAIN-REQUEST work like the additions ON INPUT and ON REQUEST that you use for individual fields. The exception is that the module is called whenever at least one of the fields listed in a preceding FIELD statement within the chain meets the condition. So <mod1> is called when one of the fields <fi> meets the condition. <mod2> is called when one of the fields <f i> or <g i> meets the condition.
    Within a processing chain, you can combine individual FIELD statements with a MODULE statement to set a condition for a single field within the chain:
    CHAIN.
    FIELD: <f1>, <f 2>,...
    FIELD <f> MODULE <mod1> ON INPUT|REQUEST|*-INPUT
    |CHAIN-INPUT|CHAIN-REQUEST.
    MODULE <mod2> ON CHAIN-INPUT|CHAIN-REQUEST.
    ENDCHAIN.
    The module <mod1> is called when screen field <f> meets the specified condition for individual fields. <mod2> is called when one of the fields <fi> or <f> meets the condition. If you use the addition ON CHAIN-INPUT or ON CHAIN-REQUEST with FIELD <f>, the condition also applies to the entire chain and module <mod1> and <mod2> are both called.
    In cases where you apply conditions to various combinations of screen fields, it is worth setting up a separate processing chain for each combination and calling different modules from within it.
    The functions of the FIELD statement for controlling data transport also apply when you use processing chains. Within a processing chain, screen fields are not transported until the FIELD statement. Processing chains also have another function for the FIELDS statements that they contain. This is described in the section on validity checks.
    Ex:
    PROCESS AFTER INPUT.
    MODULE CANCEL AT EXIT-COMMAND.
    CHAIN.
    FIELD: INPUT1, INPUT2.
    MODULE MODULE_1 ON CHAIN-INPUT.
    FIELD INPUT3 MODULE MODULE_* ON *-INPUT.
    MODULE MODULE_2 ON CHAIN-REQUEST.
    ENDCHAIN.
    FIELD INPUT1 MODULE C1 AT CURSOR-SELECTION.
    CHAIN.
    FIELD: INPUT2, INPUT3.
    MODULE C2 AT CURSOR-SELECTION.
    ENDCHAIN.
    MODULE CURSOR AT CURSOR-SELECTION.
    Regards,
    Sunil

  • Hey sur. my name anas and am from morocco i've just got a new iMac 2011 with OSX 10.7 and i want to downgrade to 10.6 please could you help sur to solve this it

    hey sur. my name anas and am from morocco i've just got a new iMac 2011 with OSX 10.7 and i want to downgrade to 10.6 please could you help sur to solve this it

    anas guellaf wrote:
    it still make 3 bips before starting the IMAC.
    That is another problem not related to the Mac OS X version you are trying to use.
    Three beeps at startup means you have a bad ram module in the computer.  Did you install the ram or did it come from another owner this way?  The first problem you need to solve is the bad ram.
    When the iMac starts, go to the apple left side of the menu bar, About This Mac, More Info, System Report, Hardware, Memory and see what the report is on the memory...does the iMac report all memory modules that have been installed as OK or does it show bad memory?  If there is not any information, you then need to remove the memory modules and restart one at a time to see which is bad.
    On the bottom of the screen there should be a small door that you can remove with a small screw driver.  You need to lay the iMac flat, disconnect the power cord, remove that small door and remove the memory modules.  You can then put two in (if it has four) and see if it starts without the beeps.  Do that with each module so you find out which is bad.  Once you know the bad memory, you can buy a new module, just like the ones installed, so the iMac starts without the beeps.
    Next, you cannot use a DVD for another computer for your iMac unless it is from one that is identical to yours.  So, you need to talk to Apple and have them send the DVD for your particular iMac.

  • TS1453 Hi, I bought Apple tv traying to rent a movie but there problem with itunes, and there is on apple tv don't have my country. could you help me please how can I solve this problem?

    Hi, I bought Apple tv traying to rent a movie but there problem with itunes, and there is on apple tv don't have my country. could you help me please how can I solve this problem?

    Whinston,
    I live in Azerbaijan. Recently I bought apple tv in New York. When I come back to my country tried to rent movies from my country but couldn't find my country name on apple tv menu, so there is a problem I don't know how to fix it. is there have another way to take a rent movies?

  • Hi.I need help.my iphone was Stolen .how can I get back my iphone. Serial No.DX*****PMW.could you help me find my iphone.thank you very much.could you send me the ICCID number to help me find the iphone

    Hi.I need help.my iphone was Stolen .how can I get back my iphone.  Serial No.DX******PMW.could you help me find my iphone.thank you very much.could you send me the ICCID number to help me find the iphone.if you can help me.
    <Personal Information Edited by Host>
                                                                                                                                                                   Sincerely a Chinese girl really need your help

    Sorry we are all users on this User  Community No Apple Staff
    Read this .
    http://support.apple.com/kb/HT2526
    Apple do not and cannot assist in finding stolen property ,that is the responsility of your Police

  • For some reason I cannot download and install the latest version of iTunes. 11.0.2. Could you help please? Each time I try, I get a command box saying 'The feature you are trying to download is on a network resource that is unavailable. Click Ok to try ag

    For some reason I cannot download and install the latest version of iTunes. 11.0.2. Could you help please? Each time I try, I get a command box saying 'The feature you are trying to download is on a network resource that is unavailable. Click Ok to try again or enter an alternate path to a folder containing the installation package iTunes.ms in the box below.
    Please help!
    Many thanks in advance
    Ben Bentley
    West Midlands
    UK

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • I have had a update on my mini ipad and its asking for a code could you help me out please

    I have got a iPad mini a update has come though and its asking me for a code when i click update could you help me out please

    TheArtificialNerd wrote:
    I can say 100% that the AppleCare phone number only redirects to other AppleCare groups.
    ALL of them Apple corporate or Apple Authorized partners.

  • Hello. the last month i face a problem with youtube at my macbook. most videos stop playing after maybe 20 - 25 sec. the same time the time bar stops moving. could you help me solve the problem? thank you

    hello. the last month i face a problem with youtube at my macbook. most videos stop playing after maybe 20 - 25 sec. the same time the time bar stops moving. could you help me solve the problem? thank you

    hello. the last month i face a problem with youtube at my macbook. most videos stop playing after maybe 20 - 25 sec. the same time the time bar stops moving. could you help me solve the problem? thank you

  • I'm using the Internet Personal Ancestral File Family Search but I'd like to work with the old version. Could you help me how to use it? Thank you

    I was working with the old version of Family Search Personal Ancestral File through Internet but I cannot deal with the new version which uses Firefox. Could you help me to work with the old version? Thank you

    Junho wrote:
    However, in Numbers, I cannot do the same thing with same procedure..
    What should i do to get all of those 4 at the same time?
    Please let me know..Thank you!
    First, be aware that Numbers is not MS Excel, and Excel is not Numbers. Features available in one of these two applications are not necessarily available in the other.
    LINEST in Numbers works somewhat differently from what you describe. The function is well described in the "iWork Formulas and Functions Help" document, available through the Help menu.
    I'd start there, with a search for LINEST.
    Regards,
    Barry

  • When I upgraded my OS to OS X 10.9 the computer doesn't connect the LAN automatically after sleep. Could you help me?

    When I upgraded my OS to OS X 10.9 the computer doesn't connect the LAN automatically after sleep. Could you help me?

    just an update on the situation....
    the problem is solved. after trying everythng, at last i did a reset on my linksys e3200 router - and BANG!!!
    airplay works.
    hope this helps someone else.

  • I am trying to buy mitril for hobbit kom but it always gives me error i have already added my card information to store but i cant buy it.Could u help me about it ,please?

    I am trying to buy mitril for hobbit kom but it always gives me error i have already added my card information to store but i cant buy it.Could u help me about it ,please?

    Wish I could help. My wife is having the same problem.  Same computer for 2 years and all of a suddent it thinks this is her first purchase.

  • My iPod has not been working for a month now and i was hoping that you could help me.The part where you charge and sync the iPod is not connecting.There is defiantly not the lead as we use it for the iPhone and that works please could you help!

    my iPod has not been working for a month now and i was hoping that you could help me.The part where you charge and sync the iPod is not connecting.There is defiantly not the lead as we use it for the iPhone and that works please could you help!
    yours sincerly
    jackfromsurrey

    What I am saying is ..........
    The iPhone HAS to be active making calls on the UK carrier network for the carrier to identify as "theirs" and therefore eligible for the Carrier to unlock
    The way to achieve this is to use a PAYG sim making and receiving calls to establish a customer relationship  with the Carrier and then follow the Carrier's process to unlock
    With a PAYG it usually means adding a specified (by the carrier ) amount  usually £15 /£20 depending on the carrier
    This is how O2 function and according to Gemma  this is how Vodafone work

Maybe you are looking for