cancel
Showing results for 
Search instead for 
Did you mean: 

Personas 3.0 - Have a script wait for backend saving

Former Member
0 Kudos

Hi Personas gurus

we are currently building a script to jump from IW32 order change directly into IW42 to allow the order to be directly confirmed.

The scripted logic starts in IW32:

  1. Save the order and keep the number stored in a variable (it will take the GUI back to IW32 initial screen)
  2. Start transaction IW42 and paste the stored number, execute
  3. .... do steps to confirm ...

My issue here is that saving the order happens asynchronous, so if I immediately enter IW42, the backend will still have locked the order.

Of course I can just "pause" the script by some huge count as described here: URGENT! Personas 2.0 SP3: ME51N: copy data fail... | SCN

but maybe someone has a better suggestion, ideally testing the actual lock?

Thanks for any suggestions!

Merten

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

write script which calls your RFC where you check whether order is locked or not.

I am assuming that this might work:

  call function 'ENQUEUE_EVVBAKE'

    exporting

      mode_vbak      = 'E'

      vbeln          = YOUR_PASSED_ORDER_NUMBER

    exceptions

      foreign_lock   = 1

      system_failure = 2

      others         = 3.

  if sy-subrc = 0.

      "Order is Locked

  endif.

How to call Remote Enabled ABAP Function Modules in Personas 3.0 - SAP Imagineering - SCN Wiki

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

Use an RFC to determine whether the document was really saved and only continue with the processing after that.

You can do this by checking for a lock entry for the order.