Is there any special reason for using varchar vor lv_carrid and not also nvarchar for lv_connid.
Nvarchar is normally the representation of the carrid on the Hana system and varchar can only take a subset of the nvarchar values.
May you give it a try and change the first line to:
DECLARE lv_carrid NVARCHAR(3);
Hope it helps,
Andreas