on 10-26-2013 6:47 AM
Dear Friend,
I need to set the Price value 0 when do the GR PO using Inventory Revalution Posting though SDK using DI API.
I am using following Code in FormDataEvent at AcctionSuccess.
But I am Getting Following Error.
How do the Inventory Revaluation Posting. Please give me any sample.
We using SAP B1 8.82 PL 6.
Stock Posting Function The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
Dim m_MaterialRev As SAPbobsCOM.MaterialRevaluation
Dim m_MaterialRevLines As SAPbobsCOM.MaterialRevaluation_lines
m_MaterialRev = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oMaterialRevaluation)
m_MaterialRev.DocDate = DateTime.Now
m_MaterialRev.RevalType = "P"
m_MaterialRevLines = m_MaterialRev.Lines
m_MaterialRevLines.SetCurrentLine(0)
m_MaterialRevLines.ItemCode = oMatrix.GetCellSpecific("1", 1).value.ToString.Trim
m_MaterialRevLines.WarehouseCode = oMatrix.GetCellSpecific("24", 1).value.ToString.Trim
m_MaterialRevLines.Price = 0
m_MaterialRevLines.RevaluationDecrementAccount = "101010100021"
m_MaterialRevLines.RevaluationIncrementAccount = "101010100021"
m_MaterialRevLines.Quantity = oMatrix.GetCellSpecific("11", 1).value.ToString.Trim
m_MaterialRevLines.Add()
m_MaterialRev.Add()
If m_MaterialRev.Add() <> 0 Then
StatusBarWarningMsg("Unable To Post Stock Document....... at line Id " & oCompany.GetLastErrorDescription)
Return False
End If
Please Help Me.
Regards,
K Sakthivel
Return True
Hi,
This is a limitation in B1. Zero value is not allowed.
The only workaround is to set the price to the lowest possible value above 0 for example 0,01
Regards,
Johan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
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.