How to use MAX() to select a single record but prevent GROUP BY from selecting all distinct values and multiple records
Just incase you need another solution. Below uses row_number() over (partition by .. order by)

CREATE TABLE dbo.docStore
    ([Doc No] int, 
     [Version No] int,
     [Line No] int ,
     [Data-a] varchar(10),
     [Data-b] varchar(10))
;

INSERT INTO dbo.docStore
    ([Doc No],[Version No],[Line No],[Data-a],[Data-b])
VALUES
    (1,1,1000,'abc','abc'    ),
    (1,2,1000,'xyz','abc'    ),
    (1,1,2000,null,'lmnop'   ),
    (1,2,2000,'ggg','lmnop'  )
;

with cte as 
(
select [Doc No], [Version No], [Line No], [Data-a], [Data-b], 
        row_number() over (partition by [Doc No], [Line No] 
                           order by [Version No] desc) 
        as rn 
from dbo.docStore
)
select [Doc No], [Version No], [Line No], [Data-a], [Data-b] 
from cte
where rn = 1
;

-- clean up 
drop table dbo.docStore 
;