I_SlsOrdFlfmtSalesOrder

DDL: I_SLSORDFLFMTSALESORDER SQL: ISOFSLSORD Type: view COMPOSITE

SOFM Sales Order

I_SlsOrdFlfmtSalesOrder is a Composite CDS View that provides data about "SOFM Sales Order" in SAP S/4HANA. It reads from 1 data source (I_SalesDocument) and exposes 93 fields with key field SalesOrder.

Data Sources (1)

SourceAliasJoin Type
I_SalesDocument SalesDocument from

Annotations (10)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #S view
EndUserText.label SOFM Sales Order view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName ISOFSLSORD view

Fields (93)

KeyFieldSource TableSource FieldDescription
KEY SalesOrder
SalesOrderType SalesDocumentType
_SalesOrderType _SalesDocumentType
SDDocumentCategory SDDocumentCategory
CreatedByUser CreatedByUser
_CreatedByUser _CreatedByUser
CreationDate CreationDate
CreationTime CreationTime
LastChangeDate LastChangeDate
OrganizationDivision OrganizationDivision
_OrganizationDivision _OrganizationDivision
SalesOrganization SalesOrganization
_SalesOrganization _SalesOrganization
DistributionChannel DistributionChannel
_DistributionChannel _DistributionChannel
SalesGroup SalesGroup
_SalesGroup _SalesGroup
SalesOffice SalesOffice
_SalesOffice _SalesOffice
SoldToParty I_SalesDocument SoldToParty
SoldToPartyName
ShipToParty Partner ShipToParty
ShipToPartyName
BillToParty Partner BillToParty
BillToPartyName
PayerParty Partner PayerParty
PayerPartyName
ResponsibleEmployee Partner ResponsibleEmployee
ResponsibleEmployeeName
CustomerClassification
_CustomerClassification
SalesOrderDate SalesDocumentDate
PurchaseOrderByCustomer PurchaseOrderByCustomer
CreditControlArea CreditControlArea
CreditSegment _CreditControlArea2Segment CreditSegment
_CreditControlArea2Segment _CreditControlArea2Segment
NextCreditCheckDate NextCreditCheckDate
TotalNetAmount TotalNetAmount
TransactionCurrency TransactionCurrency
StatisticsCurrency StatisticsCurrency
CompleteDeliveryIsDefined CompleteDeliveryIsDefined
DeliveryBlockReason DeliveryBlockReason
_DeliveryBlockReason _DeliveryBlockReason
RequestedDeliveryDate RequestedDeliveryDate
ShippingCondition ShippingCondition
_ShippingCondition _ShippingCondition
IncotermsClassification IncotermsClassification
_IncotermsClassification _IncotermsClassification
IncotermsTransferLocation IncotermsTransferLocation
IncotermsLocation1 IncotermsLocation1
IncotermsLocation2 IncotermsLocation2
IncotermsVersion IncotermsVersion
_IncotermsVersion _IncotermsVersion
ShippingType ShippingType
_ShippingType _ShippingType
HeaderBillingBlockReason HeaderBillingBlockReason
_HeaderBillingBlockReason _HeaderBillingBlockReason
BillingDocumentDate BillingDocumentDate
CustomerPaymentTerms CustomerPaymentTerms
_CustomerPaymentTerms _CustomerPaymentTerms
OverallSDDocumentRejectionSts OverallSDDocumentRejectionSts
OverallDelivConfStatus OverallDelivConfStatus
OverallDeliveryStatus OverallDeliveryStatus
HdrGeneralIncompletionStatus HdrGeneralIncompletionStatus
_HdrGeneralIncompletionStatus _HdrGeneralIncompletionStatus
HeaderDelivIncompletionStatus HeaderDelivIncompletionStatus
_HeaderDelivIncompletionStatus _HeaderDelivIncompletionStatus
OverallPricingIncompletionSts OverallPricingIncompletionSts
_OverallPricingIncompletionSts _OverallPricingIncompletionSts
HeaderBillgIncompletionStatus HeaderBillgIncompletionStatus
_HeaderBillgIncompletionStatus _HeaderBillgIncompletionStatus
OvrlItmGeneralIncompletionSts OvrlItmGeneralIncompletionSts
_OvrlItmGeneralIncompletionSts _OvrlItmGeneralIncompletionSts
OvrlItmBillingIncompletionSts OvrlItmBillingIncompletionSts
_OvrlItmBillingIncompletionSts _OvrlItmBillingIncompletionSts
OvrlItmDelivIncompletionSts OvrlItmDelivIncompletionSts
_OvrlItmDelivIncompletionSts _OvrlItmDelivIncompletionSts
FinDocCreditCheckStatus FinDocCreditCheckStatus
_FinDocCreditCheckStatus _FinDocCreditCheckStatus
ExprtInsurCreditCheckStatus ExprtInsurCreditCheckStatus
_ExprtInsurCreditCheckStatus _ExprtInsurCreditCheckStatus
PaytAuthsnCreditCheckSts PaytAuthsnCreditCheckSts
_PaytAuthsnCreditCheckSts _PaytAuthsnCreditCheckSts
CentralCreditCheckStatus
_CentralCreditCheckStatus _CentralCreditCheckStatus
ControllingObject I_SalesDocument ControllingObject
_ConObjStatusDelBlocked _ConObjStatusDelBlocked
_ConObjStatusBillgBlocked _ConObjStatusBillgBlocked
CustomerProjectUUID _EngagementProjectItem EngagementProjectUUID
CustomerProject _EngagementProjectItem EngagementProject
CustomerProjectName
_TransactionCurrency _TransactionCurrency
_StatisticsCurrency _StatisticsCurrency
@ClientHandling.algorithm: #SESSION_VARIABLE 
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #S
@EndUserText.label: 'SOFM Sales Order'
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #CHECK
@AccessControl.privilegedAssociations: [ '_CreatedByUser' ]
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'ISOFSLSORD'

