Records are getting duplicated on presing enter key in table control

Hi All,
I am using table control in module pool program.  The issue is records are getting duplicated on press of enter key.
I cannot use sy-ucomm enter and do some validation thing in my code. As the record should get update in int_tab(internal table). Otherwise ZSTR_TAB(table control)will be blank after pressing enter key.
I have gone through all the previous threads on this. Have implemented sol provided in one of threads. Now records are not getting duplicated but the next line is getting disabled. The code to avoid duplication is :
MODULE read_table_control INPUT.
  data tc-lines type i.
  DESCRIBE TABLE int_tab LINES tc-lines.
  IF tc-lines GE control-current_line.
    MODIFY int_tab FROM zstr_tab INDEX control-current_line.
  ELSE.
    IF gcreate_code = 'CREATE'.
      zstr_tab-zemp_num = gemp_num.
      INSERT zstr_tab INTO int_tab INDEX control-current_line.
    ENDIF.
    IF gchange_code = 'CHANGE'.
      MODIFY int_tab FROM zstr_tab INDEX control-current_line.
    ENDIF.
  ENDIF.
ENDMODULE.   
This module is in PAI. Now how to make the lines in control input enabled??
Any other sol for avoiding duplicate records on pressing enter key?
Thanks,
Seema

Hi,
Have you written any code in when Others of case...Endcase  ?
If Yes then checkout if there is anything wrong over there, debug and check.
If not then write delete adgecent duplicates from Int_tab comparing key fields.
Also check in PBO, if you have written any query that selects data from particular table and appending the internal table irrespective of entry is already exist. So you should write select query in the if...Endif block as below,
If int_tab[] is not initial.
select * from ZSTR_TAB
into table int_tab
where .........
endif.
If above is not the case then debug and check where exactly entries are getting duplicated so that I can have idea what exactly is happening.
Regards,
Umang Mehta

