2006 Jun 28 5:55 PM
Hello All,
I am facing a problem in locking the Project number before calling the project BAPI_PROJECT_MAINTAIN.
I am Calling the FM
CALL FUNCTION 'CJDW_ENQUEUE'
EXPORTING
OBJECT_ID = WA_FINAL-POSID
OTYPE = 'P'
SHARED = 'X'
EXCEPTIONS
FOREIGN_LOCK = 1
INVALID_TYPE = 2
MISSING_PARAMETER = 3
SYSTEM_FAILURE = 4
OTHERS = 5.
But at that time any of the user opened the project which I am trying to lock, this FM is not returning anything ie) Subrc.
Can Abybody tell me which FM I have use for this issue.
Also I have tried with FM CALL FUNCTION 'CJHX_ENQUEUE_PRPS'
EXPORTING
PSPNR = P_PSPNR
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3.
This locks the project. But the problem is the BAPI is
returning the error message saying that The Project is currently processsed by user - who is running the report.
Please give a solution for this.
Regards,
Vasanth
2006 Jun 28 5:57 PM
2006 Jun 28 6:02 PM
Try this one:
CALL FUNCTION 'ENQUEUE_EC_PROJ'
EXPORTING
MANDT = SY-MANDT
TYP = 'P'
PSPID = WC_PSPID
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3.
Regards.