We call transaction FBV2 with batch input (BDC). For some reason, the system language value sy-langu switches when we call that transaction.
lv_tcode = 'FBV2'. CALL TRANSACTION lv_tcode USING gt_bdcdata * MODE lv_CTUMODE * UPDATE lv_CUPDATE OPTIONS FROM lv_opt MESSAGES INTO it_messtab.
The user has logon language EN, so sy-langu is 'E' before the call. In debugging, we see that the value of sy-langu changes to 'U' (Finnish) as soon as we step into the CALL TRANSACTION part - and remains that way, causing issues with Units of Measure etc.
For the time being, we've implemented some workarounds, such as saving the value of sy-langu to a temp variable tmp_langu before the call, then restoring it right after the call. However, I'm sure there would be better ways.
Why does the value of sy-langu change?
How can we control the value of sy-langu (other than through direct manipulation, as suggested here)?
These system parameter values may be related:
zcsa/installed_languages = DEUO
zcsa/system_language = E
zcsa/second_language = D