Skip to Content
0
Former Member
Nov 16, 2006 at 01:55 PM

Create reference to object in event

28 Views

Hi.

I'm trying to create an object of type A and the create another object of type B and bind this to the A's container. Is this possible?

data: object        type swc_object,
      objtype       like swetypecou-objtype value 'ZCO_ORDCHG',
*      object_order  type swc_object,
*      objtype_order like swetypecou-objtype value 'ZBUS2032',
      event         like swetypecou-event, 
      objkey        like sweinstcou-objkey.
    event = 'INPUTFINISHED'.
    OBJKEY = DOCNUM.
    SWC_CREATE_OBJECT OBJECT OBJTYPE OBJKEY. "ZCO_ORDCHG
    SWC_SET_ELEMENT EVENT_CONTAINER 'Order' SALES_DOCUMENT.
    SWC_CONTAINER_TO_PERSISTENT EVENT_CONTAINER.
    SWC_RAISE_EVENT OBJECT EVENT EVENT_CONTAINER.

The Element I'm trying to set - Order is of object typ ZBUS2032.

This obviously is not really working.

What am I doing wrong?

I have tested to create an object of typ ZBUS2032 and bind this to the Container but this didn't work either.

Your comments are more than greatly appreciated.

Best regards,

Mattias