P_ACDOCA

CDS View

Private view on ACDOCA without logic

P_ACDOCA is a CDS View in S/4HANA. Private view on ACDOCA without logic. It contains 300 fields. 13 CDS views read from this table.

CDS Views using this table (13)

ViewTypeJoinVDMDescription
aro_gross_spend_amount view from ARO Gross Spend Amount - CC Currency
FARR_JournalEntryItem view_entity from Revenue Accounting-ACDOCA Extended View
I_AROAcctPostingLineItemData view from BASIC ARO Account Posting Line Item Data
I_GLAccountLineItemRawData view_entity from BASIC Raw Data of G/L Account Line Item
I_GteeMBlldElmntItmCube view from BASIC Grantee Mgmt Billed Element Item - Cube
I_PubSecCmtmtAgingBasic view from BASIC commitment aging basic view
I_RAJournalEntryItem view_entity from COMPOSITE Revenue Accounting VDM Extending ACDOCA
P_DMVCGLAccItemProfitCenter view_entity from COMPOSITE DMVC: GL Account Line Item & Profit Center
P_DMVCGLAccLineItemEdge view inner COMPOSITE DMVC: ACDOCA for Edges
P_DMVCMatlActyProcessCategory view left_outer COMPOSITE DMVC: Material Activity & Process Category
P_DMVCOrderDetail view from BASIC Order Details for DMVC
P_DrctCarryFwdDeltaPostgByQ view_entity from COMPOSITE RA Direct Carryforward delta posting from ACDOCA
P_DrctCarryFwdDeltaPostgByQ view_entity union_all COMPOSITE RA Direct Carryforward delta posting from ACDOCA

Fields (300)

