I_CustomerReturn

DDL: I_CUSTOMERRETURN Type: view BASIC

Returns Order

I_CustomerReturn is a Basic CDS View (Dimension) that provides data about "Returns Order" in SAP S/4HANA. It reads from 1 data source (I_SalesDocument) and exposes 169 fields with key field CustomerReturn. It has 4 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_SalesDocument SalesDocument from

Associations (4)

CardinalityTargetAliasCondition
[0..*] I_CustomerReturnItem _Item $projection.CustomerReturn = _Item.CustomerReturn
[0..1] I_RetsMgmtProcess _RetsMgmtProcess $projection.RetsMgmtProcess = _RetsMgmtProcess.RetsMgmtProcess
[0..1] I_CustomerReturnApprovalReason _CustRetApprovalReason $projection.CustomerReturnApprovalReason = _CustRetApprovalReason.CustomerReturnApprovalReason
[0..1] E_SalesDocumentBasic _Extension SalesDocument.SalesDocument = _Extension.SalesDocument

Annotations (19)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Returns Order view
VDM.viewType #BASIC view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
AccessControl.authorizationCheck #CHECK view
AbapCatalog.sqlViewName ISDCUSTRETURN view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
ObjectModel.compositionRoot true view
ObjectModel.representativeKey CustomerReturn view
ObjectModel.modelingPattern #ANALYTICAL_DIMENSION view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #L view
Analytics.dataCategory #DIMENSION view
Metadata.ignorePropagatedAnnotations true view
Metadata.allowExtensions true view
ObjectModel.sapObjectNodeType.name CustomerReturn view
Analytics.dataExtraction.enabled true view

Fields (169)

