C_MassChangeSalesDocument

DDL: C_MASSCHANGESALESDOCUMENT Type: view CONSUMPTION Package: SD_CHANGE_COCKPIT_SLSDOC_ODATA

Mass Change of Sales Document

C_MassChangeSalesDocument is a Consumption CDS View that provides data about "Mass Change of Sales Document" in SAP S/4HANA. It reads from 1 data source (I_SalesDocument) and exposes 112 fields with key field SalesDocument. It has 9 associations to related views. Part of development package SD_CHANGE_COCKPIT_SLSDOC_ODATA.

Data Sources (1)

SourceAliasJoin Type
I_SalesDocument SalesDocument from

Associations (9)

CardinalityTargetAliasCondition
[0..1] I_SDDocStandardPartner _StandardPartner $projection.SalesDocument = _StandardPartner.SDDocument
[0..*] I_SlsDocNonStdPartner _NonStdPartner $projection.SalesDocument = _NonStdPartner.SDDocument
[1..*] I_SDDocumentPartner _SDDocumentPartner $projection.SalesDocument = _SDDocumentPartner.SDDocument
[0..*] C_MassChangeSalesDocumentItem _SalesDocumentItem $projection.SalesDocument = _SalesDocumentItem.SalesDocument
[0..*] C_MassChgSalesDocumentItemWl _MassChgSalesDocumentItemWL $projection.SalesDocument = _MassChgSalesDocumentItemWL.SalesDocument
[0..1] E_SalesDocumentBasic _Extension $projection.SalesDocument = _Extension.SalesDocument
[0..1] C_SalesDocumentUserVH _CreatedByUser $projection.CreatedByUser = _CreatedByUser.UserID
[0..1] C_SalesDocPaymentMethodVH _PaymentMethod $projection.PaymentMethod = _PaymentMethod.PaymentMethod and $projection.BillingCompanyCode = _PaymentMethod.BillingCompanyCode
[1] I_CostCenterText _CostCenterText $projection.CostCenter = _CostCenterText.CostCenter and $projection.ControllingArea = _CostCenterText.ControllingArea and _CostCenterText.ValidityEndDate >= $session.system_date and _CostCenterText.Language = $session.system_language

Annotations (19)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Mass Change of Sales Document view
VDM.viewType #CONSUMPTION view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #REQUIRED view
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName CSDMCSLSDOC view
AbapCatalog.compiler.compareFilter true view
ObjectModel.compositionRoot true view
ObjectModel.representativeKey SalesDocument view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
OData.entitySet.name SlsDocument view
Analytics.internalName #LOCAL view
Metadata.allowExtensions true view
Metadata.ignorePropagatedAnnotations true view
Search.searchable true view

Fields (112)

