Hi harish,
this is a little bit complex because of the rules with respect to previous rows. I attach you the simplest solution, which loops over the ItemCode and than fixes the missing value only in this group.
Another solution would be to use the LAG column node to shift the previous values into the same row and than use the rule engine node or the Column Merger node, to resolve the missing values.
I hope this helps!
Iris