C_SlsDocFlfmtIssue

DDL: C_SLSDOCFLFMTISSUE SQL: CSOFISSUE Type: view CONSUMPTION Package: ODATA_SD_SOFI

Sales Order Fulfillment Issues

C_SlsDocFlfmtIssue is a Consumption CDS View that provides data about "Sales Order Fulfillment Issues" in SAP S/4HANA. It reads from 2 data sources (I_SalesOrderFlfmtIssueBasic, I_SalesDocument) and exposes 145 fields with key fields SalesDocument, DeliveryDocument, BillingDocument, PurchasingDocument, ManufacturingOrder. It has 39 associations to related views. Part of development package ODATA_SD_SOFI.

Data Sources (2)

SourceAliasJoin Type
I_SalesOrderFlfmtIssueBasic Issue inner
I_SalesDocument SalesDocument from

Associations (39)

CardinalityTargetAliasCondition
[0..1] I_CreditManagementSegment _CreditSegment $projection.creditsegment = _CreditSegment.CreditSegment
[0..1] I_SalesDocumentRjcnReason _SalesDocumentRjcnReason $projection.SalesDocumentRjcnReason = _SalesDocumentRjcnReason.SalesDocumentRjcnReason
[0..*] I_IssueText _IssueText $projection.Issue = _IssueText.Issue
[0..*] I_IssueCategoryText _IssueCategoryText $projection.IssueCategory = _IssueCategoryText.IssueCategory
[0..*] I_SalesOrganizationText _SalesOrganizationText $projection.SalesOrganization = _SalesOrganizationText.SalesOrganization
[0..*] I_DistributionChannelText _DistributionChannelText $projection.DistributionChannel = _DistributionChannelText.DistributionChannel
[0..*] I_DivisionText _DivisionText $projection.OrganizationDivision = _DivisionText.Division
[0..*] I_SalesGroupText _SalesGroupText $projection.SalesGroup = _SalesGroupText.SalesGroup
[0..*] I_SalesOfficeText _SalesOfficeText $projection.SalesOffice = _SalesOfficeText.SalesOffice
[0..*] I_CreditManagementSegmentTxt _CreditSegmentText $projection.creditsegment = _CreditSegmentText.CreditSegment association[0..*] to I_CustomerClassificationText as _CustomerClassificationText on $projection.customerclassification = _CustomerClassificationText.CustomerClassification
[0..*] I_DueDateStatusText _DueDateStatusText $projection.DueDateStatus = _DueDateStatusText.DueDateStatus
[0..*] I_IsPotentialFutureIssText _IsPotentialFutureIssText $projection.IsPotentialFutureIssue = _IsPotentialFutureIssText.IsPotentialFutureIssue
[0..*] I_SalesDocumentTypeText _SalesDocumentTypeText $projection.SalesDocumentType = _SalesDocumentTypeText.SalesDocumentType
[0..*] I_SDDocumentCategoryText _SDDocumentCategoryText $projection.SDDocumentCategory = _SDDocumentCategoryText.SDDocumentCategory
[0..*] I_DeliveryBlockReasonText _DeliveryBlockReasonText $projection.DeliveryBlockReason = _DeliveryBlockReasonText.DeliveryBlockReason
[0..*] I_BillingBlockReasonText _BillingBlockReasonText $projection.HeaderBillingBlockReason = _BillingBlockReasonText.BillingBlockReason
[0..*] I_OverallPurchaseConfStatusT _OverallPurchaseConfStatusT $projection.OverallPurchaseConfStatus = _OverallPurchaseConfStatusT.OverallPurchaseConfStatus
[0..*] I_HdrGenIncompletionStatusT _HdrGenIncompletionStatusT $projection.HdrGeneralIncompletionStatus = _HdrGenIncompletionStatusT.HdrGeneralIncompletionStatus
[0..*] I_HdrDelivIncompletionStatusT _HdrDelivIncompletionStatusT $projection.HeaderDelivIncompletionStatus = _HdrDelivIncompletionStatusT.HeaderDelivIncompletionStatus
[0..*] I_OverallPrcIncompletionStsT _OverallPrcIncompletionStsT $projection.OverallPricingIncompletionSts = _OverallPrcIncompletionStsT.OverallPricingIncompletionSts
[0..*] I_HdrBillgIncompletionStatusT _HdrBillgIncompletionStatusT $projection.HeaderBillgIncompletionStatus = _HdrBillgIncompletionStatusT.HeaderBillgIncompletionStatus
[0..*] I_OvrlItmGenIncompletionStsT _OvrlItmGenIncompletionStsT $projection.OvrlItmGeneralIncompletionSts = _OvrlItmGenIncompletionStsT.OvrlItmGeneralIncompletionSts
[0..*] I_OvrlItmBillgIncompltnStsText _OvrlItmBillgIncompltnStsT $projection.OvrlItmBillingIncompletionSts = _OvrlItmBillgIncompltnStsT.OvrlItmBillingIncompletionSts
[0..*] I_OvrlItmDelivIncompletionStsT _OvrlItmDelivIncompletionStsT $projection.OvrlItmDelivIncompletionSts = _OvrlItmDelivIncompletionStsT.OvrlItmDelivIncompletionSts
[0..*] I_PaytAuthsnCreditCheckStsText _PaytAuthsnCreditCheckStsText $projection.PaytAuthsnCreditCheckSts = _PaytAuthsnCreditCheckStsText.PaytAuthsnCreditCheckSts
[0..*] I_SalesDocApprovalStatusT _SalesDocApprovalStatusT $projection.SalesDocApprovalStatus = _SalesDocApprovalStatusT.SalesDocApprovalStatus
[0..*] I_OverallChmlCmplncStatusText _OverallChmlCmplncStatusText $projection.OverallChmlCmplncStatus = _OverallChmlCmplncStatusText.OverallChmlCmplncStatus
[0..*] I_OverallDangerousGoodsStsTxt _OverallDangerousGoodsStsTxt $projection.OverallDangerousGoodsStatus = _OverallDangerousGoodsStsTxt.OverallDangerousGoodsStatus
[0..*] I_OvrlSftyDataSheetStsTxt _OvrlSftyDataSheetStsTxt $projection.OverallSafetyDataSheetStatus = _OvrlSftyDataSheetStsTxt.OverallSafetyDataSheetStatus
[0..*] I_OvrlTradeCmplncEmbargoStsTxt _OvrlTradeCmplncEmbargoStsTxt $projection.OverallTrdCmplncEmbargoSts = _OvrlTradeCmplncEmbargoStsTxt.OverallTrdCmplncEmbargoSts
[0..*] I_OvTrdComplSanctListChkStsTxt _OvTrdComplSanctListChkStsTxt $projection.OvrlTrdCmplncSnctndListChkSts = _OvTrdComplSanctListChkStsTxt.OvrlTrdCmplncSnctndListChkSts
[0..*] I_OvTrdComplLegalCtrlChkStsTxt _OvTrdComplLegalCtrlChkStsTxt $projection.OvrlTrdCmplncLegalCtrlChkSts = _OvTrdComplLegalCtrlChkStsTxt.OvrlTrdCmplncLegalCtrlChkSts
[0..*] I_CurrencyText _TransactionCurrencyText $projection.TransactionCurrency = _TransactionCurrencyText.Currency
[0..*] I_CurrencyText _StatisticsCurrencyText $projection.StatisticsCurrency = _StatisticsCurrencyText.Currency
[0..1] C_Dischannelvaluehelp _DistributionChannelVH $projection.SalesOrganization = _DistributionChannelVH.SalesOrganization and $projection.DistributionChannel = _DistributionChannelVH.DistributionChannel
[0..1] C_OrgDivisionValueHelp _OrganizationDivisionVH $projection.SalesOrganization = _OrganizationDivisionVH.SalesOrganization and $projection.DistributionChannel = _OrganizationDivisionVH.DistributionChannel and $projection.OrganizationDivision = _OrganizationDivisionVH.Division
[0..1] C_SalesOfficeValueHelp _SalesOfficeVH $projection.SalesOrganization = _SalesOfficeVH.SalesOrganization and $projection.DistributionChannel = _SalesOfficeVH.DistributionChannel and $projection.OrganizationDivision = _SalesOfficeVH.OrganizationDivision and $projection.SalesOffice = _SalesOfficeVH.SalesOffice
[0..1] C_SalesGroupValueHelp _SalesGroupVH $projection.SalesOffice = _SalesGroupVH.SalesOffice and $projection.SalesGroup = _SalesGroupVH.SalesGroup
[0..1] E_SalesDocumentBasic _Extension SalesDocument.SalesDocument = _Extension.SalesDocument

