on 2006 Jul 26 7:14 PM
I need to perform an update (to a transparent database table) in a workflow step as a background task, and as im new to workflow, i need some help.
regards,
sukumar.
Hi Sukumar,
Just as Jocelyn said,
If this is to update standard SAP master data, or similar.
And you have found a BAPI chances are that this BAPI is used in a method for the business object.
E.g. for employee data, in transaction SWO1, you'll find BUS1065 which you can use to alter data. And for material master, I think it's BUS1000 ( just search in the texts in SWO1 for BUS*)
Kind regards, Rob Dielemans
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sukumar kumar,
SAP discourages to update tables directly.
I did check briefly to see if altering table AFVU is used in any function module or bapi, but this is not the case.
It is a table of type A with maintenance allowed with restrictions. So it´s not a high risk to update this table, via a custom method.
Kind regards, Rob Dielemans
Hi Sukumar,
I'm assuming you have done at least some workflow training?
You just need some way to update your table that you can call from your object method, and a terminating event or exception to confirm that its done.
The usual approach is to call a BAPI to perform the actual update. Of course if its a custom table you can just code the update into the method directly if you wish. Don't forget to call BAPI_TRANSACTION_COMMIT if the BAPI doesn't include commit handling itself.
You do need to consider error handling. If you are calling a BAPI or equivalent it should give an error message if there is any problem, in which case you raise an exception in your method. The other approach is to use the database update to generate an event, e.g. object.updated, and then have your background task listen for that terminating event to confirm that the work has been done.
The most common approach is to generate the event using change documents using transaction SWED, assuming updating your table results in a change document.
Whatever you do - DON'T assume that the update is always successful, and DO make sure that either success (via a terminating event) or failure (via a method exception) is reported to the workflow - otherwise your workflow will appear to have worked when it has actually failed.
Regards,
Jocelyn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.