KeyFieldSource TableSource FieldDescription
KEY CustomerReturn
CustomerReturnType
CreatedByUser CreatedByUser
LastChangedByUser LastChangedByUser
CreationDate CreationDate
CreationTime CreationTime
LastChangeDate LastChangeDate
LastChangeDateTime LastChangeDateTime
SenderBusinessSystemName SenderBusinessSystemName
SalesOrganization SalesOrganization
DistributionChannel DistributionChannel
OrganizationDivision OrganizationDivision
SalesGroup SalesGroup
SalesOffice SalesOffice
SoldToParty SoldToParty
CustomerGroup CustomerGroup
AdditionalCustomerGroup1 AdditionalCustomerGroup1
AdditionalCustomerGroup2 AdditionalCustomerGroup2
AdditionalCustomerGroup3 AdditionalCustomerGroup3
AdditionalCustomerGroup4 AdditionalCustomerGroup4
AdditionalCustomerGroup5 AdditionalCustomerGroup5
CreditControlArea CreditControlArea
CustomerReturnDate SalesDocumentDate
ServicesRenderedDate ServicesRenderedDate
SDDocumentReason SDDocumentReason
PurchaseOrderByCustomer PurchaseOrderByCustomer
CustomerPurchaseOrderType CustomerPurchaseOrderType
CustomerPurchaseOrderDate CustomerPurchaseOrderDate
CustomerPurchaseOrderSuplmnt CustomerPurchaseOrderSuplmnt
SalesDistrict SalesDistrict
RetsMgmtProcess RetsMgmtProcess
TotalNetAmount TotalNetAmount
TransactionCurrency TransactionCurrency
PricingDate PricingDate
PriceDetnExchangeRate PriceDetnExchangeRate
SDPricingProcedure SDPricingProcedure
CustomerReturnCondition SalesDocumentCondition
RequestedDeliveryDate RequestedDeliveryDate
IncotermsClassification IncotermsClassification
IncotermsTransferLocation IncotermsTransferLocation
IncotermsLocation1 IncotermsLocation1
IncotermsLocation2 IncotermsLocation2
IncotermsVersion IncotermsVersion
DeliveryBlockReason DeliveryBlockReason
ShippingType ShippingType
ShippingCondition ShippingCondition
CustomerReturnApprovalReason SalesDocApprovalReason
BillingDocumentDate BillingDocumentDate
BillingCompanyCode BillingCompanyCode
HeaderBillingBlockReason HeaderBillingBlockReason
CustomerPaymentTerms CustomerPaymentTerms
PaymentMethod PaymentMethod
CustomerTaxClassification1 CustomerTaxClassification1
CustomerTaxClassification2 CustomerTaxClassification2
CustomerTaxClassification3 CustomerTaxClassification3
CustomerTaxClassification4 CustomerTaxClassification4
CustomerTaxClassification5 CustomerTaxClassification5
CustomerTaxClassification6 CustomerTaxClassification6
CustomerTaxClassification7 CustomerTaxClassification7
CustomerTaxClassification8 CustomerTaxClassification8
CustomerTaxClassification9 CustomerTaxClassification9
FiscalYear FiscalYear
FiscalPeriod FiscalPeriod
ExchangeRateDate ExchangeRateDate
ExchangeRateType ExchangeRateType
BusinessArea BusinessArea
CustomerAccountAssignmentGroup CustomerAccountAssignmentGroup
CostCenterBusinessArea CostCenterBusinessArea
CostCenter CostCenter
ControllingArea ControllingArea
OrderID OrderID
ControllingObject ControllingObject
ReferenceSDDocument ReferenceSDDocument
ReferenceSDDocumentCategory ReferenceSDDocumentCategory
AccountingDocExternalReference AccountingDocExternalReference
AssignmentReference AssignmentReference
OverallSDProcessStatus OverallSDProcessStatus
OverallSDDocumentRejectionSts OverallSDDocumentRejectionSts
TotalBlockStatus TotalBlockStatus
OverallTotalDeliveryStatus OverallTotalDeliveryStatus
OverallDeliveryStatus OverallDeliveryStatus
OverallDeliveryBlockStatus OverallDeliveryBlockStatus
OverallOrdReltdBillgStatus OverallOrdReltdBillgStatus
OverallBillingBlockStatus OverallBillingBlockStatus
OverallTotalSDDocRefStatus OverallTotalSDDocRefStatus
OverallSDDocReferenceStatus OverallSDDocReferenceStatus
TotalCreditCheckStatus TotalCreditCheckStatus
MaxDocValueCreditCheckStatus MaxDocValueCreditCheckStatus
PaymentTermCreditCheckStatus PaymentTermCreditCheckStatus
FinDocCreditCheckStatus FinDocCreditCheckStatus
ExprtInsurCreditCheckStatus ExprtInsurCreditCheckStatus
PaytAuthsnCreditCheckSts PaytAuthsnCreditCheckSts
CentralCreditCheckStatus CentralCreditCheckStatus
CentralCreditChkTechErrSts CentralCreditChkTechErrSts
HdrGeneralIncompletionStatus HdrGeneralIncompletionStatus
OverallPricingIncompletionSts OverallPricingIncompletionSts
HeaderDelivIncompletionStatus HeaderDelivIncompletionStatus
HeaderBillgIncompletionStatus HeaderBillgIncompletionStatus
OvrlItmGeneralIncompletionSts OvrlItmGeneralIncompletionSts
OvrlItmBillingIncompletionSts OvrlItmBillingIncompletionSts
OvrlItmDelivIncompletionSts OvrlItmDelivIncompletionSts
SalesDocApprovalStatus SalesDocApprovalStatus
_Item _Item
_Partner _Partner
_StandardPartner _StandardPartner
_CustomerReturnType _SalesDocumentType
_CreatedByUser _CreatedByUser
_LastChangedByUser _LastChangedByUser
_SalesOrganization _SalesOrganization
_DistributionChannel _DistributionChannel
_OrganizationDivision _OrganizationDivision
_SalesGroup _SalesGroup
_SalesOffice _SalesOffice
_SoldToParty _SoldToParty
_CustomerGroup _CustomerGroup
_AdditionalCustomerGroup1 _AdditionalCustomerGroup1
_AdditionalCustomerGroup2 _AdditionalCustomerGroup2
_AdditionalCustomerGroup3 _AdditionalCustomerGroup3
_AdditionalCustomerGroup4 _AdditionalCustomerGroup4
_AdditionalCustomerGroup5 _AdditionalCustomerGroup5
_CreditControlArea _CreditControlArea
_SDDocumentReason _SDDocumentReason
_SDPricingProcedure _SDPricingProcedure
_ShippingType _ShippingType
_ShippingCondition _ShippingCondition
_SalesDistrict _SalesDistrict
_RetsMgmtProcess _RetsMgmtProcess
_TransactionCurrency _TransactionCurrency
_IncotermsClassification _IncotermsClassification
_IncotermsVersion _IncotermsVersion
_DeliveryBlockReason _DeliveryBlockReason
_CustRetApprovalReason _CustRetApprovalReason
_BillingCompanyCode _BillingCompanyCode
_HeaderBillingBlockReason _HeaderBillingBlockReason
_CustomerPaymentTerms _CustomerPaymentTerms
_ExchangeRateType _ExchangeRateType
_BusinessArea _BusinessArea
_CustomerAccountAssgmtGroup _CustomerAccountAssgmtGroup
_CostCenterBusinessArea _CostCenterBusinessArea
_CostCenter _CostCenter
_ControllingArea _ControllingArea
_ControllingObject _ControllingObject
_ReferenceSDDocumentCategory _ReferenceSDDocumentCategory
_OverallSDProcessStatus _OverallSDProcessStatus
_OverallSDDocumentRejectionSts _OverallSDDocumentRejectionSts
_TotalBlockStatus _TotalBlockStatus
_OverallTotalDeliveryStatus _OverallTotalDeliveryStatus
_OverallDeliveryStatus _OverallDeliveryStatus
_OverallDeliveryBlockStatus _OverallDeliveryBlockStatus
_OverallOrdReltdBillgStatus _OverallOrdReltdBillgStatus
_OverallBillingBlockStatus _OverallBillingBlockStatus
_OverallTotalSDDocRefStatus _OverallTotalSDDocRefStatus
_OverallSDDocReferenceStatus _OverallSDDocReferenceStatus
_TotalCreditCheckStatus _TotalCreditCheckStatus
_MaxDocValueCreditCheckStatus _MaxDocValueCreditCheckStatus
_PaymentTermCreditCheckStatus _PaymentTermCreditCheckStatus
_FinDocCreditCheckStatus _FinDocCreditCheckStatus
_ExprtInsurCreditCheckStatus _ExprtInsurCreditCheckStatus
_PaytAuthsnCreditCheckSts _PaytAuthsnCreditCheckSts
_CentralCreditCheckStatus _CentralCreditCheckStatus
_CentralCreditChkTechErrSts _CentralCreditChkTechErrSts
_HdrGeneralIncompletionStatus _HdrGeneralIncompletionStatus
_OverallPricingIncompletionSts _OverallPricingIncompletionSts
_HeaderDelivIncompletionStatus _HeaderDelivIncompletionStatus
_HeaderBillgIncompletionStatus _HeaderBillgIncompletionStatus
_OvrlItmGeneralIncompletionSts _OvrlItmGeneralIncompletionSts
_OvrlItmBillingIncompletionSts _OvrlItmBillingIncompletionSts
_OvrlItmDelivIncompletionSts _OvrlItmDelivIncompletionSts
_SalesDocApprovalStatus _SalesDocApprovalStatus
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Returns Order'
@VDM: {
  viewType: #BASIC,
  lifecycle.contract.type: #PUBLIC_LOCAL_API
}
@AccessControl: {
  authorizationCheck: #CHECK,
  personalData.blocking: #('TRANSACTIONAL_DATA'),
  privilegedAssociations: [ '_CreatedByUser', '_LastChangedByUser' ]
}
@AbapCatalog: {
  sqlViewName: 'ISDCUSTRETURN',
  preserveKey: true,
  compiler.compareFilter: true
}
@ObjectModel: {
  compositionRoot: true,
  representativeKey: 'CustomerReturn',
  modelingPattern: #ANALYTICAL_DIMENSION,
  supportedCapabilities: [#ANALYTICAL_DIMENSION, 
                          #CDS_MODELING_ASSOCIATION_TARGET, 
                          #CDS_MODELING_DATA_SOURCE,
                          #SQL_DATA_SOURCE,
                          #EXTRACTION_DATA_SOURCE],
  usageType: {
    dataClass:      #TRANSACTIONAL,
    serviceQuality: #B,
    sizeCategory:   #L
  }
}
@Analytics.dataCategory: #DIMENSION
@Metadata.ignorePropagatedAnnotations: true
@Metadata.allowExtensions: true
@ObjectModel.sapObjectNodeType.name: 'CustomerReturn'   

@Analytics: {
    dataExtraction: {
        enabled: true,
        delta.changeDataCapture: {
            mapping:[
                {
                    table: 'vbak', role: #MAIN,
                    viewElement: ['CustomerReturn'],
                    tableElement: ['vbeln']  },
                    
                {   filter: [{operator: #EQ, tableElement: 'posnr', value: '000000'}],
                    table: 'vbkd', role: #LEFT_OUTER_TO_ONE_JOIN,
                    viewElement: ['CustomerReturn'],
                    tableElement: ['vbeln']
                },   
                
                {   filter: [{operator: #EQ, tableElement: 'vposn', value: '000000'}],
                    table: 'veda', role: #LEFT_OUTER_TO_ONE_JOIN,
                    viewElement: ['CustomerReturn'],
                    tableElement: ['vbeln']
                }              
            ]
        }
    }
 }

define view I_CustomerReturn
  as select from I_SalesDocument as SalesDocument

  //Associations

  association [0..*] to I_CustomerReturnItem           as _Item                  on $projection.CustomerReturn = _Item.CustomerReturn
  association [0..1] to I_RetsMgmtProcess              as _RetsMgmtProcess       on $projection.RetsMgmtProcess = _RetsMgmtProcess.RetsMgmtProcess
  association [0..1] to I_CustomerReturnApprovalReason as _CustRetApprovalReason on $projection.CustomerReturnApprovalReason = _CustRetApprovalReason.CustomerReturnApprovalReason
 
  //Extensibility

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

{
      //Key

  key cast(SalesDocument as vdm_customer_return preserving type)          as CustomerReturn,

      //Category

      @ObjectModel.foreignKey.association: '_CustomerReturnType'
      cast(SalesDocumentType as vdm_customer_return_type preserving type) as CustomerReturnType,

      //Admin

      CreatedByUser,
      LastChangedByUser,
      @Semantics.systemDate.createdAt: true
      CreationDate,
      CreationTime,
      @Semantics.systemDate.lastChangedAt: true
      LastChangeDate,
      @Semantics.systemDateTime.lastChangedAt: true
      LastChangeDateTime,
      SenderBusinessSystemName,
      
      //Org

      @ObjectModel.foreignKey.association: '_SalesOrganization'
      SalesOrganization,
      @ObjectModel.foreignKey.association: '_DistributionChannel'
      DistributionChannel,
      @ObjectModel.foreignKey.association: '_OrganizationDivision'
      OrganizationDivision,
      @ObjectModel.foreignKey.association: '_SalesGroup'
      SalesGroup,
      @ObjectModel.foreignKey.association: '_SalesOffice'
      SalesOffice,

      //Sales

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_Customer_VH',
                     element: 'Customer' }
        }]
      @ObjectModel.foreignKey.association: '_SoldToParty'
      SoldToParty,
      @ObjectModel.foreignKey.association: '_CustomerGroup'
      CustomerGroup,
      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup1'
      AdditionalCustomerGroup1,
      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup2'
      AdditionalCustomerGroup2,
      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup3'
      AdditionalCustomerGroup3,
      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup4'
      AdditionalCustomerGroup4,
      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup5'
      AdditionalCustomerGroup5,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_CreditControlAreaStdVH',
                     element: 'CreditControlArea' }
        }]
      @ObjectModel.foreignKey.association: '_CreditControlArea'
      CreditControlArea,
      SalesDocumentDate                                                   as CustomerReturnDate,
      ServicesRenderedDate,
      @ObjectModel.foreignKey.association: '_SDDocumentReason'
      SDDocumentReason,
      PurchaseOrderByCustomer,
      CustomerPurchaseOrderType,
      CustomerPurchaseOrderDate,
      CustomerPurchaseOrderSuplmnt,
      @ObjectModel.foreignKey.association: '_SalesDistrict'
      SalesDistrict,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_RetsMgmtProcessStdVH',
                     element: 'RetsMgmtProcess' }
        }]
      @ObjectModel.foreignKey.association: '_RetsMgmtProcess'
      RetsMgmtProcess,

      //Pricing

      @DefaultAggregation: #SUM
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      TotalNetAmount,
      @Semantics.currencyCode: true
      @ObjectModel.foreignKey.association: '_TransactionCurrency'
      TransactionCurrency,
      PricingDate,
      PriceDetnExchangeRate,
      SDPricingProcedure,
      SalesDocumentCondition                                              as CustomerReturnCondition,

      //Shipping

      RequestedDeliveryDate,
      @ObjectModel.foreignKey.association: '_IncotermsClassification'
      IncotermsClassification,
      IncotermsTransferLocation,
      IncotermsLocation1,
      IncotermsLocation2,
      @ObjectModel.foreignKey.association: '_IncotermsVersion'
      IncotermsVersion,
      @ObjectModel.foreignKey.association: '_DeliveryBlockReason'
      DeliveryBlockReason,
      @Analytics.internalName: #LOCAL  
      @ObjectModel.foreignKey.association: '_ShippingType'
      ShippingType,
      
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_ShippingCondition' 
      ShippingCondition,
      
      //Approval Management

      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_CustRetApprovalReason'
      SalesDocApprovalReason                                              as CustomerReturnApprovalReason,
      
      //Billing

      BillingDocumentDate,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_CompanyCodeStdVH',
                      element: 'CompanyCode' }
        }]
      @ObjectModel.foreignKey.association: '_BillingCompanyCode'
      BillingCompanyCode,
      @ObjectModel.foreignKey.association: '_HeaderBillingBlockReason'
      HeaderBillingBlockReason,

      //Payment

      @ObjectModel.foreignKey.association: '_CustomerPaymentTerms'
      CustomerPaymentTerms,
      PaymentMethod,
      
      //Tax Classfication

      CustomerTaxClassification1,
      CustomerTaxClassification2,
      CustomerTaxClassification3,
      CustomerTaxClassification4,
      CustomerTaxClassification5,
      CustomerTaxClassification6,
      CustomerTaxClassification7,
      CustomerTaxClassification8,
      CustomerTaxClassification9,
      
      //Accounting

      FiscalYear,
      FiscalPeriod,
      ExchangeRateDate,
      @ObjectModel.foreignKey.association: '_ExchangeRateType'
      ExchangeRateType,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_BusinessAreaStdVH',
                     element: 'BusinessArea' }
        }]
      @ObjectModel.foreignKey.association: '_BusinessArea'
      BusinessArea,
      @ObjectModel.foreignKey.association: '_CustomerAccountAssgmtGroup'
      CustomerAccountAssignmentGroup,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_BusinessAreaStdVH',
                     element: 'BusinessArea' }
        }]
      @ObjectModel.foreignKey.association: '_CostCenterBusinessArea'
      CostCenterBusinessArea,
      CostCenter,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_ControllingAreaStdVH',
                     element: 'ControllingArea' }
        }]
      @ObjectModel.foreignKey.association: '_ControllingArea'
      ControllingArea,
      OrderID,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_ControllingObjectStdVH',
                     element: 'ControllingObject' }
        }]
      @ObjectModel.foreignKey.association: '_ControllingObject'
      ControllingObject,

      //Reference

      ReferenceSDDocument,
      @ObjectModel.foreignKey.association: '_ReferenceSDDocumentCategory'
      ReferenceSDDocumentCategory,
      
      @Analytics.internalName: #LOCAL
      AccountingDocExternalReference,
      AssignmentReference,

      //Status

      @ObjectModel.foreignKey.association: '_OverallSDProcessStatus'
      OverallSDProcessStatus,
      @ObjectModel.foreignKey.association: '_OverallSDDocumentRejectionSts'
      OverallSDDocumentRejectionSts,
      @ObjectModel.foreignKey.association: '_TotalBlockStatus'
      TotalBlockStatus,
      @ObjectModel.foreignKey.association: '_OverallTotalDeliveryStatus'
      OverallTotalDeliveryStatus,
      @ObjectModel.foreignKey.association: '_OverallDeliveryStatus'
      OverallDeliveryStatus,
      @ObjectModel.foreignKey.association: '_OverallDeliveryBlockStatus'
      OverallDeliveryBlockStatus,
      @ObjectModel.foreignKey.association: '_OverallOrdReltdBillgStatus'
      OverallOrdReltdBillgStatus,
      @ObjectModel.foreignKey.association: '_OverallBillingBlockStatus'
      OverallBillingBlockStatus,
      @ObjectModel.foreignKey.association: '_OverallTotalSDDocRefStatus'
      OverallTotalSDDocRefStatus,
      @ObjectModel.foreignKey.association: '_OverallSDDocReferenceStatus'
      OverallSDDocReferenceStatus,
      @ObjectModel.foreignKey.association: '_TotalCreditCheckStatus'
      TotalCreditCheckStatus,
      @ObjectModel.foreignKey.association: '_MaxDocValueCreditCheckStatus'
      MaxDocValueCreditCheckStatus,
      @ObjectModel.foreignKey.association: '_PaymentTermCreditCheckStatus'
      PaymentTermCreditCheckStatus,
      @ObjectModel.foreignKey.association: '_FinDocCreditCheckStatus'
      FinDocCreditCheckStatus,
      @ObjectModel.foreignKey.association: '_ExprtInsurCreditCheckStatus'
      ExprtInsurCreditCheckStatus,
      @ObjectModel.foreignKey.association: '_PaytAuthsnCreditCheckSts'
      PaytAuthsnCreditCheckSts,
      @ObjectModel.foreignKey.association: '_CentralCreditCheckStatus'
      CentralCreditCheckStatus,
      @ObjectModel.foreignKey.association: '_CentralCreditChkTechErrSts'
      CentralCreditChkTechErrSts,
      @ObjectModel.foreignKey.association: '_HdrGeneralIncompletionStatus'
      HdrGeneralIncompletionStatus,
      @ObjectModel.foreignKey.association: '_OverallPricingIncompletionSts'
      OverallPricingIncompletionSts,
      @ObjectModel.foreignKey.association: '_HeaderDelivIncompletionStatus'
      HeaderDelivIncompletionStatus,
      @ObjectModel.foreignKey.association: '_HeaderBillgIncompletionStatus'
      HeaderBillgIncompletionStatus,
      @ObjectModel.foreignKey.association: '_OvrlItmGeneralIncompletionSts'
      OvrlItmGeneralIncompletionSts,
      @ObjectModel.foreignKey.association: '_OvrlItmBillingIncompletionSts'
      OvrlItmBillingIncompletionSts,
      @ObjectModel.foreignKey.association: '_OvrlItmDelivIncompletionSts'
      OvrlItmDelivIncompletionSts,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_SalesDocApprovalStatus'
      SalesDocApprovalStatus,
      
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _Item,
      _Partner,
      _StandardPartner,
      _SalesDocumentType                                                  as _CustomerReturnType,
      _CreatedByUser,
      _LastChangedByUser,
      _SalesOrganization,
      _DistributionChannel,
      _OrganizationDivision,
      _SalesGroup,
      _SalesOffice,
      _SoldToParty,
      _CustomerGroup,
      _AdditionalCustomerGroup1,
      _AdditionalCustomerGroup2,
      _AdditionalCustomerGroup3,
      _AdditionalCustomerGroup4,
      _AdditionalCustomerGroup5,
      _CreditControlArea,
      _SDDocumentReason,
      _SDPricingProcedure,
      _ShippingType,
      _ShippingCondition,
      //Todo: _CustomerPurchaseOrderType,

      _SalesDistrict,
      _RetsMgmtProcess,
      _TransactionCurrency,
      //Todo:CustomerReturnCondition,

      _IncotermsClassification,
      _IncotermsVersion,
      _DeliveryBlockReason,
      _CustRetApprovalReason,
      _BillingCompanyCode,
      _HeaderBillingBlockReason,
      _CustomerPaymentTerms,
      //Todo: _PaymentMethod,

      _ExchangeRateType,
      _BusinessArea,
      _CustomerAccountAssgmtGroup,
      _CostCenterBusinessArea,
      _CostCenter,
      _ControllingArea,
      _ControllingObject,
      //Todo: ReferenceSDDocument,

      _ReferenceSDDocumentCategory,
      _OverallSDProcessStatus,
      _OverallSDDocumentRejectionSts,
      _TotalBlockStatus,
      _OverallTotalDeliveryStatus,
      _OverallDeliveryStatus,
      _OverallDeliveryBlockStatus,
      _OverallOrdReltdBillgStatus,
      _OverallBillingBlockStatus,
      _OverallTotalSDDocRefStatus,
      _OverallSDDocReferenceStatus,
      _TotalCreditCheckStatus,
      _MaxDocValueCreditCheckStatus,
      _PaymentTermCreditCheckStatus,
      _FinDocCreditCheckStatus,
      _ExprtInsurCreditCheckStatus,
      _PaytAuthsnCreditCheckSts,
      _CentralCreditCheckStatus,
      _CentralCreditChkTechErrSts,
      _HdrGeneralIncompletionStatus,
      _OverallPricingIncompletionSts,
      _HeaderDelivIncompletionStatus,
      _HeaderBillgIncompletionStatus,
      _OvrlItmGeneralIncompletionSts,
      _OvrlItmBillingIncompletionSts,
      _OvrlItmDelivIncompletionSts,
      _SalesDocApprovalStatus
}
where
  SalesDocument.SDDocumentCategory = 'H';
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_SALESDOCUMENT"
],
"ASSOCIATED":
[
"E_SALESDOCUMENTBASIC",
"I_ADDITIONALCUSTOMERGROUP1",
"I_ADDITIONALCUSTOMERGROUP2",
"I_ADDITIONALCUSTOMERGROUP3",
"I_ADDITIONALCUSTOMERGROUP4",
"I_ADDITIONALCUSTOMERGROUP5",
"I_BILLINGBLOCKREASON",
"I_BUSINESSAREA",
"I_CENTRALCREDITCHECKSTATUS",
"I_CENTRALCREDITCHKTECHERRSTS",
"I_COMPANYCODE",
"I_CONTROLLINGAREA",
"I_CONTROLLINGOBJECT",
"I_COSTCENTER",
"I_CREDITCONTROLAREA",
"I_CURRENCY",
"I_CUSTOMER",
"I_CUSTOMERACCOUNTASSGMTGROUP",
"I_CUSTOMERGROUP",
"I_CUSTOMERPAYMENTTERMS",
"I_CUSTOMERRETURNAPPROVALREASON",
"I_CUSTOMERRETURNITEM",
"I_DELIVERYBLOCKREASON",
"I_DISTRIBUTIONCHANNEL",
"I_DIVISION",
"I_EXCHANGERATETYPE",
"I_EXPRTINSURCREDITCHECKSTATUS",
"I_FINDOCCREDITCHECKSTATUS",
"I_HDRBILLGINCOMPLETIONSTATUS",
"I_HDRDELIVINCOMPLETIONSTATUS",
"I_HDRGENINCOMPLETIONSTATUS",
"I_INCOTERMSCLASSIFICATION",
"I_INCOTERMSVERSION",
"I_MAXDOCVALUECREDITCHECKSTS",
"I_OVERALLBILLINGBLOCKSTATUS",
"I_OVERALLDELIVERYBLOCKSTATUS",
"I_OVERALLDELIVERYSTATUS",
"I_OVERALLORDRELTDBILLGSTATUS",
"I_OVERALLPRCINCOMPLETIONSTS",
"I_OVERALLSDDOCREFERENCESTATUS",
"I_OVERALLSDDOCUMENTRJCNSTATUS",
"I_OVERALLSDPROCESSSTATUS",
"I_OVERALLTOTALDELIVERYSTATUS",
"I_OVERALLTOTALSDDOCREFSTATUS",
"I_OVRLITMBILLGINCOMPLTNSTS",
"I_OVRLITMDELIVINCOMPLETIONSTS",
"I_OVRLITMGENINCOMPLETIONSTS",
"I_PAYMENTTERMCREDITCHECKSTS",
"I_PAYTAUTHSNCREDITCHECKSTS",
"I_RETSMGMTPROCESS",
"I_SALESDISTRICT",
"I_SALESDOCAPPROVALSTATUS",
"I_SALESDOCUMENTPARTNER",
"I_SALESDOCUMENTSTANDARDPARTNER",
"I_SALESDOCUMENTTYPE",
"I_SALESGROUP",
"I_SALESOFFICE",
"I_SALESORGANIZATION",
"I_SDDOCUMENTCATEGORY",
"I_SDDOCUMENTREASON",
"I_SHIPPINGCONDITION",
"I_SHIPPINGTYPE",
"I_SLSPRICINGPROCEDURE",
"I_TOTALBLOCKSTATUS",
"I_TOTALCREDITCHECKSTATUS",
"I_USER"
],
"BASE":
[
"I_SALESDOCUMENT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/