Annotations (13)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
EndUserText.label Sales Order Fulfillment Issues view
VDM.viewType #CONSUMPTION view
AbapCatalog.compiler.compareFilter true view
Search.searchable true view
AccessControl.authorizationCheck #CHECK view
Metadata.allowExtensions true view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName CSOFISSUE view

Fields (145)

KeyFieldSource TableSource FieldDescription
KEY SalesDocument I_SalesDocument SalesDocument
KEY DeliveryDocument I_SalesOrderFlfmtIssueBasic DeliveryDocument
KEY BillingDocument I_SalesOrderFlfmtIssueBasic BillingDocument
KEY PurchasingDocument
KEY ManufacturingOrder I_SalesOrderFlfmtIssueBasic ManufacturingOrder
Issue
IssueCategory I_SalesOrderFlfmtIssueBasic IssueCategory
DueDays I_SalesOrderFlfmtIssueBasic DueDays
DueHorizonDurationInDays
DueDateStatus I_SalesOrderFlfmtIssueBasic DueDateStatus
IsPotentialFutureIssue I_SalesOrderFlfmtIssueBasic IsPotentialFutureIssue
NmbrOfIssuesInOrder I_SalesOrderFlfmtIssueBasic NmbrOfIssuesInOrder
NmbrOfIssuesInDelivery I_SalesOrderFlfmtIssueBasic NmbrOfIssuesInDelivery
NmbrOfIssuesInInvoice I_SalesOrderFlfmtIssueBasic NmbrOfIssuesInInvoice
NmbrOfIssuesInSupply I_SalesOrderFlfmtIssueBasic NmbrOfIssuesInSupply
NmbrOfAllIssues I_SalesOrderFlfmtIssueBasic NmbrOfAllIssues
NmbrOfItemsInOrder
SalesDocumentType I_SalesDocument SalesDocumentType
SalesDocumentProcessingType I_SalesDocument SalesDocumentProcessingType
SDDocumentCategory I_SalesDocument SDDocumentCategory
CreatedByUser I_SalesDocument CreatedByUser
CreatedByUserName _CreatedByUser UserDescription
LastChangedByUser I_SalesDocument LastChangedByUser
LastChangedByUserName _LastChangedByUser UserDescription
SalesOrganization I_SalesDocument SalesOrganization
DistributionChannel I_SalesDocument DistributionChannel
OrganizationDivision I_SalesDocument OrganizationDivision
SalesGroup I_SalesDocument SalesGroup
SalesOffice I_SalesDocument SalesOffice
SoldToParty I_SalesDocument SoldToParty
SoldToPartyName
SoldToPartyIsOneTimeAccount
SoldToPartyFullName
ShipToParty Partner ShipToParty
ShipToPartyName
ShipToPartyIsOneTimeAccount
ShipToPartyFullName
ResponsibleEmployee Partner ResponsibleEmployee
ResponsibleEmployeeName
PayerParty Partner PayerParty
PayerPartyName
CustomerClassification
SalesDocumentDate I_SalesDocument SalesDocumentDate
CreditSegment
PurchaseOrderByCustomer I_SalesDocument PurchaseOrderByCustomer
TotalNetAmount I_SalesDocument TotalNetAmount
TransactionCurrency I_SalesDocument TransactionCurrency
StatisticsCurrency I_SalesDocument StatisticsCurrency
RequestedDeliveryDate I_SalesDocument RequestedDeliveryDate
ReqdDelivDateYearWeek
DeliveryBlockReason I_SalesDocument DeliveryBlockReason
HeaderBillingBlockReason I_SalesDocument HeaderBillingBlockReason
SalesDocumentRjcnReason
OverallPurchaseConfStatus
HdrGeneralIncompletionStatus
HeaderDelivIncompletionStatus
OverallPricingIncompletionSts
HeaderBillgIncompletionStatus
OvrlItmGeneralIncompletionSts
OvrlItmBillingIncompletionSts
OvrlItmDelivIncompletionSts
PaytAuthsnCreditCheckSts I_SalesDocument PaytAuthsnCreditCheckSts
SalesDocApprovalStatus I_SalesDocument SalesDocApprovalStatus
OverallChmlCmplncStatus
OverallDangerousGoodsStatus
OverallSafetyDataSheetStatus
OverallTrdCmplncEmbargoSts
OvrlTrdCmplncSnctndListChkSts
OvrlTrdCmplncLegalCtrlChkSts
CustomerProject
CustomerProjectName
BusinessSolutionOrder I_SalesDocument BusinessSolutionOrder
_Issue
_IssueText _IssueText
_IssueCategory I_SalesOrderFlfmtIssueBasic _IssueCategory
_IssueCategoryText _IssueCategoryText
_DueDateStatus I_SalesOrderFlfmtIssueBasic _DueDateStatus
_DueDateStatusText _DueDateStatusText
_IsPotentialFutureIssue I_SalesOrderFlfmtIssueBasic _IsPotentialFutureIssue
_IsPotentialFutureIssText _IsPotentialFutureIssText
_SalesDocumentType I_SalesDocument _SalesDocumentType
_SalesDocumentTypeText _SalesDocumentTypeText
_SDDocumentCategory I_SalesDocument _SDDocumentCategory
_SDDocumentCategoryText _SDDocumentCategoryText
_SalesOrganization I_SalesDocument _SalesOrganization
_SalesOrganizationText _SalesOrganizationText
_DistributionChannelVH _DistributionChannelVH
_DistributionChannelText _DistributionChannelText
_OrganizationDivisionVH _OrganizationDivisionVH
_DivisionText _DivisionText
_SalesGroupVH _SalesGroupVH
_SalesGroupText _SalesGroupText
_SalesOfficeVH _SalesOfficeVH
_SalesOfficeText _SalesOfficeText
_ShipToParty Partner _ShipToParty
_PayerParty Partner _PayerParty
_ResponsibleEmployee Partner _ResponsibleEmployee
_CustomerClassification
_CustomerClassificationText _CustomerClassificationText
_CreditSegment _CreditSegment
_CreditSegmentText _CreditSegmentText
_DeliveryBlockReason I_SalesDocument _DeliveryBlockReason
_DeliveryBlockReasonText _DeliveryBlockReasonText
_HeaderBillingBlockReason I_SalesDocument _HeaderBillingBlockReason
_BillingBlockReasonText _BillingBlockReasonText
_SalesDocumentRjcnReason _SalesDocumentRjcnReason
_OverallPurchaseConfStatus I_SalesDocument _OverallPurchaseConfStatus
_OverallPurchaseConfStatusT _OverallPurchaseConfStatusT
_HdrGeneralIncompletionStatus I_SalesDocument _HdrGeneralIncompletionStatus
_HdrGenIncompletionStatusT _HdrGenIncompletionStatusT
_HeaderDelivIncompletionStatus I_SalesDocument _HeaderDelivIncompletionStatus
_HdrDelivIncompletionStatusT _HdrDelivIncompletionStatusT
_OverallPricingIncompletionSts I_SalesDocument _OverallPricingIncompletionSts
_OverallPrcIncompletionStsT _OverallPrcIncompletionStsT
_HeaderBillgIncompletionStatus I_SalesDocument _HeaderBillgIncompletionStatus
_HdrBillgIncompletionStatusT _HdrBillgIncompletionStatusT
_OvrlItmGeneralIncompletionSts I_SalesDocument _OvrlItmGeneralIncompletionSts
_OvrlItmGenIncompletionStsT _OvrlItmGenIncompletionStsT
_OvrlItmBillingIncompletionSts I_SalesDocument _OvrlItmBillingIncompletionSts
_OvrlItmBillgIncompltnStsT _OvrlItmBillgIncompltnStsT
_OvrlItmDelivIncompletionSts I_SalesDocument _OvrlItmDelivIncompletionSts
_OvrlItmDelivIncompletionStsT _OvrlItmDelivIncompletionStsT
_PaytAuthsnCreditCheckSts I_SalesDocument _PaytAuthsnCreditCheckSts
_PaytAuthsnCreditCheckStsText _PaytAuthsnCreditCheckStsText
_SalesDocApprovalStatus I_SalesDocument _SalesDocApprovalStatus
_SalesDocApprovalStatusT _SalesDocApprovalStatusT
_OverallChmlCmplncStatus I_SalesDocument _OverallChmlCmplncStatus
_OverallChmlCmplncStatusText _OverallChmlCmplncStatusText
_OverallDangerousGoodsStatus I_SalesDocument _OverallDangerousGoodsStatus
_OverallDangerousGoodsStsTxt _OverallDangerousGoodsStsTxt
_OvrlSftyDataSheetSts I_SalesDocument _OvrlSftyDataSheetSts
_OvrlSftyDataSheetStsTxt _OvrlSftyDataSheetStsTxt
_OvrlTradeCmplncEmbargoStatus I_SalesDocument _OvrlTradeCmplncEmbargoStatus
_OvrlTradeCmplncEmbargoStsTxt _OvrlTradeCmplncEmbargoStsTxt
_OvTrdCmplncSnctndListChkSts I_SalesDocument _OvTrdCmplncSnctndListChkSts
_OvTrdComplSanctListChkStsTxt _OvTrdComplSanctListChkStsTxt
_OvrlTrdCmplncLegalCtrlChkSts I_SalesDocument _OvrlTrdCmplncLegalCtrlChkSts
_OvTrdComplLegalCtrlChkStsTxt _OvTrdComplLegalCtrlChkStsTxt
_TransactionCurrency I_SalesDocument _TransactionCurrency
_TransactionCurrencyText _TransactionCurrencyText
_StatisticsCurrency I_SalesDocument _StatisticsCurrency
_StatisticsCurrencyText _StatisticsCurrencyText
OrganizationBPName1
OrganizationBPName2
_SolutionOrderATAddedforCE2008
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MIXED 
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.representativeKey: ['SalesDocument', 'Issue'] 
@ObjectModel.text.control: #('ASSOCIATED_TEXT_UI_HIDDEN')
@EndUserText.label: 'Sales Order Fulfillment Issues'
@VDM.viewType: #CONSUMPTION
@AbapCatalog.compiler.compareFilter: true
@Search.searchable: true
@AccessControl.authorizationCheck: #CHECK
@Metadata.allowExtensions: true
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'CSOFISSUE'
@AbapCatalog.dbHints: [{ dbSystem: #HDB, hint: 'NO_SUBPLAN_SHARING' }]

define view C_SlsDocFlfmtIssue

 
as select from I_SalesDocument as SalesDocument 

inner join I_SalesOrderFlfmtIssueBasic               as Issue                           on  SalesDocument.SalesDocument  = Issue.SalesOrder 
                                                                                        and SalesDocument.SalesOrganization    = Issue.SalesOrganization  
                                                                                        and SalesDocument.DistributionChannel  = Issue.DistributionChannel
                                                                                        and SalesDocument.OrganizationDivision = Issue.OrganizationDivision
                                                                                        --AT16.4.2018 added further join criteria to enable filter push-down into both sides
                                                                                        and SalesDocument.RequestedDeliveryDate   = Issue.RequestedDeliveryDate
                                                                                        and SalesDocument.SalesGroup              = Issue.SalesGroup
                                                                                        and SalesDocument.SalesOffice             = Issue.SalesOffice
                                                                                        and SalesDocument.SoldToParty             = Issue.SoldToParty
                                                                                        --and SalesDocument.PurchaseOrderByCustomer = Issue.PurchaseOrderByCustomer --AT11.08.2020 VBKD-BSTKD no longer provided by issues (no true hdr attribute & too expensive)
                                                                                                                                                                                                                                                                     
left outer to one join I_SDDocStandardPartner        as Partner                         on SalesDocument.SalesDocument = Partner.SDDocument

left outer to one join I_CalendarDate                as ReqdDelivCalendarDate           on SalesDocument.RequestedDeliveryDate = ReqdDelivCalendarDate.CalendarDate  

left outer to one join  I_SDDocumentCompletePartners as SoldToPartyAddressInfo          on SalesDocument.SalesDocument = SoldToPartyAddressInfo.SDDocument 
                                                                                        and SoldToPartyAddressInfo.SDDocumentItem = '000000'
                                                                                        and SoldToPartyAddressInfo.PartnerFunction = 'AG'   

left outer to one join  I_SDDocumentCompletePartners as ShipToPartyAddressInfo          on SalesDocument.SalesDocument = ShipToPartyAddressInfo.SDDocument --AT 20.09.2018: new CE1902
                                                                                        and ShipToPartyAddressInfo.SDDocumentItem = '000000'
                                                                                        and ShipToPartyAddressInfo.PartnerFunction = 'WE'   

//Associations

association [0..1] to I_CreditManagementSegment      as _CreditSegment                  on $projection.creditsegment = _CreditSegment.CreditSegment  

association [0..1] to I_SalesDocumentRjcnReason      as _SalesDocumentRjcnReason        on  $projection.SalesDocumentRjcnReason = _SalesDocumentRjcnReason.SalesDocumentRjcnReason 

//Text associations

association [0..*] to I_IssueText                    as _IssueText                      on $projection.Issue = _IssueText.Issue

association [0..*] to I_IssueCategoryText            as _IssueCategoryText              on $projection.IssueCategory = _IssueCategoryText.IssueCategory

association [0..*] to I_SalesOrganizationText        as _SalesOrganizationText          on $projection.SalesOrganization = _SalesOrganizationText.SalesOrganization

association [0..*] to I_DistributionChannelText      as _DistributionChannelText        on $projection.DistributionChannel = _DistributionChannelText.DistributionChannel

association [0..*] to I_DivisionText                 as _DivisionText                   on $projection.OrganizationDivision = _DivisionText.Division

association [0..*] to I_SalesGroupText               as _SalesGroupText                 on $projection.SalesGroup = _SalesGroupText.SalesGroup

association [0..*] to I_SalesOfficeText              as _SalesOfficeText                on $projection.SalesOffice = _SalesOfficeText.SalesOffice

association [0..*] to I_CreditManagementSegmentTxt   as _CreditSegmentText              on $projection.creditsegment = _CreditSegmentText.CreditSegment

association[0..*] to I_CustomerClassificationText    as _CustomerClassificationText     on $projection.customerclassification = _CustomerClassificationText.CustomerClassification

association [0..*] to I_DueDateStatusText            as _DueDateStatusText              on $projection.DueDateStatus = _DueDateStatusText.DueDateStatus

association [0..*] to I_IsPotentialFutureIssText     as _IsPotentialFutureIssText       on $projection.IsPotentialFutureIssue = _IsPotentialFutureIssText.IsPotentialFutureIssue

association [0..*] to I_SalesDocumentTypeText        as _SalesDocumentTypeText          on $projection.SalesDocumentType = _SalesDocumentTypeText.SalesDocumentType

association [0..*] to I_SDDocumentCategoryText       as _SDDocumentCategoryText         on $projection.SDDocumentCategory = _SDDocumentCategoryText.SDDocumentCategory

association [0..*] to I_DeliveryBlockReasonText      as _DeliveryBlockReasonText        on $projection.DeliveryBlockReason = _DeliveryBlockReasonText.DeliveryBlockReason

association [0..*] to I_BillingBlockReasonText       as _BillingBlockReasonText         on $projection.HeaderBillingBlockReason = _BillingBlockReasonText.BillingBlockReason

association [0..*] to I_OverallPurchaseConfStatusT   as _OverallPurchaseConfStatusT     on $projection.OverallPurchaseConfStatus = _OverallPurchaseConfStatusT.OverallPurchaseConfStatus

association [0..*] to I_HdrGenIncompletionStatusT    as _HdrGenIncompletionStatusT      on $projection.HdrGeneralIncompletionStatus = _HdrGenIncompletionStatusT.HdrGeneralIncompletionStatus

association [0..*] to I_HdrDelivIncompletionStatusT  as _HdrDelivIncompletionStatusT    on $projection.HeaderDelivIncompletionStatus = _HdrDelivIncompletionStatusT.HeaderDelivIncompletionStatus

association [0..*] to I_OverallPrcIncompletionStsT   as _OverallPrcIncompletionStsT     on $projection.OverallPricingIncompletionSts = _OverallPrcIncompletionStsT.OverallPricingIncompletionSts

association [0..*] to I_HdrBillgIncompletionStatusT  as _HdrBillgIncompletionStatusT    on $projection.HeaderBillgIncompletionStatus = _HdrBillgIncompletionStatusT.HeaderBillgIncompletionStatus

association [0..*] to I_OvrlItmGenIncompletionStsT   as _OvrlItmGenIncompletionStsT     on $projection.OvrlItmGeneralIncompletionSts = _OvrlItmGenIncompletionStsT.OvrlItmGeneralIncompletionSts

association [0..*] to I_OvrlItmBillgIncompltnStsText as _OvrlItmBillgIncompltnStsT      on $projection.OvrlItmBillingIncompletionSts = _OvrlItmBillgIncompltnStsT.OvrlItmBillingIncompletionSts

association [0..*] to I_OvrlItmDelivIncompletionStsT as _OvrlItmDelivIncompletionStsT   on $projection.OvrlItmDelivIncompletionSts = _OvrlItmDelivIncompletionStsT.OvrlItmDelivIncompletionSts

association [0..*] to I_PaytAuthsnCreditCheckStsText as _PaytAuthsnCreditCheckStsText   on $projection.PaytAuthsnCreditCheckSts = _PaytAuthsnCreditCheckStsText.PaytAuthsnCreditCheckSts

association [0..*] to I_SalesDocApprovalStatusT      as _SalesDocApprovalStatusT        on $projection.SalesDocApprovalStatus = _SalesDocApprovalStatusT.SalesDocApprovalStatus

association [0..*] to I_OverallChmlCmplncStatusText  as _OverallChmlCmplncStatusText    on $projection.OverallChmlCmplncStatus = _OverallChmlCmplncStatusText.OverallChmlCmplncStatus

association [0..*] to I_OverallDangerousGoodsStsTxt  as _OverallDangerousGoodsStsTxt    on $projection.OverallDangerousGoodsStatus = _OverallDangerousGoodsStsTxt.OverallDangerousGoodsStatus

association [0..*] to I_OvrlSftyDataSheetStsTxt      as _OvrlSftyDataSheetStsTxt        on $projection.OverallSafetyDataSheetStatus = _OvrlSftyDataSheetStsTxt.OverallSafetyDataSheetStatus

association [0..*] to I_OvrlTradeCmplncEmbargoStsTxt as _OvrlTradeCmplncEmbargoStsTxt   on $projection.OverallTrdCmplncEmbargoSts = _OvrlTradeCmplncEmbargoStsTxt.OverallTrdCmplncEmbargoSts

association [0..*] to I_OvTrdComplSanctListChkStsTxt as _OvTrdComplSanctListChkStsTxt   on $projection.OvrlTrdCmplncSnctndListChkSts = _OvTrdComplSanctListChkStsTxt.OvrlTrdCmplncSnctndListChkSts

association [0..*] to I_OvTrdComplLegalCtrlChkStsTxt as _OvTrdComplLegalCtrlChkStsTxt   on $projection.OvrlTrdCmplncLegalCtrlChkSts = _OvTrdComplLegalCtrlChkStsTxt.OvrlTrdCmplncLegalCtrlChkSts 

association [0..*] to I_CurrencyText                 as _TransactionCurrencyText        on $projection.TransactionCurrency = _TransactionCurrencyText.Currency

association [0..*] to I_CurrencyText                 as _StatisticsCurrencyText         on $projection.StatisticsCurrency = _StatisticsCurrencyText.Currency


//Value help associations

association [0..1] to C_Dischannelvaluehelp          as _DistributionChannelVH          on  $projection.SalesOrganization   = _DistributionChannelVH.SalesOrganization
                                                                                        and $projection.DistributionChannel = _DistributionChannelVH.DistributionChannel

association [0..1] to C_OrgDivisionValueHelp         as _OrganizationDivisionVH         on  $projection.SalesOrganization    = _OrganizationDivisionVH.SalesOrganization
                                                                                        and $projection.DistributionChannel  = _OrganizationDivisionVH.DistributionChannel
                                                                                        and $projection.OrganizationDivision = _OrganizationDivisionVH.Division
                                                                                                                                                       
association [0..1] to C_SalesOfficeValueHelp         as _SalesOfficeVH                  on  $projection.SalesOrganization    = _SalesOfficeVH.SalesOrganization
                                                                                        and $projection.DistributionChannel  = _SalesOfficeVH.DistributionChannel
                                                                                        and $projection.OrganizationDivision = _SalesOfficeVH.OrganizationDivision
                                                                                        and $projection.SalesOffice          = _SalesOfficeVH.SalesOffice

association [0..1] to C_SalesGroupValueHelp          as _SalesGroupVH                   on  $projection.SalesOffice = _SalesGroupVH.SalesOffice
                                                                                        and $projection.SalesGroup  = _SalesGroupVH.SalesGroup                                                                                

//Extensibility

association [0..1] to E_SalesDocumentBasic           as _Extension                      on SalesDocument.SalesDocument = _Extension.SalesDocument

{
   //Key

   @Search.defaultSearchElement: true
   @Search.fuzzinessThreshold: 0.7 
   @Search.ranking: #HIGH 
   @ObjectModel.readOnly: true
// @Consumption.semanticObject: #(SEMANTICOBJECT) Waiting for Smart Link Control Requirement: Support for a property path

   @Consumption.semanticObject: 'SalesOrder' 
   key SalesDocument.SalesDocument,
   
   @Consumption.semanticObject: 'OutboundDelivery'
   @Consumption.valueHelpDefinition: [ { entity:  { name: 'I_DeliveryDocumentStdVH', element: 'DeliveryDocument' }}] 
   key Issue.DeliveryDocument,
   
   @Consumption.semanticObject: 'BillingDocument'
   @Consumption.valueHelpDefinition: [ { entity:  { name: 'I_BillingDocumentStdVH', element: 'BillingDocument' }}] 
   key Issue.BillingDocument,
   
   @Consumption.semanticObject: 'PurchaseOrder'
   @Consumption.valueHelpDefinition: [ { entity:  { name: 'I_PurchaseOrderStdVH', element: 'PurchaseOrder' }}] 
   key cast (Issue.PurchasingDocument as vdm_purchaseorder preserving type) as PurchasingDocument,
   
// @Consumption.semanticObject: #(SEMANTICOBJECT) Waiting for Smart Link Control Requirement: Support for a property path   

   @Consumption.valueHelpDefinition: [ { entity:  { name: 'I_MfgOrderStdVH', element: 'ManufacturingOrder' }}] 
   key Issue.ManufacturingOrder, 
    
   //Issue  

   @ObjectModel.text.association: '_IssueText'
   @Consumption.valueHelpDefinition: [{ entity: { name: 'C_SlsDocFlfmtSlsIssTypeVH', element: 'Issue' } }]
   @Environment.sql.passValue: true --AT30.7.2020: precondition for hana union optimization
   key Issue.Issue, 
   
   @ObjectModel.text.association: '_IssueCategoryText'  
   Issue.IssueCategory,
      
   @DefaultAggregation: #MIN
   @Consumption.filter.hidden: true
   Issue.DueDays,
   
   cast(Issue.DueDays as duehorizondurationindays) as DueHorizonDurationInDays,

   @ObjectModel.text.association: '_DueDateStatusText'
   Issue.DueDateStatus,
   
   @ObjectModel.text.association: '_IsPotentialFutureIssText'
   Issue.IsPotentialFutureIssue,
   
   // Semantic Object

   @UI.hidden: true
   case 
         when  SalesDocument.SDDocumentCategory = 'C'
         then  'SalesOrder'
         when  SalesDocument.SDDocumentCategory = 'I'
         then  'SalesOrderWithoutCharge'
         when  SalesDocument.SDDocumentCategory = 'L'
         then  'DebitMemoRequest'
    end    
    as SemanticObject, 
       
    @UI.hidden: true
    case 
         when  Issue.ManufacturingOrderCategory = '10'
         then  'ProductionOrder'
         when  Issue.ManufacturingOrderCategory = '40'
         then  'ProcessOrder'         
    end    
    as ManufacturingObject, 

   //Counter

   @DefaultAggregation: #SUM
   @Consumption.filter.hidden: true
   Issue.NmbrOfIssuesInOrder,
   
   @DefaultAggregation: #SUM
   @Consumption.filter.hidden: true
   Issue.NmbrOfIssuesInDelivery,
   
   @DefaultAggregation: #SUM
   @Consumption.filter.hidden: true
   Issue.NmbrOfIssuesInInvoice,
       
   @DefaultAggregation: #SUM
   @Consumption.filter.hidden: true
   Issue.NmbrOfIssuesInSupply,
   
   @DefaultAggregation: #SUM
   @Consumption.filter.hidden: true                    
   Issue.NmbrOfAllIssues, 
   
   @DefaultAggregation: #SUM
   @Consumption.filter.hidden: true 
   cast(NmbrOfItemsInOrder as item_issues) as NmbrOfItemsInOrder,  
          
   //Category

   @Search.defaultSearchElement: true
   @Search.fuzzinessThreshold: 0.8
   @ObjectModel.text.association: '_SalesDocumentTypeText'
   @Consumption.valueHelpDefinition: [{entity: {name: 'C_SlsDocFlfmtSlsDocTypeVH', element: 'SalesDocumentType'} }]
   SalesDocument.SalesDocumentType,
   
   @UI.hidden: true
   SalesDocument.SalesDocumentProcessingType,
   
   @ObjectModel.text.association: '_SDDocumentCategoryText'
   @Consumption.valueHelpDefinition: [{entity: {name: 'C_SlsDocFlfmtSlsDocCatVH', element: 'SDDocumentCategory'} }]
   SalesDocument.SDDocumentCategory,   
   
   //Admin

   @Search.defaultSearchElement: true
   @Search.fuzzinessThreshold: 0.9
   @ObjectModel.text.element: 'CreatedByUserName'
   @Consumption.valueHelpDefinition: [{entity: {name: 'C_SalesDocumentUserVH', element: 'UserID'} }]
   SalesDocument.CreatedByUser,
   
   @Semantics.text: true
   @ObjectModel.readOnly: true
   @UI.hidden: true
   _CreatedByUser.UserDescription as CreatedByUserName,

   @ObjectModel.text.element: 'LastChangedByUserName'
   @Consumption.valueHelpDefinition: [{entity: {name: 'C_SalesDocumentUserVH', element: 'UserID'} }]
   SalesDocument.LastChangedByUser,
   
   @Semantics.text: true
   @ObjectModel.readOnly: true
   @UI.hidden: true
    _LastChangedByUser.UserDescription as LastChangedByUserName,
       
   //Organization

   @ObjectModel.text.association: '_SalesOrganizationText' 
   @Consumption.valueHelpDefinition: [{entity:{name:'C_SalesDocSalesOrganizationVH', element:'SalesOrganization'} }]
   SalesDocument.SalesOrganization,
   
   @Consumption.valueHelp: '_DistributionChannelVH'
   @ObjectModel.text.association: '_DistributionChannelText' 
   SalesDocument.DistributionChannel,
   
   @Consumption.valueHelp: '_OrganizationDivisionVH'
   @ObjectModel.text.association: '_DivisionText' 
   SalesDocument.OrganizationDivision, 
   
   @Consumption.valueHelp: '_SalesGroupVH'
   @ObjectModel.text.association: '_SalesGroupText' 
   SalesDocument.SalesGroup,
   
   @Consumption.valueHelp: '_SalesOfficeVH'
   @ObjectModel.text.association: '_SalesOfficeText'
   SalesDocument.SalesOffice,
       
   //Partner 

   @Search.defaultSearchElement: true
   @Search.fuzzinessThreshold: 0.8
   @Consumption.semanticObject: 'Customer'
   @Consumption.valueHelpDefinition: [ { entity: { name: 'C_SoldToValueHelp', element: 'Customer' }}] 
   @ObjectModel.text.element:  [ 'SoldToPartyFullName' ]   
   SalesDocument.SoldToParty,
   
   @Semantics.text: true
   @UI.hidden: true  
   cast (Partner._SoldToParty.CustomerName as vdm_sold_to_name) as SoldToPartyName, 
   @Consumption.filter.selectionType: #SINGLE
   cast(SoldToPartyAddressInfo.PartnerIsOneTimeAccount as  isonetimeaccountsoldtoparty) as SoldToPartyIsOneTimeAccount,
   @Consumption.filter.hidden: true
   cast(SoldToPartyAddressInfo._Address.FullName as fullnamesoldtoparty)                as SoldToPartyFullName,    
         
   @Consumption.valueHelpDefinition: [{ entity: { name: 'I_Customer_VH', element: 'Customer' }}]
   @Consumption.semanticObject: 'Customer'
   @ObjectModel.text.element:  [ 'ShipToPartyFullName' ]
   Partner.ShipToParty,
   
   @Semantics.text: true 
   @UI.hidden: true 
   cast (Partner._ShipToParty.CustomerName as ship_to_name) as ShipToPartyName, 
   @Consumption.filter.selectionType: #SINGLE
   cast(ShipToPartyAddressInfo.PartnerIsOneTimeAccount as  isonetimeaccountshiptoparty) as ShipToPartyIsOneTimeAccount,
   @Consumption.filter.hidden: true
   cast(ShipToPartyAddressInfo._Address.FullName as fullnameshiptoparty)                as ShipToPartyFullName,    
      
   @Consumption.valueHelpDefinition: [{ entity: { name: 'I_PersWrkAgrmtSrchHelp_1', element: 'PersonWorkAgreement' }}]
   @ObjectModel.text.element:  [ 'ResponsibleEmployeeName' ]
   Partner.ResponsibleEmployee,
   
   @Semantics.text: true 
   @UI.hidden: true  
   cast (Partner._ResponsibleEmployee.PersonFullName  as resp_empl_name) as ResponsibleEmployeeName, 
     
   @Consumption.valueHelpDefinition: [ { entity:  { name: 'I_Customer_VH', element: 'Customer' }}] 
   @Consumption.semanticObject: 'Customer'
   @ObjectModel.text.element:  [ 'PayerPartyName' ]
   Partner.PayerParty,
   
   @Semantics.text: true 
   @UI.hidden: true  
   cast( Partner._PayerParty.CustomerName as payer_name) as PayerPartyName,    
     
   @ObjectModel.text.association: '_CustomerClassificationText' 
   SalesDocument._SoldToParty.CustomerClassification,
    
   //Sales

   SalesDocument.SalesDocumentDate,
   
   @ObjectModel.text.association: '_CreditSegmentText'
//   @ObjectModel.foreignKey.association: '_CreditSegment'

   @Consumption.valueHelpDefinition: [{entity: {name: 'I_CrdtMSegmentVH', element: 'CreditSegment'} }]
   SalesDocument._CreditControlArea._CreditControlArea2Segment.CreditSegment,
   
   @Search.defaultSearchElement: true
   @Search.fuzzinessThreshold: 0.8
   SalesDocument.PurchaseOrderByCustomer,
   
   @DefaultAggregation: #SUM
   @Semantics.amount.currencyCode: 'TransactionCurrency'
   @Consumption.filter.hidden: true
   SalesDocument.TotalNetAmount,
   
   @Semantics.currencyCode: true
   @ObjectModel.foreignKey.association: '_TransactionCurrency'
   @ObjectModel.text.association: '_TransactionCurrencyText'
   @Consumption.filter.hidden: true 
   SalesDocument.TransactionCurrency,
    
   @DefaultAggregation: #SUM
   @Semantics.amount.currencyCode: 'StatisticsCurrency'
   @Consumption.filter.hidden: true
   cast(cast (currency_conversion(
        amount => SalesDocument.TotalNetAmount,
        source_currency => SalesDocument.TransactionCurrency,  
        target_currency => SalesDocument.StatisticsCurrency,  
        exchange_rate_date =>  cast($session.system_date as dats), 
        exchange_rate_type => 'M',
        error_handling => 'SET_TO_NULL',
        round => #CDSBoolean.true,
        decimal_shift => #CDSBoolean.true,
        decimal_shift_back => #CDSBoolean.true
       ) as abap.curr(15,2)   )
    as net_amount_in_statistics_crcy )   as TotalNetAmountInStatisticsCrcy  ,  
   
   @Semantics.currencyCode: true
   @ObjectModel.foreignKey.association: '_StatisticsCurrency'
   @ObjectModel.text.association: '_StatisticsCurrencyText'
   @Consumption.filter.hidden: true 
   SalesDocument.StatisticsCurrency,
  
   //Shipping

   SalesDocument.RequestedDeliveryDate,
   
   @Semantics.calendar.yearWeek
   cast(ReqdDelivCalendarDate.YearWeek     as reqd_deliv_date_year_week)     as ReqdDelivDateYearWeek,
   
   //Status

   @ObjectModel.text.association: '_DeliveryBlockReasonText' 
   SalesDocument.DeliveryBlockReason,
   
   @ObjectModel.text.association: '_BillingBlockReasonText' 
   SalesDocument.HeaderBillingBlockReason,
   
   @UI.hidden: true
   @ObjectModel.foreignKey.association: '_SalesDocumentRjcnReason'
   cast( '  ' as abgru_va) as SalesDocumentRjcnReason,
  
   @ObjectModel.text.association: '_OverallPurchaseConfStatusT' 
   @ObjectModel.foreignKey.association: '_OverallPurchaseConfStatus'
   cast(SalesDocument.OverallPurchaseConfStatus as totpurchaseconfsts preserving type ) as OverallPurchaseConfStatus,
   
   @ObjectModel.text.association: '_HdrGenIncompletionStatusT' 
   @ObjectModel.foreignKey.association: '_HdrGeneralIncompletionStatus'
   cast(SalesDocument.HdrGeneralIncompletionStatus as hdr_general_incompltn_status preserving type) as HdrGeneralIncompletionStatus,
   
   @ObjectModel.text.association: '_HdrDelivIncompletionStatusT' 
   @ObjectModel.foreignKey.association: '_HeaderDelivIncompletionStatus'
   cast(SalesDocument.HeaderDelivIncompletionStatus as hdrdelivincompletionstatus preserving type) as HeaderDelivIncompletionStatus,
      
   @ObjectModel.text.association: '_OverallPrcIncompletionStsT'
   @ObjectModel.foreignKey.association: '_OverallPricingIncompletionSts' 
   cast(SalesDocument.OverallPricingIncompletionSts as ovrl_pricing_incompletion_sts preserving type) as  OverallPricingIncompletionSts,
   
   @ObjectModel.text.association: '_HdrBillgIncompletionStatusT' 
   @ObjectModel.foreignKey.association: '_HeaderBillgIncompletionStatus'
   cast(SalesDocument.HeaderBillgIncompletionStatus as hdrbillgincompletionstatus preserving type) as HeaderBillgIncompletionStatus,
      
   @ObjectModel.text.association: '_OvrlItmGenIncompletionStsT' 
   @ObjectModel.foreignKey.association: '_OvrlItmGeneralIncompletionSts'  
   cast(SalesDocument.OvrlItmGeneralIncompletionSts as itms_ovrl_incompletion_status preserving type) as  OvrlItmGeneralIncompletionSts,
   
   @ObjectModel.text.association: '_OvrlItmBillgIncompltnStsT' 
   @ObjectModel.foreignKey.association: '_OvrlItmBillingIncompletionSts'
   cast(SalesDocument.OvrlItmBillingIncompletionSts as ovrl_itms_incompltn_sts_billg preserving type) as  OvrlItmBillingIncompletionSts,
   
   @ObjectModel.text.association: '_OvrlItmDelivIncompletionStsT'
   @ObjectModel.foreignKey.association: '_OvrlItmDelivIncompletionSts'
   cast(SalesDocument.OvrlItmDelivIncompletionSts as ovrl_items_dlv_incompltn_sts preserving type) as  OvrlItmDelivIncompletionSts,
   
   @ObjectModel.text.association: '_PaytAuthsnCreditCheckStsText'
   @ObjectModel.foreignKey.association: '_PaytAuthsnCreditCheckSts'
   SalesDocument.PaytAuthsnCreditCheckSts,
   
   @ObjectModel.text.association: '_SalesDocApprovalStatusT'
   @ObjectModel.foreignKey.association: '_SalesDocApprovalStatus'
   SalesDocument.SalesDocApprovalStatus,
   
   @ObjectModel.text.association: '_OverallChmlCmplncStatusText'
   @ObjectModel.foreignKey.association: '_OverallChmlCmplncStatus'
   cast(SalesDocument.OverallChmlCmplncStatus as mon_tdd_total_pcsta preserving type) as OverallChmlCmplncStatus, 
   
   @ObjectModel.text.association: '_OverallDangerousGoodsStsTxt'
   @ObjectModel.foreignKey.association: '_OverallDangerousGoodsStatus'
   cast(SalesDocument.OverallDangerousGoodsStatus as mon_tdd_total_dgsta preserving type) as OverallDangerousGoodsStatus,
   
   @ObjectModel.text.association: '_OvrlSftyDataSheetStsTxt'
   @ObjectModel.foreignKey.association: '_OvrlSftyDataSheetSts'
   cast(SalesDocument.OverallSafetyDataSheetStatus as mon_tdd_total_sdssta preserving type) as OverallSafetyDataSheetStatus, 
   
   @ObjectModel.text.association: '_OvrlTradeCmplncEmbargoStsTxt'
   @ObjectModel.foreignKey.association: '_OvrlTradeCmplncEmbargoStatus'
   cast(SalesDocument.OverallTrdCmplncEmbargoSts as totembargochksts preserving type) as OverallTrdCmplncEmbargoSts, 
    
   @ObjectModel.text.association: '_OvTrdComplSanctListChkStsTxt'
   @ObjectModel.foreignKey.association: '_OvTrdCmplncSnctndListChkSts'
   cast(SalesDocument.OvrlTrdCmplncSnctndListChkSts as totwatchlistscrngchksts preserving type) as OvrlTrdCmplncSnctndListChkSts, 

   @ObjectModel.text.association: '_OvTrdComplLegalCtrlChkStsTxt'
   @ObjectModel.foreignKey.association: '_OvrlTrdCmplncLegalCtrlChkSts'
   cast(SalesDocument.OvrlTrdCmplncLegalCtrlChkSts as totlglctrlchksts preserving type) as OvrlTrdCmplncLegalCtrlChkSts,    
      
   //Project

   @Consumption.valueHelpDefinition: [ { entity:  { name: 'I_CustomerProjectStdVH', element: 'CustomerProject' }}] 
   @ObjectModel.text.element: 'CustomerProjectName'
   SalesDocument._EngagementProjectItem.EngagementProject as CustomerProject,
      
   @Semantics.text: true
   @UI.hidden: true
   SalesDocument._EngagementProjectItem._EngagementProject.EngagementProjectName as CustomerProjectName,
  
   //Reference

   @ObjectModel.foreignKey.association: '_SolutionOrder'
   @Consumption.valueHelpDefinition: [ { entity: { name: 'C_BusinessSolutionOrderStdVH', element: 'BusinessSolutionOrder' } } ]
   SalesDocument.BusinessSolutionOrder, --AT Added for CE2008
    
   //Associations

   @Consumption.filter.hidden: true
   Issue._Issue,
    @Consumption.filter.hidden: true
   _IssueText,
   @Consumption.filter.hidden: true
   Issue._IssueCategory,
   @Consumption.filter.hidden: true
   _IssueCategoryText,   
   @Consumption.filter.hidden: true
   Issue._DueDateStatus,
   @Consumption.filter.hidden: true
   _DueDateStatusText,
   @Consumption.filter.hidden: true
   Issue._IsPotentialFutureIssue,
   @Consumption.filter.hidden: true
   _IsPotentialFutureIssText,
   @Consumption.filter.hidden: true
   SalesDocument._SalesDocumentType,
   @Consumption.filter.hidden: true
   _SalesDocumentTypeText,
   @Consumption.filter.hidden: true
   SalesDocument._SDDocumentCategory,
   @Consumption.filter.hidden: true
   _SDDocumentCategoryText,
   @Consumption.filter.hidden: true
   SalesDocument._SalesOrganization,
   @Consumption.filter.hidden: true
   _SalesOrganizationText,
   @Consumption.filter.hidden: true
   _DistributionChannelVH,
   @Consumption.filter.hidden: true
   _DistributionChannelText,
   @Consumption.filter.hidden: true
   _OrganizationDivisionVH, 
   @Consumption.filter.hidden: true
   _DivisionText,
   @Consumption.filter.hidden: true
   _SalesGroupVH,
   @Consumption.filter.hidden: true
   _SalesGroupText,
   @Consumption.filter.hidden: true
   _SalesOfficeVH,
   @Consumption.filter.hidden: true
   _SalesOfficeText,
   @Consumption.filter.hidden: true
   Partner._ShipToParty,
   @Consumption.filter.hidden: true
   Partner._PayerParty,
   @Consumption.filter.hidden: true
   Partner._ResponsibleEmployee,
   @Consumption.filter.hidden: true
   SalesDocument._SoldToParty._CustomerClassification,
   @Consumption.filter.hidden: true
   _CustomerClassificationText,
   @Consumption.filter.hidden: true
   _CreditSegment,
   @Consumption.filter.hidden: true
   _CreditSegmentText,
   @Consumption.filter.hidden: true
   SalesDocument._DeliveryBlockReason,
   @Consumption.filter.hidden: true
   _DeliveryBlockReasonText,
   @Consumption.filter.hidden: true
   SalesDocument._HeaderBillingBlockReason,
   @Consumption.filter.hidden: true
   _BillingBlockReasonText,
   @Consumption.filter.hidden: true
   _SalesDocumentRjcnReason,
   @Consumption.filter.hidden: true
   SalesDocument._OverallPurchaseConfStatus,
   @Consumption.filter.hidden: true
   _OverallPurchaseConfStatusT,
   @Consumption.filter.hidden: true
   SalesDocument._HdrGeneralIncompletionStatus,
   @Consumption.filter.hidden: true
   _HdrGenIncompletionStatusT,
   @Consumption.filter.hidden: true
   SalesDocument._HeaderDelivIncompletionStatus,
   @Consumption.filter.hidden: true
   _HdrDelivIncompletionStatusT,
   @Consumption.filter.hidden: true
   SalesDocument._OverallPricingIncompletionSts,
   @Consumption.filter.hidden: true
   _OverallPrcIncompletionStsT,
   @Consumption.filter.hidden: true
   SalesDocument._HeaderBillgIncompletionStatus,
    @Consumption.filter.hidden: true
   _HdrBillgIncompletionStatusT, 
   @Consumption.filter.hidden: true   
   SalesDocument._OvrlItmGeneralIncompletionSts,
   @Consumption.filter.hidden: true 
   _OvrlItmGenIncompletionStsT,
   @Consumption.filter.hidden: true
   SalesDocument._OvrlItmBillingIncompletionSts,
   @Consumption.filter.hidden: true 
   _OvrlItmBillgIncompltnStsT,
   @Consumption.filter.hidden: true
   SalesDocument._OvrlItmDelivIncompletionSts,
   @Consumption.filter.hidden: true 
   _OvrlItmDelivIncompletionStsT,
   @Consumption.filter.hidden: true
   SalesDocument._PaytAuthsnCreditCheckSts,
   @Consumption.filter.hidden: true 
   _PaytAuthsnCreditCheckStsText,
   @Consumption.filter.hidden: true
   SalesDocument._SalesDocApprovalStatus,
   @Consumption.filter.hidden: true 
   _SalesDocApprovalStatusT,
   @Consumption.filter.hidden: true
   SalesDocument._OverallChmlCmplncStatus,
   @Consumption.filter.hidden: true 
   _OverallChmlCmplncStatusText,
   @Consumption.filter.hidden: true
   SalesDocument._OverallDangerousGoodsStatus,
   @Consumption.filter.hidden: true 
   _OverallDangerousGoodsStsTxt,
   @Consumption.filter.hidden: true 
   SalesDocument._OvrlSftyDataSheetSts, 
   @Consumption.filter.hidden: true
   _OvrlSftyDataSheetStsTxt,
   @Consumption.filter.hidden: true
   SalesDocument._OvrlTradeCmplncEmbargoStatus,
   @Consumption.filter.hidden: true
   _OvrlTradeCmplncEmbargoStsTxt,
   @Consumption.filter.hidden: true
   SalesDocument._OvTrdCmplncSnctndListChkSts,
   @Consumption.filter.hidden: true
   _OvTrdComplSanctListChkStsTxt,
   @Consumption.filter.hidden: true
   SalesDocument._OvrlTrdCmplncLegalCtrlChkSts, 
   @Consumption.filter.hidden: true   
   _OvTrdComplLegalCtrlChkStsTxt,
   @Consumption.filter.hidden: true 
   SalesDocument._TransactionCurrency,
   @Consumption.filter.hidden: true 
   _TransactionCurrencyText,
   @Consumption.filter.hidden: true
   SalesDocument._StatisticsCurrency,
   @Consumption.filter.hidden: true 
   _StatisticsCurrencyText,
   @UI.hidden: true
   @Search.defaultSearchElement: true
   @Search.fuzzinessThreshold: 0.9
   SalesDocument._SoldToParty.OrganizationBPName1,
   @UI.hidden: true
   @Search.defaultSearchElement: true
   @Search.fuzzinessThreshold: 0.9
   SalesDocument._SoldToParty.OrganizationBPName2,
   @Consumption.filter.hidden: true
   SalesDocument._SolutionOrder  --AT Added for CE2008
   
}

where ( SalesDocument.SDDocumentCategory = 'C' or   --> Order
        SalesDocument.SDDocumentCategory = 'I' or   --> Order w/o charge
        SalesDocument.SDDocumentCategory = 'L' )    --> Debit Memo Request