@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #S
@EndUserText.label : 'Sales Doc Fulfillment: Billing Document'
@VDM.viewType: #CONSUMPTION
@AbapCatalog.compiler.compareFilter: true
@Search.searchable: false
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName : 'CSOFBILLGDOC'
define view C_SlsDocFlfmtBillgDoc
as
select from I_BillingDocument as BillingDocument
left outer to one join I_SDDocStandardPartner as Partner
on BillingDocument.BillingDocument = Partner.SDDocument
--AT29.9.2021 added to get further address key fields into virtual elemement implmentation for SoldToPartyFormattedAddress
-- (same design as for C_SlsDocFlfmtSlsDoc & C_SlsDocFlfmtDelivDoc)
left outer to one join I_SDDocumentCompletePartners as SoldToPartyAddressInfo on BillingDocument.BillingDocument = SoldToPartyAddressInfo.SDDocument
and SoldToPartyAddressInfo.SDDocumentItem = '000000'
and SoldToPartyAddressInfo.PartnerFunction = 'AG'
//Extensibility
association [0..1] to E_BillingDocument as _Extension on $projection.BillingDocument = _Extension.BillingDocument
{
//Key
key BillingDocument.BillingDocument,
BillingDocument.BillingDocumentType,
BillingDocument.BillingDocumentDate,
//Pricing
@DefaultAggregation: #NONE
@Semantics.amount.currencyCode : 'TransactionCurrency'
BillingDocument.TotalNetAmount,
@DefaultAggregation: #NONE
@Semantics.amount.currencyCode : 'TransactionCurrency'
TotalTaxAmount,
@Semantics.currencyCode:true
@ObjectModel.foreignKey.association : '_TransactionCurrency'
TransactionCurrency,
//Accounting
BillingDocument.AccountingTransferStatus,
BillingDocument.BillingDocumentIsCancelled,
//Sales
BillingDocument.PurchaseOrderByCustomer,
BillingDocument.SalesOrganization,
BillingDocument.CustomerGroup,
BillingDocument.CustomerPaymentTerms,
//Partner
@ObjectModel.text.element: [ 'SoldToPartyFullName' ]
BillingDocument.SoldToParty,
@Semantics.text: true
cast (Partner._SoldToParty.CustomerName as vdm_sold_to_name) as SoldToPartyName,
-- AT29.09.2021: changes for BP Adoption (CE2202) --*FullName
-- cast (Partner._SoldToParty._StandardAddress.FullName as fullnamesoldtoparty) as SoldToPartyFullName, --old modeling (no document address, no multiple address)
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy : 'ABAP:CL_SD_SOF_FULLNAME'
cast ( '' as fullnamesoldtoparty ) as SoldToPartyFullName,
-- AT29.09.2021: end
--Partner._SoldToParty.AddressID, --AT29.09.2021 complete address key now taken from vbpa according to best practice to aim for document addresses...
SoldToPartyAddressInfo.AddressID,
SoldToPartyAddressInfo.AddressObjectType,
SoldToPartyAddressInfo.AddressPersonID,
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy : 'ABAP:CL_SD_SOF_ADDRESS'
cast ( ' ' as formattedaddresssoldtoparty )as SoldToPartyFormattedAddress,
@ObjectModel.text.element: [ 'PayerPartyName' ]
BillingDocument.PayerParty,
@Semantics.text: true
cast (Partner._PayerParty.CustomerName as payer_name) as PayerPartyName,
@ObjectModel.text.element: [ 'BillToPartyName' ]
cast (Partner.BillToParty as kunre) as BillToParty,
@Semantics.text: true
cast (Partner._BillToParty.CustomerName as bill_to_name) as BillToPartyName,
@ObjectModel.text.element: [ 'ShipToPartyName' ]
cast (Partner.ShipToParty as kunwe) as ShipToParty,
@Semantics.text: true
cast (Partner._ShipToParty.CustomerName as ship_to_name) as ShipToPartyName,
@ObjectModel.text.element: [ 'ShipToPartyCountryName' ]
-- AT01.10.2021: changes for BP Adoption (CE2202)
--cast (Partner._ShipToParty._StandardAddress.Country as shiptopartycountry) as ShipToPartyCountry, --old modeling (no document address, no multiple address)
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy : 'ABAP:CL_SD_SOF_COUNTRYNAME'
cast ( '' as shiptopartycountry ) as ShipToPartyCountry ,
-- AT01.10.2021: end
@Semantics.text: true
-- AT01.10.2021: changes for BP Adoption (CE2202)
-- cast (Partner._ShipToParty._StandardAddress._Country._Text[1: Language = $session.system_language].CountryName as shiptopartycountryname) as ShipToPartyCountryName, --old modeling (no document address, no multiple address)
@ObjectModel.readOnly: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy : 'ABAP:CL_SD_SOF_COUNTRYNAME'
cast ( '' as shiptopartycountryname ) as ShipToPartyCountryName ,
-- AT01.10.2021: end
//Criticality
@UI.hidden: true
cast (
case
when AccountingTransferStatus = ''
or AccountingTransferStatus = 'A'
or AccountingTransferStatus = 'B'
or AccountingTransferStatus = 'F'
or AccountingTransferStatus = 'G'
or AccountingTransferStatus = 'I'
or AccountingTransferStatus = 'K'
or AccountingTransferStatus = 'L'
or AccountingTransferStatus = 'M' then 1
else 3
end as abap.int1
) as AccountingTransfStsCriticality,
// Associations
_BillingDocumentType,
_SalesOrganization,
_CustomerGroup,
_AccountingTransferStatus,
_CustomerPaymentTerms,
_TransactionCurrency
};
/*+[internal] {
"BASEINFO":
{
"FROM ":
[
"I_BILLINGDOCUMENT",
"I_CUSTOMER",
"I_SDDOCSTANDARDPARTNER",
"I_SDDOCUMENTCOMPLETEPARTNERS"
],
"ASSOCIATED":
[
"E_BILLINGDOCUMENT",
"I_ACCOUNTINGTRANSFERSTATUS",
"I_BILLINGDOCUMENTTYPE",
"I_CURRENCY",
"I_CUSTOMERGROUP",
"I_CUSTOMERPAYMENTTERMS",
"I_SALESORGANIZATION"
],
"BASE":
[
"I_BILLINGDOCUMENT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Depth:
1
2
3
4
5
All
Reload
C_SlsDocFlfmtBillgDoc view