My best guess is:
CREATE TABLE Items
(
ProductNumber VARCHAR(30),
ParentItem VARCHAR(30)
)
INSERT INTO Items (ProductNumber, ParentItem)
VALUES('10D68AV', NULL),
('M16503-001', '10D68AV'),
('722979-001', '10D68AV'),
('708984-001', '722979-001'),
('M16499-001', '10D68AV'),
('L47727-001', 'M16499-001')
;WITH Hierarchy AS
(
SELECT 0 Lvl, ProductNumber, ParentItem, ROW_NUMBER() OVER(ORDER BY ProductNumber) Rn
FROM Items
WHERE ParentItem IS NULL
UNION ALL
SELECT Lvl +1 , i.ProductNumber, i.ParentItem, ROW_NUMBER() OVER(ORDER BY i.ProductNumber) Rn
FROM Items i INNER JOIN Hierarchy h ON i.ParentItem = h.ProductNumber
)
SELECT Lvl, ProductNumber, ParentItem
FROM Hierarchy
ORDER BY Lvl, Rn
Result:
Lvl ProductNumber ParentItem
0 10D68AV (NULL)
1 722979-001 10D68AV
1 M16499-001 10D68AV
1 M16503-001 10D68AV
2 L47727-001 M16499-001
2 708984-001 722979-001
SQL Server 2019 | db<>fiddle[
^]