Slapped this together in Notepad, so this is just off the top of my head, but look at this example for a general direction. BTW, I took "nothing" to mean null.
Code:
update B11
set x=
case B11.APAAP
when B11.x=0 then B14.LatestRecord
else null
end
from dbo.F03B11 B11
inner
join (
select RZKCO
,RZDCT
,RZDOC
,RZSFX
,max(RZDGJ) LatestRecord
from dbo.F03B14
group
by RZKCO
,RZDCT
,RZDOC
,RZSFX
) B14 on
B14.RZKCO=B11.RPKCO
and B14.RZDCT=B11.RPDCT
and B14.RZDOC=B11.RPDOC
and B14.RZSFX=B11.RPSFX