使用字符串模板“|”跨多条线

Using String templates "|" Across Multiple Lines

有什么方法可以跨多行使用 | 字符串运算符吗?

使用经典的 CONCATENATE 令牌,您可以进行如下分配:

CONCATENATE 'A rubber duck is a toy shaped like a stylized'
            'duck, generally yellow with a flat base. It'
            'may be made of rubber or rubber-like material' 
            'such as vinyl plastic.' INTO lv_variable SEPARATED BY space.

我没有找到执行以下操作的有效方法:

lv_variable = |A rubber duck is a toy shaped like a stylized | &
              |duck, generally yellow with a flat base. It | &
              |may be made of rubber or rubber-like material | &
              |such as vinyl plastic.|.

有没有办法做到这一点,或者在使用 | 运算符时是否被限制在一行中?

你可以这样做:

data : lv_variable type string.

lv_variable = |A rubber duck is a toy shaped like a stylized| &&
              |duck, generally yellow with a flat base. It | &&
              |may be made of rubber or rubber-like material | &&
              |such as vinyl plastic.|.

write lv_variable.