2006 Dec 12 9:27 PM
Hi all,
IAM USING A PROGRAM TO create reservation using BAPI AND UPDATING A ZTABLE AND END OF THE PROGRAM I CALLING ANOTHER PROGRAM IN WHICH IAM USING THE SAME RECORD I RECENTLY UPDATED.
For some reason sometimed the second program is not executing at times . I CANNOT EVEN DEBUG BECAUSE SOMETIMES ITS EXECUTING AND SOMETIMES NOT.
cAN ANYONE TELL ME WHAT MIGHT THE REASON.
mY guess is that the resb and rkpf or ztable is not getting updated immediately because i am using the same tables and the recently updated record in the second program.
Thanks
Hi all,
IAM USING A PROGRAM TO create reservation using BAPI AND UPDATING A ZTABLE AND END OF THE PROGRAM I CALLING ANOTHER PROGRAM IN WHICH IAM USING THE SAME RECORD I RECENTLY UPDATED.
For some reason sometimed the second program is not executing at times . I CANNOT EVEN DEBUG BECAUSE SOMETIMES ITS EXECUTING AND SOMETIMES NOT.
cAN ANYONE TELL ME WHAT MIGHT THE REASON.
mY guess is that the resb and rkpf or ztable is not getting updated immediately because i am using the same tables and the recently updated record in the second program.
Thanks
2006 Dec 12 9:29 PM
1) use COMMIT WORK AND WAIT. Before calling second program.
2) Try to read the Z table for the newly entered data. If is is successful then call the second program.
Regards
Kathirvel
2006 Dec 12 9:34 PM
Lock the Z table before you updated it; then release the lock after the update is complete. Then run the BAPI.
Rob
Can't specify wait
Message was edited by:
Rob Burbank
2006 Dec 12 9:42 PM
Hi
iam creating reservation using bapi and then updating a ztable with reservation number and in the next program i calling this reservation number from the ztable that i have updated recently.
how can i lock and unlock the ztable.
can't i use commit and wait after i update the ztable .
iam using
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = space
IMPORTING
RETURN =
.
as well
Thanks
2006 Dec 12 9:48 PM
Then try to lock (and wait) the reservation. Then unlock it. then update the Z table.
On second thought, try that first. (You have to do the commit anyway.)
Rob
Message was edited by:
Rob Burbank
2006 Dec 12 9:54 PM
Hi ,
can you tell me how to lock and make the reservation wait
Thanks
2006 Dec 12 10:19 PM
First, try:
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
Rob
2006 Dec 12 10:24 PM
HI,
I MODIFIED THE CODE BUT I DON'T WHEN THE SECOND PROGRAM EXECUTES .
IT EXECUTES MOST OF THE TIME BUT ONCE IN A WHILE IT DOESN'T .rIGHT NOW ITS EXECUTING BUT IAM NOT SURE.
THIS SHOULD SOLVE THE PROBLEM BUT I ALREADY HAD BAPI TRANSACTION COMMIT BUT INSTEAD OF X I PASSED SPACE DOES THAT MAKES ANY DIFFERENCE.
THANKS
2006 Dec 12 10:31 PM
From the documentation of BAPI_TRANSACTION_COMMIT, for the WAIT parameter:
Using the command `COMMIT AND WAIT`
Description
The default value of this parameter is SPACE. If the parameter contains the value SPACE or it does not contain a value at all, then a simple COMMIT WORK is executed.
If the parameter WAIT contains a value other than SPACE, a COMMIT WORK AND WAIT command is executed.
Rob
Message was edited by:
Rob Burbank
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |