Hi..
Although row material for FG or SFG have “do not cost” flag, row material’s cost is included in std cost for them.
To exclude row material with do not cost” flag, Refer to below picture.
You should define space as Indicator for Relevancy to Costing for row material with do not cost” flag Through t-code cs02.