If you create a cost plan with cost plan details, xog read is correct, but xog write back without change is producing an error message:
Valid Fiscal Period does not exist for start and end dates for plan detail.
This happens, if you add value to “Total Cost”.
The Steps to Replicate is as follows:
..
<CostPlans>
<CostPlan benefitPlanCode="" code="cp1" finishPeriod="2023-03" investmentCode="contex1" investmentType="project" isPlanOfRecord="true" name="cp1" periodType="MONTHLY" revision="0" startPeriod="2022-08">
<Description/>
<GroupingAttributes>
<GroupingAttribute>transaction_class_id</GroupingAttribute>
</GroupingAttributes>
<Details>
<Detail>
<Cost>
<segment finish="2023-03-31T00:00:00" start="2022-08-01T00:00:00" value="1.0"/>
</Cost>.....
XOG in the out file from step 4
Expected result: XOG IN successfully
Actual result: Error message in XOG output log...
>Valid Fiscal Period does not exist for start and end dates for plan detail.</
Clarity 16.1.1 and supported releases.
When entering Total cost via UI, even though you see values populated for each month on the UI that's just a calculation done by the application from the cost segment. The XOG IN behavior is working as expected and caused if the cost plan xog data does not include all monthly segments that come between Finish and Start period of the cost plan.
Workaround:
The XOG file would need to modified to ensure all the monthly segments that come between Finish and Start period of the cost plan.
Example ( monthly segments from Start Period: 2022-08 and Finish Period: 2023-02)
<Cost>
<segment finish="2022-08-31T00:00:00" start="2022-08-01T00:00:00" value="0.13"/>
<segment finish="2022-09-30T00:00:00" start="2022-09-01T00:00:00" value="0.13"/>
<segment finish="2022-10-31T00:00:00" start="2022-10-01T00:00:00" value="0.13"/>
<segment finish="2022-11-30T00:00:00" start="2022-11-01T00:00:00" value="0.13"/>
<segment finish="2022-12-31T00:00:00" start="2022-12-01T00:00:00" value="0.12"/>
<segment finish="2023-01-31T00:00:00" start="2023-01-01T00:00:00" value="0.12"/>
<segment finish="2023-02-28T00:00:00" start="2023-02-01T00:00:00" value="0.12"/>
<segment finish="2023-03-31T00:00:00" start="2023-03-01T00:00:00" value="0.12"/>
</Cost>
Or
Populate the values in the individual segments without populating total cost.
How Cost Plan Write XOG file should be created : XOG Error: Valid Fiscal Period does not exist for start and end dates for plan detail