@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog: {
sqlViewName: 'CCNTXIIPT',
compiler.compareFilter: true
}
@VDM: {
viewType: #CONSUMPTION,
private: false
}
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@EndUserText.label: 'Incoming VAT Invoice'
@ObjectModel: {
semanticKey: ['CN_TaxInvcCode', 'CN_TaxInvcNmbr'],
representativeKey: 'CN_TaxInvcUUID',
usageType: {
serviceQuality: #A,
sizeCategory: #XL,
dataClass: #TRANSACTIONAL
}
}
@Search.searchable
@UI.headerInfo: {
typeName: 'Manage Incoming VAT Invoices - China',
typeNamePlural: 'Manage Incoming VAT Invoices - China',
title: { type: #STANDARD, value: 'CN_TaxInvcNmbr' },
description: { type: #STANDARD, value: 'CN_TaxInvcCode' }
}
define view C_CN_TaxInputInvc
as select from I_CN_TaxInputInvc as Document
// Value Helps
association [1] to C_CN_TaxCurrency as _Currency on $projection.CN_TaxInvcCrcy = _Currency.Currency
association [1] to C_CN_TaxCompanyCode as _CompanyCode on $projection.CompanyCode = _CompanyCode.CompanyCode
association [0..1] to C_CN_TaxInvcPurchasingOrg as _PurchasingOrganization on $projection.PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization
association [0..1] to C_CN_TaxInvcPurchasingGroup as _PurchasingGroup on $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
association [0..1] to C_CN_TaxInvcSupplier as _Supplier on $projection.Supplier = _Supplier.Supplier
//and $projection.CompanyCode = _Supplier.CompanyCode
association [1] to C_CN_TaxEntity as _TaxEntity on $projection.CN_TaxEntityID = _TaxEntity.CN_TaxEntityID
and $projection.CompanyCode = _TaxEntity.CompanyCode
association [1] to C_CN_TaxInvcType as _InvoiceType on $projection.CN_TaxInvcType = _InvoiceType.CN_TaxInvcType
association [1] to C_CN_TaxInvcDeductionType as _DeductionType on $projection.CN_TaxInvcDeductionType = _DeductionType.CN_TaxInvcDeductionType
association [0..*] to C_CN_TaxTransferItem as _TransferItem on $projection.CN_TaxInvcUUID = _TransferItem.CN_TaxInvcUUID
association [1..1] to C_CN_TaxInvcInptProcgSts as _InvoiceStatus on $projection.CN_TaxInvcInptProcgSts = _InvoiceStatus.CN_TaxInvcInptProcgSts
association [1..1] to C_CN_TaxInvcGldnTxSystSts as _GoldenTaxStatus on $projection.CN_TaxInvcGldnTxSystSts = _GoldenTaxStatus.CN_TaxInvcGldnTxSystSts
association [1] to I_CN_TaxInvoicePostingType as _PostingType on $projection.CN_InvoicePostingType = _PostingType.CN_InvoicePostingType
association [1] to I_CN_TaxInvoiceRiskLevel as _RiskLevel on $projection.CN_GoldenTaxSystemRiskLevel = _RiskLevel.CN_GoldenTaxSystemRiskLevel
association [1] to I_CN_TaxInvoiceSpecificElmnt as _SpecificElements on $projection.CN_InvoiceSpecificElement = _SpecificElements.CN_InvoiceSpecificElement
{
@UI.hidden: true
key Document.CN_TaxInvcUUID,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.9
@Search.ranking: #HIGH
-- @ObjectModel.mandatory: true
@UI.identification.position: 10
@UI.lineItem.position: 10
@UI.fieldGroup: { qualifier: 'GeneralInfo', position: 10 }
Document.CN_TaxInvcCode,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.9
@Search.ranking: #HIGH
-- @ObjectModel.mandatory: true
@UI.identification.position: 20
@UI.lineItem.position: 20
@UI.fieldGroup: { qualifier: 'GeneralInfo', position: 20 }
Document.CN_TaxInvcNmbr,
-- @ObjectModel.mandatory: true
@UI.fieldGroup: { qualifier: 'GeneralInfo', position: 60 }
Document.CN_TaxSellerRegnNmbr,
-- @ObjectModel.mandatory: true
@UI.fieldGroup: { qualifier: 'GeneralInfo', position: 80 }
Document.CN_TaxBuyerRegnNmbr,
-- @ObjectModel.mandatory: true
-- comment by xiong
-- @UI.fieldGroup: { qualifier: 'GeneralInfo', position: 40 }
-- @ObjectModel.foreignKey.association: '_InvoiceType'
-- end of comment
@ObjectModel.readOnly: true
@ObjectModel.foreignKey.association: '_InvoiceType'
@UI.dataPoint: { title: 'Invoice Type', description: 'Type', targetValueElement: 'CN_TaxInvcType' }
--@UI.lineItem.position: 25
@UI.selectionField.position: 40
Document.CN_TaxInvcType,
@Semantics.businessDate.at: true
-- @ObjectModel.mandatory: true
@UI.lineItem.position: 50
@UI.dataPoint: { title: 'Invoice Date', description: 'Invoice Date', targetValueElement: 'CN_TaxInvcDate' }
@UI.fieldGroup: [ { qualifier: 'GeneralInfo', position: 30 } ]
@UI.selectionField.position: 40
Document.CN_TaxInvcDate,
@ObjectModel.foreignKey.association: '_Currency'
@ObjectModel.mandatory: true
Document.CN_TaxInvcCrcy,
@Semantics.amount.currencyCode: 'CN_TaxInvcCrcy'
@UI.lineItem.position: 70
@UI.fieldGroup: { qualifier: 'AmountInfo', position: 10 }
Document.CN_TaxInvcNetAmtInInvcCrcy,
@UI.lineItem.position: 80
@Semantics.amount.currencyCode: 'CN_TaxInvcCrcy'
@UI.fieldGroup: { qualifier: 'AmountInfo', position: 20 }
Document.CN_TaxInvcTaxAmtInInvcCrcy,
-- @UI.lineItem.position: 90
-- @Semantics.amount.currencyCode: 'CNTaxInvcCrcy'
-- @UI.dataPoint: {title: 'TotalAmount', description: 'Total Amount', targetValueElement: 'CNTaxInvcIssueDate'}
-- @UI.fieldGroup: { qualifier: 'AmountInfo', position: 30 }
-- Internal Incident: 1680225411 - Calculated fields are currently not supported for draft 2.0.
-- cast ( Document.CNTaxInvcNetAmtInInvcCrcy + Document.CNTaxInvcTaxAmtInInvcCrcy - CNTaxInvcDiscNetAmtInInvcCrcy - CNTaxInvcDiscTaxAmtInInvcCrcy as ficntaxinvc_amnt_tot ) as CNTaxInvcTotAmtInInvcCrcy,
-- @ObjectModel.mandatory: true
@UI.selectionField.position: 20
@ObjectModel.foreignKey.association: '_TaxEntity'
Document.CN_TaxEntityID,
@Semantics.amount.currencyCode: 'CN_TaxInvcCrcy'
Document.CN_TaxInvcDiscNetAmtInInvcCrcy,
@Semantics.amount.currencyCode: 'CN_TaxInvcCrcy'
Document.CN_TaxInvcDiscTaxAmtInInvcCrcy,
Document.CN_TaxInvcIsElectronic,
Document.IsPostedOnAccount,
@ObjectModel.foreignKey.association: '_CompanyCode'
-- @ObjectModel.mandatory: true
@UI.fieldGroup: { qualifier: 'GeneralInfo', position: 70 }
@UI.selectionField.position: 10
Document.CompanyCode,
@ObjectModel.foreignKey.association: '_GoldenTaxStatus'
@UI.lineItem.position: 30
@UI.dataPoint: { title: 'GT Status', description: 'GT Status', targetValueElement: 'CN_TaxInvcGldnTxSystSts' }
@UI.fieldGroup: { qualifier: 'HeaderInfo', position: 20 }
@UI.selectionField.position: 60
Document.CN_TaxInvcGldnTxSystSts,
@ObjectModel.readOnly: true
@UI.fieldGroup: { qualifier: 'GeneralInfo', position: 85 }
Document.CN_TaxInvcGldnTxSystStsSyncTme,
@ObjectModel.readOnly: true
@ObjectModel.foreignKey.association: '_InvoiceStatus'
@UI.dataPoint: { title: 'Input Invoice Status', description: 'Status', targetValueElement: 'CN_TaxInvcInptProcgSts' }
@UI.lineItem.position: 25
@UI.selectionField.position: 50
Document.CN_TaxInvcInptProcgSts,
@UI.fieldGroup: { qualifier: 'DeductionInfo', position: 10 }
@ObjectModel.foreignKey.association: '_DeductionType'
Document.CN_TaxInvcDeductionType,
-- @ObjectModel.mandatory: true
Document.FiscalYear,
// Posting Indicator
Document.CN_InvoicePostingPeriod,
@ObjectModel.foreignKey.association: '_PostingType'
Document.CN_InvoicePostingType,
Document.CN_InvoiceLatestPostingDate,
Document.CN_GoldenTaxSystemResultString,
@ObjectModel.foreignKey.association: '_RiskLevel'
Document.CN_GoldenTaxSystemRiskLevel,
@ObjectModel.foreignKey.association: '_SpecificElements'
Document.CN_InvoiceSpecificElement,
Document.CN_BlueInvoiceNumber,
@ObjectModel.readOnly: true
Document.CN_TaxSellerName,
@UI.multiLineText: true
@UI.fieldGroup: { qualifier: 'GeneralInfo', position: 90 }
Document.CN_TaxInvcComment,
@ObjectModel.foreignKey.association: '_PurchasingOrganization'
@UI.fieldGroup: { qualifier: 'PurchaseInfo', position: 10 }
Document.PurchasingOrganization,
@ObjectModel.foreignKey.association: '_PurchasingGroup'
@UI.fieldGroup: { qualifier: 'PurchaseInfo', position: 20 }
Document.PurchasingGroup,
@ObjectModel.foreignKey.association: '_Supplier'
@UI.lineItem.position: 40
@UI.fieldGroup: { qualifier: 'GeneralInfo', position: 50 }
@UI.selectionField.position: 30
Document.Supplier,
@Semantics.user.createdBy: true
@ObjectModel.readOnly: true
Document.CreatedByUser,
@Semantics.systemDateTime.createdAt
@ObjectModel.readOnly: true
Document.CreationUTCDateTime,
@Semantics.user.lastChangedBy: true
@ObjectModel.readOnly: true
Document.LastChangedByUser,
@Semantics.systemDateTime.lastChangedAt
@ObjectModel.readOnly: true
Document.LastChangeDateTime,
_Currency,
_CompanyCode,
_PurchasingOrganization,
_PurchasingGroup,
_Supplier,
_TaxEntity,
_InvoiceType,
_DeductionType,
_TransferItem,
_InvoiceStatus,
_PostingType,
_RiskLevel,
_SpecificElements,
_GoldenTaxStatus
}