Click or drag to resize

clsImportItem Class

Store Item data via DI-API to OITM into the database given CompanyID. The DTW is using the import table MARIProjektImportOITM.

Please make sure, that SAP Business One DI-API in 32 or 64 bit is installed according to the usage of this interface. The logon user in MARIProject has to have a corresponding user linked to the selected company database.

Use MPInterface.bImportERPItem(clsImportItem, clsImportBaseeImportMode) to import.

Inheritance Hierarchy
SystemObject
  MARIInterfaceclsImportBase
    MARIInterfaceclsImportBaseERP
      MARIInterfaceclsImportItem

Namespace:  MARIInterface
Assembly:  MARIInterface (in MARIInterface.dll) Version: 8.0.0.100
Syntax
public class clsImportItem : clsImportBaseERP

The clsImportItem type exposes the following members.

Constructors
  NameDescription
Public methodclsImportItem
Initializes a new instance of the clsImportItem class
Top
Properties
  NameDescription
Public propertyAvgPrice
Average price. (Read Only)
Public propertyBarCode
Item master bar code field
Public propertyBuyUnitMsr
Purchase unit of mesurnment
Public propertyByWh
Item cost managed by warehouse
Public propertyCalculationMethod
Calculation Method (not used V5.3)
Public propertyCommissionMode
Commission Mode
Public propertyCommissionPercent
Commission Percent. Only used for CommissionMode=2
Public propertyCostMarginImputed
Stadard cost plus percentage. 0.2=20%. -1=inherits from item group
Public propertyCustomerEquipmentCardCategory
Customer Service Object Category
Public propertyDefaultQualityProcesSales
Default Quality Proces Sales
Public propertyDefaultQualityProcessPurchase
Default Quality Process Purchase
Public propertyDefaultWarehouse
Default Warehouse
Public propertyEvalSystem
price calculation
Public propertyGLMethod
GLMethod W, C, L or empty -> OITM.GLMethod
Public propertyInvntItem
Inventory Item Flag: stores: Y=Yes, N=No
Public propertyInvntryUom
Inventory unit of mesurnment
Public propertyIssueMthd
Public propertyItemCode
ItemCode Mandantory item code field
Public propertyItemFrgnName
Fogerign Name
Public propertyItemGroupByName
(optional) help field to find the ItmsGrpCod by name of the item group. Import will search for the correct Code.
Public propertyItemName
ItemName
Public propertyItmsGrpCod
Item Group Code
Public propertyLandedCostMethod
Landed Cost Method (not used V5.3)
Public propertyMainsupplier
Main Supplier CardCode (Also stored in ITM2)
Public propertyMaintenanceItem
Link a mantenance item to a license item. Used only, when MaintenanceType=1.
Public propertyMaintenancePercent
Maintenance Percentage. 0.2=20%
Public propertyMaintenanceType
Type of an item used as maintenance item linked to a license item.
  • 0=Normal Item
  • 1=Item with a linked maintenance item. Use MaintenanceItem for the link
  • 2=Maintenance Item used by license items (Type=1)
