Skip to content

Importing XML to P6 error

Thomas NicholsonMember for 20 years
Created
4
2
0

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

4 replies

Oldest first
  1. 0
    Zoltan Palffy ·

    The issue is caused by the

    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.
  2. 0
    Thomas Nicholson ·

    Zoltan, as usual you're a

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

     

    Kind regards, 

     

    Thom

  3. 0
    Tom Boyle ·

    Perfect diagnosis from

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

  4. 0
    Zoltan Palffy ·

    thanks both Toms

    thanks both Toms 

Log in or join to reply

ProjectControls.com is free to join. Members can post questions, reply, vote and follow discussions.

Existing members: your original username and password still work. Forgot password?