on 11-13-2008 1:52 PM
Hello,
i am seaching for a function which gives me all subsidiary customers of a customer.
For an example:
I have a customer 01234 which has 5 customers subsidiary.
I want to know these customer numbers. I know the table KNVH and that i can read it with HKUNR, but there must be another way.
In Transaction VDH2N there is what i need. But i don´t get how SAP reads the customers here.
Customer hierarchies are stored in KNVH table. There is nothing wrong with reading it, there is even a "reverse look-up" index by HITYP and HKUNNR. Keep in mind though that there are also the validity dates.
You may also use one of the BAPIs below, but sometimes a simple SELECT is much faster and easier.
BAPI_CUSTOMER_GET_CHILDREN
BAPI_CUSTOMER_GET_ROOT
BAPI_CUSTOMER_GET_ROOT_LIST
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Indexes are maintained and viewed in Data Dictionary - transaction SE11. Enter the table name -> Display and then click Indexes button.
"Rreverse look-up" is not a technical or official term, but rather a jargon for the indexes that utilize the fields that are not part of the key but very commonly used to look up the table entries.
User | Count |
---|---|
100 | |
11 | |
11 | |
6 | |
6 | |
5 | |
4 | |
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.