Why duplicates in my_SELECT statement-Small issue in SQL

Hi Experts,
I hv follwoing SQL, but, in some cases, am getting duplicates......any clue? is it bcoz, am using BSIS first and then BKPF(Header) as second?
SELECT s~hkont
         s~belnr
         s~bschl
         s~shkzg
         s~dmbtr
         s~kostl
         s~prctr
         k~bukrs
         k~gjahr
         k~monat
         k~belnr
         m~saknr
         m~xbilk
         m~gvtyp
    INTO TABLE t_main
     FROM bsis AS s
      INNER JOIN bkpf AS k ON kbukrs = sbukrs AND
                            kbelnr = sbelnr AND
                            kgjahr = sgjahr
      INNER JOIN ska1 AS m ON msaknr = shkont
         WHERE s~hkont   IN s_hkont AND
               s~kostl   IN s_kostl AND
               s~prctr   IN s_prctr AND
               k~bukrs   IN s_bukrs AND
               k~gjahr   IN s_gjahr AND
               k~monat   IN s_monat.

thanq.
After implememnting the Alvaro Tejada suggestion i.e. Using the DISTINCT clause, I moved the prog. into TEST/QA systems.
So, pls. let me know that,
1 - Is that suggestion(DISTINCT) wuld NOT work in all cases, like, some times may yield incorrect data?
2 - If so, will implement ur suggestion, i.e. By using T001 table, will JOIN the SKA1 table.......but, here making one more transport is tedious with a bit paper work.......so, if u say, its must, will create a new transport!
Its friednly asking, not criticing
thanq

