I tried with indexed field, and found that whereever indexed fields will be assigned (doesnt matter 2nd, 3rd or 4th statement), all values till that assign statement will be avaialble in buffer, after that it wont till than it is released explicitly or transaction got over.
Strong scope is not impacting anything.
do for testtt transaction:
create testTT.
assign
F1 = "KG1"
F3 = "KG3".
assign
F2 = "KG2PUA". /* Indexed field PAU */
assign
F4 = TRUE.
pause.
end.
And its only taking care of Primary Index, not others.
It was a real time scenario for one of my code, a table was getting created in 2 different statements, first in include file with indexed and some date, time & user fields after create statement, second some specific values as per requirement without any conditions.
So when I was working on a defect, I was not sure whether exactly this code getting executed or some else, as only include file values were getting displayed in the buffer, but just after include file second statement values were not getting displayed. The only thing transaction was larger and was takin some time so I was able to get this situation.