Application Development 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: 

CALL TRANSACTION with UPDATE 'S'

Former Member
0 Kudos

Hi,

In my program i transfer planned orders into production orders using a CALL TRANSACTION CO40 UPDATE 'S'.

A planned order with quantity 5 creates 5 production orders with quantity 1. (5 CALL TRANSACTIONs).

My problem: When the second / third ... CALL TRANSACTION is performed the RESB-Entries from the first call are not on database. So a SELECT - Statement in Userexit EXIT_SAPLCOZF_003 returns incomplete results. Whats wrong?

Thanks for your support!

Regards Martin

6 REPLIES 6

Former Member
0 Kudos

Will your processing allow a COMMIT WORK call after the transaction call? Are you checking return code to be sure update is successful after your Synchronous transaction call? The transaction call should be synchronous, but it may be that you're inserting data into the update stack, but it's not going to the database until the end of the program. If so, a commit work after the transaction call should result in the db getting updated.

On the other hand, if the data does show up, just a little later than expected, you can insert a "wait up to xxx seconds." statement into the code between transaction calls to give SAP a chance to update all the tables. Depending upon the transaction, it sometimes takes a few seconds for everything to get updated, as SAP hands off the pieces of updates to the dispatcher, etc.

0 Kudos

I tried a COMMIT WORK AND WAIT after the CALL TRANSACTION Statement. Nothing changed. When I stop in Debugger and take a look at SE16 I don't see the just created production order. After finishing the programm all entries appear. So I think a "wait up to xxx seconds" will not work either.

Regards, martin

0 Kudos

>

> I tried a COMMIT WORK AND WAIT after the CALL TRANSACTION Statement. Nothing changed.

If you use CALL TRANSACTION ... UPDATE 'S' the update will be similar to the one with COMMIT WORK AND WAIT. You don't have to explicitly mention it.

How did you solve your problem ? In the forum you will find many open threads on similar subject, your solution might be of some help.

BR,

Suhas

Edited by: Suhas Saha on Jun 8, 2010 5:37 PM

0 Kudos

The problem was the BDC data. All 5 production orders were created within 1 CALL TRANSACTION CO40. Don't know why haven't seen yesterday.

Regards, martin

0 Kudos

>

> The problem was the BDC data.

I thought my understanding on CALL TRANSACTION using UPDATE 'S' was about to take a hit

Cheers,

Suhas

Former Member
0 Kudos

Problem solved.

Thanks for support!