Public propertyManBtchNum
Use Batches -> stores: Y=Yes, N=No
Public propertyManSerNum
Use Serial Numbers. stores: Y=Yes, N=No
Public propertyManufacturerCode
FirmCode / ManufacturerCode
Public propertyManufacturerCodeByName
(optional) Help Field to find ManufacturerCode via the name
Public propertyMngMethod
Management Method. See DI-API Items.SRIAndBatchManageMethod 0: On Every Transaction 1: On Release Only
Public propertyOcrCode1
Default Distribution rule for contract positions based on this item. (Only if company settings allows to change distribution rules on contract position level)
Public propertyOcrCode2
Default Distribution rule for contract positions based on this item. (Only if company settings allows to change distribution rules on contract position level)
Public propertyOcrCode3
Default Distribution rule for contract positions based on this item. (Only if company settings allows to change distribution rules on contract position level)
Public propertyOcrCode4
Default Distribution rule for contract positions based on this item. (Only if company settings allows to change distribution rules on contract position level)
Public propertyOcrCode5
Default Distribution rule for contract positions based on this item. (Only if company settings allows to change distribution rules on contract position level)
Public propertyPhantom
Phantom Property Yes/No
Public propertyPlaningSystem
Planing System
Public propertyPrchseItem
Purchase item flag: stores: Y=Yes, N=No
Public propertyPreferredVendorList
List of prefered Suppliers/Vendors. Stored in ITM2. See property Mainsupplier for the main one. This list can contain the code of the Mainsupplier, but must not.
Public propertyPrice
Price based on price list 1
Public propertyPriceCurrency
Currency for the price on price list 1
Public propertyProductConfigurationID
ProductConfigurationID (Not Used in V5.3)
Public propertyProRataIDPurchase
Default Pro Rata Purchase Rule for this item
Public propertyProRataIDSales
Default Pro Rata Sales Rule for this item
Public propertyPurchaseVatGroup
Purchase Vat Group
Public propertyQryGroup
QryGroup1-64
Public propertyQryGroup1
Public propertyQryGroup10
Public propertyQryGroup11
Public propertyQryGroup12
Public propertyQryGroup13
Public propertyQryGroup14
Public propertyQryGroup15
Public propertyQryGroup16
Public propertyQryGroup17
Public propertyQryGroup18
Public propertyQryGroup19
Public propertyQryGroup2
Public propertyQryGroup20
Public propertyQryGroup21
Public propertyQryGroup22
Public propertyQryGroup23
Public propertyQryGroup24
Public propertyQryGroup25
Public propertyQryGroup26
Public propertyQryGroup27
Public propertyQryGroup28
Public propertyQryGroup29
Public propertyQryGroup3
Public propertyQryGroup30
Public propertyQryGroup31
Public propertyQryGroup32
Public propertyQryGroup33
Public propertyQryGroup34
Public propertyQryGroup35
Public propertyQryGroup36
Public propertyQryGroup37
Public propertyQryGroup38
Public propertyQryGroup39
Public propertyQryGroup4
Public propertyQryGroup40
Public propertyQryGroup41
Public propertyQryGroup42
Public propertyQryGroup43
Public propertyQryGroup44
Public propertyQryGroup45
Public propertyQryGroup46
Public propertyQryGroup47
Public propertyQryGroup48
Public propertyQryGroup49
Public propertyQryGroup5
Public propertyQryGroup50
Public propertyQryGroup51
Public propertyQryGroup52
Public propertyQryGroup53
Public propertyQryGroup54
Public propertyQryGroup55
Public propertyQryGroup56
Public propertyQryGroup57
Public propertyQryGroup58
Public propertyQryGroup59
Public propertyQryGroup6
Public propertyQryGroup60
Public propertyQryGroup61
Public propertyQryGroup62
Public propertyQryGroup63
Public propertyQryGroup64
Public propertyQryGroup7
Public propertyQryGroup8
Public propertyQryGroup9
Public propertyRecurrentAccounting
Stanadrd recurring maintenance interval. See clsImportProjectContractPosition.eMaintenancePeriodic for the values
Public propertySalesMarginImputed
Standard cost plus percentage for the sales margin. -1=inherits from item group
Public propertySalesVatGroup
Sales Vat Group
Public propertySalPackMsr
Sales packing unit of mesurnment
Public propertySalUnitMsr
Sales unit of mesurnment
Public propertySellItem
Sales item flag: stores: Y=Yes, N=No
Public propertySerialNumberBatchMode
Help Variable as one property to switch ManBtchNum or ManSerNum on and off. One Item can have only one of the both
Public propertyServiceDueDateOffset
Offset days in the month for maintenance. Only used for ServiceDueDateType=3.
Public propertyServiceDueDateType
Standard for the accointing of maintenance.
  • 1=End of period
  • 2=Beginning of the period
  • 3=Special day of the period. Use ServiceDueDateOffset for the offset.
Public propertySuppCatNum
SuppCatNum: Mfr Catalog Number
Public propertyTaxSetting1
TaxSetting1 (not used V5.3)
Public propertyTaxSetting2
TaxSetting2 (not used V5.3)
Public propertyTaxSetting3
TaxSetting3 (not used V5.3)
Public propertyTreeType
Tree type (Normal, Production...)
Public propertyU_MARIBez1
100 char item text
Public propertyU_MARIBez2
100 char item text
Public propertyU_MARIMem1
Memo field with item data. Used in Dimensiontext of contract positions: clsImportProjectContractPosition.Description4
Public propertyU_MARIMem2
Memo field with item data. Used in Longtext of contract position: clsImportProjectContractPosition.Description3
Public propertyUserText
Remark field
Public propertyVatLiable
VATLiable
Public propertyWtLiable
Withholding Tax stores: Y=Yes, N=No
Top
Methods
Fields
  NameDescription
Public fieldUDFs
User Defined Fields (Fieldname,Value) Fieldname = "U_xyz"
Top
Remarks
Used by MS Access table: MARIProjektImportOITM.
Examples
Create a new item in SBO via DI-API
public bool CreateItemCode(string sItemCode, string sItemName, short lItemGroup) {
    clsImportItem NewItem = new clsImportItem();
    NewItem.CompanyID = 1; // First company linked to MARIProject
    NewItem.ItemCode = sItemCode;
    NewItem.ItemName = sItemName;
    NewItem.U_MARIBez1 = sItemName; // First description in contract position
    NewItem.U_MARIBez2 = "With the following properties";
    NewItem.U_MARIMem1 = "<!DOCTYPE HTML><ul><li>Property1</li><li>Property1</li><li>Property1</li></ul>"; // basic html formatting.
    NewItem.SalUnitMsr = "*";
    NewItem.DefaultWarehouse = "01"; //default warehouse
    NewItem.VatLiable = true;
    NewItem.BarCode = "89789564564897";
    NewItem.SellItem = true;
    NewItem.PrchseItem = true;
    NewItem.InvntItem = true;
    NewItem.ItmsGrpCod = lItemGroup;

    if (oMPInterface.bImportERPItem(NewItem, clsImportBase.eImportMode.ValidateAndImport)) {
        return true;
    } else {
        LogFail(oMPInterface.oErrors.PrintErrors());
        return false;
    }
}
See Also