Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MARA → sap::Mara

General Material Data

Key: MANDT + MATNR

ABAP fieldGoogle MerchantRust fieldRust typeDDICData elementDescription
MANDT (key)mandtStringCLNT 3MANDTClient
MATNR (key)idmatnrStringCHAR 18MATNRMaterial Number
ERSDAersdaOption<chrono::NaiveDate>DATS 8ERSDACreated On
LVORMlvormboolCHAR 1LVOMADeletion Flag at Client Level
MTARTmtartStringCHAR 4MTARTMaterial Type
MATKLgoogle_product_categorymatklStringCHAR 9MATKLMaterial Group
MEINSmeinsStringUNIT 3MEINSBase Unit of Measure
BRGEWshipping_weightbrgewrust_decimal::DecimalQUAN 13,3BRGEWGross Weight
GEWEIproduct_weight shipping_weightgeweiStringUNIT 3GEWEIWeight Unit
NTGEWproduct_weightntgewrust_decimal::DecimalQUAN 13,3NTGEWNet Weight
EAN11gtin identifier_existsean11StringCHAR 18EAN11International Article Number (EAN/UPC)
NUMTPgtinnumtpStringCHAR 2NUMTPCategory of EAN
MFRNRbrandmfrnrStringCHAR 10MFRNRManufacturer (vendor number)
MFRPNmpn identifier_existsmfrpnStringCHAR 40MFRPNManufacturer Part Number
PRDHAproduct_typeprdhaStringCHAR 18PRODH_DProduct Hierarchy
WRKSTmaterialwrkstStringCHAR 48WRKSTBasic Material
SATNRitem_group_idsatnrStringCHAR 18SATNRGeneric Article (IS-Retail)
INHALunit_pricing_measureinhalrust_decimal::DecimalQUAN 13,3INHALNet Contents (IS-Retail)
INHMEunit_pricing_measureinhmeStringUNIT 3INHMEContent Unit (IS-Retail)

pink attributes are machine data: converted by a fixed rule, never rewritten. See Google Merchant Center.

Generated Rust

// abap_to_rust::sap::Mara
/// `MARA`: General Material Data
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Mara {
    /// `MANDT` CLNT 3 (key): Client
    #[serde(rename = "MANDT")]
    pub mandt: String,
    /// `MATNR` CHAR 18 (key): Material Number
    #[serde(rename = "MATNR")]
    pub matnr: String,
    /// `ERSDA` DATS 8: Created On
    #[serde(rename = "ERSDA", default, with = "crate::abap::dats")]
    pub ersda: Option<chrono::NaiveDate>,
    /// `LVORM` CHAR 1: Deletion Flag at Client Level
    #[serde(rename = "LVORM", default, with = "crate::abap::xflag")]
    pub lvorm: bool,
    /// `MTART` CHAR 4: Material Type
    #[serde(rename = "MTART", default)]
    pub mtart: String,
    /// `MATKL` CHAR 9: Material Group
    #[serde(rename = "MATKL", default)]
    pub matkl: String,
    /// `MEINS` UNIT 3: Base Unit of Measure
    #[serde(rename = "MEINS", default)]
    pub meins: String,
    /// `BRGEW` QUAN 13,3: Gross Weight
    #[serde(rename = "BRGEW", default)]
    pub brgew: rust_decimal::Decimal,
    /// `GEWEI` UNIT 3: Weight Unit
    #[serde(rename = "GEWEI", default)]
    pub gewei: String,
    /// `NTGEW` QUAN 13,3: Net Weight
    #[serde(rename = "NTGEW", default)]
    pub ntgew: rust_decimal::Decimal,
    /// `EAN11` CHAR 18: International Article Number (EAN/UPC)
    #[serde(rename = "EAN11", default)]
    pub ean11: String,
    /// `NUMTP` CHAR 2: Category of EAN
    #[serde(rename = "NUMTP", default)]
    pub numtp: String,
    /// `MFRNR` CHAR 10: Manufacturer (vendor number)
    #[serde(rename = "MFRNR", default)]
    pub mfrnr: String,
    /// `MFRPN` CHAR 40: Manufacturer Part Number
    #[serde(rename = "MFRPN", default)]
    pub mfrpn: String,
    /// `PRDHA` CHAR 18: Product Hierarchy
    #[serde(rename = "PRDHA", default)]
    pub prdha: String,
    /// `WRKST` CHAR 48: Basic Material
    #[serde(rename = "WRKST", default)]
    pub wrkst: String,
    /// `SATNR` CHAR 18: Generic Article (IS-Retail)
    #[serde(rename = "SATNR", default)]
    pub satnr: String,
    /// `INHAL` QUAN 13,3: Net Contents (IS-Retail)
    #[serde(rename = "INHAL", default)]
    pub inhal: rust_decimal::Decimal,
    /// `INHME` UNIT 3: Content Unit (IS-Retail)
    #[serde(rename = "INHME", default)]
    pub inhme: String,
}

impl Mara {
    pub const TABNAME: &'static str = "MARA";
    pub const KEY: &'static [&'static str] = &["MANDT", "MATNR"];
    /// (ABAP name, Rust name), in DDIC position order.
    pub const FIELDS: &'static [(&'static str, &'static str)] = &[("MANDT", "mandt"), ("MATNR", "matnr"), ("ERSDA", "ersda"), ("LVORM", "lvorm"), ("MTART", "mtart"), ("MATKL", "matkl"), ("MEINS", "meins"), ("BRGEW", "brgew"), ("GEWEI", "gewei"), ("NTGEW", "ntgew"), ("EAN11", "ean11"), ("NUMTP", "numtp"), ("MFRNR", "mfrnr"), ("MFRPN", "mfrpn"), ("PRDHA", "prdha"), ("WRKST", "wrkst"), ("SATNR", "satnr"), ("INHAL", "inhal"), ("INHME", "inhme")];
}