Skip to Content
0

Update Z table on user decision

Apr 20 at 08:48 AM

62

avatar image

Hi,

In my workflow i have a user decision and based on Approve or Reject i have to update a Z table. I found below blogs useful for this:

https://archive.sap.com/discussions/thread/3844674

https://archive.sap.com/discussions/thread/1315537

Could anybody please explain this to me:

i) I have to update Z table in Update task fm wrapped inside an activity step (method).

ii) i dont have to use explicit commit.

iii) In case i have multiple user decision and for each item i have to update Z table, i should have separate function module for each update and fm has to be called in update task.

please let me know.

Thank you

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Himanshu Gupta
Apr 20 at 09:01 AM
0

Hi sudhanshu

The easiest way to create a Class and method to update the Z table.

in Workflow create an Activity and in the Task choose your Zclass and its method. Bind import and export parameter between Method and Task and then Task and workflow.

You don't need to create multiple method or task . You can use the same and bind the value according.

if you have multiple user decision and want to update many times , you can also opt for the "Method " tab in the activity directly.

Regards

Himanshu

Show 5 Share
10 |10000 characters needed characters left characters exceeded

Thanks Himanshu. My actual query was about having it in 'Update task' if yes, then it has to be a fm as i don't think there is way to call method in update task. please advise.

0

Hi Sudhanshu,

if you want to update table using FM with update task, you can call FM inside Class method.

Create a wrapper method and pass it in the workflow Task or Activity .

0

hello Himanshu, I'm not very much interested for function module but are you saying that i can simply write a method with update/modify statement along with commit work (or commit work and wait). of course i will doing some binding. Will that be ok? please advise.

Thank you

0

Hi Sudanshu,

Yes you can directly put in the Method.

WR

Himanshu

0

hello Himanshu, and that would be with commit work ..right? or i can use commit work and wait.

0
Pavan Bhamidipati Apr 24 at 08:03 AM
1

Hi,

Long time ago,I have written a wiki which can be used as one of the possible solutions to your issues.

https://wiki.scn.sap.com/wiki/display/ABAP/Program+Exits+In+Workflow

Thanks

Pavan Bhamidipati

Share
10 |10000 characters needed characters left characters exceeded
Anjan Paul Apr 20 at 12:49 PM
0

Hi,

You can update it from Program Exit of the steps. You can search SCN for how to use Program Exit .

Thanks

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks Anjan! My problem was not where to update but how to commit (whether sync. or asyn. or in update task). I'm using program exit for some other purpose but for this a simple activity method is working fine to me for now.

0