Yes, we can activate ABAP objects programmatically, to do that we just need to call the function module ‘REPS_OBJECT_ACTIVATE’.
Please find below the sample code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
*Data Declaration: PARAMETERS: p_objectToActivate TYPE e071-obj_name. *Function module to activate object: CALL FUNCTION 'REPS_OBJECT_ACTIVATE' EXPORTING OBJECT_NAME = p_objectToActivate "Object to activate OBJECT_TYPE = 'REPS' "Type of the object EXCEPTIONS NOT_EXECUTED = 1 OTHERS = 2 . IF SY-SUBRC = 0. Message 'The object has been activated successfully.' Type 'I'. ENDIF. |
Happy activation. 🙂