cancel
Showing results for 
Search instead for 
Did you mean: 

Capture the status management status while saving in cProjects

0 Kudos

Hi,

I have a requirement wherein have to capture the status of status management(ex: release, flag for transfer, lock etc..) while saving. Is there any BADI which captures these details while saving. while saving the project I have to capture these status and send an email accordingly.

Or in general, is there a way to capture the status when project converted from simulation to operative, and project transferred from cPRojects to PS.

Regards,

Praveen kumar

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Prvaeen,

At runtime we can capture the status of the project using the project instance.

If the project guid is available then by using the project instance ,status instances we have to call the static method

'GET_STATUS' of the class 'CL_DPR_STATUS_MANAGEMENT' we can acheive the status

Use the following code to get the status

DATA:

lv_project_guid TYPE dpr_tv_guid,

lref_manager TYPE REF TO cl_dpr_appl_object_manager,

lref_dpr_proj TYPE REF TO cl_dpr_project,

lref_dpr_status TYPE REF TO if_dpr_status_element,

ls_crmt_jest TYPE crmt_jest_buf,

lt_crmt_jest TYPE crmt_jest_buf_tab,

lt_status_int TYPE dpr_tt_status_int.

              • lv_project_guid holds the project guid *************

  • Get instance of object manager

lref_manager = cl_dpr_appl_object_manager=>get_instance( ).

IF lv_project_guid IS NOT INITIAL.

TRY.

CALL METHOD lref_manager->get_project

EXPORTING

iv_guid = lv_project_guid

  • iv_external_id =

RECEIVING

rr_project = lref_dpr_proj.

CATCH cx_dpr_object_not_found_error .

EXIT.

ENDTRY.

IF lref_dpr_proj IS BOUND.

lref_dpr_status ?= lref_dpr_proj.

  • get the current status of the project

CALL METHOD cl_dpr_status_management=>get_status

EXPORTING

ir_status_element = lref_dpr_status

iv_only_active = cl_dpr_co=>sc_true

IMPORTING

et_jest_buf = lt_crmt_jest

et_status = lt_status_int.

  • Check for the Table TJ02 for the object status mainly from 'I1700' to 'I1799'

READ TABLE lt_crmt_jest TRANSPORTING NO FIELDS

WITH KEY stat = 'I1700' " check for creation status

inact = space.

IF sy-subrc EQ 0.

                  • &&&&& Check for the status here *********

ENDIF.

ENDIF.

ENDIF.

Thanks and Regards,

Satish A.