Hello Sai,
We can achieve this by writing a End routine while loading data from DSO1 to DSO3 by looking into DSO2.
i.e. while we upload data from DSO1 to DSO3, write a logic in END ROUTINE to fetch the data from DSO3 based on header & item and use internal table which holds this data for populating value for Document No. This way you can have data in DSO3 as per your requirement.
Note: Here I'm not sure about the frequency of changes that happen & whether both DSO1 & DSO2 has a record when a header is changed. If you are sure that DSO1 & DSO2 has a new record for any change (like you said above) then this logic should work.
Hope this helps...
Regards,
Venu Gopal