Skip to Content

Exception occured in the update of the application object, while using /RPM/SAVE_CHANGES

There is a custom tab "Deliverables" created using webdynpro in NWBC. (Screenshot1)

Custom code is triggered when user clicks on Calculate. This code calculates necessary amounts and updates item in database using '/RPM/ITEM_DISPLAY', '/RPM/ITEM_MODIFY' and '/RPM/SAVE_CHANGES'.

Everything works fine except when user tries to change some other field in other tabs and clicks on main SAVE button of item overall. (Screenshot2)

Error occurs from these set of Function modules and I am not sure why!

Code below:

DATA: lv_context TYPE STANDARD TABLE OF /rpm/ts_object_hier,
wa_context TYPE /rpm/ts_object_hier.
wa_context-object_id = lv_itemextid.
wa_context-object_guid = lv_guid.

CALL FUNCTION '/RPM/ITEM_DISPLAY'
EXPORTING
is_context = wa_context
iv_edit_mode = '2'
* IV_ITEM_TYPE =
* IV_LANGUAGE =
* IV_TEMPLATE =
IMPORTING
es_attributes = wa_attributes
* ES_ACTIVE_DECISION =
* EV_COMMENTS =
ev_short_texts = l_short_text
* ES_MODE =
* EV_RC =
* TABLES
* ET_ACLS =
* ET_FIELD_DESCRIPTION =
* ET_MSG =
.
wa_attributes-zzanu = lv_annual_units.
wa_attributes-guid = lv_guid.
wa_attributes-zzgm = lv_gm.
wa_attributes-zzgm1 = lv_gm_contr.
wa_attributes-zztc = lv_target_cost_ac.
wa_attributes-zztc1 = lv_target_cost_pre.
wa_attributes-zzrp = lv_rprice.
wa_attributes-zzcp = lv_consultant_price.
wa_attributes-zzans = lv_annual_sales.
wa_attributes-zzgmp = lv_gross_margin_pre.
wa_attributes-zztuni = lv_zztuni.
APPEND wa_attributes TO it_attributes.
CALL FUNCTION '/RPM/ITEM_MODIFY'
EXPORTING
* IV_LANGUAGE =
iv_change_mode = 'U'
* IV_COMMENTS =
iv_short_texts = l_short_text
* IS_MODIFY_CONTEXT =
* IMPORTING
* EV_RC =
TABLES
it_attributes = it_attributes
* IT_ACLS =
et_msg = lv_msg
* ET_GUID =
* ET_DETAIL_GUID =
.
CALL FUNCTION '/RPM/SAVE_CHANGES'
* EXPORTING
* IV_CHECK_ONLY = /RPM/CL_CO=>SC_FALSE
* IV_REMOVE_OBJECTS =
IMPORTING
* EV_RC =
et_msg = lv_msg.

As per initial analysis, I found the below. Edit mode is disabled if I use those above FMs.

Could anyone please provide any information on this issue?

8vdk1.png (47.2 kB)
3j8lz.png (43.7 kB)
avtka.jpeg (110.7 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 31, 2017 at 08:47 AM

    Dear Barkha,

    The Message "Exception occurred in the update of the application object" is caused by the button "Calculate" on tab "Deliverables" for field SHORT_TEXT at the following coding part:

    ZPDMEGT_JAFRAMETRICS
    MAIN
    ONACTIONCALCULATE1

    CALL FUNCTION '/RPM/ITEM_MODIFY'
    EXPORTING
    * IV_LANGUAGE =
    iv_change_mode = 'U'
    * IV_COMMENTS =
    *Begin of change : S02 - Enable parameter. Retain short text
    iv_short_texts = l_short_text
    *End of change : S02 - Enable parameter. Retain short text
    ...


    Afterwards, these leads to a problem because the project is not changeable when trying to set the "Description".
    (see class CL_RPM_PROJECT, method SET_DESCRIPTION)

    Best regards,

    Judith

    Add comment
    10|10000 characters needed characters exceeded

    • Thank you Judith.

      I have the same reply from SAP.

      However, I have commented the short text export parameter from the above code, still the problem persists.

      Does this mean we cannot use '/RPM/ITEM_MODIFY' at all?

      If yes, do you think there is other way to overcome this.

      Thanking in anticipation.