Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 1.18 KB

text-assembly.md

File metadata and controls

49 lines (31 loc) · 1.18 KB

code pal for ABAP > Documentation > Text Assembly

Text Assembly

What is the Intent of the Check?

This check searches for locations where text is assembled from different fragments and string templates (marked by |) are not used.

How to solve the issue?

Use string templates to assemble text from smaller pieces.

What to do in case of exception?

In exceptional cases, you can suppress this finding by using the pseudo comment "#EC TEXT_ASSEMBLY which has to be placed after the statement:

  DATA(first) = 'A'.
  DATA(second) = 'B'. 
  DATA(third) = 'C'.
  
  WRITE first && ': ' && second && ' - ' && third. "#EC TEXT_ASSEMBLY 

Example

Before the check:

  DATA(first) = 'A'.
  DATA(second) = 'B'. 
  DATA(third) = 'C'.
  
  WRITE first && ': ' && second && ' - ' && third.

After the check:

  DATA(first) = 'A'.
  DATA(second) = 'B'. 
  DATA(third) = 'C'.

  WRITE |{ first }: { second } - { third }|. 

Further Readings & Knowledge