on 07-17-2009 2:52 PM
I have a scenario in workflow where
Blocked invoice comes to workflow and i need to release it.
for this in workflow i an getting "IncomingInvoice " which is of type BO BUS2081.
I have created a method in ZBUS2081 for releasing this invoice. The binding is as follows.
From workflow i am passing the "IncomingInvoice" object to &_WI_OBJECT_ID& which is of type BUS2081.
This is working fine when i execute the workflow.
In the BO method the code is as follows.
data: gt_bapireturn type table of BAPIRET2 with HEADER LINE.
data: IncomingInvoice type ref to OBJECT.
CALL FUNCTION 'BAPI_INCOMINGINVOICE_RELEASE'
EXPORTING
invoicedocnumber = object-key-INVOICEDOCNUMBER
fiscalyear = object-key-FiscalYear
DISCOUNT_SHIFT = ' '
tables
return = gt_bapireturn
.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN =
.
When i execute this method, it is releasing the document successfullt.
But when i execute the workflow, it showing the step completed, but the document is not released.
Please tell me if i am missing anything in the binding.
I think that data is passing fromworkflow to task but problem is when passing from task to method .
I think you should use COMMIT Work after the Release FM.
I hope the binding is done properly.
Thanks
Arghadip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check system log to see if update is failing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Change the attribute of the task from background to foreground(temporary) and put a break point in the custom method.
execute the scenario and cehck if GT_RETURN table from the BAPI.
As you are running in background, check if any authorization error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try it without the CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
If it works, I'll explain why.
Regards,
Tom Carruth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Its not working with out "BAPI_TRANSACTION_COMMIT.
I have even tried using COMMIT work and wait up to 3 seconds.
still its not working.
i have verified there is no problem with data binding.
data is passing properly.
when i execute the BO , it is releasing the Invoice.
But when i use it in workflow, its not updating.. but the task status is Completed.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.