Skip to main content

COUNT(

  CASE

    WHEN PROCESS EQUALS (

      "_STD_CEL_AP_ACTIVITIES_TABLE"."ACTIVITY_EN"

      EQUALS (("_STD_CEL_AP_ACTIVITIES_TABLE"."ACTIVITY_EN")* to ANY to 'Remove Payment Block' END )

    )

    THEN

      "BSEG"."MANDT" || "BSEG"."BUKRS" || "BSEG"."GJAHR" || "BSEG"."BELNR" || "BSEG"."BUZEI"

  END

)



I haven’t used PROCESS EQUALS before, and I’m finding it difficult to understand its syntax even after going through the documentation. I want to use it in view, so if you have any insights or examples on how to use it, please let me know.

Hi ​@Gayatriiiii.B

As described on the docs, the syntax should be: 
PROCESS [ ON activity_table.string_column ] [ NOT ] equals [ start ] activity ( to activity )* [ end ]

Here, everything between square brackets is optionally. In your case, I would expect that the following statement should work: 

 

PROCESS ON  "_STD_CEL_AP_ACTIVITIES_TABLE"."ACTIVITY_EN"  EQUALS ANY to  'Remove Payment Block' END


You might even want to make your code faster by not returning a concatenations of columns, but just a single character. The example below does the same using less computing power.

COUNT(

CASE

WHEN 
PROCESS ON  "_STD_CEL_AP_ACTIVITIES_TABLE"."ACTIVITY_EN"  EQUALS ANY to  'Remove Payment Block' END

THEN 1

END