Skip to Content
avatar image
Former Member

BPM - query internal SAP table BC_BPEM_EL_ENTRY - binary columns


I need to do a query involving the internal SAP tables for the BPM and I have the following problem with querying the BC_BPEM_EL_ENTRY table (the DB used is SAP's MaxDB):

As you can see there are a lot of binary columns. How can I query those columns in the WHERE clause of a SELECT query?

I thought that converting the binary columns to hexadecimal and querying against that would work but the HEX function doesn't seem to work although it's listed in the docs (

I did a very simple test query but I get an error:

Exception of type caught: The SQL statement "SELECT HEX(PROC_DEF_ID) FROM BC_BPEM_EL_ENTRY " contains the syntax error[s]: - 1:11 - SQL syntax error: the token "(" was not expected here

I thought I could use the hex function in the WHERE clause like that:

SELECT whatever columns



Could you suggest how to query those binary columns?

Thanks in advance!

capture.png (45.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Nov 14, 2016 at 11:16 AM

    OK, I managed to resolve it somehow. The issue was due to the fact that SAP uses an intermediary step in executing queries, i.e. it evaluates the SQL you pass it to a DB vendor independent syntax called Open SQL. In my case I had to bypass that and issue native SQL in order to use the HEX function to filter on binary data.

    You can check:


    In order to import the class you need to add a dependency to the SAP opensql component in NWDI.

    Anyone with a better solution?

    Add comment
    10|10000 characters needed characters exceeded