define view I_SlsOrdFlfmtSalesOrder
as
select from I_SalesDocument                     as SalesDocument

left outer to one join I_SDDocStandardPartner   as Partner
        on SalesDocument.SalesDocument = SDDocument

//left outer to one join P_SDDocCtrlgObjStsBlkdInfo as ConObjStatusDelBlocked  

//on SalesDocument.ControllingObject                     = ConObjStatusDelBlocked.ControllingObject and

//   ConObjStatusDelBlocked.BusinessTransactionType      = 'SDDN' and

//   ConObjStatusDelBlocked.BusTransacExecutionAllowance = '3' and

//   ConObjStatusDelBlocked.ControllingObjectCategory    = 'VBK' and

//   not ConObjStatusDelBlocked.StatusIsInactive         = 'X'

//

//left outer to one join P_SDDocCtrlgObjStsBlkdInfo as ConObjStatusInvBlocked  

//on SalesDocument.ControllingObject                     = ConObjStatusInvBlocked.ControllingObject and

//   ConObjStatusInvBlocked.BusinessTransactionType      = 'SDIN' and

//   ConObjStatusInvBlocked.BusTransacExecutionAllowance = '3' and

//   ConObjStatusInvBlocked.ControllingObjectCategory    = 'VBK' and

//   not ConObjStatusInvBlocked.StatusIsInactive         = 'X'


association[0..1] to I_SDDocCtrlgObjStsBlkdInfo as _ConObjStatusDelBlocked
on $projection.ControllingObject                     = _ConObjStatusDelBlocked.ControllingObject and
   _ConObjStatusDelBlocked.BusinessTransactionType      = 'SDDN' and
   _ConObjStatusDelBlocked.BusTransacExecutionAllowance = '3' and
   _ConObjStatusDelBlocked.ControllingObjectCategory    = 'VBK' and
   not _ConObjStatusDelBlocked.StatusIsInactive         = 'X'

association[0..1] to I_SDDocCtrlgObjStsBlkdInfo as _ConObjStatusBillgBlocked  
on $projection.ControllingObject                     = _ConObjStatusBillgBlocked.ControllingObject and
   _ConObjStatusBillgBlocked.BusinessTransactionType      = 'SDIN' and
   _ConObjStatusBillgBlocked.BusTransacExecutionAllowance = '3' and
   _ConObjStatusBillgBlocked.ControllingObjectCategory    = 'VBK' and
   not _ConObjStatusBillgBlocked.StatusIsInactive         = 'X'

association[0..1] to I_CreditControlArea2Segment as _CreditControlArea2Segment on $projection.CreditControlArea = _CreditControlArea2Segment.CreditControlArea 