Similar Messages

  • Just three small issue...

    Hello All,
    Well after a few months of delay (First me damaging the bois chip then me burning out the motherboard) I finally got my computer up and running. I do have some small issues that I hope someone may be able to help me with.
    1.   When I shut down the computer it restarts itself. The only way I can shut it down is to hit the power button in the back of the case.
    2.   When I do attempt to shut down the computer and it restart on it’s own I get no video. It also gives three long beeps. Now please understand that the video card works fine when the computer is on or when I do a manual restart. This only happens when I try to shut down the computer.
    3.   When I try to use the RAID by plugging up two hard drives the computer well get stuck at the screen where it read the array configuration.  The configuration can be correct with the RAID set for stripe two (WD 13GB and a WD 7GB hard drive) Western Digital hard drive’s.
    Any type of help would be great. Here are the specs to my computer.
    KT3 Ultra2-R
    AMD 2100+ XP
    512MD DDRAM
    WD 20GB
    Goldstar 40x12x40
    Acer 52x CD-Rom
    Jaton Geforce 2 MX/MX 400

    wd also have funny jumperless master with no slave setting
    normal master only if it has a slave
    why raid none matching drives
    a stripe will only be 2x smallest and a mirror size of the smallest

  • Small issue in Business Rules

    Dear All
    i have a Business Rule callingin BPEL Process based on below XSD file
    <?xml version="1.0" encoding="windows-1256" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.bank.com/bankbpel"
    targetNamespace="http://www.bank.com/bankbpel"
    elementFormDefault="qualified">
    <xsd:complexType name="Client-BR-Input-Type">
    <xsd:sequence>
    <xsd:element name="Status" type="xsd:string"/>
    <xsd:element name="is-VIP" type="xsd:string"/>
    <xsd:element name="Start-Date" type="xsd:date"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="Degree" type="Degree-Type"/>
    <xsd:element name="Client-BR-Input" type="Client-BR-Input-Type"/>
    <xsd:complexType name="Degree-Type">
    <xsd:sequence>
    <xsd:element name="Degree" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    after finishing my rules and decisions, i dropped Business Rule inside BPEL and start to copy values in input parameters of Business Rule, but i face *"Exception - Problem Building Schema !" !!*
    and sure my problem now in XSD file, please advise why and how to avoid ? ..

    Dear All
    Resolved, it is a small issue as i expected, i forget to update in/out variables to map for elements in XSD file like below ..
    <variables>
    <variable name="dsIn"
    element="client:Client-BR-Input"/>
    <variable name="dsOut"
    element="client:Degree"/>
    </variables>
    thanks

  • New sessions every time an sql statement is issued

    Hi, I have a problem with using oraoledb (v 10.1.0) with VB6 accessing an Oracle database 9i (v 9.2.0.6). Every time an sql statement is issued in the client side, a new session is started in the server side (seen in Enterprise Manager). I don´'t know why. Is an oraoledb parameter or a database parameter? How can I avoid this? The big problem behind this behaviour is controling row locking. If I issue a "select field from table where conditions for update nowait(or wait n)", this creates a lock that belongs to a session. If a few sentences after I issue an "update the-same-table set the-same-field = value where the-same-condition" as this one creates a new session, an ORA-00054 is raised telling the row(s) is blocked.
    any idea?
    thanks

    I'm a DBA and I encountered the same problem with a system developed for our company. We reported that to the company that developed the application and they sey then close the conections, but they remain in the database.
    Could anyone find a solution for this? I believe is a problem in the VB code, but I do not know anything from VB.
    thanks,
    Lisandro

  • Help on small issues after WinXP downgrade from Vista

    Lenovo 3000 v200
    I recently downgraded from Vista to WinXP Professional, and I must say I'm much happier with XP.
    Some issues on the install: although I downloaded all drivers from the Lenovo site, the install didn't work from my usb floppy drive.
    It recognized the floppy on the F6 portion of the install, but then later it kept asking for the disk to be inserted (it was already in the drive).  Workaround was to install by changing to "compatibility mode" in the BIOS, and after install, loading all drivers and changing BIOS back to SATA.
    All features of the laptop appear to work perfectly; camera, fingerprint reader, wifi, etc.
    HOWEVER: in the device manager, there are 3 yellow exclamation points in the "Other Devices" section, and each of them is labeled "Base System Device."   Does anyone know what these are?  Why are they not recognized as specific devices?  LenovoCare doesn't recognize them either, and I have no idea what drivers to attempt to install for mystery devices.
    Also, "Modem Device on High Definition Audio Bus" won't install.  I have the current driver, and I've tried updating from LenovoCare, but no luck.  As I don't use a modem, this seems irrelevant, but I'd like to install it just the same if possible.
    Finally, the LenovoCare recognized a need to install a "Hotkey" update, and it claims to successfully install, but everytime I run LenovoCare it says I need it again.  Any comments or observations?
    Again, the computer works just fine even with these small issues.  In fact, it is better than fine; it is a joy to use and a real speed demon with XP instead of Vista.  So I'm not trying to do any rocket science or potentially screw up a very nice situation, but I am trying to iron out these small nuisances.
    Thanks to all of you who consider my trivial problems.  I really appreciate having knowledgable individuals like yourselves help out a very modestly skilled, but reasonably ambitious user.
    Cheers,
    Fred

    Hello Fred,
    I created a blog on this forum called.... "I Explain How To Downgrade From Vista To XP Successfully On A 3000 N100 Laptop" Locate this message and read through it. Try the "Auto Detect This System" I Talk about. It will load the latest drivers and the latest...BIOS..... for your particular model if you have not already upgraded it. You did not mention if you had upgraded your BIOS...... if your running an  "OLD" version.... THIS..... could be your problem.
    Regards

  • Why Duplicate A Master?

    I can't seem to come up with a good reason for duplicating a Master.
    Why duplicate a Master, as opposed to creating a new Version form the Master?

    Why duplicate a Master, as opposed to creating a new Version form the Master?
    You are right, usually it is wasteful, to have several master image files for different versions of the same image.
    But in some situations it makes sense to me to create a second master:
    If you edit using an external editor, and Aperture cannot reproduce these edits internally,
    If you want to finalize your edits,  because you need to ensure that these edits never, ever will get changed (for legal or scientific reasons),
    If you need the same image in two different projects and you can't achieve what you want to do by using different albums (sometimes I need to do this, if I want to export a part of the Library),
    If you want to create a new, smaller master from a cropped image version.
    And I'd really like to hear different opinions!
    Regards
    Léonie

  • TS1398 Got the dreaded no wifi on my wife's iPhone 4S. Wifi greyed out and no luck with the reset network instructions. Why isn't Apple addressing this issue? We are a family of Apple product users, 2 ipads, an ipad mini, 4 iPhones but one isn't working!

    Got the dreaded no wifi on my wife's iPhone 4S. Wifi greyed out and no luck with the reset network instructions. Why isn't Apple addressing this issue? We are a family of Apple product users, 2 ipads, an ipad mini, 4 iPhones but one isn't working! Issue began whenwe upgraded the operating system.....
    Come on Apple.....get this issue sorted out!

    Just out of warranty. This is a software issue. everything was ok until the software update. Apple just need to sort it out.

  • My daughter has downloaded free games from the App Store and I have been charged in excess of £200 and I don't know why has anyone had the same issue and if so how did you get your money back

    My daughter has downloaded free games from the App Store and I have been charged in excess of £200 and I don't know why has anyone had the same issue and if so how did you get your money back

    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact
    To help avoid future transgressions set the Restrictions for In-App Purchases...
    Settings > General > Restrictions
    Understanding Restrictions  >  http://support.apple.com/kb/HT4213

  • Why is the text so small in the log in screen?

    I am visually-impaired.  Why is the text so small in the log in screen?

    You can try to set the display resolution to something like 1024x768 (from the "Best for display") in the "Displays" System Preferences - this will "enlarge" things on the login screen as well as after, (the trick about using the Option key to zoom does not work on the login screen), and then after logging in, reset the Display resolution back to "Best for display".
    To use the "Option" key for zooming -- set in the "Accessibility" System Preference Zoom options "Use scroll gesture with modifier keys to zoom" to Option.
    Not sure, but you might also be able to affect this by changing the default system font. If the above doesn't help, say so and will do a bit more research to see how to change this and see if it also applies to the login screen
    Good luck...

  • Why is the version file smaller than the original file, although I didn't make changes in the file? And why is the keywords don't exporting with original files?

    Hi! Why is the version file smaller than the original file, although I didn't make changes in the file? And why is the keywords don't exporting with original files?

    Wild guess: you're using the the wrong export settings. You'll need to tell us more before we can help you - like the export settings you're usng, the size and format of the originals etc.

  • Why we use Tables statement in case of using SELECT-OPTIONS:

    hi all,
    Why we use Tables statement in case of using the following coding in an ABAP program ...
    tables: vbak.
    SELECT-OPTIONS: s1 for vbak-vbeln.
    here if we dont provide the tables statement why it does not work ????
    pls answwer ....???

    Hi
    This statement is not allowed in classes and declares a data object table_wa as a table work area whose data type is adopted from the identically named structured data type table_wa from the ABAP Dictionary. table_wa must be defined as a flat structure in the ABAP Dictionary. You can specify database tables or Views for table_wa.
    Work table areas declared with TABLES are interface work areas and should only be declared in the global declaration section of a program for the following purpose:
    reward if usefull
    The statement TABLES is required for exchanging data between screen fields that were defined in a program screen when transferring from the ABAP Dictionary and the ABAP program. For the screen event PBO, the content of the table work area is transferred to identically named screen fields; for PAI, the system adopts the data from identically named screen fields.
    In executable programs, flat table work areas can be used for adopting data that were provided for the event GET table_wa from a linked logical database. TABLES is synonymous with the statement NODES for this purpose.
    Work table areas declared with TABLES behave like the data declared with the addition COMMON PART, meaning the data are used by the programs of a program group.
    Table work areas declared with TABLES can be declared in subroutines and
    function modules. However, this is not recommended. A table work area declared in a procedure is not local but belongs to the context of a framework program. The table work area can be viewed starting from the declaration in the framework program and lives as long as the framework program. In contrast to normal program-global data, the content of the table work areas declared in subroutines and function modules is stored temporarily when these subroutines and function modules are called. Value assignments that were made during runtime of the procedure are preserved until the procedure is completed. When exiting the procedure, the table work areas are filled with the contents that they contained when the procedure was called. Table work areas declared in procedures behave like global data to which the statement LOCAL is applied in the procedure.
    The form TABLES * is obsolete.

  • Why iCal cancel of event edits issue is still not fixed after over 2 years?

    Why iCal "cancel of event edits" issue is still not fixed after over 2 years?
    I have been in the software engineering industry for over 14 years, but I have never seen a large corporation being so slow at addressing major issues like these.
    What would it take for Apple to start working on this issue?

    Yup. This is fully ridiculous that you can't cancel your updates once you start. I love the tool but this is on pretty significant issue.
    Sometimes I accidentally move a mtg or make some edit while viewing and you can't back you!!
    If you feel the same way, you should post a note here:
    http://www.apple.com/feedback/ical.html
    Message was edited by: SteveMc10123

  • Ipad mini working sluggish after installing ios7  why apple is not fixing this issue

    Ipad mini working sluggish after installing ios7  why apple is not fixing this issue
    Now it doesn't feels like i m using an apple device .
    idevices should be flawless thats what it was

    (A) Reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.
    (B) Reset all settings
    Settings>General>Reset>Reset all settings
    Note: Data will not be affected but settings will be reset.

  • Why the flashback log'size smaller than the archived log ?

    hi, all . why the flashback log'size smaller than the archived log ?

    Lonion wrote:
    hi, all . why the flashback log'size smaller than the archived log ?Both are different.
    Flash logs size depends on parameter DB_FLASHBACK_RETENTION_TARGET , how much you want to keep.
    Archive log files is dumped file of Online redo log files, It can be either size of Online redo log file size or less depending on online redo size when switch occurred.
    Some more information:-
    Flashback log files can be created only under the Flash Recovery Area (that must be configured before enabling the Flashback Database functionality). RVWR creates flashback log files into a directory named “FLASHBACK” under FRA. The size of every generated flashback log file is again under Oracle’s control. According to current Oracle environment – during normal database activity flashback log files have size of 8200192 bytes. It is very close value to the current redo log buffer size. The size of a generated flashback log file can differs during shutdown and startup database activities. Flashback log file sizes can differ during high intensive write activity as well.
    Source:- http://dba-blog.blogspot.in/2006/05/flashback-database-feature.html
    Edited by: CKPT on Jun 14, 2012 7:34 PM

  • Why are the fonts so small since I upgraded? I have difficulty reading folder names even when I wear my reading glasses.

    Why are the fonts so small since I upgraded? I have difficulty reading folder names even when I wear my reading glasses.

    Kirby:
    . What version of OS X?
    10.6.8 - latest Snow Leopard.
    . How are you determining the size of the Vault?
    Using Finder: "Size 5.8 MB on disk".
    . What exactly did you do that you describe as "I decided to set up a Vault to back up to the Time Machine external hard drive.".  In general, Time Machine should be on a drive dedicated to it (that is, with nothing else on it).
    Oops, right: I meant Time Capsule. Time Machine is backing up to the Time Capsule, but I thought I could also use the Time Capsule as an external hard drive as well as a target for Time Machine. So, this is a non-no?
    . How many images show up when you select "Photos" from near the top of the Library tab of the Inspector and filter using the Filter Rule "File Status" with the argument "Referenced"?
    1. Thanks for getting me to learn Aperture's "filtering" (Command-F). Cool.
    2. No images. Aha. So, do this mean all the masters are in the iPhoto library?
    But, using Finder:
    iPhoto Library: 18.2 GB 8,014 items
    Aperture Library.aplibrary: 20.6 GB 7,945 which would be right: I did some deleting after importing from iPhoto
    Aperture Vault: 5.8 MB

Maybe you are looking for