Question:
Hi,
I am facing a problem in filling task container from event container.
I am using BAPI 'CreateFromData' for object type BUS2012 as a task to create second PO for component automatically when a subcontract PO is created .
I created an event POCREATE. I created attributes for Object type YBUS2012.
For BAPI 'CreateFromData' , there is a mandatory structure to be filled .
How do i assign virtual attributes to that structure ( in other words How do i define binding between an event and Method/Task )
Can i create an internal table/ structure as a virtual attribute?
I appreciate if you help me.
Thanks,
Ramp2000
Answer:
Hi,
I think you're going to struggle to assign multiple virtual attributes to a structure in a single binding.
There is, however, an option to define binding via a function module. From the binding screen for your task (I presume you're using a single-step task for this) triggering event, select menu path:
Goto --> Alternative binding.
There you enter the name of a custom function module which moves all the event parameters to the correct task container elements. You will, of course, have to code this function module yourself, which should be based (in terms of the interface) on 'SWA_TEMPLATE_EXECUTE_DATAFLOW'.
Personally, I reckon you're better off defining your own method to create the second PO, using the object key to access the attributes (and anything else you need) programmatically.
Regards,
Tim