Similar Messages

  • When we post Inbound Invoice IDocs, we are getting an error message "Enter a tax jurisdiction code".

    Hi Experts,
    When we post Inbound Invoice IDocs, we are getting an error message "Enter a tax jurisdiction code". As checked, we have configured OBCD and OBCA for the vendor and we are passing the Tax Jurisdiction code in E1EDP04 SAL segment. Can anybody give us some idea to resolve this issue.
    Regards,
    Sameek

    Hi Sameek,
    Please refer the below link. Hope it helps.
    http://scn.sap.com/thread/1435286
    Regards,
    Chandan.

  • Can Anyone help with syncing my contacts are getting duplicated and there is a file from my computer and they are not the same it is driving me carazy can anyone help?

    Can Anyone help with syncing my contacts are getting duplicated and there is a file from my computer and they are not the same it is driving me carazy can anyone help?

    Are you in DSL? Do you know if your modem is bridged?
    "Sometimes your knight in shining armor is just a retard in tin foil.."-ARCHANGEL_06

  • Records are getting overwritten in the internal table using Select query.

    Hi All,
    I have following query :
    Loop at i_salesplant.
           select maramatnr mvkeVKORG mvkeVTWEG maraZZCOEAFE maraZZCOEAFEUOM mvkeZZALLPOL
           into corresponding fields of table i_zallocpol from mara inner join mvke on
           mvkematnr = maramatnr
           where MARA~zzobjtype = I_ZZOBJTYPE
             and MVKE~VKORG = i_salesplant-vkorg
             and MVKE~VTWEG = T_VTWEG.
         ENDLOOP.
    My Que : For example lets say first it selects all the records for Sales Org 1000. Next when you select the records for the Sales Org 2000 the earlier records are getting overwritten.
    Please let me know your valuable inputs.
    Thanks,
    Chandravadan

    Hi,
    Thanks alot for the reply.
    I changed query using appending as follows :
          Loop at i_salesplant.
            select maramatnr mvkeVKORG mvkeVTWEG maraZZCOEAFE maraZZCOEAFEUOM mvkeZZALLPOL
             into appending corresponding fields of table i_zallocpol from mara inner join mvke on
            mvkematnr = maramatnr
            where MARA~zzobjtype = I_ZZOBJTYPE
              and MVKE~VKORG = i_salesplant-vkorg
              and MVKE~VTWEG = T_VTWEG.
          ENDLOOp.
    But it is giving error saying " Field "APPENDING" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "     
    Please suggest.
    Thanks,
    Chandravadan

  • In EIS at data loading Few Records are getting rejected

    Hello,
    I m loading the data in Essbase through EIS.I am using user defined SQL for data loading.
    In log this this is showing that 22000 records are loaded and 564 records rejected.
    Can any Expert let me know why these records are getting rejected.
    Thx
    Shivendra

    If you look on your EIS server, under hyperion\eis there is a logfiles directory. Under it are folders for every load. In these folders are the error files. If you look at the file, the first column shows you the member that got rejected. You can then look to see if it is in your outline. My guess is your custom sql is bringing back rows that are not in the cube

  • Differential Invoice - Product costs are getting duplicated

    Hi,
    I set up differential invoice process for my client. Everything is perfect except an issue on PA document where product costs and other costs are getting duplicated (hence double cost). On differential invoice, in 'Diff. Condition' tab, these costs doesnot appear for difference condition types. Yet, they are again reflected in PA document when the Differential invoice is posted.
    Can you please share if anybody has some info how the issue can be handled.
    Points will be given for approriate suggestions and answers
    Regards,
    Praveen

    Hi Stefan,
    I think creating A/P invoice with posting date=03.01.2015 would be wrong.
    Instead you may create the same with posting date=07.01.2015 and document date=03.01.2015.
    Thank You,
    JO

  • Why does firefox change fonts when I am trying to download or get help, click and enter keys are disabled why?

    I recently did a clean install of windows7 after returning from Europe and installed Mozilla firefox being fed up with microsoft and google .
    Fire fox seemed to be working ok but 7 out of 10 downloads were failing, and it seemed that every ebsite entered in the address bar turned into a question.
    There was no save shortcut, or paste buttons just a set of to me useless buttons first html, last html, then when I tried to contact help all of a sudden I got a "install fonts" notice and the enter key stopped working,
    and any action key was also disabled without advising me.
    It appears that either Mozilla or someone doesn't want me using firefox.
    I also noticed that the clean disk and other utilities didn't work and that the temp and temp internet folders were empty when I tried to open them but they actually had some 25 megabytes in them when queried as administrator. I also noticed a quick flash reference to Jscript=void,
    and my 32 bit computer suddenly started up as a 64 bit Turion.
    scan and system clean said machine was clean.
    Whats going on here?
    I am not on my machine, I can't contact you on it because the enter button has been disabled by font change.
    Maybe this robot needs some help too!

    Can you undo the system restore?
    Note that using System Restore can cause your Firefox installation to get corrupted because not all files are restored (only files in a white-list), so be cautious with using System Restore.
    *You may lose data in the Firefox profile folder like .js and .ini files pr profiles.ini can be affected.
    *You may need to (re)install software that was affected.
    In case you need to reinstall Firefox then you need to delete the Firefox program folder before reinstalling to make sure that all files get replaced.
    A possible cause is security software (firewall,anti-virus) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox and the plugin-container from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
    See:
    *https://support.mozilla.org/kb/Server+not+found
    *https://support.mozilla.org/kb/Firewalls

  • Records randomly get duplicated when added or edited.

    For some reason when a certain user is adding a record, it duplicates it three times. This also happens randomly when they edit the record.
    Some get duplicated while some don't. There is no workflows or event handlers.
    Why is that happening?

    anyone?

  • Data are getting cashed for Deatils in master detail table .

    Hi All,
    I have created an entity association between department and manager.
    There is a method in am to create the record in Department.
    Department creation method is calling the Manager creation method using association accessor which is defined in the DepartmentEO.
    At the end of successful exection of this method it is creating an record in Department and Manager.
    If i am calling department creation method second time without saving the record which was created earlier then under one department its showing two managers.
    I mean Its showing the manager records what was created in previous steps as well as created with current department.
    If i keep repeating the process no of magers are keep increasing .
    Ideally it should show only one manager but records of managers are getting cashed.
    Please provide me some pointed how to get rid of this issue.
    Thanks,
    Arun.

    Hi Timo,
    Take this scenioro with following usecase .
    Suppose there is a mster detail relationship between Department and mager Foreign key as departmentid.
    If i create a new row in department with DeptId=10 then one record for detail Manger will be created with deptId=10 and say manger id =10.
    without saving this record if i am invoking create method for department then one record for department is created with deptid=11 and detail mager table showing two records with deptid=10 and deptid=11.
    If i repeat the same step third time mager is showing 3 record with dept id 10,11 and 12.
    Since there is Association between Depat and Manger with deptId.
    So for Deptid=12 it should show only that manger having deptid=12 but its showing all the manger created in previous steps.
    Thanks,
    Arun.

  • How to get the Number of lines displayed in  table control in bdc

    Hi,
    when we write a  bdc for a standard transaction, if we encounter a table control, we fill the values for each record like field(01), and the second record field(02) .......and so on..
    if only 3 records are displayed in the screen and if we have 5 records to be filled in the table control, how to write the logic for that?
    how to track of how many lines are getting displayed in the table control .. again it depends on the screen resolution i think..
    useful answers will be rewarded
    shekhar

    Hi,
    Here is the solution code for this :-
    data for controlling paging on screen 0102 
    DATA: W_MAXLINES(2) TYPE N, 
    W_NEXT_LINE(3) TYPE N, 
    W_PAGE(1), "y = page forward, n otherwise 
    W_SCRLEN(2) TYPE I, 
    W_SCRLINE(2) TYPE I. 
    DATA: BEGIN OF W_HDR. 
    INCLUDE STRUCTURE D020S. 
    DATA: END OF W_HDR. 
    DATA: BEGIN OF W_FLD OCCURS 100. 
    INCLUDE STRUCTURE D021S. 
    DATA: END OF W_FLD. 
    DATA: BEGIN OF W_LOG OCCURS 20. 
    INCLUDE STRUCTURE D022S. 
    DATA: END OF W_LOG. 
    DATA: BEGIN OF W_MC OCCURS 20. 
    INCLUDE STRUCTURE D023S. 
    DATA: END OF W_MC. 
    DATA: BEGIN OF W_DYNPRONAME, 
    PROGRAM(8) VALUE 'SAPMM60X', 
    DYNPRO(4) VALUE '0102', 
    END OF W_DYNPRONAME. 
    FORM GET_MAX_LINES. 
    set w_maxlines to the number of var-loop occurrences on the screen so 
    that we know when to page forward on screen 0102 
    also initialise w_next_line to zero for GET_NEXT_LINE 
    this subroutine caters for all cases - including screens without loops 
    CLEAR: W_MAXLINES, 
    W_NEXT_LINE. 
    IMPORT DYNPRO W_HDR 
    W_FLD 
    W_LOG 
    W_MC 
    ID W_DYNPRONAME. 
    LOOP AT W_FLD WHERE LTYP EQ 'L'. 
    MOVE W_FLD-LINE TO W_SCRLINE. "first var-loop line 
    MOVE W_FLD-LBLK TO W_SCRLEN. "depth of loop block 
    EXIT. 
    ENDLOOP. 
    IF SY-SUBRC EQ 0 
    AND W_SCRLEN NE 0. 
    sy-srows = total no of lines on screen 
    w_scrline = actual first line of loop so that 
    w_scrline - 1 = number of heading lines (before loop) 
    4 = no of lines at top of screen - command line, pushbuttons, 2 ulines 
    3 = no of lines after loop - uline & Page count 
    w_scrlen = no of lines in loop block 
    w_maxlines = sy-srows - ( wscrline - 1 ) - 4 - 3 
    and then 1 less but not sure why! 
    W_MAXLINES = SY-SROWS - W_SCRLINE - 1 - 4 - 3. 
    W_MAXLINES = W_MAXLINES - 1.
    W_MAXLINES = W_MAXLINES DIV W_SCRLEN. 
    ELSE. 
    MOVE 99 TO W_MAXLINES. "this required if no screen loop 
    ENDIF. 
    ENDFORM. 
    FORM GET_NEXT_LINE. 
    set w_page if page forward is required 
    W_NEXT_LINE = W_NEXT_LINE + 1. 
    IF W_NEXT_LINE GT W_MAXLINES. 
    W_NEXT_LINE = 1. 
    W_PAGE = 'Y'. 
    ELSE. 
    W_PAGE = 'N'. 
    ENDIF. 
    ENDFORM. 
    Hope it helps.
    reward if helpful.
    Regards,
    Sipra

  • BDC: How to enter data in Table control (With wizard) using scrolling?

    Using BDC, I am trying to enter the data in the table control (with wizard).
    I want to know what is the specific command to scroll down in table control (With Wizard).
    While recording I am getting these steps:
    SAPLCKBASCR1     0202     X
                   BDC_CURSOR     CKI94B-MATNR
                   BDC_OKCODE     /00
    When I use above command and run BDC, it does not scroll.
    Kindly let me know where am I going wrong.
    Thanks in advance for your kind help.
    Ashish

    The transaction is CK94
    and the BDC recording is :
              T     CK94
    SAPLCKBASCR1     0200     X
                   BDC_CURSOR     CKI94A-BDATJ
                   BDC_OKCODE     =ENTR
                   CKI94A-MATNR     10000789
                   CKI94A-WERKS     VA79
                   CKI94A-BDATJ     2005
                   CKI94A-MGTYP     ZDU01
    SAPLCKBASCR1     0202     X
                   BDC_CURSOR     CKI94B-MISCH_VERH(02)
                   BDC_OKCODE     /00
                   CKI94B-MIXCOST_PC(01)
                   CKI94B-MIXCOST_PC(02)     X
                   CKI94B-MISCH_VERH(01)
                   CKI94B-MISCH_VERH(02)                    40
    SAPLCKBASCR1     0202     X
                   BDC_CURSOR     CKI94B-MATNR
                   BDC_OKCODE     /00
    SAPLCKBASCR1     0202     X
                   BDC_CURSOR     CKI94B-MATNR
                   BDC_OKCODE     /00
    SAPLCKBASCR1     0202     X
                   BDC_CURSOR     CKI94B-MISCH_VERH(07)
                   BDC_OKCODE     /00
                   CKI94B-MIXCOST_PC(07)
                   CKI94B-MISCH_VERH(07)                    60
    SAPLCKBASCR1     0202     X
                   BDC_CURSOR     CKI94B-MATNR
                   BDC_OKCODE     /00
    SAPLCKBASCR1     0202     X
                   BDC_CURSOR     CKI94B-MATNR
                   BDC_OKCODE     /00
    SAPLCKBASCR1     0202     X
                   BDC_CURSOR     CKI94B-MATNR
                   BDC_OKCODE     =STOR
    BDC_OKCODE  '/00' is recorded when I scroll down in the table control.
    Thanks for your kind  concern.
    Ashish

  • Get the count of rows in a table control

    Hi Experts,
      How do I get the count of the rows in a table control during run time.
    I am developing a BDC in which I have to check all entries in a table control.
    My requirement is to get the total number of rows in a table control dynamically.
    Thanks
    Kumar

    Hi,
    Use a variable when u r passing the records from the internal table to the screen fields
    and display the same.
    I think this idea may help u.
    And pls explain me ur requirement clearly.
    Refer to the following link this may help u.
    http://sapabapnotes.blogspot.com/2008/03/working-with-ecatt-extended-computer.html
    Reward if helpful.
    Jagadish

  • Hitting enter key or choosing "render work area" no rendering occurs

    I recently migratated all my pictures and projects from one computer to another, new one.
    Working with PE12.
    I'm trying to render a project that I have created, but when I hit the enter key, or even select "Render Work Area" from the Timeline menu, instead of rendering, it plays back the project.
    Anyone knows what is going on?! please?

    ATR,
    I'm very glad you jumped back in.  So, thank you.
    I've done everything you have suggested, and I'm getting the same issue.  However, there is one observation that could help you further narrow it down.
    I'm going to respond to all your suggestions, point-by-point below in order to help you - help me- the best I can
    1. I am assuming that you are working in the Expert workspace of Premiere Elements 12. If so, the go to the Quick workspace and try each of the following [ Correct]
    a. Hit the Render button above the Filmstrip there  [done]
    b. Go to Timeline Menu/click on Render Work Area  [done]
    c. Press Enter key of the computer main keyboard  [done]
    Did the rendering dialog come up at any time? [YES, (and this has been happening all along), when I try to render, in any of the 3 ways above, I do see a window pop up for a millisecond and then it disappears.  I hightly suspect that it is the "render" window that is attempting to open, but just goes away for some reason.
    When you went back to the Expert workspace, was there now a green line instead of an orange line over the TImeline content spanned by the gray tabs of the Work Area Bar? [no, still orange coolor]
    2. Make a copy of the problem project (File Menu/Save A Copy and renaming it). Open the copy and determine if you can render the Expert workspace Timeline content of that of the Quick workspace Filmstrip.
    3. Have you cleared out the preview files in the Adobe Premiere Elements Previews FIle Folder for this problem project? [YES, manually went inside the Adobe Premiere E Previews File and deleted everything] Double check on that. How much free space is there at the location where you have this Adobe Premiere Elements Previews Files Folder? [Plenty of space is left ~ 230GB] Next, go to Edit Menu/Preferences/Media and its Media Cache Datebase and hit the Clean button there to get rid of conformed video files.  [Hit the clean button, twice]
    4. Next, delete the Premiere Elements 12's settings file named Adobe Premiere Elements Prefs. The route to it in Windows 7, 8, or 8.1 64 bit is
    Local Disk C
    Users
    Owner
    AppData
    Roaming
    Adobe
    Premiere Elements
    12.0
    and in the 12.0 Folder is the Adobe Premiere Elements Prefs file that you delete. If that does not work, delete the whole 12.0 Folder in which the Adobe Premiere Elements Prefs file exists. Be sure to be working with Folder Option Show Hidden Files, Folders, and Drives active so that you can see the path cited.  [Wend all the way inside the 12.0 folder, but did not see any file called Adobe Premiere Elements Prefs, so deleted the whole 12.0 folder instead as you suggested]
    Just starting my day. We will be watching for further developments. I will be thinking about this some more.
    Thanks.
    ATR
    Add On...Leaving the whys behind can lead to more of the same. So, unless you are in a time crunch to get this project out, let us not give up just yet [ I am not in any rush to get this out, and I not giving up if you aren't .   I can tell you like to solve puzzles and I thank you for it.]

  • All Records are not getting displayed in adobe form from table

    Hi All,
    I Want to display records from table  to Adobe Form Table .
    But While Displaying only some of the records are getting displayed How can i display all the records in next pages of adobe form.
    Its Urgent PLZ Reploy soon.
    Thanks & Regards
       Kiran

    dear friend,
    please check the adobe format, must be match to
    the data base format.
    pls go to the setting and adjust the data base table.
    if nothing is going click the radio button
    html format.
    that will work.
    rewards are expecting.
    vivek

  • Problem with disabling "ENTER" key in JTextArea

    Hi,
    I have the following codes to disable the 'ENTER' key in the JTextArea,
    but it does not work. Does anyone know why?
    KeyStroke enterKey = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0);
    textarea.getKeymap().removeKeyStrokeBinding(enterKey);
    textarea.addKeyListener(new KeyAdapter() {
    public void keyTyped(KeyEvent e) {
    // do something
    Thanks,
    Pin

    I don't know how you mean "disable", but if you are going to ignore the Enter key, then add a KeyListener to the text area, and in the key pressed method, consume() the key event if the VK_ENTER was pressed. That's all, and you don't have to deal with that key binding thingy.
    The other two event types (typed and released) might be ignored, the enter is processed during key press (as it is now, with the default settings).
    The reason is that processing the Enter key (and other such internally understood keys) is done by the peer, but the peer won't get the key event if it's already consumed.
    FYI: Were it a JTextField, consuming the Enter key presses would mean that the field won't fire action events any more. Since text area does not fire action events, therefore it's a non issue.
    FYI2: Consuming the event only blocks the event to be sent to the peer, all the other listeners still get it.

Maybe you are looking for

  • Error when Compare Size of P-, Q- with X- and Y- Tables in RSRV

    Hi Expert, I am using RSRV and trying to compare the content of P table to X table. But it seems that the X table was deleted while comparing it to P. And while doing it, I experience a "runtime error". Can I recover the X table and how? Janet

  • Process & tutorial to move rdata from ECC R/3 to SAP BW system

    I am looking for the process and tutorial in details how to move data from SAP ECC R/3 system to SAP BW system? Could somebody have any links or resources related to this task? I am searching in the SDN for a while but no luck. Thanks in advanced!

  • Workflow for purchase requisition release strategy

    Hi all, I need an urgent help on Workflow for Purchase Requisition Release. The requirement is that when a purchase requisition with a given combination (Purchasing Group, Material Group and Account Assignment Category) is created and saved, it shoul

  • Iphone shutting off while editing photo

    I took a picture of something, and when i went on my photos to rotate it my iphone keeps shutting off then turning back on. Ive tried shutting it off restarting all my apps I dony know why it keeps happening.

  • 2007 Imacs that I want to use for duel screen set up.

    Hello. I have two mid-2007 imacs I want to use as an extended desktop. Given the both have mini DVIs.I want to know if it's possible and what I need to buy? Thank You.