KeyField CDS FieldsUsed in Views
KEY awitem awitem 1
KEY aworg aworg,ReferenceDocumentContext 4
KEY awref awref,ReferenceDocument 4
KEY awtyp awtyp,OriginalReferenceDocumentType,ReferenceDocumentType 4
KEY belnr AccountingDocument,belnr 8
KEY docln docln,GLAccountLineItem,LedgerGLLineItem 8
KEY drcrk DebitCreditCode,shkzg 3
KEY gjahr FiscalYear,gjahr 7
KEY ktosl ktosl,TransactionKey,TransactionTypeDetermination 3
KEY ra_contract_id contract_id,RevenueAccountingContract 4
KEY ra_pob_id PerformanceObligation,pob_id 4
KEY rbukrs company_code,CompanyCode,rbukrs,SourceCompanyCode 9
KEY rldnr Ledger,rldnr,SourceLedger 6
KEY slalittype slalittype,SubLedgerAcctLineItemType 3
accas AccountAssignment 1
accasty AccountAssignmentType 1
ACCTG_NOTIF_UUID AccountingNotificationUUID 1
acritmtype AccrualItemType 1
acrlogsys AccrualObjectLogicalSystem 1
acrobj_id AccrualObject 1
acrobjtype AccrualObjectType 1
acrrefobj_id AccrualReferenceObject 1
acrsobj_id AccrualSubobject 1
acrvaldat AccrualValueDate 1
afabe AssetDepreciationArea 1
AGING GeneralLedgerAgingScope 1
AGING_INCRMNT GeneralLedgerAgingIncrement 1
anbwa AssetTransactionType 1
anlgr GroupMasterFixedAsset 1
anlgr2 GroupFixedAsset 1
anlkl AssetClass 1
anln1 MasterFixedAsset 1
anln2 FixedAsset 1
arbid WorkCenterInternalID 1
artpr MaintPriorityType 1
aufnr aufnr,OrderID,ProductionOrder 4
aufnr_org OriginOrder 1
aufps OrderItem 1
augbl ClearingAccountingDocument,ClearingJournalEntry 2
augdt ClearingDate 2
auggj ClearingJournalEntryFiscalYear 1
autyp OrderCategory 1
awsys awsys,LogicalSystem,ReferenceDocumentLogicalSystem 3
awtyp_rev ReversalReferenceDocumentType 1
bdgt_account PubSecBudgetAccount 1
bdgt_account_cocode PubSecBudgetAccountCoCode 1
bdgt_cnsmpn_amount_type PubSecBudgetCnsmpnAmtType 1
bdgt_cnsmpn_date PubSecBudgetCnsmpnDate 1
bdgt_cnsmpn_period PubSecBudgetCnsmpnFsclPeriod 1
bdgt_cnsmpn_type PubSecBudgetCnsmpnType 1
bdgt_cnsmpn_year PubSecBudgetCnsmpnFsclYear 1
bdgt_relevant PubSecBudgetIsRelevant 1
bemot BillableControl 1
blart AccountingDocumentType 1
bldat DocumentDate 1
BRANCH_ID FinancialServicesBranch 1
bschl PostingKey 1
bsl AmountInFreeDefinedCurrency3 1
bstat AccountingDocumentCategory,bstat 2
bttype BusinessTransactionCategory 1
budat budat,PostingDate 3
buzei AccountingDocumentItem 1
bwkey bwkey,ValuationArea 2
bzdat AssetValueDate 1
bzirk SalesDistrict 1
cbttype BusinessTransactionType 1
closing_run_id JrnlPeriodEndClosingRunLogUUID 1
closingstep FinancialClosingStep 1
co_accasty_n1 StstclAccountAssignmentType1 1
co_accasty_n2 StstclAccountAssignmentType2 1
co_accasty_n3 StstclAccountAssignmentType3 1
co_beknz OriginCtrlgDebitCreditCode 1
CO_MEFBTR IncmpltSummableValnFxdQty 1
CO_MEGBTR IncmpltSummableValnQty 1
CO_MEINH IncmpltSummableValnQtyUnt 1
coco_num ConditionContract 1
csl AmountInFreeDefinedCurrency4 1
DATASOURCE_ID FinancialDataSource 1
depr_period DepreciationFiscalPeriod 1
DOCNR_LD JrnlEntrAltvFYConsecutiveID 1
dsl AmountInFreeDefinedCurrency5 1
ebeln PurchasingDocument 2
ebelp PurchasingDocumentItem 2
equnr Equipment 1
erkrs OperatingConcern 1
erlkz LineItemIsCompleted 1
esl AmountInFreeDefinedCurrency6 1
fbuda ServicesRenderedDate 1
fcsl AmountInFunctionalCurrency 1
fikrs FinancialManagementArea 1
fipex CommitmentItem 1
fiscyearper FiscalYearPeriod 2
fistl FundsCenter 1
fkart BillingDocumentType 1
FS_PRODUCT_GROUP FinancialServicesProductGroup 1
fsl AmountInFreeDefinedCurrency7 1
gkont OffsettingAccount 1
glaccount_type GLAccountType 1
gm_osl AmountInGrantCurrency 1
gsl AmountInFreeDefinedCurrency8 1
hbkid HouseBank 1
hfsl FixedAmountInCoCodeCrcy 1
hkgrp CostOriginGroup 1
hktid HouseBankAccount 1
hsl AmountInCompanyCodeCurrency 1
ilart MaintenanceActivityType 1
istru Assembly 1
kalnr CostEstimate,kalnr 3
kblnr EarmarkedFundsDocument 1
kblpos EarmarkedFundsDocumentItem 1
kdauf kdauf,SalesOrder 3
kdgrp CustomerGroup 1
kdpos kdpos,SalesOrderItem 2
kfsl FixedAmountInGlobalCrcy 1
koart FinancialAccountType 2
kokrs ControllingArea 1
ksl AmountInGlobalCurrency 1
kstrg CostObject 1
ktop2 CountryChartOfAccounts 1
ktopl ChartOfAccounts 1
kunnr Customer 2
kunre BillToParty 1
kunwe ShipToParty 1
lifnr Supplier 1
linetype JournalEntryItemCategory 1
lstar CostCtrActivityType 1
mat_lifnr InventorySpecialStockSupplier 1
matkl SoldProductGroup 1
matnr matnr 1
matnr_copa SoldProduct 1
maufnr SuperiorOrder 1
measure FundedProgram 1
mig_source JrnlEntryItemMigrationSource,mig_source 2
mlptyp mlptyp,ProcessCategory 2
movcat AssetAcctTransClassfctn 1
msl Quantity 1
muvflg QuantityIsIncomplete 1
mwskz TaxCode 1
netdt NetDueDate 2
nplnr ProjectNetwork 1
nplnr_vorgn RelatedNetworkActivity 1
obs_reason JrnlEntryItemObsoleteReason 1
offstg_docln OffsettingLedgerGLLineItem 1
orgl_change OrganizationalChange 1
osl AmountInFreeDefinedCurrency1 1
overtimecat TimeSheetOvertimeCategory 1
paccas PartnerAccountAssignment 1
paccasty PartnerAccountAssignmentType 1
panl1 PartnerMasterFixedAsset 1
panl2 PartnerFixedAsset 1
paobjnr paobjnr 2
paufnr PartnerOrder 1
paufps PartnerOrderItem 1
pautyp PartnerOrderCategory 1
pdabrz PartnerSettlementReferenceDate 1
periv FiscalYearVariant 2
pernr PersonnelNumber 1
perop_beg PerformancePeriodStartDate 1
perop_end PerformancePeriodEndDate 1
pfsl FixedPriceVarcInGlobalCrcy 1
pkdauf PartnerSalesDocument 1
pkdpos PartnerSalesDocumentItem 1
pkstrg PartnerCostObject 1
planned_parts_work MaintenanceOrderIsPlanned 1
plknz MaintenanceOrderPlanningCode 1
plstar PartnerCostCtrActivityType 1
pnplnr_vorgn PartnerProjectNetworkActivity 1
poper FiscalPeriod,poper 3
pprctr PartnerProfitCenter 1
prctr prctr,ProfitCenter 5
prec_gjahr PrdcssrJournalEntryFiscalYear 1
precnnr RealEstatePartnerContract 1
priok MaintPriority 1
prznr BusinessProcess 1
ps_psp_pnr ps_psp_pnr 1
pscope PartnerControllingObjectClass 1
psegment PartnerSegment 1
psempsl REPartnerSettlementUnitID 1
psgenr RealEstatePartnerBuilding 1
psgrnr RealEstatePartnerProperty 1
psl TotalPriceVarcInGlobalCrcy 1
psmenr REPartnerRentalObject 1
psnksl REPartnerServiceChargeKey 1
pswenr REPartnerBusinessEntity 1
qsprocess ProductionProcess,qsprocess 2
racct GLAccount,hkont 4
racct_sender SenderGLAccount 1
rassc PartnerCompany 1
rbcur FreeCurrency3 1
rbdgt_vldty_nbr GteeMBudgetValidityNumber 1
rbest ReferencePurchaseOrderCategory 1
rbudget_pd BudgetPeriod 1
rbunit ConsolidationUnit 1
rbuptr PartnerConsolidationUnit 1
rbusa BusinessArea,gsber 3
rccur FreeCurrency4 1
rcntr CostCenter,kostl 3
rco_ocur ControllingObjectCurrency 1
rcomp Company 1
rdcur FreeCurrency5 1
re_account CashLedgerAccount 1
re_bukrs CashLedgerCompanyCode 1
rebzg InvoiceReference 1
rebzj InvoiceReferenceFiscalYear 1
rebzz InvoiceItemReference 1
RECNNR RealEstateContract 1
recur FreeCurrency6 1
rfarea fkber,FunctionalArea 3
rfccur FunctionalCurrency 1
rfcur FreeCurrency7,FreeDefinedCurrency7 2
rfund Fund 1
rgcur FreeCurrency8 1
rgm_ocur GrantCurrency 1
rgrant_nbr GrantID 2
rhcur CompanyCodeCurrency 2
rhoart OriginObjectType 1
risk_class CreditRiskClass 1
ritclg ConsolidationChartOfAccounts 1
ritem CnsldtnFinancialStatementItem 1
rkcur GlobalCurrency 2
rmsl ReferenceQuantity 1
rmvct FinancialTransactionType 1
rocur FreeCurrency1,FreeDefinedCurrency1 2
rrcty GLRecordType 1
rrunit ReferenceQuantityUnit 1
rsponsored_class SponsoredClass 1
rsponsored_prog SponsoredProgram 2
rsrce CostAnalysisResource 1
rtcur BalanceTransactionCurrency 1
runit BaseUnit 1
rvcur FreeCurrency2,FreeDefinedCurrency2 2
rvunit CostSourceUnit 1
rwcur DocumentCurrency,SalesDocumentCurrency,TransactionCurrency 4
ryear LedgerFiscalYear 1
sbusa PartnerBusinessArea 1
scntr PartnerCostCenter 1
scope ControllingObjectClass 1
segment segment 3
sempsl RESettlementUnitID 1
service_contract_id ServiceContract 1
service_contract_item_id ServiceContractItem 1
service_contract_type ServiceContractType 1
service_doc_id ServiceDocument 1
service_doc_item_id ServiceDocumentItem 1
service_doc_type ServiceDocumentType 1
sfarea PartnerFunctionalArea 1
sfund PartnerFund 1
SGENR RealEstateBuilding 1
sgrant_nbr PartnerGrant 1
SGRNR RealEstateProperty 1
sgtxt DocumentItemText 1
sityp CnsldtnSubitemCategory 1
SMENR RERentalObject 1
snksl REServiceChargeKey 1
solution_order_id BusinessSolutionOrder 1
solution_order_item_id BusinessSolutionOrderItem 1
spart OrganizationDivision 1
subit CnsldtnSubitem 1
subta TransactionSubitem 1
subta_rev ReversalTransactionSubitem 1
SWENR REBusinessEntity 1
tax_country TaxCountry 1
timestamp RAPostingItemLastChgDateTime,timestamp 4
tplnr FunctionalLocation 1
tsl AmountInBalanceTransacCrcy 1
ukostl OriginCostCenter 1
ulstar OriginCostCtrActivityType 1
UMATNR OriginProduct 1
umskz SpecialGLCode 1
uprctr OriginProfitCenter 1
usnam AccountingDocCreatedByUser 1
uspob OriginSenderObject 1
uvorn OrderSuboperation 1
valobj_id valobj_id 1
valobjtype valobjtype 1
valut ValueDate 1
varc_hkgrp VarianceOriginGroup 1
VARC_UACCT VarianceOriginGLAccount 1
vkorg SalesOrganization 1
vname JointVenture 1
vorgn GLBusinessTransactionType 1
vornr OrderOperation 1
vornr_org OriginOrderOperation 1
vrgng ControllingBusTransacType 1
vsl AmountInFreeDefinedCurrency2 1
vtkey ProviderContract 1
vtpos ProviderContractItem 1
vtweg DistributionChannel 1
werks Plant 1
wfsl FixedAmountInTransCrcy 1
work_item_id WorkItem 1
wsl AmountInTransactionCurrency 1
wwert ExchangeRateDate 1
xopvw IsOpenItemManaged 1
xreversed IsReversed 1
xreversing IsReversal 1
XSECONDARY JournalEntryIsSecondaryEntry 1
xsettled IsSettled 1
xsettling IsSettlement 1
zuonr AssignmentReference 1
 @AbapCatalog.entityBuffer.definitionAllowed: false
 @VDM.viewType: #BASIC
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private:true
define view entity P_ACDOCA
  as select from acdoca
    
  //            inner join finsc_ld_cmp      on acdoca.rldnr = finsc_ld_cmp.rldnr and acdoca.rbukrs = finsc_ld_cmp.bukrs

