04-28-2005 8:36 AM
I have a problem about SCC1, I created program for copying Request No. to another client by using SCC1.
But SCC1 can use only one user and another can not use it at the same time. So I want to know how can I check status or something that SCC1 is used by other user.
Thanks in advance for your kindly help.
04-28-2005 8:49 AM
04-28-2005 9:58 AM
Thank you for your answer but I want to know how can I check or know the status when SCC1 locked by another user in ABAP. Thanks in advance.
Message was edited by: Chai Chai
04-28-2005 11:41 AM
Hi Chai Chai,
Try the following code (I ripped it out of the standard code that performs the check):
DATA : ENQTABLE_ID LIKE RSTABLE-TABNAME,
ENQKEY LIKE RSTABLE-VARKEY.
ENQTABLE_ID = 'RSCLICOPY'.
ENQKEY(3) = SY-MANDT.
CALL FUNCTION 'ENQUEUE_E_TABLE'
EXPORTING
TABNAME = ENQTABLE_ID
VARKEY = ENQKEY
EXCEPTIONS
FOREIGN_LOCK = 4
SYSTEM_FAILURE = 8.
IF SY-SUBRC <> 0.
* Then SCC1 is locked in this client!!!!!
ENDIF.
Hope that helps.
Cheers,
Brad
Message was edited by: Brad Williams (added the variable declarations)
04-29-2005 4:33 AM
Hi Mr.Brad Williams ,
Thank you very much for your help, I add your code to my program, it's work!! .
Regards,
Chai
04-29-2005 8:13 AM
Hi Chai Chai,
No problem.
Its nice when someone has helped you, to acknowledge that help by awarding some points. The following blog talks about the points system at SDN /people/mark.finnern/blog/2004/08/10/spread-the-love
If you are so inclined then please set this post as a question, and then set it as answered against my response.
Thanks,
Brad