Hello together,
I'm facing a problem with assigning values to a field in a struct.
I have this code (sStruktur is a struct datatype)
sStruktur->rechnung->"%%LP_GetMapping4Field(sTable,
'RE_RECHNG_DAT')%%%" = LP_FormatValue("RE_RECHNG_DAT.%%sTable%%%",
$item("RE_RECHNG_DAT", sRecord_SLDA_RECHNUNG))
In my programm I would expect as value in my struct:

But what happens?

In debugger I can see, that after "LP_FormatValue the function LP_GetMapping4Field is called once again and the return of this function is assigned to.
What's going on there? In my eyes this is not correct behaviour.
If I use this code
sTemp = LP_FormatValue("RE_RECHNG_DAT.%%sTable%%%", $item("RE_RECHNG_DAT", sRecord_SLDA_RECHNUNG))
sStruktur->rechnung->"%%LP_GetMapping4Field(sTable, 'RE_RECHNG_DAT')%%%" = sTemp
it works as expected.
Cheers,
Michael.




