I want to select the length of the string ( LGOBE ) minus 4.
But i get this error: "In the function "SUBSTRING", the parameter number "3" must be an ABAP variable. This is not the case for the expression that starts with "LENGTH"."
What I understand from this message is that i cannot use a function as the third parameter, is this interpretation correct? If so, is there an alternative for me to remove the last 4 places of the string inside the select statement? Thank you.
SELECT
SUBSTRING( LGOBE,1, LENGTH( LGOBE ) - 4 ) AS TEST1,
LGOBE, WERKS
FROM T001L INTO TABLE @DATA(IT_FINAL)
UP TO 100 ROWS.
CL_DEMO_OUTPUT=>DISPLAY( IT_FINAL ).