Hi PPM Experts,
System: PPM 6.0
Requirement:
Item and project version(snapshot) has to be generated automatically whenever the user change the item decision point status.
Solution:
Implemented the BADI /RPM/DECISION_POINT=>PREPARE_TO_SAVE
Calling static class to generate version: /rpm/cl_item_d_api=>create_items_version
Problem:
Item version is generated successfully but project version is not. It throw's errors as below.
"Item version XXXX does not exists."
"Snapshot version could not be created"
code:
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = lv_number_range
object = ' DPR_VRSN'
IMPORTING
number = lv_hdr_verid
EXCEPTIONS
interval_not_found = 1
number_range_not_intern = 2
object_not_found = 3
quantity_is_0 = 4
quantity_is_not_1 = 5
interval_overflow = 6
buffer_overflow = 7
OTHERS = 8.
/rpm/cl_item_d_api=>create_items_version(
EXPORTING
it_item_guids = lt_itemguid
iv_version_type = lc_snapst
iv_vers_hdr_name = lv_hdr_verid
iv_cp_version_name = lv_hdr_verid
iv_vers_hdr_description = lv_verdes
).
The version has to generate for an item along with the project.
Kindly help me to resolve this issue.