{
   //Key

   key cast(SalesDocument as vdm_sales_order) as SalesOrder,
   
   //Category

   @ObjectModel.foreignKey.association: '_SalesOrderType' 
   SalesDocumentType as SalesOrderType,
   _SalesDocumentType as _SalesOrderType,
   SDDocumentCategory, 
      
   //Admin

   CreatedByUser,
   _CreatedByUser,
   @Semantics.systemDate.createdAt: true  
   CreationDate,
   CreationTime,
   @Semantics.systemDate.lastChangedAt: true
   LastChangeDate,
      
   //Organization

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

   @ObjectModel.text.element:  [ 'SoldToPartyName' ]   
   SalesDocument.SoldToParty,
   @Semantics.text: true  
   cast (SalesDocument._SoldToParty.CustomerName as vdm_sold_to_name) as SoldToPartyName, 
   @ObjectModel.text.element:  [ 'ShipToPartyName' ]
   Partner.ShipToParty,
   @Semantics.text: true  
   cast (Partner._ShipToParty.CustomerName as ship_to_name) as ShipToPartyName, 
   @ObjectModel.text.element:  [ 'BillToPartyName' ]
   Partner.BillToParty,
   @Semantics.text: true  
   cast (Partner._BillToParty.CustomerName as bill_to_name) as BillToPartyName,
   @ObjectModel.text.element:  [ 'PayerPartyName' ]
   Partner.PayerParty,
   @Semantics.text: true  
   cast (Partner._PayerParty.CustomerName as payer_name) as PayerPartyName,
   @ObjectModel.text.element:  [ 'ResponsibleEmployeeName' ]
   Partner.ResponsibleEmployee,
   @Semantics.text: true   
   Partner._ResponsibleEmployee.PersonFullName as ResponsibleEmployeeName,
   @ObjectModel.foreignKey.association: '_CustomerClassification'
   SalesDocument._SoldToParty.CustomerClassification,
   SalesDocument._SoldToParty._CustomerClassification,
           
   //Sales

   SalesDocumentDate as SalesOrderDate,
   PurchaseOrderByCustomer,
   @ObjectModel.foreignKey.association: '_CreditControlArea2Segment'
   CreditControlArea,
   _CreditControlArea2Segment.CreditSegment,
   _CreditControlArea2Segment,
   NextCreditCheckDate,
   
   //Pricing

   @DefaultAggregation: #SUM
   @Semantics.amount.currencyCode: 'TransactionCurrency'
   TotalNetAmount,
   @Semantics.currencyCode: true
   @ObjectModel.foreignKey.association: '_TransactionCurrency'
   TransactionCurrency,
   @Semantics.currencyCode: true
   @ObjectModel.foreignKey.association: '_StatisticsCurrency'
   StatisticsCurrency,    
   
  //Shipping

   CompleteDeliveryIsDefined, 
   @ObjectModel.foreignKey.association: '_DeliveryBlockReason' 
   DeliveryBlockReason,
   _DeliveryBlockReason,
   RequestedDeliveryDate,
   @ObjectModel.foreignKey.association: '_ShippingCondition' 
   ShippingCondition,
   _ShippingCondition,
   @ObjectModel.foreignKey.association: '_IncotermsClassification'
   IncotermsClassification,
   _IncotermsClassification,   
   IncotermsTransferLocation,    
   IncotermsLocation1,
   IncotermsLocation2,
   @ObjectModel.foreignKey.association: '_IncotermsVersion'
   IncotermsVersion,
   _IncotermsVersion,
   @ObjectModel.foreignKey.association: '_ShippingType' 
   ShippingType,
   _ShippingType,
   @ObjectModel.foreignKey.association: '_HeaderBillingBlockReason' 
   HeaderBillingBlockReason,
   _HeaderBillingBlockReason,
   
   //Billing   

   BillingDocumentDate,
   
   //Payment 

   @ObjectModel.foreignKey.association: '_CustomerPaymentTerms' 
   CustomerPaymentTerms, 
   _CustomerPaymentTerms,
  
   //Status

   OverallSDDocumentRejectionSts,
   OverallDelivConfStatus,
   OverallDeliveryStatus,
   @ObjectModel.foreignKey.association: '_HdrGeneralIncompletionStatus' 
   HdrGeneralIncompletionStatus,
   _HdrGeneralIncompletionStatus,
   @ObjectModel.foreignKey.association: '_HeaderDelivIncompletionStatus' 
   HeaderDelivIncompletionStatus,
   _HeaderDelivIncompletionStatus,
   @ObjectModel.foreignKey.association: '_OverallPricingIncompletionSts' 
   OverallPricingIncompletionSts,
   _OverallPricingIncompletionSts,
   @ObjectModel.foreignKey.association: '_HeaderBillgIncompletionStatus' 
   HeaderBillgIncompletionStatus,
   _HeaderBillgIncompletionStatus,  
   @ObjectModel.foreignKey.association: '_OvrlItmGeneralIncompletionSts'    
   OvrlItmGeneralIncompletionSts,
   _OvrlItmGeneralIncompletionSts,   
   @ObjectModel.foreignKey.association: '_OvrlItmBillingIncompletionSts'       
   OvrlItmBillingIncompletionSts,
   _OvrlItmBillingIncompletionSts,
   @ObjectModel.foreignKey.association: '_OvrlItmDelivIncompletionSts'          
   OvrlItmDelivIncompletionSts,  
   _OvrlItmDelivIncompletionSts,
   @ObjectModel.foreignKey.association: '_FinDocCreditCheckStatus'
   FinDocCreditCheckStatus,
   _FinDocCreditCheckStatus,
   @ObjectModel.foreignKey.association: '_ExprtInsurCreditCheckStatus'
   ExprtInsurCreditCheckStatus,
   _ExprtInsurCreditCheckStatus,
   @ObjectModel.foreignKey.association: '_PaytAuthsnCreditCheckSts'
   PaytAuthsnCreditCheckSts,
   _PaytAuthsnCreditCheckSts,
   @ObjectModel.foreignKey.association: '_CentralCreditCheckStatus'
   cast(CentralCreditCheckStatus as central_credit_check_status preserving type) as  CentralCreditCheckStatus,
   _CentralCreditCheckStatus,   
      
//   cast( ConObjStatusDelBlocked.CtrlgObjStatusIsDeliveryBlkd as user_status_deliv_block ) as CtrlgObjStatusIsDeliveryBlkd,

//   cast( ConObjStatusInvBlocked.CtrlgObjStatusIsBillingBlkd  as user_status_inv_block )   as CtrlgObjStatusIsBillingBlkd,  

 
    SalesDocument.ControllingObject,
   _ConObjStatusDelBlocked,
   _ConObjStatusBillgBlocked,
 
   //Project

   _EngagementProjectItem.EngagementProjectUUID as CustomerProjectUUID,
   @ObjectModel.text.element:  [ 'CustomerProjectName' ] 
   _EngagementProjectItem.EngagementProject as CustomerProject,
   @Semantics.text: true 
   _EngagementProjectItem._EngagementProject.EngagementProjectName as CustomerProjectName,
      
   _TransactionCurrency,
   _StatisticsCurrency
    
   }
     
