cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Linetotal 0 or discount 100 in a PO

former_member186712
Active Contributor
0 Kudos


Hello all,

I have a problem when I integrate Sales Order from R3 to Purchase Order in B1.

I use R3SO2B1PO.

Everything works perfect except when I want to put the line total with 0 value.

Depending in a condition I want to put the LineTotal with 0 or the line discount with 100%.

When I do this in the documents lines:

<xsl:if test="PSTYV=&apos;TANN&apos;">

<DiscPrcnt>100</DiscPrcnt>

</xsl:if>

I get this message:


com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception: com.sap.b1i.bizprocessor.BizProcException: BPE001 Nested exception: com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception: com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception: java.lang.RuntimeException: Invoke of: ReadXml Source: Description: Property 'DiscPrcnt' of 'DocumentLine' is invalid

When I do this:

<xsl:if test="PSTYV=&apos;TANN&apos;">

<LineTotal>0.00</LineTotal>

</xsl:if>

In B1 the line is not getting to 0 but I don't get any error.

In B1 the local currency is in DKK and the document is in EUR.

Please advise me what to do.

Thank you in advance.

Best regards,

Augusto Silva

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Augusto

I'd suggest that you install SAP Business One SDK and check diapi.chm file from 'Help" folder in case of such problems. It will give the actual name of the property not a name of the field from database - they differ much.

First:

Public Property DiscountPercent() As Double

so use DiscountPercent

Second:

use UnitPrice = 0 or PriceAfterVAT = 0 instead of LineTotal

Hope this helps.

Kind regards,

Radek

former_member186712
Active Contributor
0 Kudos

Hi Radoslaw,

You were right. 🙂

I was using the name field of table and I should use the DiscountPercent.

Thank you for your help.

Best regards,

Augusto

Answers (0)