SAP tables returning empty value

Hello fam, hope you are all in good health!

Today i’m trying to loop through a table in SAP, and there is a condition that is never met :

The output is the following :


The SAP table i’m looping through :

I don’t know but it’s like the variable countIndexTabOutput is not coming back empty.

Calling @LevKushnir The Savior for help !

Cheers community !

Anyone can help me find another way to count the cells in that table, when it finds a blank cell it should stop?
I really can’t find another way than the one cited below.

Hi @Meloueh01,

Can you try changing the condition countIndexTabOutput.Equals(" ") to below one

String.IsNullOrEmpty(countIndexTabOutput) or String.IsNullOrWhiteSpace(countIndexTabOutput)

I think countIndexTabOutput is empty without any space character.