How Business Unit and Sales Order are related


I have a requirement, where I need to create a form to display sales order details along with Business Unit. I tried all the tables, but not able to figure out how can I get Business Unit for that Sales Id. Can some one please help?

I have salesId, but I am not able to find the related Business Unit defined on the sales order form.

Path for Business Unit: Line Details > Default Financial Dimensions > Business Unit.

It is defaultDimension on the sales order line . Business unit is one of the dimension attributes.
Look at \Data Dictionary\Tables\DimensionAttributeValueSet\Methods\getDimAttrNames.
This will give you some information on how to get the related attributes name for a selected salesLine.DefaultDimenion.

You may initially have to understand the dimension framework. See this white paper