Hi Alex,
Have you tried the same in the sort parameter of the table placed in your smartforms? I think it will work with this. But usually in this scenario what I does is, I will pass the internal table to the smartform as you had shown in the second table from the program itself.
Regards,
Abijith