cancel
Showing results for 
Search instead for 
Did you mean: 

Update Table whenever new Work item is assigned to a User

Former Member
0 Kudos

Dears,

I'm looking for possible solution for updating Ztable in real time(Synchronously) whenever a new work item is assigned to a user and also update Ztable when workitem is processed by user.

Background job and modifying workflows are not an option in this requirement.

Please advice on any possible solutions

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

SandySingh
Active Contributor
0 Kudos

Hello

Can you explain the underlying business requirement for storing the details in the Ztable.

So these workitems can be related to any workflow or you are interested in 1-2 workflows.

You can make use of programming exits in workflow. Use events - AFTER RULE EXECUTION & AFTER EXECUTION

Program Exits In Workflow - ABAP Development - SCN Wiki

Regards

sandy

Former Member
0 Kudos

Hi Sandy,

I know about Programming exits.

But in my case the same should be applicable to all workflows and workflows which will be developed in future.

I couldnt find any helpful BADI's or Exits for this requirement.

Any ideas?

Thanks!

anjan_paul
Active Contributor
0 Kudos

Hi,

   Agent  can be assigned manually and automatically.  By which way you want  to  do it.

   one possible solution may be  create a program which will collect all information of agent from SWW* tables and modify into  your Ztable          based on your  timstamp.   Then exeucute this periodically.

SandySingh
Active Contributor
0 Kudos

Hello

I think if you don't wanne use background reports and modifying quite a few workflows then "programming exits" is the only way.

You can create a generic programming exit and attach it to each User Decision Step in all workflows.

You can also look for SAP_WAPI* Function modules that are called during agent assignment and workitem execution and create an implicit enhancement in the FM..

Ideally you should consider following options in order:

1. Background Job with application logs

2. Programming Exits

3. Make use of Enhancement framework in the standard code. Debug to find a suitable spot.

4. Adding a Method in the workflow

Regards

Sandy

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello everyone,

Thank you very much for your kind support and help!

When we received the requirement, I had initially suggested to have a Program which runs in background and collects all the information from RFC RH_INBOX_VIEW_CREATE and update Ztable, but they denied as they wanted Ztable to be updated real time without any delay. Then I suggested Programming Exit, which they are yet to confirm, as they don't want to touch existing workflows.

As per the customer, reason to have a Ztable is to read the data and be in continuous sync with some of their external application built on different platforms. This could have been better achieved using a Web Service or by calling RFC. But the customer is very adamant on Ztable concept. Currently I'm not very sure on what applications they are using and what is their approach to read data. Will update once I have specs handy and finalize the approach.

Thanks again.

Regards,

Harish

Former Member
0 Kudos

How does the external application read the Z-table? Why cannot they use the same method to read the data from the standard workflow tables (such as SWWUSERWI) instead of the Z-table? Sounds really complicated and prone to errors (I mean keeping the Z-table up to date and in sync with the real data).

Regards,

Karri

former_member185167
Active Contributor
0 Kudos

Just say No to Z tables. I'm sure you know more about workflow than they do, guide them.

If they insist, just provide a view of the workflow tables that looks like a Z table.

pokrakam
Active Contributor
0 Kudos

As per the customer, reason to have a Ztable is to read the data and be in continuous sync with some of their external application built on different platforms. This could have been better achieved using a Web Service or by calling RFC. But the customer is very adamant on Ztable concept.

Sounds very sensible, apart form the last sentence.

paul_bakker2
Active Contributor
0 Kudos

Hi,

Does it have to be a Z table? Because SAP standard tables store this information already.. all you have to do is read them.

The benefit of this 'SAP standard' approach is zero enhancement effort and guaranteed to work for all workflows, now and in the future.

So I assume there has to be a compelling reason for your Z table strategy! Let's hear it.

cheers

Paul

Former Member
0 Kudos

Programming exits are the way to go! Although I would try to avoid this kind of Z-table logging for ALL workflows (would be interesting to hear the background for this requirement).

Regards,

Karri