Quantcast
Channel: SCN: Message List - SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 7775

Re: Deleting Locked Transactions from SM12 programmatically

$
0
0

Hi Faisal,

 

Sry i am new to CRM. Will this code work in deleting the SM12 entries programmatically.

 

I need to delete the session lock for that particular user.

 

  DATA: W_GARG  TYPE EQEGRAARG.

 

  CLEAR: W_GARG, ENQ, ENQ[].

 

  CALL FUNCTION 'ENQUEUE_READ'

    EXPORTING

      GNAME                 = P_GNAME

      GUNAME                = P_GUNAME

    IMPORTING

      NUMBER                = P_NUMBER

      SUBRC                 = P_SUBRC

    TABLES

      ENQ                   = ENQ

    EXCEPTIONS

      COMMUNICATION_FAILURE = 1

      SYSTEM_FAILURE        = 2

      OTHERS                = 3.

 

 

  IF ENQ[] IS NOT INITIAL.

 

    CONCATENATE SY-MANDT P_WI_ID INTO W_GARG.

 

    DELETE ENQ WHERE GARG  W_GARG.

 

    CALL FUNCTION 'ENQUE_DELETE'

      EXPORTING

        CHECK_UPD_REQUESTS = '1'

      IMPORTING

        SUBRC              = P_SUBRC

      TABLES

        ENQ                = ENQ.

 

  ENDIF.

 

ENDFUNCTION.


Viewing all articles
Browse latest Browse all 7775

Trending Articles



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