{
  key cast(acdoca.rldnr       as fins_ledger_pers preserving type)  as rldnr,
  key cast(acdoca.rbukrs      as fis_bukrs preserving type)         as rbukrs,
  key cast(acdoca.gjahr       as fis_gjahr_no_conv preserving type) as gjahr,
  key cast(acdoca.belnr       as fis_belnr preserving type)         as belnr,
  key cast(acdoca.docln       as fis_docln preserving type)         as docln,
  

      cast(acdoca.ryear       as fis_ryear_no_conv preserving type) as ryear,
      acdoca.rrcty,
      cast(acdoca.docnr_ld    as fis_docnr_ld preserving type)      as DOCNR_LD,

      ///////////////////////////////////////////////////////////////////////////////

      // .INCLUDE ACDOC_SI_00  Unified Journal Entry: Transaction, Currencies, Units

      ///////////////////////////////////////////////////////////////////////////////

      cast(rmvct as fis_rmvct preserving type)                     as rmvct,
      cast(vorgn as fis_vorgn preserving type )                    as vorgn,
      vrgng,
      cast(bttype as fis_bttype preserving type) as bttype,
      cast(cbttype as fis_custbttype preserving type) as cbttype,
      cast(closingstep as fis_closingstep preserving type) as closingstep,
      cast(awtyp as fis_awtyp preserving type)                     as awtyp,
      cast(awsys as logsystem preserving type)                     as awsys,
      cast(aworg as fis_aworg preserving type)                     as aworg,
      awref,
      awitem,
      awitgrp,
      subta,
      cast( acctg_notif_uuid as fis_hdr_technical_id preserving type ) as ACCTG_NOTIF_UUID,
      cast( offstg_docln as fis_offsetting_docln preserving type ) as offstg_docln,
      xreversing,
      xreversed,
      xtruerev,
      cast(awtyp_rev as fis_awtyp_rev preserving type ) as awtyp_rev,
      aworg_rev,
      awref_rev,
      cast( subta_rev as fis_subta_rev preserving type ) as subta_rev,
      xsettling,
      xsettled,
      prec_awtyp,
      prec_aworg,
      prec_awref,
      prec_awitem,
      prec_subta,
      prec_bukrs,
      cast( prec_gjahr as fins_prec_gjahr_gfc_no_conv preserving type ) as prec_gjahr,
      prec_belnr,
      prec_docln,

      src_awtyp,
      src_awsys,
      src_aworg,
      src_awref,
      src_awitem,
      src_awsubit,
      xcommitment,
      cast( obs_reason as fis_obsolete_item_reason preserving type ) as obs_reason,
      cast( xsecondary as journalentryissecondaryentry ) as XSECONDARY,
      closing_run_id,
      orgl_change,
      
      cast(racct as fis_racct preserving type)                     as racct,


      ////////////////////////////////////////////////////////////////////////////////////

      // .INCLUDE  ACDOC_SI_GL_ACCAS Unified Journal Entry: G/L additional account assignments

      ////////////////////////////////////////////////////////////////////////////////////

      cast(rcntr as fis_kostl preserving type)                     as rcntr,
      cast(prctr as fis_prctr preserving type)                     as prctr,
      cast(rfarea as fm_farea preserving type)                     as rfarea,
      cast(rbusa as fis_rbusa preserving type)                     as rbusa,
      cast(kokrs as fis_kokrs preserving type)                     as kokrs,
      segment,
      cast(scntr as fis_skost preserving type)                     as scntr,
      cast(pprctr as fis_pprctr preserving type)                   as pprctr,
      cast(sfarea as fis_sfkber preserving type)                   as sfarea,
      cast(sbusa as fis_pargb preserving type)                     as sbusa,
      cast(rassc as fis_rassc preserving type)                     as rassc,
      psegment,


      /////////////////////////////////////////////////////////////////////////////////////

      // .INCLUDE ACDOC_SI_VALUE_DATA Unified Journal Entry: Value Fields

      /////////////////////////////////////////////////////////////////////////////////////


      cast(rtcur as fis_rtcur preserving type)                     as rtcur,
      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rtcur'} }
      cast(tsl as fis_tsl preserving type)                         as tsl,

      cast(rwcur as fis_rwcur preserving type)                     as rwcur,
      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rwcur'} }
      cast(wsl as fis_wsl preserving type)                         as wsl,

      cast(rhcur as fis_hwaer preserving type)                     as rhcur,
      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rhcur'} }
      cast(hsl as fis_hsl preserving type)                         as hsl,
      @Semantics: { amount : {currencyCode: 'rhcur'} }
      hvkwrt,

      cast(rkcur as fis_rkcur preserving type)                     as rkcur,
      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rkcur'} }
      cast(ksl as fis_ksl preserving type)                         as ksl,

      // Functional Currency

      rfccur,
      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rfccur'} }
      cast(fcsl as fis_vfccur12 preserving type)                   as fcsl,

      // Freely Defined Currency 1

      cast(rocur as fis_rocur preserving type)                     as rocur,
      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rocur'} }
      cast(osl as fis_osl preserving type)                         as osl,

      // Freely Defined Currency 2

      cast(rvcur as fis_rvcur preserving type)                     as rvcur,
      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rvcur'} }
      cast(vsl as fis_vsl preserving type)                         as vsl,

      // Freely Defined Currency 3

      rbcur                                                        as rbcur,
      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rbcur'} }
      cast(bsl as fis_bsl preserving type)                         as bsl,

      // Freely Defined Currency 4

      rccur                                                        as rccur,
      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rccur'} }
      cast(csl as fis_csl preserving type)                         as csl,

      // Freely Defined Currency 5

      rdcur                                                        as rdcur,
      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rdcur'} }
      cast(dsl as fis_dsl preserving type)                         as dsl,

      // Freely Defined Currency 6

      recur                                                        as recur,
      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'recur'} }
      cast(esl as fis_esl preserving type)                         as esl,

      // Freely Defined Currency 7

      cast(rfcur as fis_rfcur preserving type)                     as rfcur,
      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rfcur'} }
      cast(fsl as fis_fsl preserving type)                         as fsl,

      // Freely Defined Currency 8

      rgcur                                                        as rgcur,
      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rgcur'} }
      cast(gsl as fis_gsl preserving type)                         as gsl,

      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rkcur'} }
      cast(kfsl as fis_kfsl preserving type)                       as kfsl,

      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rkcur'} }
      kfsl2                                                        as kfsl2,

      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rkcur'} }
      kfsl3                                                        as kfsl3,

      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rhcur'} }
      case when ksl = 0 or kfsl = 0 then cast('0' as fis_hfsl) else 
        cast( 
          cast(
            cast( cast( hsl as abap.dec(23,2) ) as abap.d34n ) * 
      //CAST(CURR AS D34N) not allowed, use detour through fixed point DEC

            cast( cast( kfsl as abap.dec(23,2) ) as abap.d34n ) /  
            cast( cast( ksl as abap.dec(23,2) ) as abap.d34n ) 
           as abap.dec(23,2) )  
         as fis_hfsl ) 
         end as hfsl,
         
      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rwcur'} }         
      case when ksl = 0 or kfsl = 0 then cast('0' as fis_wfsl) else 
        cast( 
          cast(
            cast( cast( wsl as abap.dec(23,2) ) as abap.d34n ) * 
      //CAST(CURR AS D34N) not allowed, use detour through fixed point DEC

            cast( cast( kfsl as abap.dec(23,2) ) as abap.d34n ) /  
            cast( cast( ksl as abap.dec(23,2) ) as abap.d34n ) 
           as abap.dec(23,2) )  
         as fis_wfsl ) 
         end as wfsl,         
                      
