on 05-30-2013 9:53 AM
Hello
I need to check which customer has the most number of ShipTos on the system and also the average number of ShipTos across all customers.
What would be the best way to get this information?
Thanks
Roy
I would actually use transaction TAANA, which allows to count records in a table based on various aggregation levels.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
call TAANA
directly click Execute
Enter table KNVP
click the button to select a variant
click Ad-Hoc Variant button
Move the fields you want count from the right to the left
in your case
KUNNR, VKORG, VTWEG, SPART, PARVW
click okay
the Ad-hoc variant is flagged, just click continue
select online of background depending on the volume of records you have in KNVP and click continue
later find your table in the tree on the left, click the variant and see the results on the right
why not?
you should actually have a number per combination of these keys:
KUNNR, VKORG, VTWEG, SPART, PARVW
Assuming your customer is only created in one sales area and has partner roles for sold-to, ship-to and invoice-to
then you should have 3 records with a total number, a number ship-tos , a number for sold-tos and a number for invoice-tos
You only need to sort it the was you want read it. The standard execution sorts it by total number descending
Roy,
In the suggestion mentioned by Jurgen, if you want to find out the number of SH for a customer (SP); not taking sales area in to consideration; simply do not take those fields as "input parameters".
E.g.
Take KUNNR and PARVW and execute
(instead of taking KUNNR, VKORG, VTWEG, SPART, PARVW and executing)
TAANA is a transaction that I use most in preparation for data migrations and data archiving.
Especially in data archiving it can give me easily the numbers of records for a certain comination of data in a certain table before and after archiving.
The Ad-hoc analysis is nice for such one-time analysis, but usually I setup real variants to use long term. the most powerful feature is in the environment menu. It is possible to create virtual fields. e.g. a subset of a date , so you can easily count the number of documents per month.
Dear,
Rather than go by standard level ,go by a Query ( SQVI by ABAPer) level as differentiate with any Unique Number .
Note : We have also created Z Report by differentiated with Unloading point why because It is Unique to us as per Ship To Party .
Thanks,
Naren
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In t-code SE16, open the table KNVP. If a customer has more than one ship-to, field PARZA will work as counter. For example, if a customer has 12 ship-to's, for each row in this table PARZA will be counted from 0 to 11. So basically,
1- Restrict the output by PARVW = 'WE' in KNVP table.
2- Sort the table descending by PARZA.
For the average number of ship-to's, there is no direct answer. You'll probably need coding for this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Let's say our example sold-to has 4 ship-to's. If we delete PARZA = 2, KNVP will have 3 outputs as;
PARZA = ''
PARZA = '1'
PARZA = '3'
But if you assign a new ship to our customer, its PARZA will be '2', not '4'. So yes, after deletion of a partner, if you do not assign a new partner to this customer, PARZA count may not be accurate. But I don't think the result will be 'very faulty'.
Ok so assuming the results wouldn't be very faulty how can I actually use them to get the customer with most ShipTos if PARZA is only an acceding counter? By sorting PARZA all I will get is the customer that was updated last, it wouldn't necessarily be the one with the most ShipTos or am I missing something?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
12 | |
10 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.