biuan SAP® BUSINESS ONE SDK
API Material Revaluation FIFO Service

Description

The MaterialRevaluationFIFOService service enables you to retrieve the FIFO layers for a specific item and location. You can then use information about the FIFO layers to specify specific layers to revalue (FIFOLayers) and provide these to the MaterialRevaluation object.

To perform material revaluation, select Inventory --> Inventory Transactions --> Inventory Revaluation.

Object Model

Example

Material revaluation (FIFO) (C#)
SAPbobsCOM.MaterialRevaluation m_MaterialRev; SAPbobsCOM.MaterialRevaluation_lines m_MaterialRevLines; SAPbobsCOM.FIFOLayers m_FIFOLayers; SAPbobsCOM.MaterialRevaluationFIFOService m_MRVFIFOService; SAPbobsCOM.MaterialRevaluationFIFO m_MRVFIFO; SAPbobsCOM.MaterialRevaluationFIFOParams m_MRVFIFOParam; SAPbobsCOM.Items m_FIFOItems; SAPbobsCOM.Documents m_APInvoice; SAPbobsCOM.Document_Lines m_APInvoice_Line; SAPbobsCOM.BusinessPartners m_Vendor; m_MaterialRev = (MaterialRevaluation)m_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oMaterialRevaluation); m_MaterialRev.DocDate = DateTime.Now; m_MaterialRev.RevalType = "P"; // Line sub object: m_MaterialRevLines = m_MaterialRev.Lines; m_MaterialRevLines.SetCurrentLine(0); m_MaterialRevLines.ItemCode = m_FIFOItems.ItemCode; // Layer sub object m_FIFOLayers = m_MaterialRevLines.FIFOLayers; // Get Company Service m_companyService = (CompanyService)m_Company.GetCompanyService(); // Get Material Revaluation FIFO Service m_MRVFIFOService = (MaterialRevaluationFIFOService)m_companyService.GetBusinessService(SAPbobsCOM.ServiceTypes.MaterialRevaluationFIFOService); // Create Material Revaluation FIFO Service parameters m_MRVFIFOParam = (MaterialRevaluationFIFOParams)m_MRVFIFOService.GetDataInterface(SAPbobsCOM.MaterialRevaluationFIFOServiceDataInterfaces.mrfifosMaterialRevaluationFIFOParams); m_MRVFIFOParam.ItemCode = m_FIFOItems.ItemCode; m_MRVFIFOParam.LocationCode = "01"; m_MRVFIFOParam.LocationType = "64"; m_MRVFIFOParam.ShowIssuedLayers = BoYesNoEnum.tNO; // Process FIFO layers m_MRVFIFO = m_MRVFIFOService.GetMaterialRevaluationFIFO(m_MRVFIFOParam); // Process first layer m_FIFOLayers.LayerID = m_MRVFIFO.Layers.Item(0).LayerID; m_FIFOLayers.TransactionSequenceNum = m_MRVFIFO.Layers.Item(0).TransactionSequenceNum; String strNewPrice = NewPriceTxt.Text; m_FIFOLayers.Price = 500; // Process other layers int LayerNum = m_MRVFIFO.Layers.Count; for (int i = 1; i < LayerNum ; ++i) { m_FIFOLayers.Add(); m_FIFOLayers.SetCurrentLine(i); m_FIFOLayers.LayerID = m_MRVFIFO.Layers.Item(i).LayerID; m_FIFOLayers.TransactionSequenceNum = m_MRVFIFO.Layers.Item(i).TransactionSequenceNum; m_FIFOLayers.Price = 500; } m_MaterialRev.Add();

See Also

SAP® B1 DI-API C# definition

public class MaterialRevaluationFIFOServiceClass : IMaterialRevaluationFIFOService, MaterialRevaluationFIFOService { public extern MaterialRevaluationFIFOServiceClass(); public virtual extern object GetDataInterface( MaterialRevaluationFIFOServiceDataInterfaces enumMSDI); public virtual extern object GetDataInterfaceFromXMLFile( string bstrFileName); public virtual extern object GetDataInterfaceFromXMLString( string bstrXMLString); public virtual extern MaterialRevaluationFIFO GetMaterialRevaluationFIFO( MaterialRevaluationFIFOParams pIMaterialRevaluationFIFOParams); }

Related information


Material Revaluation FIFO MaterialRevaluationFIFO Object
A specific item's FIFO layers. You can use the MaterialRevaluationFIFOService service to retrieve an item's FIFO layers, which are returned in this object. You can then revaluate these layers by passing the IDs of these FIFO layers to the...
   Parent: Material Revaluation FIFO Service MaterialRevaluationFIFOService Service

Material Revaluation FIFO Params MaterialRevaluationFIFOParams Object
Contains parameters for retrieving FIFO layers using the MaterialRevaluationFIFOService service.
   Parent: Material Revaluation FIFO Service MaterialRevaluationFIFOService Service

Material Revaluation FIFO Service Data Interfaces MaterialRevaluationFIFOServiceDataInterfaces Enumeration
MaterialRevaluationFIFOService data interfaces.
   Parent: Material Revaluation FIFO Service MaterialRevaluationFIFOService Service


SAP® Business One is the trademark(s) or registered trademark(s) of SAP AG in Germany and in several other countries. Contact
This website is not affiliated with, maintained, authorized, endorsed or sponsored by SAP AG or any of its affiliates