KeyFieldSource TableSource FieldDescription
KEY SalesDocument SalesDocument SD Document
SDDocumentCategory SDDocumentCategory Document Cat.
SalesOrganization SalesOrganization Sales Organization
DistributionChannel DistributionChannel RefDistCh-Cust/Mat.
SoldToParty SoldToParty Sold-to Party
ShipToParty _StandardPartner ShipToParty Ship-To Party (obsolete)
SDDocumentReason SDDocumentReason Order Reason
OrganizationDivision Org. Division
SalesGroup SalesGroup Sales Group
SalesOffice SalesOffice Sales Office
SalesDistrict SalesDistrict Sales District
BusinessArea BusinessArea Business Area
BillingCompanyCode BillingCompanyCode CCodeToBeBilled
CostCenter CostCenter Cost Center
CostCenterDescription _CostCenterText CostCenterDescription Description
ControllingArea ControllingArea Controlling Area
SalesDocumentType SalesDocumentType Sales Doc. Type
CreationDate CreationDate Time Stamp
CreatedByUser CreatedByUser User Name
DeliveryBlockReason Delivery Block
SalesDocApprovalReason
OverallSDProcessStatus OverallSDProcessStatus
TotalNetAmount TotalNetAmount Total Net Amount
TransactionCurrency TransactionCurrency Transaction Currency
HeaderBillingBlockReason Billing Block
ShippingCondition ShippingCondition Shipping Conditions
SlsOrdShippingType ShippingType Shipping Type
CustomerPaymentTerms Pyt Terms
PaymentMethod PaymentMethod Pymt Meth.
CustomerGroup CustomerGroup Customer Group
AdditionalCustomerGroup1 AdditionalCustomerGroup1 Customer Grp 1
AdditionalCustomerGroup2 AdditionalCustomerGroup2 Customer Grp 2
AdditionalCustomerGroup3 AdditionalCustomerGroup3 Customer Grp 3
AdditionalCustomerGroup4 AdditionalCustomerGroup4 Customer Grp 4
AdditionalCustomerGroup5 AdditionalCustomerGroup5 Customer Grp 5
HeaderIncotermsClassification Incoterms
IncotermsLocation1 IncotermsLocation1 Inco. Location1
IncotermsLocation2 IncotermsLocation2 Inco. Location2
IncotermsVersion IncotermsVersion Inco. Version
PayerParty _StandardPartner PayerParty Payer
BillToParty _StandardPartner BillToParty Inv. Recipient
ResponsibleEmployee _StandardPartner ResponsibleEmployee Employee Resp.
SalesEmployee _StandardPartner SalesEmployee Sales Employee
ShipToPartyName
SoldToPartyName
BillToPartyName
PayerPartyName
ResponsibleEmployeeName
SalesEmployeeName
OrganizationBPName1 _SoldToParty OrganizationBPName1 Name 1
OrganizationBPName2 _SoldToParty OrganizationBPName2 Name 2
AdditionalPartnerName
PartnerFunction
Customer
Supplier
Personnel
ContactPerson
Division
WBSElementExternalID
Product
SalesDocumentRjcnReason
ProfitCenter
SlsDocMassChangeRequestUUID
SlsDocMassChgEntityLevel
PaymentTerms
ItemBillingBlockReason
SalesDocumentDate SalesDocumentDate Document Date
PricingDate PricingDate Pricing Date
BillingDocumentDate BillingDocumentDate Billing Date
_StandardPartner _StandardPartner
_NonStdPartner _NonStdPartner
_MassChgSalesDocumentItemWL _MassChgSalesDocumentItemWL
_DeliveryBlockReason _DeliveryBlockReason
_DistributionChannel _DistributionChannel
_OrganizationDivision _OrganizationDivision
_SalesGroup _SalesGroup
_SalesOffice _SalesOffice
_SalesDistrict _SalesDistrict
_BusinessArea _BusinessArea
_CustomerGroup _CustomerGroup
_AdditionalCustomerGroup1 _AdditionalCustomerGroup1
_AdditionalCustomerGroup2 _AdditionalCustomerGroup2
_AdditionalCustomerGroup3 _AdditionalCustomerGroup3
_AdditionalCustomerGroup4 _AdditionalCustomerGroup4
_AdditionalCustomerGroup5 _AdditionalCustomerGroup5
_ControllingArea _ControllingArea
_SDDocumentCategory _SDDocumentCategory
_TransactionCurrency _TransactionCurrency
_SalesOrganization _SalesOrganization
_BillingCompanyCode _BillingCompanyCode
_SalesDocumentType _SalesDocumentType
_SalesDocumentItem _SalesDocumentItem
_SalesDocApprovalReason _SalesDocApprovalReason
_HeaderBillingBlockReason _HeaderBillingBlockReason
_OverallSDProcessStatus _OverallSDProcessStatus
_CustomerPaymentTerms _CustomerPaymentTerms
_IncotermsClassification _IncotermsClassification
_IncotermsVersion _IncotermsVersion
_ShippingType _ShippingType
_ShippingCondition _ShippingCondition
_SDDocumentReason I_SalesDocument _SDDocumentReason
_SoldToParty _SoldToParty
_ShipToParty _StandardPartner _ShipToParty
_PayerParty _StandardPartner _PayerParty
_BillToParty _StandardPartner _BillToParty
_ResponsibleEmployee _StandardPartner _ResponsibleEmployee
_SalesEmployee _StandardPartner _SalesEmployee
_SDDocumentPartner _SDDocumentPartner
_CreatedByUser _CreatedByUser
_CostCenter _CostCenter
_CostCenterText _CostCenterText
_PaymentMethod _PaymentMethod

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view C_MassChangeSalesDocument.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.

