Occurence handles

Author: None (None)


I have a problem returning an occurence handle as OUT parameter in a operation

In the operation the $occhandle function returns a correct value and it is saved in a param declared as "handle P_HANDLE :OUT". 

Unfortunately, the calling component receive a NULL value. The calling component use a variable declared as handle

Someone has a good idea to resolve this problem?

Thanks in advance



  1. For more precision, I had to return an occurrence handle of a non-database entity

    Author: None (None)
  2. Hi,


    I am not sure if I remember it correctly, but I believe that you have to declare the operation in the entity themself:

    As public operation in the business object model, so an signature is generate for this operation.

    Only if you have a signatur for the entity you can pass it through different components.

    Best regards


    Author: Thomas.Young (thomas.young@young-consulting.de)
  3. As descrided in the documentation (under the voice Occurrence operation) I found a working solution as follows

    - I wrote code in the occurrence operation in the model entity definition

    - I compiled occurrence operation signature using  /ceo

    and everything works good.

    On the contrary, when I use a  "public handle", the handle returned by an occurrence operation is always NULL.

    Author: None (None)
  4. How is the code with newinstance ?

    It seems, that the handle is local defined and therefore no longer valid, when the operation returns.

    Try to use a component-variable / typ="public handle" for the  newinstance command

    and assign this to your out-parameter.


    Good luck,



    Author: gypsilon (wva@gypsilon.de)