Skip to Content
Former Member
May 12, 2016 at 12:18 PM

Syntax error using line_exists() inside COND-operator


Hi all,

we got a strange syntax error while using the function line_exists() inside the COND-operator. Here is the generalized coding therefore (rf_result is of type ABAP_BOOL):

rf_result = COND #( WHEN iv_id IS INITIAL THEN abap_false ELSE line_exists( mt_data[ id = iv_id ] ) ).

The syntax check says: line_exists is not a field

I expected that the statement uses the boolean result of the function line_exists and returns it.

We currently use as workaround the function xsdbool() surrounding the function line_exists().

Is this an error or do I something miss? Has someone an explanation about the behavior or an idea?



PS: system status = NW 7.4 SP08