2020 Apr 28 12:28 PM
As in the screenshot, at line 5, it gives me the expected output,
but I was expecting the same at line 6. Why iv_text updates itself in mid way of right expressing. In my opinion, it should evaluate the right expression completely and then update the variable itself.
2020 Apr 28 12:37 PM
replace this line
data(lv_text) = `Z_CLAIM_500_EMAIL`
' --> Char
`--> string
2020 Apr 28 12:37 PM
replace this line
data(lv_text) = `Z_CLAIM_500_EMAIL`
' --> Char
`--> string
2020 Apr 28 1:11 PM
anurag.gupta.home24 When you write this inline declaration:
data(lv_text) = 'Z_CLAIM_500_EMAIL'.
the ABAP compiler declares LV_TEXT as a variable of type C and length 17 (because there are 17 characters in the right-hand side).
It means that LV_TEXT can never have more than 17 characters at runtime, any longer text assigned to it will be truncated.
Solution: do as Frederic said.
2020 Apr 28 1:06 PM
Please post the code as text instead of image, so that one can easily answer by testing your code.