Website Upgrade Incoming - we're working on a new look (and speed!) standby while we deliver the project

Tips on using this forum..

(1) Explain your problem, don't simply post "This isn't working". What were you doing when you faced the problem? What have you tried to resolve - did you look for a solution using "Search" ? Has it happened just once or several times?

(2) It's also good to get feedback when a solution is found, return to the original post to explain how it was resolved so that more people can also use the results.

Importing XML to P6 error

4 replies [Last post]
Thomas Nicholson
User offline. Last seen 11 weeks 5 days ago. Offline
Joined: 4 Oct 2006
Posts: 88
Groups: None

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

Replies

Zoltan Palffy
User offline. Last seen 7 weeks 6 days ago. Offline
Joined: 13 Jul 2009
Posts: 3089
Groups: None

thanks both Toms 

Tom Boyle
User offline. Last seen 1 day 15 hours ago. Offline
Joined: 28 Nov 2006
Posts: 304
Groups: None

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.)

Thomas Nicholson
User offline. Last seen 11 weeks 5 days ago. Offline
Joined: 4 Oct 2006
Posts: 88
Groups: None

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

 

Kind regards, 

 

Thom

Zoltan Palffy
User offline. Last seen 7 weeks 6 days ago. Offline
Joined: 13 Jul 2009
Posts: 3089
Groups: None

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.