cancel
Showing results for 
Search instead for 
Did you mean: 

how to use the function /RPM/ITEM_MODIFY and /RPM/DECISION_POINT_MODIFY

0 Kudos

Hi,experts,

   We want to change the item state and decision point state by our customized program.We used the function /RPM/ITEM_MODIFY and /RPM/DECISION_POINT_MODIFY but don't know what the parameters are,so it can't change the item.We enclose our code pls help us.

ZWK_PPM_ITEM_CHANGE

*&---------------------------------------------------------------------*

*& Report  ZWK_PPM_ITEM_CHANGE

*&

*&---------------------------------------------------------------------*

*&

*&

*&---------------------------------------------------------------------*

REPORT  zwk_ppm_item_change.

DATA: it_context       TYPE  /rpm/tt_object_hier WITH HEADER LINE.

DATA: et_item_details  TYPE  /rpm/tt_item_d_api_ui WITH HEADER LINE.

DATA: es_attributes    TYPE  /rpm/ts_item_d_api.

DATA: it_attributes    TYPE  /rpm/tt_item_d_api WITH HEADER LINE.

*it_context-object_guid = '00237D3D41F51ED1B6D87AA7FE078E04'.

*APPEND it_context TO it_context.

*CALL FUNCTION '/RPM/ITEM_GET_DETAILS_DB'

*  TABLES

*    it_context      = it_context[]

*    et_item_details = et_item_details.

*LOOP AT et_item_details.

*  MOVE-CORRESPONDING et_item_details TO it_attributes.

*  it_attributes-proj_description = '123'.

*  APPEND it_attributes.

*ENDLOOP.

it_context-object_guid = '00237D3D41F51ED1B6D87AA7FE078E04'.

APPEND it_context TO it_context.

CALL FUNCTION '/RPM/ITEM_DISPLAY'

  EXPORTING

    is_context                 = it_context

*   IV_EDIT_MODE               =

*   IV_ITEM_TYPE               =

*   IV_LANGUAGE                =

*   IV_TEMPLATE                =

IMPORTING

   es_attributes              = es_attributes

*   ES_ACTIVE_DECISION         =

*   EV_COMMENTS                =

*   EV_SHORT_TEXTS             =

*   ES_MODE                    =

*   EV_RC                      =

* TABLES

*   ET_ACLS                    =

*   ET_FIELD_DESCRIPTION       =

*   ET_MSG                     =

          .

es_attributes-zsfcb = 'X'.

APPEND es_attributes TO it_attributes.

DATA: et_msg  TYPE  /rpm/tt_messages.

DATA: item_context TYPE  /rpm/ts_item_context.

CALL FUNCTION '/RPM/ITEM_MODIFY'

  EXPORTING

    iv_change_mode    = 'U'

    is_modify_context = item_context

  TABLES

    it_attributes     = it_attributes

    et_msg            = et_msg.

WRITE: '1'.

ZWK_PPM_DECISION_CHANGE

*&---------------------------------------------------------------------*

*& Report  ZWK_PPM_DECISION_CHANGE

*&

*&---------------------------------------------------------------------*

*&

*&

*&---------------------------------------------------------------------*

REPORT  zwk_ppm_decision_change.

DATA: lw_zsppm001    TYPE  zsppm0001.

DATA: et_decisions   TYPE  /rpm/tt_decision_api.

DATA: is_context     TYPE  /rpm/ts_object_hier,

      iv_language    TYPE  laiso,

      iv_change_mode TYPE  char1,

      it_comments    TYPE  /rpm/tt_object_text.

CALL FUNCTION '/RPM/DECISION_POINT_GETLIST'

  EXPORTING

    iv_item_guid = '00237D3D41F51ED1B6D87AA7FE078E04'

    iv_edit_mode = '1'

  TABLES

    et_decisions = et_decisions.

is_context-object_guid = '00237D3D41F51ED1B6D87AA7FE078E04'.

CALL FUNCTION '/RPM/DECISION_POINT_MODIFY'

  EXPORTING

    is_context     = is_context

    iv_language    = 'ZH'

    iv_change_mode = /rpm/cl_co=>sc_change_mode_update

    it_comments    = it_comments

  TABLES

    it_attributes  = et_decisions.

Accepted Solutions (1)

Accepted Solutions (1)

amit_maheshwari2
Contributor

Hi Qiao,

To use FM  /RPM/ITEM_MODIFY, first you have to call  /RPM/ITEM_DISPLAY in EDIT mode then you can update item using  /RPM/ITEM_MODIFY.

Please check if the same applies for/RPM/DECISION_POINT_MODIFY also.

Cheers

Amit

0 Kudos

Hi Amit,

     Thanks for you help.It's the right way for us.

Answers (0)