//

//      @Aggregation.default: #SUM

//      @Semantics: { amount : {currencyCode: 'rhcur'} }

//      case when ksl = 0 then ksl else

//        cast( hsl * cast( kfsl2 as abap.d34n ) / cast( ksl as abap.d34n ) as fis_hfsl2 ) end as hfsl2,

//

//      @Aggregation.default: #SUM

//      @Semantics: { amount : {currencyCode: 'rhcur'} }

//      case when ksl = 0 then ksl else

//        cast( hsl * cast( kfsl3 as abap.d34n ) / cast( ksl as abap.d34n ) as fis_hfsl3 ) end as hfsl3,        


      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rkcur'} }
      cast(psl as fis_psl preserving type)                         as psl,

      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rkcur'} }
      psl2                                                         as psl2,

      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rkcur'} }
      psl3                                                         as psl3,


      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rkcur'} }
      cast(pfsl as fis_pfsl preserving type)                       as pfsl,

      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rkcur'} }
      pfsl2                                                        as pfsl2,

      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rkcur'} }
      pfsl3                                                        as pfsl3,


      rco_ocur                                                     as rco_ocur,
      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rco_ocur'} }
      co_osl,
      
      rgm_ocur                                                     as rgm_ocur,
      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rgm_ocur'} }
      gm_osl,
      

      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rhcur'} }
      hstprs,

      @Aggregation.default: #SUM
      @Semantics: { amount : {currencyCode: 'rhcur'} }
      hpvprs,


      runit                                              as runit,
      @Aggregation.default: #SUM
      @Semantics: { quantity : {unitOfMeasure: 'runit'} }
      msl,

      @Aggregation.default: #SUM
      @Semantics: { quantity : {unitOfMeasure: 'runit'} }
      mfsl,

      cast(rvunit as fis_co_meinh preserving type)                 as rvunit,
      @Aggregation.default: #SUM
      @Semantics: { quantity : {unitOfMeasure: 'rvunit'} }
      vmsl,

      @Aggregation.default: #SUM
      @Semantics: { quantity : {unitOfMeasure: 'rvunit'} }
      vmfsl,
      
      cast( rrunit as fis_ref_qty_uom preserving type )  as rrunit,
      @Aggregation.default: #SUM
      @Semantics: { quantity : {unitOfMeasure: 'rrunit'} }
      rmsl,      

      qunit1                                             as qunit1,
      @Aggregation.default: #SUM
      @Semantics: { quantity : {unitOfMeasure: 'qunit1'} }
      quant1,

      qunit2                                             as qunit2,
      @Aggregation.default: #SUM
      @Semantics: { quantity : {unitOfMeasure: 'qunit2'} }
      quant2,

      qunit3                                             as qunit3,
      @Aggregation.default: #SUM
      @Semantics: { quantity : {unitOfMeasure: 'qunit3'} }
      quant3,

      cast( co_meinh as fis_fco_meinh preserving type ) as CO_MEINH,
      
      @Aggregation.default: #SUM
      @Semantics: { quantity : {unitOfMeasure: 'co_meinh'} }
      cast( co_megbtr as fis_fco_megbtr preserving type )  as CO_MEGBTR,
      
      @Aggregation.default: #SUM
      @Semantics: { quantity : {unitOfMeasure: 'co_meinh'} }
      cast( co_mefbtr as fis_fco_mefbtr preserving type )  as CO_MEFBTR,      

      /////////////////////////////////////////////////////////////////////////////

      // .INCLUDE ACDOC_SI_FIX  Unified Journal Entry: Mandatory fields for G/L

      ////////////////////////////////////////////////////////////////////////////

      cast(drcrk as fis_shkzg preserving type)           as drcrk,
      // cast(poper as FIS_POPER) as poper,

      cast(poper as fins_fiscalperiod preserving type)   as poper,
      cast(acdoca.periv as fis_periv preserving type)    as periv,
      cast(fiscyearper as fis_jahrper_conv preserving type ) as fiscyearper,
      cast(budat as fis_budat preserving type)           as budat,
      cast(bldat as fis_bldat preserving type)           as bldat,
      cast(blart as fis_blart preserving type)           as blart,
      // cast(blart as farp_blart) as blart,

      cast(buzei as fis_buzei preserving type)           as buzei,
      // cast(buzei as farp_buzei) as buzei,

      cast(zuonr as fis_zuonr preserving type)           as zuonr,
      cast(bschl as fis_bschl preserving type)           as bschl,
      cast(bstat as fis_bstat preserving type)           as bstat,
      // cast(bstat as farp_bstat_d) as bstat,

      cast(linetype as fis_linetype preserving type ) as linetype,
      cast(ktosl as fac_ktosl preserving type)           as ktosl,
      slalittype,
      xsplitmod,
      cast(usnam as fis_usnam preserving type)           as usnam,
      timestamp,
      last_change_datetime,
      eprctr,
      cast(rhoart as fis_hoart preserving type)          as rhoart,
      glaccount_type,
      cast(ktopl as fis_ktopl preserving type)           as ktopl,
      cast(lokkt as fis_altkt_skb1 preserving type)      as lokkt,
      cast(ktop2 as fis_ktop2 preserving type)           as ktop2,
      
      
      /////////////////////////////////////////////////////////////////////////////

      // .INCLUDE ACDOC_SI_FINCS   Universal Journal Entry: Fields for Group Reporting

      ////////////////////////////////////////////////////////////////////////////

      cast( rbunit as fis_md_bunit preserving type )     as rbunit,
      cast( rbuptr as fis_md_buptr preserving type )     as rbuptr,
      cast( rcomp  as fis_rcomp    preserving type )     as rcomp,
      cast( ritclg as fis_itclg    preserving type )     as ritclg,
      cast( ritem  as fis_fsi_item preserving type )     as ritem,
      cast( sityp  as fis_fc_sityp preserving type )     as sityp,
      cast( subit  as fis_fc_sitem preserving type )     as subit,     
            

      ///////////////////////////////////////////////////////////////////////////

      // .INCLUDE ACDOC_SI_GEN  Unified Journal Entry: Fields for several subledgers

      //////////////////////////////////////////////////////////////////////////

      cast(rebzg as fis_rebzg preserving type)                           as rebzg,
      cast(rebzj as fis_rebzj_no_conv preserving type)                   as rebzj,
      cast(rebzz as fis_rebzz preserving type)                           as rebzz,
      cast(rebzt as farp_rebzt preserving type)                          as rebzt,
      cast(rbest as fis_refbtyp preserving type)                         as rbest,
      cast(ebeln as fis_ebeln preserving type)                           as ebeln,
      cast(ebelp as fis_ebelp preserving type)                           as ebelp,
      zekkn,
      // cast(sgtxt as FIS_SGTXT) as sgtxt,

      cast(sgtxt as farp_sgtxt preserving type)                          as sgtxt,
      cast(kdauf as vdm_sales_order preserving type)                     as kdauf,
      cast(kdpos as sales_order_item preserving type)                    as kdpos,
      matnr,
      werks,
      cast(lifnr as md_supplier preserving type)                         as lifnr,
      cast(kunnr as kunnr preserving type)                               as kunnr,
      fbuda,
      perop_beg,
      perop_end,
      coco_num,
      wwert                                                              as wwert,
      ucb_id,
      ucb_scale_numerator,
      
      /////////////////////////////////////////////////////////////////////////

      // .INCLUDE ACDOC_SI_FI  Unified Journal Entry: Fields for FI subledgers

      /////////////////////////////////////////////////////////////////////////

      cast(koart as farp_koart preserving type)                          as koart,
      cast(umskz as fac_umskz preserving type)                           as umskz,
      cast(mwskz as fis_mwskz preserving type)                           as mwskz,
      tax_country,
      cast(hbkid as farp_hbkid preserving type)                          as hbkid,
      cast(hktid as fac_hktid preserving type)                           as hktid,
      cast(xopvw as fis_xopvw preserving type)                           as xopvw,
      cast(augdt as fis_augdt preserving type)                           as augdt,
      // cast(augbl as farp_augbl) as augbl,

      cast(augbl as fis_augbl preserving type)                           as augbl,
      cast(auggj as fis_auggj_no_conv preserving type)                   as auggj,

      cast( case augdt when '00000000' then cast( ' ' as xaugp  preserving type)
                                       else cast( 'X' as xaugp  preserving type)
            end  as xaugp  preserving type)                              as XAUGP,
      valut,     
      cast(aging as fis_aging preserving type)                           as AGING,
      cast(aging_incrmnt as fis_incrmnt preserving type)                 as AGING_INCRMNT,

      /////////////////////////////////////////////////////////////////////////

      // .INCLUDE ACDOC_SI_FAA  Unified Journal Entry: Fields for Asset Accounting

      /////////////////////////////////////////////////////////////////////////

      cast(afabe as fis_afabe_d preserving type)                         as afabe,
      cast(anln1 as fis_anln1 preserving type)                           as anln1,
      cast(anln2 as fis_anln2 preserving type)                           as anln2,
      bzdat,
      cast(anbwa as fis_anbwa_vdm preserving type ) as anbwa,
      movcat,
      cast(depr_period as fis_peraf preserving type)                     as depr_period,
      cast(anlgr as fis_anlgr preserving type)                           as anlgr,
      cast(anlgr2 as fis_anlgr2 preserving type)                         as anlgr2,
      settlement_rule,
