2017 Oct 02 10:24 AM - edited 2024 Feb 04 2:18 AM
Hi expert,
I m trying to create new delivery from another company with DI API.
I am saving xml with code docfrom.SaveXML(filePath);
Then i get this xml with
Documents d1 = (Documents)Initializer.oCompany.GetBusinessObjectFromXML(filePath, 0);
var c = d1.Add();
I'm succes with that. But when i look at the newly created delivery i saw the discount percentage is different from other. The first one is 3, the newly created one is 3.03
I think these value is calculated again. But i dont know how it is calculated?
Because when i write the 3,35 to discount total the discount percentage is calculated as 2,98 not 3,03. Does anybody know how is it?
Request clarification before answering.
Hi,
SAP has a few ways of calculation.
If you provide Quantity, Price and discount, the line total will be calculated.
If you provide Quantity, Price and line total, the discount will be calculated regardless of what discount you have entered.
For import from XML, all the values are provided for, and as such SBO recalculate the discount.
To workaround your problem, modify the XML file first by removing the below fields:
1. LineTotal (Doc Lines)
2. DocTotal (Doc Header)
3. PriceAfterVat (Doc Lines)
Regards
Edy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gul aly or Edy Simon
i have some problem using GetBusinessObjectFromXML , becouse i am traying to export from one database to another some documents
like : stocktransfer , Invoices , deliverys,
etc ,
but when use
Documents d1 = (Documents)Initializer.oCompany.GetBusinessObjectFromXML(filePath, 0);
var c = d1.Add();
i get an error : (-5002) You cannot change the total for this document
how can you solve this problem?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
19 | |
10 | |
9 | |
9 | |
7 | |
7 | |
6 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.