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: 

While Creating Invoice it says "Delivery is being processed"? Even no logs in SM12

0 Kudos

Hello All,

For some Process i have to auto create Sale Order(SO) Delivery (DEL) PGI (pgi) and Invoice(INV) through some program.

  • It seems to work fine but at times i have seen SO ODB is done but PGI and INV not done because in return table of Bapi(Invoice) it says "DELIVERY IS BEING PROCESSED".
  • Sometimes i have seen SO ODB and PGI, but INV not done because in return table of Bapi(Invoice) it says "DELIVERY IS BEING PROCESSED"

In both above cases i have checked SM12 and also i did LOGOUT and Login again but this didnot help. Also if the same delivery no(which is currently being processed), i put in VF01 manually and SAVE, it gets created. It didnot give any error message while doing it manually.

Please give some advice. Rewards will be given.

Below are the BAPIS being used:

So -> BAPI_SALESDOCU_CREATEFROMDATA

DEL -> BAPI_OUTB_DELIVERY_CREATE_SLS

PGI -> WS_DELIVERY_UPDATE (with serial nos)

INV -> BAPI_BILLINGDOC_CREATEMULTIPLE

2 REPLIES 2

anand_sagarsethi
Contributor
0 Kudos

did you tried wait condition at each step, to let the system do that work..

Thanks

Anand

pokrakam
Active Contributor
0 Kudos

Some saving is done in background and is still active by the time your next BAPI is called. When doing it manually you're not quite as fast as the computer, and therefore it works because the update is complete by the time you push the next button.

Use BAPI_TRANSACTION_COMMIT with the WAIT flag set after each BAPI, and do a COMMIT WORK AND WAIT after the non-BAPI function module WS_DELIVERY_UPDATE.