SAP Business One Data Ownership is one of those functions almost nobody enables during implementation, and that nevertheless ends up explaining why one salesperson can see another's opportunities, or why a branch supervisor gets into the customer portfolio of a subsidiary that isn't theirs. When everyone sees everything, information stops being a governed asset and turns into a silent risk. So if your company runs with several salespeople, branches or sales teams, this control is not a technical luxury: it is the border between protected data and exposed data.
In this practical guide we will configure the function step by step, review the relationship types the system offers and, above all, build SQL queries —for SQL Server and SAP HANA— to audit who owns each document and detect the orphan records that slip past the filter. That way you will not only switch the control on, you will also be able to prove it works.

The real problem: visibility without governance
Picture a sales team of twelve. Each one negotiates their own accounts, guards their margin and protects their customer relationship. Yet the moment anyone opens a sales opportunity or a quotation, they can look at —and even edit— everyone else's work. The result is internal friction, special prices that leak and, in the worst case, a salesperson who resigns and walks out with the whole portfolio in an Excel file.
Data Ownership solves exactly this. Instead of handing out blanket permissions by form, it defines who can see whose documents according to the real structure of the organization. A manager, for example, reaches their subordinates' documents, but two salespeople at the same level never cross paths. The control also applies to sales, purchasing and opportunity documents, which are precisely the most sensitive in the business.
Why you need SAP Business One Data Ownership
The ERP's general authorizations answer the question «which modules can this user use?». They do not answer the more delicate one: «which specific records can they see inside that module?». That is where Data Ownership comes in, acting as a second filter based on the relationship between the user and the document owner.
The benefits are concrete. First, you protect the sales portfolio and the margins from internal curiosity. Second, you bring order to the operation as you grow into several branches, because each team works on its own universe of data. As a result, management reports get cleaner and the conversations about «who touched this order» stop being based on guesswork.
Prerequisites before starting
Before switching anything on, it pays to get the house in order. Here is the minimum list you need resolved:
- Employee master data loaded: every person with commercial access must exist in Human Resources, with their manager and department defined.
- Employee-user link: the User field on the employee record must point to the corresponding SAP login.
- Clear organizational structure: departments, branches and teams must reflect reality, because the relationships are calculated on top of them.
- Superuser profile: you need administrator rights to touch system initialization.
This preliminary step is the one most often underestimated. If employees have no manager or department assigned, the hierarchical relationships simply will not work and the filter will let everything through.
Step-by-step tutorial: configuring data ownership
Step 1: Enable the function
Go to Administration → System Initialization → General Settings and locate the BP (Business Partners) tab or General, depending on your version. There, check the Enable Data Ownershipbox. Once you confirm, the system enables the Owner field on documents and unlocks the configuration windows. This is the master switch: without it, none of the remaining settings has any effect.
Step 2: Define how data is shared
Next, go into Administration → System Initialization → Authorizations → Data Ownership → Data Ownership Sharing Options. In this window you decide which document types the filter applies to —invoices, orders, quotations, opportunities— and whether the control also reaches business partners. That way you avoid switching on restrictions where they add no value.
Step 3: Set the authorization relationships
Now go to Administration → System Initialization → Authorizations → Data Ownership → Data Ownership Authorizations. This is the central matrix. For each relationship you define the access level: No Access, Read Only o Full. The system offers the following relationships between the user and the document owner:
- Peer: user and owner share the same manager.
- Manager: the user sits above the owner in the hierarchy.
- Subordinate: the user reports to the owner.
- Department: both belong to the same department.
- Branch: both share the same branch.
- Team: both belong to the same work team.
- Company: both belong to the same company.
A typical model, for example, grants Full access to the manager over their subordinates, Read Only within the same department and No Access between peers. As a result, a manager supervises their team, colleagues collaborate without editing, and nobody snoops on someone else's portfolio.
Step 4: Turn on the global filter
Finally, check the Owner Filtering Activebox. This global flag switches the company's entire Data Ownership on or off. While it is off, you can configure relationships calmly without affecting users. Good practice, then, is to leave this step for last, once the model has been validated with real cases.

