clsImportItem Class |
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.
Namespace: MARIInterface
The clsImportItem type exposes the following members.
| Name | Description | |
|---|---|---|
| clsImportItem | Initializes a new instance of the clsImportItem class |
| Name | Description | |
|---|---|---|
| AvgPrice | Average price. (Read Only) | |
| BarCode | Item master bar code field | |
| BuyUnitMsr | Purchase unit of mesurnment | |
| ByWh | Item cost managed by warehouse | |
| CalculationMethod | Calculation Method (not used V5.3) | |
| CommissionMode | Commission Mode
| |
| CommissionPercent | Commission Percent. Only used for CommissionMode=2 | |
| CostMarginImputed | Stadard cost plus percentage. 0.2=20%. -1=inherits from item group | |
| CustomerEquipmentCardCategory | Customer Service Object Category | |
| DefaultQualityProcesSales | Default Quality Proces Sales | |
| DefaultQualityProcessPurchase | Default Quality Process Purchase | |
| DefaultWarehouse | Default Warehouse | |
| EvalSystem | price calculation | |
| GLMethod |
GLMethod W, C, L or empty -> OITM.GLMethod
| |
| InvntItem | Inventory Item Flag: stores: Y=Yes, N=No | |
| InvntryUom | Inventory unit of mesurnment | |
| IssueMthd | ||
| ItemCode | ItemCode Mandantory item code field | |
| ItemFrgnName | Fogerign Name | |
| ItemGroupByName |
(optional) help field to find the ItmsGrpCod by name of the item group. Import will search for the correct Code.
| |
| ItemName | ItemName | |
| ItmsGrpCod | Item Group Code | |
| LandedCostMethod | Landed Cost Method (not used V5.3) | |
| Mainsupplier | Main Supplier CardCode (Also stored in ITM2) | |
| MaintenanceItem | Link a mantenance item to a license item. Used only, when MaintenanceType=1. | |
| MaintenancePercent | Maintenance Percentage. 0.2=20% | |
| MaintenanceType | Type of an item used as maintenance item linked to a license item.
| |
| ManBtchNum | Use Batches -> stores: Y=Yes, N=No | |
| ManSerNum | Use Serial Numbers. stores: Y=Yes, N=No | |
| ManufacturerCode | FirmCode / ManufacturerCode | |
| ManufacturerCodeByName | (optional) Help Field to find ManufacturerCode via the name | |
| MngMethod |
Management Method. See DI-API Items.SRIAndBatchManageMethod
0: On Every Transaction
1: On Release Only
| |
| OcrCode1 | Default Distribution rule for contract positions based on this item. (Only if company settings allows to change distribution rules on contract position level) | |
| OcrCode2 | Default Distribution rule for contract positions based on this item. (Only if company settings allows to change distribution rules on contract position level) | |
| OcrCode3 | Default Distribution rule for contract positions based on this item. (Only if company settings allows to change distribution rules on contract position level) | |
| OcrCode4 | Default Distribution rule for contract positions based on this item. (Only if company settings allows to change distribution rules on contract position level) | |
| OcrCode5 | Default Distribution rule for contract positions based on this item. (Only if company settings allows to change distribution rules on contract position level) | |
| Phantom | Phantom Property Yes/No | |
| PlaningSystem | Planing System | |
| PrchseItem | Purchase item flag: stores: Y=Yes, N=No | |
| PreferredVendorList |
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.
| |
| Price | Price based on price list 1 | |
| PriceCurrency | Currency for the price on price list 1 | |
| ProductConfigurationID | ProductConfigurationID (Not Used in V5.3) | |
| ProRataIDPurchase | Default Pro Rata Purchase Rule for this item | |
| ProRataIDSales | Default Pro Rata Sales Rule for this item | |
| PurchaseVatGroup | Purchase Vat Group | |
| QryGroup | QryGroup1-64 | |
| QryGroup1 | ||
| QryGroup10 | ||
| QryGroup11 | ||
| QryGroup12 | ||
| QryGroup13 | ||
| QryGroup14 | ||
| QryGroup15 | ||
| QryGroup16 | ||
| QryGroup17 | ||
| QryGroup18 | ||
| QryGroup19 | ||
| QryGroup2 | ||
| QryGroup20 | ||
| QryGroup21 | ||
| QryGroup22 | ||
| QryGroup23 | ||
| QryGroup24 | ||
| QryGroup25 | ||
| QryGroup26 | ||
| QryGroup27 | ||
| QryGroup28 | ||
| QryGroup29 | ||
| QryGroup3 | ||
| QryGroup30 | ||
| QryGroup31 | ||
| QryGroup32 | ||
| QryGroup33 | ||
| QryGroup34 | ||
| QryGroup35 | ||
| QryGroup36 | ||
| QryGroup37 | ||
| QryGroup38 | ||
| QryGroup39 | ||
| QryGroup4 | ||
| QryGroup40 | ||
| QryGroup41 | ||
| QryGroup42 | ||
| QryGroup43 | ||
| QryGroup44 | ||
| QryGroup45 | ||
| QryGroup46 | ||
| QryGroup47 | ||
| QryGroup48 | ||
| QryGroup49 | ||
| QryGroup5 | ||
| QryGroup50 | ||
| QryGroup51 | ||
| QryGroup52 | ||
| QryGroup53 | ||
| QryGroup54 | ||
| QryGroup55 | ||
| QryGroup56 | ||
| QryGroup57 | ||
| QryGroup58 | ||
| QryGroup59 | ||
| QryGroup6 | ||
| QryGroup60 | ||
| QryGroup61 | ||
| QryGroup62 | ||
| QryGroup63 | ||
| QryGroup64 | ||
| QryGroup7 | ||
| QryGroup8 | ||
| QryGroup9 | ||
| RecurrentAccounting | Stanadrd recurring maintenance interval. See clsImportProjectContractPosition.eMaintenancePeriodic for the values | |
| SalesMarginImputed | Standard cost plus percentage for the sales margin. -1=inherits from item group | |
| SalesVatGroup | Sales Vat Group | |
| SalPackMsr | Sales packing unit of mesurnment | |
| SalUnitMsr | Sales unit of mesurnment | |
| SellItem | Sales item flag: stores: Y=Yes, N=No | |
| SerialNumberBatchMode |
Help Variable as one property to switch ManBtchNum or ManSerNum on and off. One Item can have only one of the both
| |
| ServiceDueDateOffset | Offset days in the month for maintenance. Only used for ServiceDueDateType=3. | |
| ServiceDueDateType | Standard for the accointing of maintenance.
| |
| SuppCatNum | SuppCatNum: Mfr Catalog Number | |
| TaxSetting1 | TaxSetting1 (not used V5.3) | |
| TaxSetting2 | TaxSetting2 (not used V5.3) | |
| TaxSetting3 | TaxSetting3 (not used V5.3) | |
| TreeType | Tree type (Normal, Production...) | |
| U_MARIBez1 | 100 char item text | |
| U_MARIBez2 | 100 char item text | |
| U_MARIMem1 | Memo field with item data. Used in Dimensiontext of contract positions: clsImportProjectContractPosition.Description4 | |
| U_MARIMem2 | Memo field with item data. Used in Longtext of contract position: clsImportProjectContractPosition.Description3 | |
| UserText | Remark field | |
| VatLiable | VATLiable | |
| WtLiable | Withholding Tax stores: Y=Yes, N=No |
| Name | Description | |
|---|---|---|
| bReadFromDB |
Reads the item data from the database and copies the values to the class
(Overrides clsImportBasebReadFromDB(MPInterface, String).) | |
| bSaveRSToMDB | (Overrides clsImportBasebSaveRSToMDB(MPInterface, DataRow, DataTable).) |
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; } }