01-08-2007 12:37 AM
Hi all,
I have to make a small report but customer does not give me a developer key nor SE38 access to write a short report.
What I need:
I have migrated 1,5 Mio Business Partner (are in table BUT000) and 1.499.970 contracts of these BUPA (are in table FKKVKP). The problem is that for any reason 30 BUPA do not have contract and I have to find out who are theses 30 BUPA.
I tried it with QUICK VIEWER: Declared both tables and made a key relation between BUT000-PARTNER and FKKVKP-GPART. Then it shows me the all records that are in both tables. But actually that does not help me, since I want to see those 30 that are NOT in FKKVKP.
So I was thinking run this report in the QUICK VIEWER and then take the file with all theses Partners and then go into SE16 of BUT000 and select in the selection screen of parameter PARTNER all <> those in the file. But, since we are talking about 1,5 Mio, I cannot download the file from QUICK VIEWER:
I need a good idea to find this f____g 30 Business Partner who have no contract.
Who has an idea?
t
01-08-2007 12:50 AM
01-08-2007 12:50 AM
01-08-2007 1:10 AM
Hi Rich,
Thanks for the proposal. Sounds good.
I'll try it tomorrow morning.
If I require support to create the query I'll let you know.
Thanks and good night.
thomas
01-08-2007 9:47 PM
Hi Rich and other friends,
i was looking into the QUICK VIEWER as you told me and I thought I had found the solution.
In the graphically displayed JOIN between the both tables I put the mouse on the link between BUT000-PARTNER and FKKVKP-GPART and with the right button I selected OUTER JOIN.
then I run the program again (I saw it was generated new), however the result is the join of both tables and it does not show me the 30 Business Partners, who do not have contract.
What did I wrong?
Thomas
01-08-2007 9:53 PM
01-08-2007 9:56 PM
The OUTTER JOIN, defines a that it will try to join all records from the right to the table on the left, but if there are no records in the right side table, then you still get the records from the left, but there will be no right side fields that have values. I hope i didn't confuse you.
Regards,
Rich HEilman
01-08-2007 11:54 PM
Hi Rich,
First of all thanks for answering so prompt.
Of course you confused me ...outer .. inner ...left ...right... You do not really want me to change the positions of the tables in the graphical join painter????
My output is only the fields PARTNER and Date of creation and unfortunately there are no records with blanks in the partner field. Well I did not check all 1,5 Mio records, but I think it gives me the same output like I got with the INNER JOIN.
Just to make it more transparent:
BUT000 (1,5 Mio records) FKKVKP (1.499.970 records)
-
-
PARTNER -
outer join----
GPART
VKONT
How can I get the 30 Business Partner that are in BUT000, but not in FKKVKP?
Thanks again..
thomas
01-09-2007 12:41 AM
Its like a needle in a hay stack, yes?
Sorry for the confusion. No don't change the order of the tables. Choose a field or two from the FKKVKP to put in the output of the query. Now when you run this, these fields will be blank if there is not a record in FKKVKP for your join condition. Again the OUTER JOIN will give you all of the records from BUT000 regardless if there is a corresponding record in FKKVKP, so when there is not, the fields that come from FKKVKP will be blank. I hope this makes sense.
I assume that the output in in ALV format, so you could sort the column from FKKVKP in ascending order, probably the records that you are looking for will be on in the top of the list. You will see some serious performance issues with 1.5 million records.
Regards,
Rich Heilman
01-09-2007 12:47 AM
Thanks so much Rich,
For me it makes sence, what you describe and I believe it will work. However, I've to wait until tomorrow.
Have sleep
Regards,
Thomas
01-09-2007 8:56 PM
01-09-2007 9:07 PM
01-08-2007 3:47 AM
Hi,
you can make a quick report with the help of Tcode SQVI. it will b more helpful to u, without se38.
regards
Suvetha.