Hi experts,
I'd like to test this business object AFVC_PM via SWO1 and specially this method "PMorderoperation.UserstatusSet".
But after the execution of this method, the operation status remains unchaged.
When I debug the source code, I can see that the variable STAOBJ ( LIKE ONR00-OBJNR ) is empty after the call of the macro (but RC = 0).
This is probably the reason why the status is not chaged.
SWC_GET_PROPERTY SELF 'StatusObjNumber' STAOBJ.
IF SY-SUBRC NE 0.
EXIT_RETURN 1000 SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'STATUS_CHANGE_EXTERN'
EXPORTING
CHECK_ONLY = 'X'
CLIENT = SY-MANDT
OBJNR = STAOBJ
USER_STATUS = ESTAT
SET_INACT = STATUSINACTIVE
EXCEPTIONS
OBJECT_NOT_FOUND = 1
STATUS_INCONSISTENT = 2
So my question is : Is this the right way to test this BO? Or what should I do to get the status changed (in test mode) ?
Thanks in advance for your help.
Juan.