Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Database commit not happening!

Former Member
0 Likes
628

Hi,

The scenario is to create a proforma invoice through BDC programming after PGI is done.

An output type is assigned while PGI which will trigger a routine to update a custom table with the status field value as unprocessed. At the end of this updation, an event is being raised to trigger a Job and execute the BDC program to do the invoicing of the unprocessed delivery documents from the custom table.

The problem is, BDC is not happening for the current delivery document created. The reason being, it is not getting committed in the custom table at the time when it is supposed to be picked up from the custom table. The previous unprocessed deliveries from the custom table are through with the BDC process except the current one.

Any suggestions for carrying out BDC for the current delivery too. In other words, any way to commit the current delivery data into the custom table before raising the event. Note: COMMIT WORK (after the MODIFY statement and before RAISING the event) is resulting into the Update termination.

Vishy

2 REPLIES 2
Read only

Former Member
0 Likes
458

are you doing all this in an exit..? is so which exit. yes you should not suppose to use commit work in a exit. it leads to update termination. how are you updating/inserting the values to ztable.

Read only

0 Likes
458

There are two programs created, one for creating entries in the custom table with the status field as unprocessed and the other program for picking up the unprocessed deliveries and do the Invoicing through BDC for VF01.

The first program executes based on the output type assigned in the delivery during PGI. The second program is triggered by an event from the first program.

Once i observed update termination, i removed the COMMIT WORK. I had put commit work assuming it would make the current delivery to be available from the second program. But this did not happen.

Vishy

Edited by: vishwanath vedula on Oct 25, 2008 10:44 AM

Edited by: vishwanath vedula on Oct 25, 2008 10:45 AM