Hi,
I have checked everything in the workflow, and i have identified whats going wrong in the workflow too.
But i do not know the solution to it.
I have run the workflow through SWUE
and tested the workflow in swi1 its working perfectly alright.
But if i run it through the transaction C202 and check it in SWI1 --> Workflow Container and chekc the object key it is not correctly passed as shown in the screenshot below
Please tell me how should i get a correct object key. Is there something that i am missing?
Please help
Request clarification before answering.
Hi Ali
ZBUS1041 is your custom BO and I would guess that you made it as a subtype of standard object BUS1041? yes or no?
I would also assume that you created the subtype because you wanted to add your own Event (CHANGED)...amongst other things.
How is this CHANGED event triggered - you must have planned it because it is not a standard event from BUS1041? Are you using some code - check that code if you are generating the key correctly or not. It would be good to see the code.
Moreover, recommendation is to use Delegation between BUS1041 and ZBUS1041 (SWO1->Delegate->Objtype = BUS1041 and Delegation Type = ZBUS1041). By this you will do a 'reverse inheritance' - all custom attributes/methods/events created in ZBUS1041 will be available to BUS1041. Then you can trigger the event CREATED using BUS1041 instead of ZBUS1041.
Regards,
Modak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry for late replyModak
Yes i am triggering the CHANGED event using Change Document 'PLAN'. I have entered a new entry and maped my BOR bject and CHANGED event with Change Document Object 'PLAN'
But now if I trigger form my workflow it does not generate the right object key. So i have found a solution to it, in which i need to write a function module which generates the right object key and then place that function module in SWED with my Change Document Object.
But i dont know what to write in that function module and how to get the write object key on run time basis.
Can you please guide me with that?
Thanks
Hi Ali
I would take example from FM CJPN_BUS_2001_2054_OBJECT_KEY which we see in one of the standard entry in SWED.
Your FM should have the same signatures. Then setup a break point in that FM and execute the transaction. Check what you get as the parameters and if you can do a select on table PLKO to get the right key or not.
If not, do not use this event to trigger your workflow. Instead, find an enhancement in the transaction which gets triggered on SAVE (after all checks) and then trigger your event from there, using FM SAP_WAPI_CREATE_EVENT.
regards,
Modak
Hi
Please ask one question per entry....
Wait for the answers from the orginal ...
Otherwise I think that the right answers was delegation, you can have some cases where the delegation is not something you wish for but really I have really had one.
Delegation, means your orginal bUS is delegated to you Z bus, which means when you mention BUS the actual object instanciated is the ZBUS so withing your workflow within your event, your task you mention only the BUS ...
If you are still encountering issue check if both object key are the same.
If you are using SWEC check that the modification document has the same key as your object
If the modification object key is not the same as the bus key then in transaction SWED you can make you own code in a function module base on the template SWE_CD_TEMPLATE_OBJKEY_FB_2

Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ali M,
I am Facing the same issue, can you please let us know how this issue get's resolved.
For my case i have created the custom BO ZBUS1041 with CREATE & CHANGE event/Method and generated the program.
Business object is getting triggered and also CREATE event, but Object key is not getting passed, Please help to resolve.



Thanks
Udaya Chandran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ali,
The custom business object might lead you to this issue.
Go to transaction SWO6 and delegate your custom business object to standard business object using new entries option.
At the workflow basic data --> Events Tab --> Change to standard BO instead custom BO.
Then do refresh using SWU_OBUF and check it again.
Thanks,
Vijay.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your prompt reply Vijay.
i have just checked that the object key is being wrongly gemerated because one of the paramenter is not being passed to the object and therefore its not adding up in the object key. Can you please help me with it. Its still not resolved.
I know i am quite near and there's a very minor mistake that i might be doing.
please help
Thanks
Hi Ali,
I hope you have created custom event for your requirement using function module
How did you trigger the event ? using function module?
If so, just put the break point at the function module and check what value passed to the object key.
Actually if you have multiple key fields, you have to concatenate all the key fields and have to pass to the function module.
Thanks,
Vijay.
Hi Vijay,
No, I am triggering the event using Change Document Linkage in SWEC. So there's no function module.
Only Receiver function module is being triggered which is set automatic by standard config.
thats also one of the reason why i cant do anything to debug where its going wrong. Please help
Hi Vijay,
No, I am triggering the event using Change Document Linkage in SWEC. So there's no function module.
Only Receiver function module is being triggered which is set automatic by standard config.
thats also one of the reason why i cant do anything to debug where its going wrong. Please help
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.