Auditing data ownership with SQL
Configuring the filter is only half the job. The other half is verifying that it really covers everything. Below are three queries I use to audit this control. Each one comes in its SQL Server and SAP HANA version, because date, concatenation and null-handling functions differ between the two engines.
Query 1: Sales documents with no owner
A document with no owner assigned (OwnerCode field holding -1) falls outside the filter and is therefore visible to anyone. This query catches that leak across invoices, orders and quotations in a single pass.
SQL Server
-- Sales documents with no owner assigned SELECT 'Invoice' AS Document, T0.DocNum, T0.DocDate, T0.CardName, T0.DocTotal FROM OINV T0 WHERE ISNULL(T0.OwnerCode, -1) <= 0 UNION ALL SELECT 'Order', T1.DocNum, T1.DocDate, T1.CardName, T1.DocTotal FROM ORDR T1 WHERE ISNULL(T1.OwnerCode, -1) <= 0 UNION ALL SELECT 'Quotation', T2.DocNum, T2.DocDate, T2.CardName, T2.DocTotal FROM OQUT T2 WHERE ISNULL(T2.OwnerCode, -1) <= 0 ORDER BY DocDate DESC;
SAP HANA
-- Sales documents with no owner assigned SELECT 'Invoice' AS "Document", T0."DocNum", T0."DocDate", T0."CardName", T0."DocTotal" FROM OINV T0 WHERE IFNULL(T0."OwnerCode", -1) <= 0 UNION ALL SELECT 'Order', T1."DocNum", T1."DocDate", T1."CardName", T1."DocTotal" FROM ORDR T1 WHERE IFNULL(T1."OwnerCode", -1) <= 0 UNION ALL SELECT 'Quotation', T2."DocNum", T2."DocDate", T2."CardName", T2."DocTotal" FROM OQUT T2 WHERE IFNULL(T2."OwnerCode", -1) <= 0 ORDER BY "DocDate" DESC;
Query 2: Employee hierarchy map
Before designing the relationships, you need to see the real structure: who reports to whom and which user each employee has. This query joins employees, managers, departments and users into a single table.
SQL Server
-- Employee hierarchy for designing data ownership
SELECT
E.empID AS Code,
E.firstName + ' ' + E.lastName AS Employee,
D.Name AS Department,
ISNULL(M.firstName + ' ' + M.lastName, 'No manager assigned') AS Manager,
U.USER_CODE AS UserName
FROM OHEM E
LEFT JOIN OHEM M ON E.manager = M.empID
LEFT JOIN OHDP D ON E.dept = D.Code
LEFT JOIN OUSR U ON E.userId = U.USERID
WHERE E.Active = 'Y'
ORDER BY D.Name, Employee;
SAP HANA
-- Employee hierarchy for designing data ownership
SELECT
E."empID" AS "Code",
E."firstName" || ' ' || E."lastName" AS "Employee",
D."Name" AS "Department",
IFNULL(M."firstName" || ' ' || M."lastName", 'No manager assigned') AS "Manager",
U."USER_CODE" AS "UserName"
FROM OHEM E
LEFT JOIN OHEM M ON E."manager" = M."empID"
LEFT JOIN OHDP D ON E."dept" = D."Code"
LEFT JOIN OUSR U ON E."userId" = U."USERID"
WHERE E."Active" = 'Y'
ORDER BY "Department", "Employee";
Query 3: Invoicing distribution by owner
Finally, this query shows how many documents and how much money each owner handles in the current year. It also exposes the «NO OWNER» row, which usually reveals the control gaps right away.
SQL Server
-- Invoicing distribution by owner (current year)
SELECT
ISNULL(E.firstName + ' ' + E.lastName, 'NO OWNER') AS Owner,
COUNT(*) AS DocCount,
SUM(T0.DocTotal) AS TotalAmount
FROM OINV T0
LEFT JOIN OHEM E ON T0.OwnerCode = E.empID
WHERE YEAR(T0.DocDate) = YEAR(GETDATE())
GROUP BY E.firstName, E.lastName
ORDER BY TotalAmount DESC;
SAP HANA
-- Invoicing distribution by owner (current year)
SELECT
IFNULL(E."firstName" || ' ' || E."lastName", 'NO OWNER') AS "Owner",
COUNT(*) AS "DocCount",
SUM(T0."DocTotal") AS "TotalAmount"
FROM OINV T0
LEFT JOIN OHEM E ON T0."OwnerCode" = E."empID"
WHERE YEAR(T0."DocDate") = YEAR(CURRENT_DATE)
GROUP BY E."firstName", E."lastName"
ORDER BY "TotalAmount" DESC;
Remember the key difference between engines: SQL Server concatenates with the operator + and uses ISNULL and GETDATE(); SAP HANA, by contrast, concatenates with ||, uses IFNULL and Current date, and it also demands double quotes around field names that mix upper and lower case. For example, if you later calculate ageing, DAYS_BETWEEN replace DATEDIFF.
Variations and use cases
Data Ownership adapts to several real scenarios. In a multi-branch company, for instance, you can use the Branch relationship so each location sees only its own sales, while central management keeps Full access. In the same way, a collections team can work with the Team relationship to split portfolios without one agent stepping on another's.
Another frequent case shows up in sales opportunities. Because they hold sensitive information about open negotiations, many companies turn the filter on for that object alone and leave the rest open. That protects what is critical without getting in the way of daily operations. The configuration becomes surgical instead of restrictive.

Best practices and common mistakes
The most common mistake is enabling global filtering before validating the model. Half the team loses access to their own documents and support drowns in complaints. So configure first, test with real users, and switch the global filter on at the end.
The second classic mistake is documents with no owner. When data is imported in bulk or documents are created under a generic user, the Owner field stays empty and those records escape the control. It is worth running Query 1 periodically and assigning an owner to whatever shows up. Also, always define each employee's manager and department, because the hierarchical relationships depend directly on those fields.
One last recommendation: don't confuse Data Ownership with General Authorizations. The first controls which records you see; the second, which functions you can use. They complement each other, but they solve different problems. Used together, they make up a solid, auditable security scheme.
Official SAP Resources
To go deeper, the official documentation describes every window in detail. You can check the SAP Business One online help and the guide for the Data Ownership Authorizationswindow, plus the Implementing SAP Business One course available on SAP Learning. These sources explain the exact behavior of each relationship depending on the version and patch level installed.
Conclusion
Data Ownership turns an ERP where «everyone sees everything» into a system where each person sees what belongs to them. It is not a glamorous function, but it is the one that protects your sales portfolio, your margins and internal trust. And with the three audit queries you stop trusting theory and start verifying the control with hard data.
If you want to take the ERP beyond operational use and turn it into a strategic advantage, this kind of configuration is what separates administering a system from leading your company's information. In the Strategic Circle I share tutorials like this one, with the technical detail and the queries ready to apply. Come join and put your own data governance model to work at hectorpincheira.com.




