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_Cust360SlsOrdWithoutCharge.
-- 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_Cust360SlsOrdWithoutCharge AS
SELECT
Cust360SlsOrdWithoutCharge.SalesOrderWithoutCharge AS SalesOrderWithoutCharge,
Cust360SlsOrdWithoutCharge.SoldToParty AS SoldToParty,
cast('' as ad_namtext ) AS SoldToPartyName,
cast( Cust360SlsOrdWithoutCharge._Partner[ PartnerFunction = 'WE' ].Customer as kunwe preserving type ) AS ShipToParty,
cast('' as ad_namtext ) AS ShipToPartyName,
cast( Cust360SlsOrdWithoutCharge._Partner[ PartnerFunction = 'RG' ].Customer as kunrg preserving type ) AS PayerParty,
cast('' as ad_namtext ) AS PayerPartyName,
cast( Cust360SlsOrdWithoutCharge._Partner[ PartnerFunction = 'RE' ].Customer as kunre preserving type ) AS BillToParty,
cast('' as ad_namtext ) AS BillToPartyName,
cast( Cust360SlsOrdWithoutCharge._Partner[ PartnerFunction = 'VE' ].Personnel as sales_empl preserving type ) AS SalesEmployee,
cast('' as ad_namtext ) AS SalesEmployeeName,
cast( Cust360SlsOrdWithoutCharge._Partner[ PartnerFunction = 'ZM' ].Personnel as resp_empl preserving type ) AS ResponsibleEmployee,
cast('' as ad_namtext ) AS ResponsibleEmployeeName,
Cust360SlsOrdWithoutCharge.PurchaseOrderByCustomer AS PurchaseOrderByCustomer,
Cust360SlsOrdWithoutCharge.RequestedDeliveryDate AS RequestedDeliveryDate,
Cust360SlsOrdWithoutCharge.OverallSDProcessStatus AS OverallSDProcessStatus,
Cust360SlsOrdWithoutCharge._OverallSDProcessStatus._Text[1:Language = $session.system_language].OverallSDProcessStatusDesc AS OverallSDProcessStatusDesc,
Cust360SlsOrdWithoutCharge.OverallSDDocumentRejectionSts AS OverallSDDocumentRejectionSts,
Cust360SlsOrdWithoutCharge._OverallSDDocumentRejectionSts._Text[1:Language = $session.system_language].OvrlSDDocumentRejectionStsDesc AS OvrlSDDocumentRejectionStsDesc,
Cust360SlsOrdWithoutCharge.OverallBillingBlockStatus AS OverallBillingBlockStatus,
Cust360SlsOrdWithoutCharge._OverallBillingBlockStatus._Text[1:Language = $session.system_language].OverallBillingBlockStatusDesc AS OverallBillingBlockStatusDesc,
Cust360SlsOrdWithoutCharge.SalesDocApprovalStatus AS SalesDocApprovalStatus,
Cust360SlsOrdWithoutCharge._SalesDocApprovalStatus._Text[1:Language = $session.system_language].SalesDocApprovalStatusDesc AS SalesDocApprovalStatusDesc,
Cust360SlsOrdWithoutCharge.OverallChmlCmplncStatus AS OverallChmlCmplncStatus,
Cust360SlsOrdWithoutCharge._OverallChmlCmplncStatus._Text[1:Language = $session.system_language].OverallChmlCmplncStatusDesc AS OverallChmlCmplncStatusDesc,
Cust360SlsOrdWithoutCharge.OverallDangerousGoodsStatus AS OverallDangerousGoodsStatus,
Cust360SlsOrdWithoutCharge._OverallDangerousGoodsStatus._Text[1:Language = $session.system_language].OverallDangerousGoodsStsDesc AS OverallDangerousGoodsStsDesc,
Cust360SlsOrdWithoutCharge.OverallSafetyDataSheetStatus AS OverallSafetyDataSheetStatus,
Cust360SlsOrdWithoutCharge._OvrlSftyDataSheetSts._Text[1:Language = $session.system_language].OverallSafetyDataSheetStsDesc AS OverallSafetyDataSheetStsDesc,
cast(Cust360SlsOrdWithoutCharge.OverallTrdCmplncEmbargoSts as totembargochksts preserving type) AS OverallTrdCmplncEmbargoSts,
Cust360SlsOrdWithoutCharge._OvrlTradeCmplncEmbargoStatus._Text[1:Language = $session.system_language].OverallTrdCmplncEmbargoStsDesc AS OverallTrdCmplncEmbargoStsDesc,
cast(Cust360SlsOrdWithoutCharge.OvrlTrdCmplncSnctndListChkSts as totwatchlistscrngchksts preserving type) AS OvrlTrdCmplncSnctndListChkSts,
Cust360SlsOrdWithoutCharge._OvTrdCmplncSnctndListChkSts._Text[1:Language = $session.system_language].OvrlTrdCmplncSnctndListStsDesc AS OvrlTrdCmplncSnctndListStsDesc,
cast(Cust360SlsOrdWithoutCharge.OvrlTrdCmplncLegalCtrlChkSts as totlglctrlchksts preserving type) AS OvrlTrdCmplncLegalCtrlChkSts,
Cust360SlsOrdWithoutCharge._OvrlTrdCmplncLegalCtrlChkSts._Text[1:Language = $session.system_language].OvrlTrdCmplncLglCtrlChkStsDesc AS OvrlTrdCmplncLglCtrlChkStsDesc,
Cust360SlsOrdWithoutCharge.TransactionCurrency AS TransactionCurrency,
Cust360SlsOrdWithoutCharge._TransactionCurrency._Text[1:Language=$session.system_language].CurrencyName AS CurrencyName,
Cust360SlsOrdWithoutCharge.TotalNetAmount AS TotalNetAmount,
Cust360SlsOrdWithoutCharge.SalesOrderWithoutChargeDate AS SalesOrderWithoutChargeDate,
Cust360SlsOrdWithoutCharge.SalesOrderWithoutChargeType AS SalesOrderWithoutChargeType,
_SalesDocumentType._Text[1:Language=$session.system_language].SalesDocumentTypeName AS SalesDocumentTypeName,
Cust360SlsOrdWithoutCharge.CreationDate AS CreationDate,
Cust360SlsOrdWithoutCharge.LastChangeDate AS LastChangeDate,
Cust360SlsOrdWithoutCharge.CreatedByUser AS CreatedByUser,
Cust360SlsOrdWithoutCharge._CreatedByUser.UserDescription AS CreatedByUserDescription,
Cust360SlsOrdWithoutCharge.LastChangedByUser AS LastChangedByUser,
Cust360SlsOrdWithoutCharge._LastChangedByUser.UserDescription AS LastChangedByUserDescription,
Cust360SlsOrdWithoutCharge.SalesOrganization AS SalesOrganization,
Cust360SlsOrdWithoutCharge._SalesOrganization._Text[1:Language=$session.system_language].SalesOrganizationName AS SalesOrganizationName,
Cust360SlsOrdWithoutCharge.DistributionChannel AS DistributionChannel,
Cust360SlsOrdWithoutCharge._DistributionChannel._Text[1:Language=$session.system_language].DistributionChannelName AS DistributionChannelName,
Cust360SlsOrdWithoutCharge.OrganizationDivision AS OrganizationDivision,
Cust360SlsOrdWithoutCharge._OrganizationDivision._Text[1:Language=$session.system_language].DivisionName AS DivisionName,
Cust360SlsOrdWithoutCharge.SalesOffice AS SalesOffice,
Cust360SlsOrdWithoutCharge._SalesOffice._Text[1:Language=$session.system_language].SalesOfficeName AS SalesOfficeName,
Cust360SlsOrdWithoutCharge.SalesGroup AS SalesGroup,
Cust360SlsOrdWithoutCharge._SalesGroup._Text[1:Language=$session.system_language].SalesGroupName AS SalesGroupName,
Cust360SlsOrdWithoutCharge.ReferenceSDDocument AS ReferenceSDDocument,
Cust360SlsOrdWithoutCharge.SDDocumentReason AS SDDocumentReason,
Cust360SlsOrdWithoutCharge._SDDocumentReason._Text[1:Language=$session.system_language].SDDocumentReasonText AS SDDocumentReasonText,
Cust360SlsOrdWithoutCharge.DeliveryBlockReason AS DeliveryBlockReason,
Cust360SlsOrdWithoutCharge._DeliveryBlockReason._Text[1:Language=$session.system_language].DeliveryBlockReasonText AS DeliveryBlockReasonText,
Cust360SlsOrdWithoutCharge.HeaderBillingBlockReason AS HeaderBillingBlockReason,
Cust360SlsOrdWithoutCharge._HeaderBillingBlockReason._Text[1:Language=$session.system_language].BillingBlockReasonDescription AS BillingBlockReasonDescription,
Cust360SlsOrdWithoutCharge._TransactionCurrency AS _TransactionCurrency,
Cust360SlsOrdWithoutCharge._OverallSDProcessStatus AS _OverallSDProcessStatus,
Cust360SlsOrdWithoutCharge._OverallSDDocumentRejectionSts AS _OverallSDDocumentRejectionSts,
Cust360SlsOrdWithoutCharge._SalesOrganization AS _SalesOrganization,
Cust360SlsOrdWithoutCharge._DistributionChannel AS _DistributionChannel,
Cust360SlsOrdWithoutCharge._OrganizationDivision AS _OrganizationDivision,
Cust360SlsOrdWithoutCharge._SalesOffice AS _SalesOffice,
Cust360SlsOrdWithoutCharge._SalesGroup AS _SalesGroup,
Cust360SlsOrdWithoutCharge._DeliveryBlockReason AS _DeliveryBlockReason,
Cust360SlsOrdWithoutCharge._HeaderBillingBlockReason AS _HeaderBillingBlockReason,
Cust360SlsOrdWithoutCharge._SDDocumentReason AS _SDDocumentReason,
Cust360SlsOrdWithoutCharge._OverallBillingBlockStatus AS _OverallBillingBlockStatus,
Cust360SlsOrdWithoutCharge._SalesDocApprovalStatus AS _SalesDocApprovalStatus,
Cust360SlsOrdWithoutCharge._OverallChmlCmplncStatus AS _OverallChmlCmplncStatus,
Cust360SlsOrdWithoutCharge._OverallDangerousGoodsStatus AS _OverallDangerousGoodsStatus,
Cust360SlsOrdWithoutCharge._OvrlSftyDataSheetSts AS _OvrlSftyDataSheetSts,
Cust360SlsOrdWithoutCharge._OvrlTradeCmplncEmbargoStatus AS _OvrlTradeCmplncEmbargoStatus,
Cust360SlsOrdWithoutCharge._OvTrdCmplncSnctndListChkSts AS _OvTrdCmplncSnctndListChkSts,
Cust360SlsOrdWithoutCharge._OvrlTrdCmplncLegalCtrlChkSts AS _OvrlTrdCmplncLegalCtrlChkSts,
Cust360SlsOrdWithoutCharge._SoldToParty AS _SoldToParty
FROM I_SalesOrderWithoutCharge AS Cust360SlsOrdWithoutCharge
INNER JOIN I_Customer360BusDocSetting AS Customer360BusDocSetting ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_SalesOrderWithoutChargeType AS _SalesDocumentType ON SalesOrderWithoutChargeType = _SalesDocumentType.SalesOrderWithoutChargeType -- association [0..1]
LEFT OUTER JOIN C_SalesDocumentUserVH AS _CreatedByUser ON CreatedByUser = _CreatedByUser.UserID -- association [0..1]
LEFT OUTER JOIN C_SalesDocumentUserVH AS _LastChangedByUser ON LastChangedByUser = _LastChangedByUser.UserID -- association [0..1]
LEFT OUTER JOIN E_SalesDocumentBasic AS _Extension ON SalesOrderWithoutCharge = _Extension.SalesDocument -- association [1]
;