vdh1n in t codes









T View customer hierarchy using vdh1n and partner tab


D View customer hierarchy using vdh1n and header poartners tab in sales order
& Help View customer hierarchy using tcode vdh1n

Execute tcode VDH1N to view customer hierarchy





vdh1n step 1


vdh1n step 2


vdh1n step 3


vdh1n step 4


View via partner tab in sales order header


You can also view the customer hierachy details within the header parters tab when creating or changing a sales order in @VA01 / @VA02

vdh1n step 5


The abap code to retrieve the customer hiearchy is as follows




*get customer sales org, distribution channel, division from table KNVH

CALL FUNCTION 'RKE_READ_CUSTOMER_HIERARCHY'
EXPORTING customer = -kunnr
* DATE = SY-DATUM
htype = 'A' sales_channel = -vtweg sales_division = -spart sales_org = -vkorg
TABLES
hpath = lt_hpath.
CLEAR ls_hpath.
READ TABLE lt_hpath INTO ls_hpath WITH KEY histunr = '03'.