I_CN_MaterialStockAcctgDoc

DDL: I_CN_MATERIALSTOCKACCTGDOC SQL: ICNMATSTKACCTDOC Type: view BASIC Package: APPL_GLO_LOG_ODATA_CN

Material stock accounting document for china turnover report

I_CN_MaterialStockAcctgDoc is a Basic CDS View that provides data about "Material stock accounting document for china turnover report" in SAP S/4HANA. It reads from 2 data sources (acdoca, fmlt_curtp_ml) and exposes 19 fields with key fields AccountingDocument, FiscalYear, GLAccountLineItem, Ledger, CompanyCode. Part of development package APPL_GLO_LOG_ODATA_CN.

Data Sources (2)

SourceAliasJoin Type
acdoca accdoc from
fmlt_curtp_ml MAPP inner

Annotations (13)

NameValueLevelField
EndUserText.label Material stock accounting document for china turnover report view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
AbapCatalog.sqlViewName ICNMATSTKACCTDOC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #CHECK view
VDM.private false view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
VDM.viewType #BASIC view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view

Fields (19)

KeyFieldSource TableSource FieldDescription
KEY AccountingDocument belnr
KEY FiscalYear gjahr
KEY GLAccountLineItem docln
KEY Ledger acdoca rldnr
KEY CompanyCode acdoca rbukrs
AccountingDocumentItem buzei
CompanyCodeCurrency rhcur
StockIdentifyingMaterial matnr
Plant bwkey
InventoryValuationType bwtar
InventorySpecialStockType sobkz
DebitCreditCode drcrk
GoodsMovementStkAmtInCCCrcy hsl
MatlStkIncrQtyAmountInCCCrcy Total goods Received Value
MatlStkDecrQtyAmountInCCCrcy Total goods Issued Value
PostingDate budat
DocumentDate bldat
AccountingDocumentType blart
ReferenceDocumentType awtyp
@EndUserText.label: 'Material stock accounting document for china turnover report'
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
@AbapCatalog.sqlViewName: 'ICNMATSTKACCTDOC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #CHECK

@VDM.private: false
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED


@VDM.viewType:#BASIC
@ObjectModel.usageType:{
    serviceQuality: #C,
    sizeCategory: #XXL,
    dataClass: #MIXED
}

define view I_CN_MaterialStockAcctgDoc
as select from 

acdoca as accdoc
inner join fmlt_curtp_ml as MAPP on MAPP.rbukrs = accdoc.rbukrs and is_logistic_curtype = 'X' and accdoc.rldnr = MAPP.rldnr

 //bseg   as _bseg

// inner join bkpf on bkpf.bukrs = bseg.bukrs and bkpf.belnr = bseg.belnr and bkpf.gjahr = bseg.gjahr

 //as select from I_AccountingDocument  as _bkpf // on _bkpf.CompanyCode = bseg.bukrs 

                                     //    and _bkpf.AccountingDocument = bseg.belnr 

                                     //    and _bkpf.FiscalYear = bseg.gjahr

// association [0..1] to  I_AccountingDocument as _bkpf on $projection.AccountingDocument = _bkpf.AccountingDocument and $projection.FiscalYear= _bkpf.FiscalYear   

                    
 {
  key belnr as AccountingDocument,//Document Number

  key gjahr as FiscalYear, //Fiscal Year,

  key docln as GLAccountLineItem,//Item of a GL account

  key accdoc.rldnr as Ledger,
  key accdoc.rbukrs as CompanyCode,
      buzei as AccountingDocumentItem,//Number of Line Item Within Accounting Document

      @Semantics.currencyCode: true
      rhcur as CompanyCodeCurrency, //Currency

      matnr as StockIdentifyingMaterial,//material

      bwkey as Plant,//Valuation Area

      bwtar as InventoryValuationType,//Valuation Type

      sobkz as InventorySpecialStockType,//Stock Type of Goods Movement (Stock Identifier)


      drcrk as DebitCreditCode,//Debit/Credit

      @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
      hsl  as   GoodsMovementStkAmtInCCCrcy,
      @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
      @EndUserText.label: 'Total goods Received Value'
      @UI.hidden: true
      (case when hsl > 0 then hsl else 0 end) as MatlStkIncrQtyAmountInCCCrcy,//good receipt value

      @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
      @EndUserText.label: 'Total goods Issued Value'
      @UI.hidden: true
      (case when hsl < 0 then hsl else 0 end ) as MatlStkDecrQtyAmountInCCCrcy, // goods issue value

//      _bseg.dmbtr as GoodsMovementStkAmtInCCCrcy,//Amount in Companycode Currency

//  @Semantics.unitOfMeasure: true

//、      rvunit as BaseUnitofMeasure,//Base Unit

//  @Semantics.quantity.unitOfMeasure: 'BaseUnitofMeasure'

//      menge as QuantityInBaseUnit,//Quantity

      budat as PostingDate,//Posting Date

      bldat as DocumentDate,//Document Date

      blart as AccountingDocumentType,//Document Type

      awtyp as ReferenceDocumentType  //Reference Transaction

}
  where  bstat <> 'D'
       and   bstat <> 'M'
       and   awtyp   <> 'GLYEC'
       and   koart   =  'M'
       and   matnr   <> ''
       and   ktosl   =  'BSX'
       and   awtyp   <> 'MKPF'
       and   poper <> '000'
       and   bstat <> 'C'
//       and   squan   = '0'

//       and   h_budat >= :p_begin_date