anlkl,
ktogr,
      cast(panl1 as fis_panl1 preserving type )                          as panl1,
      cast(panl2 as fis_panl2 preserving type )                          as panl2,

      //////////////////////////////////////////////////////////////////////////

      // .INCLUDE ACDOC_SI_ML Unified Journal Entry: Fields for Material Ledger

      //////////////////////////////////////////////////////////////////////////

      cast(kalnr as fis_kalnr preserving type)                           as kalnr,
      vprsv,
      mlast,
      cast(kzbws as inventoryspecialstockvalntype preserving type)       as kzbws,
      xobew,
      cast(sobkz as inventoryspecialstocktype preserving type)           as sobkz,
      // VTSTAMP, 

      mat_kdauf,
      mat_kdpos,
      mat_pspnr,
      mat_ps_posid,
      cast(mat_lifnr as fis_mlmat_lifnr preserving type)                 as mat_lifnr,
      bwtar,
      bwkey,
      hpeinh,
      // KPEINH,

      // OPEINH,

      // VPEINH,

      mlptyp,
      mlcateg,
      qsbvalt,
      qsprocess,
      perart,  

      ////////////////////////////////////////////////////////////////////////////

      // .INCLUDE ACDOC_SI_CFIN   Unified Journal Entry: Fields for Central Finance

      //////////////////////////////////////////////////////////////////////////////

      bukrs_sender,
      cast(racct_sender as fis_racct_sender preserving type)             as racct_sender,
      accas_sender,
      accasty_sender,

      ////////////////////////////////////////////////////////////////////////////

      //  .INCLUDE  ACDOC_SI_CO  Unified Journal Entry: CO fields

      ///////////////////////////////////////////////////////////////////////////

      objnr,
      hrkft,
      hkgrp,
      parob1,
      parobsrc,
      cast( uspob as fis_uspob preserving type)          as uspob,
      co_belkz,
      beltp,
      muvflg,
      cast(gkont as fis_gkont preserving type)           as gkont,
      cast(gkoar as farp_gkoar preserving type)          as gkoar,
      cast(erlkz as fis_kblerlkz preserving type)        as erlkz,
      pernr,
      paobjnr,
      xpaobjnr_co_rel,
      cast(scope as fis_scope_cv_conv_co preserving type)   as scope,
      logsyso,
      pbukrs,
      cast(pscope as fis_pscope_cv_conv_co preserving type)   as pscope,
      logsysp,
      bwstrat,
      objnr_hk,
      cast( aufnr_org as fco_aufnr_org preserving type)   as aufnr_org,
      
      cast(ukostl as fis_usp_kostl    preserving type)     as ukostl,
      cast(ulstar as fins_usp_lstar    preserving type)    as ulstar,
      cast(umatnr as fis_origin_matnr preserving type)     as UMATNR,
      cast(varc_uacct as fis_varc_origin_acct preserving type) as VARC_UACCT,     

      uprctr,
      accas,
      cast(accasty as fis_accasty preserving type) as accasty,
      lstar,
      cast(aufnr as fis_aufnr preserving type)           as aufnr,
      autyp,
      cast(ps_psp_pnr as ps_posnr preserving type)       as ps_psp_pnr,
      ps_posid,
      ps_prj_pnr,
      ps_pspid,
      nplnr,
      cast( nplnr_vorgn as fis_npvrg_no_conv preserving type ) as nplnr_vorgn,
      prznr,
      kstrg,
      cast(bemot as fis_bemot preserving type)           as bemot,
      cast(rsrce as fis_co_resource preserving type)     as rsrce,
      qmnum,
      service_doc_type,
      service_doc_id,
      service_doc_item_id,
      service_contract_type,
      service_contract_id,
      service_contract_item_id,
      cast(solution_order_id as crms4_solo_object_id preserving type ) as solution_order_id,
      cast(solution_order_item_id as crms4_solo_number_int preserving type ) as solution_order_item_id,
      
      cast( vtkey as fis_vtkey_kk preserving type ) as vtkey,
      cast( vtpos as fis_vtpos_kk preserving type ) as vtpos,
      
      cast( ra_contract_id as fis_contract_id preserving type ) as ra_contract_id,
      cast( ra_pob_id as fis_pob_id preserving type ) as ra_pob_id,      
      
      erkrs,
      cast(paccas as fis_paccas preserving type)         as paccas,
      cast(paccasty as fins_paccasty preserving type)    as paccasty,
      cast(plstar as fis_par_lstar preserving type)      as plstar,
      cast(paufnr as fis_par_aufnr preserving type)      as paufnr,
      cast(pautyp as fis_par_auftyp preserving type)     as pautyp,
      cast(pps_posid as fis_par_posid preserving type)   as pps_posid,
      cast(pps_pspid as fis_par_pspid preserving type)   as pps_pspid,
      cast(pkdauf as fis_par_kdauf preserving type)      as pkdauf,
      cast(pkdpos as fis_par_kdpos preserving type)      as pkdpos,
      ppaobjnr,
      pnplnr,
      cast( pnplnr_vorgn as fis_par_vornr_auf_no_conv preserving type ) as pnplnr_vorgn,
      pprznr,
      pkstrg,
      cast(co_accasty_n1 as fis_accasty_n1 preserving type)         as co_accasty_n1,
      cast(co_accasty_n2 as fis_accasty_n2 preserving type)         as co_accasty_n2,
      cast(co_accasty_n3 as fis_accasty_n3 preserving type)         as co_accasty_n3,      
      co_zlenr,
      co_belnr,
      co_buzei,
      co_refbz,
      overtimecat,
      work_item_id,      
