Monday, April 5, 2010

How to change user status by ABAP

SAP R/3 4.6c, if we want to change user status in production order by ABAP, we can apply function 'I_CHANGE_STATUS'. This function requires object number, current active status and status that we want to set as active.
Example:

CALL FUNCTION 'I_CHANGE_STATUS'
EXPORTING
OBJNR = PA_OBJNR
ESTAT_INACTIVE = lv_inactive
ESTAT_ACTIVE = lv_active
EXCEPTIONS
CANNOT_UPDATE = 1
OTHERS = 2 .

No comments:

Post a Comment