where ( SalesDocument.SDDocumentCategory = 'C' or   --> Order
        SalesDocument.SDDocumentCategory = 'I' or   --> Order w/o charge
        SalesDocument.SDDocumentCategory = 'L' )    --> Debit Memo Request
        
        
                                                                                                                                            
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CREDITCONTROLAREA2SEGMENT",
"I_CUSTOMER",
"I_ENGAGEMENTPROJECT",
"I_ENGAGEMENTPROJECTITEM",
"I_PERSONWORKAGREEMENT_1",
"I_SALESDOCUMENT",
"I_SDDOCSTANDARDPARTNER"
],
"ASSOCIATED":
[
"I_BILLINGBLOCKREASON",
"I_CENTRALCREDITCHECKSTATUS",
"I_CREDITCONTROLAREA2SEGMENT",
"I_CURRENCY",
"I_CUSTOMERCLASSIFICATION",
"I_CUSTOMERPAYMENTTERMS",
"I_DELIVERYBLOCKREASON",
"I_DISTRIBUTIONCHANNEL",
"I_DIVISION",
"I_EXPRTINSURCREDITCHECKSTATUS",
"I_FINDOCCREDITCHECKSTATUS",
"I_HDRBILLGINCOMPLETIONSTATUS",
"I_HDRDELIVINCOMPLETIONSTATUS",
"I_HDRGENINCOMPLETIONSTATUS",
"I_INCOTERMSCLASSIFICATION",
"I_INCOTERMSVERSION",
"I_OVERALLPRCINCOMPLETIONSTS",
"I_OVRLITMBILLGINCOMPLTNSTS",
"I_OVRLITMDELIVINCOMPLETIONSTS",
"I_OVRLITMGENINCOMPLETIONSTS",
"I_PAYTAUTHSNCREDITCHECKSTS",
"I_SALESDOCUMENTTYPE",
"I_SALESGROUP",
"I_SALESOFFICE",
"I_SALESORGANIZATION",
"I_SDDOCCTRLGOBJSTSBLKDINFO",
"I_SHIPPINGCONDITION",
"I_SHIPPINGTYPE",
"I_USER"
],
"BASE":
[
"I_CUSTOMER",
"I_SALESDOCUMENT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/