co_beknz,
uprznr,
pps_psp_pnr,
pps_prj_pnr,
pservice_doc_type,
pservice_doc_id,
pservice_doc_item_id,  

varc_hkgrp,    

      //////////////////////////////////////////////////////////////////////

      //  .INCLUDE  ACDOC_SI_COPA  Unified Journal Entry: CO-PA fields

      //////////////////////////////////////////////////////////////////////

      fkart,
      vkorg,
      vtweg,
      spart,
      matnr_copa,
      matkl,
      kdgrp,
      land1,
      brsch,
      bzirk,
      kunre,
      kunwe,
      konzs,

 //////////////////////////////////////////////////////////////////////

 // .INCLUDE ACDOC_SI_PS  Unified Journal Entry: Fields for Public Sector

 /////////////////////////////////////////////////////////////////////

re_bukrs,
re_account,
fikrs,
fipex,
cast(fistl as farp_fistl preserving type)  as fistl,
measure,
rfund,
rgrant_nbr,
rbudget_pd,
sfund,
sgrant_nbr,
sbudget_pd,
bdgt_account,
bdgt_account_cocode,
bdgt_cnsmpn_date,
bdgt_cnsmpn_period,
cast( bdgt_cnsmpn_year as psm_bdgt_cnsmpn_year_no_conv preserving type ) as bdgt_cnsmpn_year,
bdgt_relevant,
bdgt_cnsmpn_type,
bdgt_cnsmpn_amount_type,
rsponsored_prog,
rsponsored_class,
rbdgt_vldty_nbr,
cast(kblnr as fis_kblnr_fi preserving type ) as kblnr,
cast(kblpos as fis_kblpos preserving type ) as kblpos,


      ///////////////////////////////////////////////////////////////////////

      // .INCLUDE ACDOC_SI_JVA  Universal Journal Entry: Fields for Financial Services

      ///////////////////////////////////////////////////////////////////////

