cancel
Showing results for 
Search instead for 
Did you mean: 

How to check Maximum number of ShipTos?

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

JL23
Active Contributor
0 Kudos

I would actually use transaction TAANA, which allows to count records in a table based on various aggregation levels.

Former Member
0 Kudos

Can you please elaborate using my concrete question as an example?

Thanks

JL23
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Thanks Jürgen.

So I've got the results back but not really sure what to do with them

It tells me that the customer with most entries is customer 123 with 860 entries but that still doesn't provide the number of ShipTos this customer has....?

Regards

Roy

JL23
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Actually the customer can be created in more than one sales area but having thought about it further I believe you are correct, it should be sufficient for our needs.

Many thanks

Roy

Former Member
0 Kudos

Dear Jurgen ..

Your document is very nice i have done testing on my ides it is working but i have still one doubt plz let me know.. we can find this information in se16n itself also but plz tell me why you gave this method... plz i am waiting for ur replay 

JL23
Active Contributor
0 Kudos

How could you get this result in SE16N per customer for maybe 100000 customers in one shot?

former_member182378
Active Contributor
0 Kudos

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)

former_member182378
Active Contributor
0 Kudos

Jurgen,

Thank you for your posts!

Could you please give some (business) examples where you used this functionality?

Former Member
0 Kudos

Dear thank you so much plz could you you provide one business scenario

easily i can understand plz

thanks a lot for ur replay

JL23
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Thanks T W that makes sense as each field combination I take is treated as unique (like a table key) so taking Sales Area out should do the trick.

Answers (3)

Answers (3)

former_member184065
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Kivanc

Thank you for your reply however if a partner function is deleted the counter doesn't get reused as it is part of the key to make it unique, so is this information really correct?

Regards

Roy

Former Member
0 Kudos

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'.

Former Member
0 Kudos

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?


sambit_mishra
Active Participant
0 Kudos

Hi Roy,

I guess this link might help you!!

http://scn.sap.com/thread/1439913

Regards,

Sambit.

Former Member
0 Kudos

Hi Sambit,

How exactly?

This message you provided discusses how to Find Ship-to's not assigned to Sold-to's...

Regards

Roy