on 03-27-2015 7:57 AM
Hi All,
In WF_Witem table WI_ID getting generated with different sequence. I've a request and i sent for approval. Like this till four approvers are available.
For every approver it will generate new work item id with highest number. So we will sort that 4 work item Ids with descending order then will get latest work item id. In case in the middle of approval process any one of the approver rejected then in Data Base table its taking Work Item Id is Lowest number compared to other work item ids. So i am unable to find the latest work item based on sorting descending order. But in Dev and Qa is working fine. ONly in Production why its taking lowest number compared to other work item ids.
Kindly Help i this issue.
Thanks & Regards,
Jack.
Hi Jack
Rick's response is backed by note:
2062657 - Work item numbers are not created in sequence
Check with your Basis team if they can allocate only one Application Server for the workflow in production ..... but it has to be well thought off and not overload one App server.
Meanwhile for your report, go by karri & Ronen's response on using WI Creation / Completion Date and times.
Regards,
Modak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check with your Basis team if they can allocate only one Application Server for the workflow in production ..... but it has to be well thought off and not overload one App server.
No no no, please don't do this unless there is a valid reason (this scenario doesn't qualify). That's just creating a bad workaround for what shouldn't be necessary in first place and overall more potential for trouble!
Hi Jack,
Based on my understanding, you are using this Custom table for dashboard reports. As others have pointed out that using SAP standard tables are much better than using Custom Table. When we introduce a custom table then we have to ensure the 100% sync between WF and Custom table entries for data consistency.
You could have fulfilled your requirements using few SAP_WAPI* Function modules but If you intend to use the same design , I would suggest not to use the Workitem ID as key field. Instead introduce fields like - Request_ID_No , Item_no , Time stamp (approved on) as key fields along with approval_level_no and status. But then you will have to ensure that the table entries are consistent when workitem is actioned within the workflow process or even with outside influence - workflow admin actions and transactional changes.
Regards
Sandy
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.
Hello,
This looks like another lesson in why you should resist using Z tables for workflows. People, there is no need for Z tables, the workflow tables store more than enough information.
What are you trying to do with this Z table? Keep track of when something is approved? It's all in the workflow tables.
Having said that, it is strange that a workitem created 13 minutes later has a workitem id that is nearly 8000 lower. Did you check in SWI1 if this is really true? I would suspect a programming error.
As stated above, you should order on creation date/time, not number.
regards
Rick Bakker
I agree with Rick, you're duplicating information that is already in the DB - having the date and time in there is completely pointless.
Numbers are buffered at each app server. Workflow is load-balanced across servers. Sequence can never be guaranteed in this setup. This goes for many SAP number ranges.
@Rick - A big bad ugly job hogging a server can cause such a discrepancy. But you're still right that it's worth checking.
I agree with Karri, you can't trust that the created work items are always in sequential order. I think the reason is due to the workitem number range interval settings. I would however use the creation time stamp field and not the time & date since It's easier to sort by and I sometime see problems when the users are from different time zones in the date & time fields as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
for one request multiple line items are available. I've created one dashboard with list of rejetcted work items list. This list is fetching from zwf_witem based on wi_id in descending order. but in case of rejection wi_id is lowest number is generating. This time once initiator has approved rejetced work item after that also already resend workitem is showing in dash board.
Hi,
I am not sure what is your problem, but I want to point one important fact: You cannot trust that the created work items are always in sequential order (=latest work item has the highest number). There should be an OSS note about this (the problem has to do with multiple application servers). You need to check the creation date & time of the work item to be absolutely sure that you have the last work item.
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 Jack,
So you got four work item ID's , lets say for an example 1, 2, 3 & 4. All are waiting at approver inbox for approval.
In this case what do you mean by latest work item? Do you want to get the first approved work item from all four?
If so, sort descending the work items based on work item date and completion time of the work item.
Thanks,
Vijay.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.