Importing XML to P6 error

Morning all, 

I'm trying to import an XML/MPP file into P6 v8.2 and keep getting an error 

 

SEVERE: Unable to invoke setHoursPerYear on business object Calendar. Value for field "HoursPerYear" in Calendar may not be set to greater than 8784. com.primavera.integration.client.xml.xmlimporter.XMLImporterException: Unable to invoke setHoursPerYear on business object Calendar. Value for field "HoursPerYear" in Calendar may not be set to greater than 8784. I've checked the MPP file and cannot see any problems. Does anyone have any idea how to solve this problem? Thanks in advance,  Thom

T
Tom Boyle 👤 Member for 19 years 6 months

Perfect diagnosis from Zoltan.  One clarification:

There is no need to repeat the process for different calendars.  DaysPerMonth in MSP is a singular property of a Project, not of a Calendar, and it only occurs once in a project xml file.  (P6's XML importer multiplies the Project|HoursPerDay by the Project|DaysPerMonth to arrive at an HoursPerMonth that it then writes to each non-elapsed-duration calendar in P6.)

T
Thomas Nicholson 👤 Member for 19 years 8 months

Zoltan, as usual you're a star.  Thank you for that, I shall get started immediately. 

 

Kind regards, 

 

Thom

Z
Zoltan Palffy 👤 Member for 16 years 10 months

The issue is caused by the incorrect calendar setting inside Microsoft Project.



The total working hours per year in P6  is 

 

366 Days *24 hours / day = 8784 hours / year

The Microsoft Project XML file defined more then 31 working days per week.  This violation of the business rules hence P6 import function stopped and report the above error. 

 

31 days X 12 months x 24 hours = 8928 hours /year

This problem can be fixed either in Microsoft Project (MSP) or in MSP XML file



A. Microsoft Project method

1. Open the problem project in Microsoft Project

2. Select Tools -> "Change Working Time" from the pull down menu to open the "Change Working Time" window

3. Select a calendar from the "For Calendar" drop down section.

4. Single Click Options icon at the bottom in the "Change Working Time" window.

5. Click the "Calendar" tab in the top of Options window

6. Modify the days per month to 30.5 then click OK

Repeat 3 to 7 to check all calendars setting.

7. Export the project to XML format then import it to P6.

B. Without MSP installed

1. Open the XML file in a text editor.

2. Search for "<DaysPerMonth>" XML attribute.

3. Change the value in between the <DaysPerMonth> and </DaysPerMonth> to 30.5 

ie <DaysPerMonth>30.5</DaysPerMonth>

4. Repeat step 2 and 3 until all values had modified

5. Save the XML file.

6. Import into P6.

Forum Sponsor

Top Posters

Julian Pegg
1 posts
Peter Nagy
2 posts
Raymund de Laza
17 posts
Syed_Asad
0 posts
Tony Greyvenstein
0 posts
Ahmed Al-Jubouri
13 posts
Umar Alvi
3 posts
Sibusiso Mahlalela
0 posts
Michael Samanyayi
3 posts
Simon Gumede
0 posts