Store and provide context data using this class cl_usmd_app_context.
TRY.
DATA(lo_context) = cl_usmd_app_context=>get_context( ).
ENDTRY.
IF lo_context IS BOUND.
*--- Type of Change Request
lo_context->get_attributes(
IMPORTING
ev_crequest_type = DATA(lv_ctype)
ev_crequest_step = DATA(lv_wf_step) ).
ENDIF.
DATA: eo_context TYPE REF TO if_usmd_app_context, "Application Context
eo_model TYPE REF TO if_usmd_model_ext, "USMD Model
ev_parent_process TYPE usmd_process, "Process Type
ev_process TYPE usmd_process, "Process
ev_wi_id TYPE sww_wiid, "Workitem ID
ev_crequest_id TYPE usmd_crequest, "Change Request ID
ev_crequest_type TYPE usmd_crequest_type, "Change Request Type
ev_crequest_step TYPE usmd_crequest_appstep, "CR App Step
ev_crequest_index TYPE usmd_crequest_wfindex. "CR Index
* lv_entity TYPE usmd_entity VALUE 'BP_CENTRL'.
CALL METHOD cl_usmd_app_context=>get_context
RECEIVING
eo_context = eo_context.
CALL METHOD eo_context->get_attributes
IMPORTING
eo_model = eo_model
ev_parent_process = ev_parent_process
ev_process = ev_process
ev_wi_id = ev_wi_id
ev_crequest_id = ev_crequest_id
ev_crequest_type = ev_crequest_type
ev_crequest_step = ev_crequest_step
ev_crequest_index = ev_crequest_index.
No comments:
Post a Comment