cast(fs_product_group as fis_ffs_product_group preserving type ) as FS_PRODUCT_GROUP,
cast(branch_id as fis_ffs_branch_id preserving type ) as BRANCH_ID,
cast(datasource_id as fis_ffs_datasource_id preserving type ) as DATASOURCE_ID,     

 
      ///////////////////////////////////////////////////////////////////////

      // .INCLUDE ACDOC_SI_JVA  Unified Journal Entry: Fields for Joint Venture Accounting

      ///////////////////////////////////////////////////////////////////////

vname,
egrup,
recid,
vptnr,
btype,
etype,
prodper,
billm,
pom,
cbrunid,
jvactivity,
pvname,
pegrup,
s_recind,
cbracct,
cbobjnr,     

      ///////////////////////////////////////////////////////////////////////

      // .INCLUDE ACDOC_SI_RE STRU  0 0 Unified Journal Entry: Fields for Real Estate

      ///////////////////////////////////////////////////////////////////////      

      cast(swenr as rebdvdmbeno preserving type ) as SWENR,
      cast(sgenr as rebdvdmbuno preserving type ) as SGENR,
      cast(sgrnr as rebdvdmprno preserving type ) as SGRNR,
      cast(smenr as rebdvdmrono preserving type ) as SMENR,
      cast(recnnr as recnvdmcnnr preserving type ) as RECNNR,      
