Purpose
Demo ZCL_XTT_DEMO_140 shows or removes an entire template region according to an ABAP condition. Use ;type=block when the condition affects a range of rows or a PDF subform, rather than a single value.

Choose the appropriate conditional feature
- Use
;cond=to calculate one displayed value. - Use
show_iforhide_ifto select row layouts in a repeated tree. - Use
;type=blockfor an arbitrary, one-time template region.
;type=block
This example displays the block only in 2019: ;cond=sy-datum(4) EQ '2019'.

The next block is displayed when TITLE in root R is not initial.

You could also write ;cond=value-title IS NOT INITIAL
For PDF, a subform defines the block boundary. In Excel and Word, table rows define it.
Table borders may not be visible in Word

To display the borders in the template
Table Tools -> Layout -> View Gridlines

The directive replaces the older workaround of passing a one-row table to show a region and an empty table to hide it.
Shorthand
{R-BL2;type=block;cond=strlen( value-TITLE ) GT 0} can be shortened to {R-BL2;=strlen( v-TITLE ) GT 0}.
*See templates 140