CREATE VIEW C_MassChangeSalesDocument AS
SELECT
  SalesDocument,
  SDDocumentCategory,
  SalesOrganization,
  DistributionChannel,
  SoldToParty,
  _StandardPartner.ShipToParty AS ShipToParty,
  SDDocumentReason,
  cast(OrganizationDivision as organization_division preserving type ) AS OrganizationDivision,
  SalesGroup,
  SalesOffice,
  SalesDistrict,
  BusinessArea,
  BillingCompanyCode,
  CostCenter,
  _CostCenterText.CostCenterDescription AS CostCenterDescription,
  ControllingArea,
  SalesDocumentType,
  CreationDate,
  CreatedByUser,
  cast( DeliveryBlockReason as header_delivery_block_reason preserving type ) AS DeliveryBlockReason,
  cast( SalesDocApprovalReason as sd_apm_approval_reason_vdm preserving type ) AS SalesDocApprovalReason,
  OverallSDProcessStatus,
  TotalNetAmount,
  TransactionCurrency,
  cast(HeaderBillingBlockReason as header_billing_block_reason preserving type ) AS HeaderBillingBlockReason,
  ShippingCondition,
  ShippingType AS SlsOrdShippingType,
  cast( CustomerPaymentTerms as hdr_dzterm preserving type ) AS CustomerPaymentTerms,
  PaymentMethod,
  CustomerGroup,
  AdditionalCustomerGroup1,
  AdditionalCustomerGroup2,
  AdditionalCustomerGroup3,
  AdditionalCustomerGroup4,
  AdditionalCustomerGroup5,
  cast( IncotermsClassification as vdm_header_incoterm1 preserving type ) AS HeaderIncotermsClassification,
  IncotermsLocation1,
  IncotermsLocation2,
  IncotermsVersion,
  _StandardPartner.PayerParty AS PayerParty,
  _StandardPartner.BillToParty AS BillToParty,
  _StandardPartner.ResponsibleEmployee AS ResponsibleEmployee,
  _StandardPartner.SalesEmployee AS SalesEmployee,
  cast('' as ad_namtext ) AS ShipToPartyName,
  cast('' as ad_namtext ) AS SoldToPartyName,
  cast('' as ad_namtext ) AS BillToPartyName,
  cast('' as ad_namtext ) AS PayerPartyName,
  cast('' as ad_namtext ) AS ResponsibleEmployeeName,
  cast('' as ad_namtext ) AS SalesEmployeeName,
  _SoldToParty.OrganizationBPName1 AS OrganizationBPName1,
  _SoldToParty.OrganizationBPName2 AS OrganizationBPName2,
  cast( ' ' as abap.char( 100 )) AS AdditionalPartnerName,
  cast( ' ' as parvw_unv preserving type ) AS PartnerFunction,
  cast( ' ' as kunnr) AS Customer,
  cast( ' ' as lifnr) AS Supplier,
  cast( '00000000' as pernr_d) AS Personnel,
  cast( '0000000000' as parnr) AS ContactPerson,
  cast( ' ' as spart ) AS Division,
  cast( ' ' as ps_posid_edit ) AS WBSElementExternalID,
  cast( ' ' as productnumber ) AS Product,
  cast( ' ' as abgru_va preserving type ) AS SalesDocumentRjcnReason,
  cast( ' ' as prctr ) AS ProfitCenter,
  hextobin( '00000000000000000000000000000000' ) AS SlsDocMassChangeRequestUUID,
  cast ('H' as sd_mcc_entity_level) AS SlsDocMassChgEntityLevel,
  cast(' ' as abap.char(4) ) AS PaymentTerms,
  cast(' ' as billing_block_reason_item preserving type) AS ItemBillingBlockReason,
  SalesDocumentDate,
  PricingDate,
  BillingDocumentDate,
  SalesDocument._SDDocumentReason AS _SDDocumentReason,
  _StandardPartner._ShipToParty AS _ShipToParty,
  _StandardPartner._PayerParty AS _PayerParty,
  _StandardPartner._BillToParty AS _BillToParty,
  _StandardPartner._ResponsibleEmployee AS _ResponsibleEmployee,
  _StandardPartner._SalesEmployee AS _SalesEmployee
FROM I_SalesDocument AS SalesDocument
LEFT OUTER JOIN I_SDDocStandardPartner AS _StandardPartner ON SalesDocument = _StandardPartner.SDDocument  -- association [0..1]
LEFT OUTER JOIN I_SlsDocNonStdPartner AS _NonStdPartner ON SalesDocument = _NonStdPartner.SDDocument  -- association [0..*]
LEFT OUTER JOIN I_SDDocumentPartner AS _SDDocumentPartner ON SalesDocument = _SDDocumentPartner.SDDocument  -- association [1..*]
LEFT OUTER JOIN C_MassChangeSalesDocumentItem AS _SalesDocumentItem ON SalesDocument = _SalesDocumentItem.SalesDocument  -- association [0..*]
LEFT OUTER JOIN C_MassChgSalesDocumentItemWl AS _MassChgSalesDocumentItemWL ON SalesDocument = _MassChgSalesDocumentItemWL.SalesDocument  -- association [0..*]
LEFT OUTER JOIN E_SalesDocumentBasic AS _Extension ON SalesDocument = _Extension.SalesDocument  -- association [0..1]
LEFT OUTER JOIN C_SalesDocumentUserVH AS _CreatedByUser ON CreatedByUser = _CreatedByUser.UserID  -- association [0..1]
LEFT OUTER JOIN C_SalesDocPaymentMethodVH AS _PaymentMethod ON PaymentMethod = _PaymentMethod.PaymentMethod AND BillingCompanyCode = _PaymentMethod.BillingCompanyCode  -- association [0..1]
LEFT OUTER JOIN I_CostCenterText AS _CostCenterText ON CostCenter = _CostCenterText.CostCenter AND ControllingArea = _CostCenterText.ControllingArea AND _CostCenterText.ValidityEndDate >= $session.system_date AND _CostCenterText.Language = $session.system_language  -- association [1]
;