‎2007 Aug 15 2:46 AM
Hi All,
I call BAPI 'BAPI_PO_CREATE1' and create PO, then commit via
commit work and wait.
after creating, query the new PO via
SELECT ebelp pstyp INTO TABLE lt_ebelp
FROM ekpo
WHERE ebeln = p_lv_ebeln.
but no result.
If creating and waiting a moment, it do work.
why, I already used 'commit work and wait' but not 'commit work'.
thanks.
regards.
dou
‎2007 Aug 15 2:53 AM
Try to use BAPI_TRANSACTION_COMMITT FM and see the results.
It should work ,please call FM after your BAPI FM...
Thanks
Seshu
‎2007 Aug 15 2:54 AM
Instead of Commit work and wait use the bapi : BAPI_TRANSACTION_COMMIT,
in which you can pass the wait = 'X'.
Even if this does not work, pass the wait upto 3 seconds.
Then this will definitely work.
Regards
Gopi
‎2007 Aug 15 4:39 AM
Hi All,
At first, I used as follow
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
but it don't work.
so, I replaced with 'commit work and wait'.
‎2007 Aug 15 4:43 AM
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
wait up to 3 seconds. " Add thisAccordingly increase or decrease the time in seconds.
Regards
Gopi
‎2007 Aug 15 4:48 AM
Okay ,first check whether po number is getting saved or not .
If po is saving then use BAPI_TRANSACTION_COMIITT FM ..
Now check ur select query like : Since wait upto n seconds ( This may not work)
data : n Type i.
n = 10.
write the below code after BAPI_TRANSACTIOn_COMITT.
do n times.
select query
if sy-subrc eq 0.
exit.
endif.
enddo.
still document number is not coming ,testing purpose increate n as 20 and see the results.
Thanks
Seshu
‎2007 Aug 15 5:07 AM
Hi All,
thanks very much.
now, I only use do loop to perform it.
best regards.
dou
‎2007 Aug 17 2:43 AM