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

MARD → sap::Mard

Storage Location Data for Material

Key: MANDT + MATNR + WERKS + LGORT

ABAP fieldGoogle MerchantRust fieldRust typeDDICData elementDescription
MANDT (key)mandtStringCLNT 3MANDTClient
MATNR (key)matnrStringCHAR 18MATNRMaterial Number
WERKS (key)werksStringCHAR 4WERKS_DPlant
LGORT (key)lgortStringCHAR 4LGORT_DStorage Location
LABSTavailabilitylabstrust_decimal::DecimalQUAN 13,3LABSTUnrestricted-Use Stock
INSMEavailabilityinsmerust_decimal::DecimalQUAN 13,3INSMEStock in Quality Inspection
SPEMEavailabilityspemerust_decimal::DecimalQUAN 13,3SPEMEBlocked Stock

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

Generated Rust

// abap_to_rust::sap::Mard
/// `MARD`: Storage Location Data for Material
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Mard {
    /// `MANDT` CLNT 3 (key): Client
    #[serde(rename = "MANDT")]
    pub mandt: String,
    /// `MATNR` CHAR 18 (key): Material Number
    #[serde(rename = "MATNR")]
    pub matnr: String,
    /// `WERKS` CHAR 4 (key): Plant
    #[serde(rename = "WERKS")]
    pub werks: String,
    /// `LGORT` CHAR 4 (key): Storage Location
    #[serde(rename = "LGORT")]
    pub lgort: String,
    /// `LABST` QUAN 13,3: Unrestricted-Use Stock
    #[serde(rename = "LABST", default)]
    pub labst: rust_decimal::Decimal,
    /// `INSME` QUAN 13,3: Stock in Quality Inspection
    #[serde(rename = "INSME", default)]
    pub insme: rust_decimal::Decimal,
    /// `SPEME` QUAN 13,3: Blocked Stock
    #[serde(rename = "SPEME", default)]
    pub speme: rust_decimal::Decimal,
}

impl Mard {
    pub const TABNAME: &'static str = "MARD";
    pub const KEY: &'static [&'static str] = &["MANDT", "MATNR", "WERKS", "LGORT"];
    /// (ABAP name, Rust name), in DDIC position order.
    pub const FIELDS: &'static [(&'static str, &'static str)] = &[("MANDT", "mandt"), ("MATNR", "matnr"), ("WERKS", "werks"), ("LGORT", "lgort"), ("LABST", "labst"), ("INSME", "insme"), ("SPEME", "speme")];
}