I_SOURCINGPROJECT

CDS View

Sourcing Project

I_SOURCINGPROJECT is a CDS View in S/4HANA. Sourcing Project. 8 CDS views read from this table.

CDS Views using this table (8)

ViewTypeJoinVDMDescription
C_ProdSrcgOvwPgSmartFilter view from CONSUMPTION Product Sourcing Overview Smart Filter
C_SourcingProjectDEX view from CONSUMPTION Sourcing Project
C_SourcingProjectDocVarbl view from CONSUMPTION Document Variables for Sourcing Project
C_SourcingProjectVH view from CONSUMPTION Sourcing Project
I_SrcgProjNameBySemanticKey view_entity from BASIC Sourcing Project
P_SourcingProjectAnalytics view from COMPOSITE Sourcing Project Base view for Analytics
P_SourcingProjectsByStatus view from COMPOSITE Sourcing Projects By Status
P_SrcgProjectTotalTargetAmount view from CONSUMPTION Sourcing Project Total Target Amount
@AccessControl.authorizationCheck: #MANDATORY

@ObjectModel:{ representativeKey: 'SourcingProjectUUID',
               semanticKey: ['SourcingProject'],
               usageType.dataClass: #TRANSACTIONAL,
               usageType.serviceQuality: #A,
               usageType.sizeCategory: #M }

@VDM.viewType: #BASIC

@EndUserText.label: 'Sourcing Project'

define view entity I_SourcingProject
  as select from R_SourcingProject

  association [0..*] to I_SourcingProjectItem        as _SourcingProjectItem        on  $projection.SourcingProjectUUID = _SourcingProjectItem.SourcingProjectUUID

  association [0..*] to I_SourcingProjectQuotation   as _SourcingProjectQuotation   on  $projection.SourcingProjectUUID = _SourcingProjectQuotation.SourcingProjectUUID

  association [0..*] to I_SrcgProjAllowedCurrency    as _SrcgProjAllowedCurrency    on  $projection.SourcingProjectUUID = _SrcgProjAllowedCurrency.SourcingProjectUUID

  association [0..*] to I_SourcingProjectMilestone   as _SourcingProjectMilestone   on  $projection.SourcingProjectUUID = _SourcingProjectMilestone.SourcingProjectUUID

  //foreign key associations

  association [0..1] to I_Currency                   as _DocumentCurrency           on  $projection.DocumentCurrency = _DocumentCurrency.Currency
  association [0..1] to I_CompanyCode                as _CompanyCode                on  $projection.CompanyCode = _CompanyCode.CompanyCode
  association [0..1] to I_PurchasingGroup            as _PurchasingGroup            on  $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
  association [0..1] to I_PurchasingOrganization     as _PurchasingOrganization     on  $projection.PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization
  association [1..1] to I_MaterialGroup              as _MaterialGroup              on  $projection.MaterialGroup = _MaterialGroup.MaterialGroup
  association [0..1] to I_SrcgProjLifecycleStatus    as _SrcgProjLifecycleStatus    on  $projection.SrcgProjLifecycleStatus = _SrcgProjLifecycleStatus.SrcgProjLifecycleStatus
  association [0..1] to I_SrcgProjApprovalStatus     as _SrcgProjApprovalStatus     on  $projection.SrcgProjApprovalStatus = _SrcgProjApprovalStatus.SrcgProjApprovalStatus
  association [0..1] to I_SourcingProjectType        as _SourcingProjectType        on  $projection.SourcingProjectType = _SourcingProjectType.SourcingProjectType
  association [0..1] to I_SourcingProjectPhase       as _SourcingProjectPhase       on  $projection.SourcingProjectPhase = _SourcingProjectPhase.SourcingProjectPhase

  association [0..1] to I_PaymentTerms               as _PaymentTerms               on  $projection.PaymentTerms = _PaymentTerms.PaymentTerms
  association [0..1] to I_IncotermsClassification    as _IncotermsClassification    on  $projection.IncotermsClassification = _IncotermsClassification.IncotermsClassification
  association [0..1] to I_IncotermsVersion           as _IncotermsVersion           on  $projection.IncotermsVersion = _IncotermsVersion.IncotermsVersion
  association [0..1] to I_SrcgProjPubdSuplrListBP    as _SrcgProjPubdSuplrListBP    on  $projection.SourcingProjectUUID = _SrcgProjPubdSuplrListBP.SourcingProjectUUID
  association [0..1] to I_PurchasingDocumentType     as _PurchasingDocumentType     on  $projection.SrcgProjFollowOnDocumentCat  = _PurchasingDocumentType.PurchasingDocumentCategory
                                                                                    and $projection.SrcgProjFollowOnDocumentType = _PurchasingDocumentType.PurchasingDocumentType
  association [0..1] to I_PurchasingDocumentCategory as _PurchasingDocumentCategory on  $projection.SrcgProjFollowOnDocumentCat = _PurchasingDocumentCategory.PurchasingDocumentCategory
  //tbd

  association [0..1] to I_UserContactCard            as _CreatedByUser              on  $projection.CreatedByUser = _CreatedByUser.ContactCardID
  association [0..1] to I_UserContactCard            as _ChangedByUser              on  $projection.LastChangedByUser = _ChangedByUser.ContactCardID
  association [0..1] to I_EmplContactCard            as _PurchaserResponsible       on  $projection.PurchaserRespWorkAgreement = _PurchaserResponsible.PersonWorkAgreement

  //Extension

  association [1..1] to E_SourcingProject            as _Extension                  on  $projection.SourcingProjectUUID = _Extension.SourcingProjectUUID


{

  key SourcingProjectUUID                                        as SourcingProjectUUID,
      cast( bintohex( SourcingProjectUUID ) as abap.char( 70 ) ) as TechnicalWrkflwObject,
      SourcingProject                                            as SourcingProject,
      SourcingProjectVersion                                     as SourcingProjectVersion,
      SourcingProjectType                                        as SourcingProjectType,
      SourcingProjectName                                        as SourcingProjectName,
      SrcgProjLifecycleStatus                                    as SrcgProjLifecycleStatus,
      SrcgProjApprovalStatus                                     as SrcgProjApprovalStatus,
      SourcingProjectPhase                                       as SourcingProjectPhase,
      SrcgProjRevisionSts                                        as SrcgProjRevisionSts,
      SrcgProjActvtnSts                                          as SrcgProjActvtnSts,
      SrcgProjPubgSts                                            as SrcgProjPubgSts,

      SourcingSupplierListUUID                                   as SourcingSupplierListUUID,

      cast(
           concat_with_space(SourcingProjectName,
                             concat('V',
                                    cast(SourcingProjectVersion as abap.char(10))
                                    ),
                             1
          ) as vdm_srcgprojversionconcat)                        as SrcgProjVersionConcatenated,

      CompanyCode                                                as CompanyCode,
      PurchasingGroup                                            as PurchasingGroup,
      PurchasingOrganization                                     as PurchasingOrganization,
      MaterialGroup                                              as MaterialGroup,

//      @Semantics.currencyCode: true

      DocumentCurrency                                           as DocumentCurrency,

      @Semantics.amount.currencyCode: 'DocumentCurrency'
      SrcgProjTotalTargetAmount                                  as SrcgProjTotalTargetAmount,

      PurchaserRespWorkAgreement                                 as PurchaserRespWorkAgreement,

      QtnLatestSubmissionDateTime                                as QtnLatestSubmissionDateTime,

      @Semantics.user.lastChangedBy: true
      LastChangedByUser                                          as LastChangedByUser,
      @Semantics.user.createdBy: true
      CreatedByUser                                              as CreatedByUser,

      @Semantics.systemDateTime.lastChangedAt: true
      LastChangeDateTime                                         as LastChangeDateTime,

      @Semantics.systemDateTime.createdAt: true
      CreationDateTime                                           as CreationDateTime,

      @ObjectModel.foreignKey.association: '_IncotermsClassification'
      IncotermsClassification                                    as IncotermsClassification,
      IncotermsTransferLocation                                  as IncotermsTransferLocation,

      @ObjectModel.foreignKey.association: '_IncotermsVersion'
      IncotermsVersion                                           as IncotermsVersion,
      IncotermsLocation1                                         as IncotermsLocation1,
      IncotermsLocation2                                         as IncotermsLocation2,

      @ObjectModel.foreignKey.association: '_PaymentTerms'
      PaymentTerms                                               as PaymentTerms,
      CashDiscount1Days                                          as CashDiscount1Days,
      CashDiscount2Days                                          as CashDiscount2Days,
      CashDiscount1Percent                                       as CashDiscount1Percent,
      CashDiscount2Percent                                       as CashDiscount2Percent,
      NetPaymentDays                                             as NetPaymentDays,

      /* @Semantics.amount.currencyCode: 'DocumentCurrency'
       @DefaultAggregation:#NONE
       targetamount                        as TargetAmount,*/

      SrcgProjPubgDteTme                                         as SrcgProjPubgDteTme,
      SrcgProjAttchsAreForbidden                                 as SrcgProjAttchsAreForbidden,
      SrcgProjNotesAreForbidden                                  as SrcgProjNotesAreForbidden,

      @ObjectModel: { foreignKey.association: '_PurchasingDocumentCategory' }
      SrcgProjFollowOnDocumentCat                                as SrcgProjFollowOnDocumentCat,
      @ObjectModel: { foreignKey.association: '_PurchasingDocumentType' }
      SrcgProjFollowOnDocumentType                               as SrcgProjFollowOnDocumentType,
      PurContrValidityStartDate                                  as PurContrValidityStartDate,
      PurContrValidityEndDate                                    as PurContrValidityEndDate,

      ExchangeRateType                                           as ExchangeRateType,

      ExternalSourcingProjectRef                                 as ExternalSourcingProjectRef,
      LogicalSystem                                              as LogicalSystem,

      /* Associations */
      _SourcingProjectItem,
      _SourcingProjectQuotation,
      _SrcgProjAllowedCurrency,
      _SourcingProjectMilestone,
      //foreign key associations

      _SrcgProjLifecycleStatus,
      _SrcgProjApprovalStatus,
      _CompanyCode,
      _PurchasingGroup,
      _PurchasingOrganization,
      _MaterialGroup,
      _DocumentCurrency,
      _SourcingProjectType,
      _PaymentTerms,
      _IncotermsClassification,
      _IncotermsVersion,
      _SourcingProjectPhase,
      _SrcgProjPubdSuplrListBP,
      _PurchasingDocumentCategory,
      _PurchasingDocumentType,
      //tbd

      _CreatedByUser,
      _ChangedByUser,
      _PurchaserResponsible

}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"R_SOURCINGPROJECT"
],
"ASSOCIATED":
[
"I_COMPANYCODE",
"I_CURRENCY",
"I_EMPLCONTACTCARD",
"I_INCOTERMSCLASSIFICATION",
"I_INCOTERMSVERSION",
"I_MATERIALGROUP",
"I_PAYMENTTERMS",
"I_PURCHASINGDOCUMENTCATEGORY",
"I_PURCHASINGDOCUMENTTYPE",
"I_PURCHASINGGROUP",
"I_PURCHASINGORGANIZATION",
"I_SOURCINGPROJECTITEM",
"I_SOURCINGPROJECTMILESTONE",
"I_SOURCINGPROJECTPHASE",
"I_SOURCINGPROJECTQUOTATION",
"I_SOURCINGPROJECTTYPE",
"I_SRCGPROJALLOWEDCURRENCY",
"I_SRCGPROJAPPROVALSTATUS",
"I_SRCGPROJLIFECYCLESTATUS",
"I_SRCGPROJPUBDSUPLRLISTBP",
"I_USERCONTACTCARD"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/