cast(snksl as rescvdmsckey preserving type ) as snksl ,
cast(sempsl as rescvdmsuid preserving type ) as sempsl,
cast(dabrz as farp_dabrbez preserving type)  as dabrz,

cast(pswenr as rebdvdmpbeno preserving type ) as pswenr,
cast(psgenr as rebdvdmpbuno preserving type ) as psgenr,
cast(psgrnr as rebdvdmpprno preserving type ) as psgrnr,
cast(psmenr as rebdvdmprono preserving type ) as psmenr,
cast(precnnr as recnvdmpcnnr preserving type ) as precnnr,
cast(psnksl as rescvdmpsckey preserving type ) as psnksl,
cast(psempsl as rescvdmpsuid preserving type ) as psempsl,
cast(pdabrz as fins_par_dabrbez preserving type ) as pdabrz,     

     
 ///////////////////////////////////////////////////////////////////////

 // .INCLUDE ACDOC_SI_ACR STRU  0 0 Universal Journal Entry: Fields for Accrual object

 ///////////////////////////////////////////////////////////////////////     

acrobjtype,
acrlogsys,
acrobj_id,
acrsobj_id,
acritmtype,
cast( acrrefobj_id as fis_acr_refobj_id preserving type ) as acrrefobj_id, 
acrvaldat,


///////////////////////////////////////////////////////////////////////

 // .INCLUDE ACDOC_SI_VAL STRU  0 0 Universal Journal Entry: Fields for Fin. Valuation Object

 ///////////////////////////////////////////////////////////////////////    

valobjtype,
valobj_id,
valsobj_id,
cast(netdt as faedt_fpos preserving type) as netdt,
cast(risk_class as credit_risk_class preserving type) as risk_class,
      
      //////////////////////////////////////////////////////////////////////

      //  .INCLUDE  ACDOC_SI_LOG  Universal Journal Entry: Fields for Logistics

      //////////////////////////////////////////////////////////////////////


      arbid,
      cast( vornr as fis_vornr_no_conv preserving type ) as vornr,
      aufps,
      paufps,
      
      //////////////////////////////////////////////////

      // .INCLUDE  ACDOC_SI_LOG_ACT:  New Fields  PM  //

      //////////////////////////////////////////////////

cast( uvorn as fis_uvorn_no_conv preserving type ) as uvorn,
equnr,
tplnr, 
istru, 
ilart,
plknz,
artpr,
priok,
maufnr,        
matkl_mm,   
planned_parts_work,
cast( vornr_org as fis_origin_order_operation preserving type)   as vornr_org,

      //////////////////////////////////////////////////////////////////////////

      // .INCLUDE  ACDOC_SI_TECH:  Universal Journal Entry: Technical Fields  //

      ////////////////////////////////////////////////////////////////////////// 

cast(mig_source as fis_acdoc_mig_source preserving type) as mig_source 
              
           
//      @Aggregation.default: #SUM

//      cast( cast(1 as abap.dec( 12, 0 )) as fis_nbritm preserving type ) as nbritm


}
/* Filter for BSTAT not required as these are not written to ACDOCA */
//where

//  (

//    bstat <> 'D'

//  )

//  and(

//    bstat <> 'M'

//  )