cancel
Showing results for 
Search instead for 
Did you mean: 

Error adding Sales order via DI-SERVER Posting Date deviates from the defin

Former Member
0 Kudos

When adding a sales order via the DI-API we have started receiving the following error:

Error: Posting Date deviates from the defined range. To complete the operation, define the posting period to match the entered Posting Date. [(----) 131-204]

I have verified that the posting dates within the document exist within the defined posting periods in SAP and that the posting period in question is unlocked.

I can add the document within the SAP B1 interface without any issues.

This process and code was also working up until the start of the new financial year. There have been no changes to the code or the financial periods in the new year.

There is a peculiarity with the financial periods for this company in that they have moved from calendar periods in the past to financial periods. Has anyone come accross any issues with posting dates and the DI SERVER API?

The dates in the XML document that we are trying to add are shown below.

...

<Documents> 
<row> 
<DocDate>20100310</DocDate> 
<DocDueDate>20100310</DocDueDate> 
<CardCode>C9999</CardCode>

...

The following are the financial period values from OFPR

Posting Date From/To: 06.03.10 02.04.10

Due Date From/To: 01.01.10 01.04.11

Document Date From/To: 01.01.10 02.04.10

Start of Fiscal Year: 01.01.10

Regards,

Sean

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I know this is an old post but here is an idea for future reference.

What could be the problem here is that the Posting Periods have been set up in the current connection session of the DI API.

Connections need to be restarted to see all the changes from new posting periods, the DI API is no exception so it is worth restarting this service to see if it solves your problems.

Former Member
0 Kudos

Sean,

Your Posting Date looks abnormal. If your Start of Fiscal Year is 01.01.10, the logical posing date would be 01.03.10 to 31.03.10. Please clarify how those posting periods defined.

Thanks,

Gordon

Former Member
0 Kudos

Hi Gordon,

Our customer has moved their financial year end from 1 April / 31 March using calendar months to a 4/4/5 financial period model with a year start date from Jan.

This was necessary after the company was purchased by a US firm that wanted to align the reporting calendars.

Under the 4/4/5 model their financial year start date does not start 1st January. Hence the 3/1/2010 being the first date of the January period.

No matter how the periods are setup the financial year start date in SAP Business One cannot be anything other than the 1st of the month.

All posting within SAP appears to be working fine, it is only via the DI SERVER requests that we seem to be having problems.

However, we suspect that the issue may be unrelated to the posting periods due to some other testing performed.

Regards,

Sean