cancel
Showing results for 
Search instead for 
Did you mean: 

Decision Point change status

Former Member
0 Kudos

Dear Experts,

I'm trying to develop a report to modify the status of a decision point.

I have tried to use the standard function /RPM/DECISION_POINT_MODIFY and I've tried the method set_attributes of the standard class CL_RPM_DECISION.

In both cases, the return code is OK and apparently the status changed (looking the variables in debug mode) but once the report ends, the old status remains in the database (table /RMP/DECISION).

I paste the both ABAP code through I'm trying to change the DP status.

Please, could you tell me if I missed something or if there is something wrong?

thanks a lot.

Aupa.

ABAP Code:

When I'm calling the function /RPM/DECISION_POINT_MODIFY , I do:

ls_context-object_guid = wa_decision-guid.

ls_context-portfolio_guid = lv_porf_guid.

ls_context-parent_guid = wa_decision-guid.

CALL FUNCTION '/RPM/DECISION_POINT_MODIFY'

EXPORTING

is_context = ls_context

iv_language = lv_lang

iv_change_mode = lv_chg_mode

it_comments = it_item_desc_comments

IMPORTING

ev_rc = lv_rc

TABLES

it_attributes = it_item_desc_attr_ins

et_msg = lt_msg.

and when I've tried to use the standard class, I do:

DATA: lr_decision TYPE REF TO cl_rpm_decision,

ls_attributes TYPE rpm_ts_decision_int,

ls_decision_int TYPE rpm_ts_decision_int,

lv_rc TYPE i.

DATA: lr_object_manager TYPE REF TO cl_rpm_obj_manager,

lr_common TYPE REF TO if_rpm_common.

lr_object_manager = cl_rpm_obj_manager=>get_instance( ).

CALL METHOD lr_object_manager->get_appl_object

EXPORTING

iv_project_guid = i_item_guid

iv_appl_obj_id = i_decision_id

  • iv_appl_obj_guid = i_decision_guid

iv_appl_obj_ot = 'EPO'

RECEIVING

rr_object = lr_common.

lr_decision ?= lr_common.

CALL METHOD lr_decision->get_attributes

IMPORTING

es_attributes = ls_attributes.

  • Make sure that decision point is in edit mode

lv_rc = lr_decision->if_rpm_entity~set_edit_mode(

cl_rpm_co=>sc_edit_mode_change ).

IF lv_rc IS NOT INITIAL.

RAISE error.

ENDIF.

  • Update status

ls_decision_int = ls_attributes.

ls_decision_int-status = i_status.

ls_decision_int-active = 'X'.

  • Set the DP attributes

lr_decision->set_attributes( ls_decision_int ).

  • Read new atrributes

clear ls_decision_int.

CALL METHOD lr_decision->get_attributes

IMPORTING

es_attributes = ls_decision_int.

e_status = ls_decision_int-status.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

When you are using function module to change the decision point status, you must use /RPM/SAVE_CHANGES function module after /RPM/DECISION_POINT_MODIFY function module otherwise the changes will not be committed to database.

When you are using the classes , then you should use object manager ( cl_rpm_obj_manager) instance method do_save.

Former Member
0 Kudos

hi guys ,

you need to call method cl_inm_ppm_services=>save with iv_check_only = ' '.

this method has a commit which saves the data.

thanks

mithun

former_member188001
Active Participant
0 Kudos

Hi,

Can someone suggest how to use classes to get Item Attributes and then change the status for the same. I used function modules to do so but these function modules are not released. Thats the reason i want to use classes.

any suggestions are appreciable.

Thanks,

Salil

Answers (1)

Answers (1)

0 Kudos

Please use /RPM/SAVE_CHANGES.

Changes need to be committed to the database and that can be achieved through the function module /RPM/SAVE_CHANGES.