CommitSalesOrder BSFN call failing in custom SO BSSV

Lucky.2811

Active Member
Hi List,

We have copied standard sales order entry (JP420001, J4200010) BSSVs and modified for our custom requirements. When standard BSSV is invoked there is no issue but when the custom one is invoked it fails always exactly at commitSalesOrder function execution statement (bsfnService.execute(context, connection, "CommitSalesOrder", bsfnParams);)

It gives error as “Failure to cleanup context” or “Internal server error executing commitSO function”

We haven’t changed the call of commit function and also compared the code of custom one with standard, there is no difference.

It occurs both in server and also in fat client. Attached files are from fat client.

Any help would be greatly appreciated
 
Standard SO BSSV uses manual transaction commitment for SO MBF's.

<font class="small">Code:</font><hr /><pre> //Explicit Manual TP Connection
IConnection soConnection =
context.getNewConnection(IConnection.MANUAL);

if (soConnection != null)
{
try
{
//Call to CommitSalesOrder Wrapper
bsfnMessages =
callCommitSalesOrder(context, soConnection, internalVO,
soDetail);
</pre><hr />

It looks like there is a transaction collision in your BSSV. I had similar problem when tried to combine Shipment Confirmation and Sales Order Management functionality in one BSSV (transaction/connection boundaries). The reason was to have sole BSSV for the complex ShipConfirm/SO update BSSV withing one transaction boundaries.
There was a Database Lock, both BSSV's tried to update same record. I didn't have much time to solve the issue and just decided to separate BSSV for ShipConfirm and SO Manager with standalone BSSV's.
Here is something about transactions in BSSV.
Please let me know if that was the case and if you have any luck how did you solve it.
 
Thanks Sergii for reply!!!!

I know about that manual commit. Infact what I observed is if we don't pass ship to address it is working, whenever ship to address is input commit SO is failing

I have one more issue with this...
I need to update some custom fields to the order once after the order is entered. So as commitSalesOrder function is using manual commit I wrote update statemnts after commit transaction statement. No luck.The fields are not getting updated..While debugging I can see records in F4201 and F4211 right after commit but update is not working on that order... Not sure if this is something to do with published BSSV transaction processing..
 
My suggestion would be obvious - split create and update bssv's.
1. Call BSSV - Create Order
2. If there was no bssv exception (orders has been created) call BSSV - Update Order

Please keep us updated with your progress.
 
Lakshmi

Was this issue resolved. We are getting a similar issue when we call the standard Sales order BSSV through a custom BSSV. The sales order is created, but then then the commit fails and transaction is rolled back completely. the logs suggest that the

Aug 27 11:44:31.129080 jdb_exet.c2415 - 67263/73 WRK:AM920TZ_80000000_DConnector JDB3600011 - Failed to perform Update for F4801
Aug 27 11:44:31.129208 jdb_exet.c5678 - 67263/73 WRK:AM920TZ_80000000_DConnector JDB9901232 - Canceling transaction because: TC033 UpdateTable: update failed
Aug 27 11:44:31.129360 jtp_tm.c2001 - 67263/73


67263/73 WRK:AM920TZ_80000000_DConnector Thu Aug 27 11:44:31.129088 jdb_exet.c2415
JDB3600011 - Failed to perform Update for F4801


Since the line is a W line type it creates a related work order and it seems like the F4211EndDoc is calling the F4801Enddoc which is triggering the update . this is failing. The detailed logs suggest

WRK:AM920TZ_80000000_DConnector OS400QL016 - ExecuteSQLRequest: QSQLMSG *LIBL - SQL0913 - Row or object &1 in &2 type *&3 in use

F4801 is in Use. Any ideas?
 
Back
Top