Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8088

Re: About BAPI_PRODORDCONF_CREATE_TT and releasing Reservation

$
0
0

Hi Stéphane,

 

Here is the code I used, just before calling the BAPI:

 

 

  DATA: l_lock(1) TYPE c,

        l_while  TYPE i.

 

* Check if Reservation is locked, if yes wait for unlocking

  l_lock = 'X'.

  l_while = 0.

  WHILE l_lock = 'X'.

    CALL FUNCTION 'ENQUEUE_EMRESB'

      EXPORTING

        mode_resb      = 'E'

        rsnum          = l_rsnum

      EXCEPTIONS

        foreign_lock  = 1

        system_failure = 2

        OTHERS        = 3.

    IF sy-subrc <> 0.

      l_lock = 'X'.

      WAIT UP TO 1 SECONDS.

      l_while = l_while + 1.

    ELSE.

      CLEAR l_lock.

      CALL FUNCTION 'DEQUEUE_EMRESB'

        EXPORTING

          mode _resb    = 'E'

          rsnum        = l_rsnum.

      EXIT.

    ENDIF.

 

    IF l_while = 60.

      EXIT.

    ENDIF.

  ENDWHILE.



I hope it will help.....


Thank you and bye,


Flavio


Viewing all articles
Browse latest Browse all 8088

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>