SAP Function STATUS_CHANGE_FOR_ACTIVITY - Carry Out Status Changes for an Activity

Parameter Reference Type Length Default Optional Text
ACTIVITY_ALLOWED XFELD C 1 SPACE X 'Activity Allowed' Flag (Only for OBTYP = ORC)
CHECK_ONLY XFELD C 1 SPACE X 'Carry Out Checks Only' Flag
CLIENT SYST-MANDT C 3 SY-MANDT X Client (Use Only in Exceptional Cases!)
DATE SYST-DATUM D 8 X Effective Date for Results Analysis
NO_AUTHORITY_CHECK XFELD C 1 SPACE X Suppress Authorization Check
NO_CHECK XFELD C 1 SPACE X 'No Check Whether Activity Allowed' Flag
OBJNR JSTO-OBJNR C 22 Object Number
SET_CHGKZ JSTO-CHGKZ C 1 X 'Activate Change Documents' Flag
VRGNG TJ01-VRGNG C 4 Activity for which the Subsequent Statuses are to be Set
ZEILE MESG-ZEILE C 22 SPACE X Line Number for Message Handler, if Active

Parameter Reference Type Length Text
ACTIVITY_NOT_ALLOWED 0 'Activity not Allowed' Flag
ERROR_OCCURRED 0 'Error Message Occurred' Flag
OBJECT_NOT_FOUND 0 'Status Object Not Found' Flag
STATUS_INCONSISTENT 0 'Status Set and Deleted' Flag
STATUS_NOT_ALLOWED 0 'Status Change Not Allowed' Flag
STONR TJ30-STONR N 2 Status Number
WARNING_OCCURRED 0 'Warning Message Occurred' Flag

Exception Text
ACTIVITY_NOT_ALLOWED Activity not Allowed
OBJECT_NOT_FOUND Status Object Not Found
STATUS_INCONSISTENT Individual Status Should be Set and Deleted
STATUS_NOT_ALLOWED Status Change Not Allowed
WARNING_OCCURED Activity is "Allowed with Warning" Only
WRONG_INPUT CHECK_ONLY = 'X' and NO_CHECK = 'X'

Functionality
The function module executes an activity on a status object.
It first checks whether the activity is currently allowed, i.e.

  • whether there is a set status that allows the activity

  • whether there is no status that does not allow the activity

  • If the activity can be executed, the subsequent statuses that influencethe activity are set or deleted.
    If the AUTHORITY_CHECK flag is set, then the activity is also notallowed if the authorization for setting or deleting a user status(subsequent status) is missing. Otherwise no authorization check ismade on the user status.

    Notes
    The status changes are first executed in the internal buffer only andwritten to the database later using a "COMMIT WORK".
    If the message handler is active, no error messages or exceptions aretriggered. Instead an appropriate message is written in the messagehandler.

    Description
    When the message handler is active this flag indicates that theactivity may not be executed at this time.

    Value range
    INITIAL or 'X'

    Description
    When the message handler is active this flag indicates that an errorhas occured during processing (E message).

    Value range
    INITIAL or 'X'

    Description
    When the message handler is active this flag indicates that the objectnumber given could not be found in the table JSTO.

    Value range
    INITIAL or 'X'

    Description
    When the message handler is active this flag indicates that an attemptwas made to set and delete a status at the same time.
    This is an internal error in the status management that should notoccur.
    Consult the developer responsible for status management.

    Value range
    INITIAL or 'X'

    Description
    When the message handler is active this flag indicates that an invalidstatus is to be set.
    (Compare exception STATUS_NOT_ALLOWED for the function modulesSTATUS_CHANGE_INTERN,STATUS_CHANGE_EXTERN)
    The occurence of this error points to an inconsistency in theconfiguration of status management.

    Value range
    INITIAL or 'X'

    Description
    Delivers the new status number after the status change.

    Value range
    00 - 99

    Description
    When the message handler is active this flag indicates that a warningmessage has been issued.
    This occurs if a status has the activity "allowed with warning"

    Value range
    INITIAL or 'X'

    Description
    If this flag is set, an activity is allowed for object type ORC even ifno status has been set that explicitly allows this.
    However, no status may be set that forbids this.

    Value range
    INITIAL or 'X'

    Default
    INITIAL

    Description
    Check only, no status changes are carried out.
    If the activity cannot be executed, either exceptions are triggered or,if the message handler is active, the export parameter is filled.

    Value range
    INITIAL or 'X'.

    Default
    INITIAL

    Description
    Client

    Description
    The activity influences are ignored.
    Status changes are made even if statuses are set that do not allow theactivity.

    Value range
    INITIAL or 'X'

    Default
    INITIAL

    Description
    Object number

    Value range
    Object number must exist in table JSTO.

    Description
    If this flag is set, an additional creation of change documents isactivated for the status object.
    Once the creation of change documetns has been activated for a statusobject it cannot be deactivated.
    The change documents are displayed using the function moduleSTATUS_SHOW_CHANGE_DOCUMENTS.

    Value range
    INITIAL or 'X'

    Default
    INITIAL

    Description
    Business transaction that is to be executed.

    Value range
    Check table is TJ01. Here the flag SM (status management) must be setfor the transaction.

947682Err generatng ARU settl rule w/ intrnl ordr cllctve procssng
380357Equipment:user status during installatn/dismantling