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

MBEW → sap::Mbew

Material Valuation

Key: MANDT + MATNR + BWKEY + BWTAR

ABAP fieldGoogle MerchantRust fieldRust typeDDICData elementDescription
MANDT (key)mandtStringCLNT 3MANDTClient
MATNR (key)matnrStringCHAR 18MATNRMaterial Number
BWKEY (key)bwkeyStringCHAR 4BWKEYValuation Area
BWTAR (key)bwtarStringCHAR 10BWTAR_DValuation Type
VPRSVcost_of_goods_soldvprsvStringCHAR 1VPRSVPrice Control (S standard / V moving average)
VERPRcost_of_goods_soldverprrust_decimal::DecimalCURR 11,2VERPRMoving Average Price
STPRScost_of_goods_soldstprsrust_decimal::DecimalCURR 11,2STPRSStandard Price
PEINHcost_of_goods_soldpeinhrust_decimal::DecimalDEC 5PEINHPrice Unit

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

Generated Rust

// abap_to_rust::sap::Mbew
/// `MBEW`: Material Valuation
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Mbew {
    /// `MANDT` CLNT 3 (key): Client
    #[serde(rename = "MANDT")]
    pub mandt: String,
    /// `MATNR` CHAR 18 (key): Material Number
    #[serde(rename = "MATNR")]
    pub matnr: String,
    /// `BWKEY` CHAR 4 (key): Valuation Area
    #[serde(rename = "BWKEY")]
    pub bwkey: String,
    /// `BWTAR` CHAR 10 (key): Valuation Type
    #[serde(rename = "BWTAR")]
    pub bwtar: String,
    /// `VPRSV` CHAR 1: Price Control (S standard / V moving average)
    #[serde(rename = "VPRSV", default)]
    pub vprsv: String,
    /// `VERPR` CURR 11,2: Moving Average Price
    #[serde(rename = "VERPR", default)]
    pub verpr: rust_decimal::Decimal,
    /// `STPRS` CURR 11,2: Standard Price
    #[serde(rename = "STPRS", default)]
    pub stprs: rust_decimal::Decimal,
    /// `PEINH` DEC 5: Price Unit
    #[serde(rename = "PEINH", default)]
    pub peinh: rust_decimal::Decimal,
}

impl Mbew {
    pub const TABNAME: &'static str = "MBEW";
    pub const KEY: &'static [&'static str] = &["MANDT", "MATNR", "BWKEY", "BWTAR"];
    /// (ABAP name, Rust name), in DDIC position order.
    pub const FIELDS: &'static [(&'static str, &'static str)] = &[("MANDT", "mandt"), ("MATNR", "matnr"), ("BWKEY", "bwkey"), ("BWTAR", "bwtar"), ("VPRSV", "vprsv"), ("VERPR", "verpr"), ("STPRS", "stprs"), ("PEINH", "peinh")];
}