on 06-25-2015 6:27 AM
Helo,
i have a problem with my workflow:
I have created a task and it needs a instance of an BOR-object (Is-U contract).
The Problem is, that i don't know how to create a precheck. That means, before starting Task it must be checked, exist a instance of this object?
sometimes, the object-instance could be not exist an then the workflow fails.
Do someone know, how to create an existence Check for BOR-object-instances?
I thought about to use a Container Operation, but i don't know, how to use it for this case.
Thank you very much,
bye
Adalbert
What do you want to do when the object does not exist? Would you just skip the following step, or what?
You could add an condition step (before the problematic step) in your workflow. In the condition step editor you have all the different comparison possibilities, and some of them should work also for "IF INITIAL" situation. You could for example just check if some of the object attributes is initial, or whatever.
Also, I am not completely sure what you mean here. There is no contract at all in the database (and thus the object was not instantiated) or the contract is there, but the BOR object was not instantiated? How is the object is instantiated at the first place? Couldn't you add the relevant logic already to this instantiation phase?
Kind regards,
Karri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
BOR can only be instanciated if they exist unlike of class object.
They nearly all implement the interface IFSAP wich has method existence check
So if you are working with a standard BOR you can use this method, it is not instance independant.
Either you can use this standard and capture the return code or build your own on a Z delegated BOR
in order not to exit but to return a parameter (make it instance independant in order to just provide the key and return a parameter)
Then based on that build your own task and include it in your workflow .
I hope this helps
Cheers
Stephane
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
If the BOR object instance(which is also a WF triggering instance) does not exist because the Object (document) is deleted or Cancelled, then the workflow instance should also get cancelled. Just add the deleted or Cancelled event for BOR object in SWDD> Basic data >Version Dependent Tab> Events tab. Receiver Type : Cancel workflow
Regards
Sandy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
You can use following FM to check the existing WF instance for a BOR object
CALL FUNCTION 'SAP_WAPI_WORKITEMS_TO_OBJECT'
EXPORTING
* OBJECT_POR =
OBJTYPE = IV_OBJECT_TYPE
OBJKEY = IV_OBJECT_KEY
* TOP_LEVEL_ITEMS = 'X'
SELECTION_STATUS_VARIANT = 0000
* TIME =
* TEXT = 'X'
OUTPUT_ONLY_TOP_LEVEL = 'X'
LANGUAGE = IV_LANGU
IMPORTING
RETURN_CODE = lv_return_code
TABLES
WORKLIST = lt_worklist
MESSAGE_LINES = lt_message_lines
* MESSAGE_STRUCT =
Regards
Sandy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.