
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
<edmx:Reference
Uri="../../catalogservice;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_COMMON',Version='0001',SAP__Origin='xxx')/$value">
<edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="Common"/>
</edmx:Reference>
<edmx:Reference
Uri="../../catalogservice;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_UI',Version='0001',SAP__Origin='xxx')/$value">
<edmx:Include Namespace="com.sap.vocabularies.UI.v1" Alias="UI"/>
</edmx:Reference>
<edmx:Reference
Uri="../../catalogservice;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_COMMUNICATION',Version='0001',SAP__Origin='xxx')/$value">
<edmx:Include Namespace="com.sap.vocabularies.Communication.v1" Alias="Communication"/>
</edmx:Reference>
<edmx:Reference Uri="../../../sap/c_purchaseorder_fs_srv/$metadata">
<edmx:Include Namespace="C_PURCHASEORDER_FS_SRV" Alias="SAP"/>
</edmx:Reference>
<edmx:Reference Uri="http://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/cs02/vocabularies/Org.OData.Aggregation.V1.xml">
<edmx:Include Alias="Aggregation" Namespace="Org.OData.Aggregation.V1"/>
</edmx:Reference>
<edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/vocabularies/Org.OData.Capabilities.V1.xml">
<edmx:Include Alias="Capabilities" Namespace="Org.OData.Capabilities.V1"/>
</edmx:Reference>
<edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/vocabularies/Org.OData.Core.V1.xml">
<edmx:Include Alias="Core" Namespace="Org.OData.Core.V1"/>
</edmx:Reference>
<edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/vocabularies/Org.OData.Measures.V1.xml">
<edmx:Include Alias="CQP" Namespace="Org.OData.Measures.V1"/>
</edmx:Reference>
<edmx:DataServices>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="c_purchaseorder_fs_anno_mdl.v1">
<Annotations Target="C_PURCHASEORDER_FS_SRV.C_PurOrdItemEnhType/Material">
<Annotation Term="Common.SemanticObject" String="Material"/>
</Annotations>
<Annotations Target="C_PURCHASEORDER_FS_SRV.C_PurOrdItemEnhType">
<Annotation Term="UI.LineItem">
<Collection/>
</Annotation>
<Annotation Term="UI.LineItem" Qualifier="PurchItem">
<Collection>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="PurchaseOrderItemText"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="MaterialGroup"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="Material"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="FirstDeliveryDate"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="OrderQuantity"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="NetPriceAmount"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="PurchaseOrderNetPriceQuantity"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="NetAmount"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
</Collection>
</Annotation>
</Annotations>
<Annotations Target="C_PURCHASEORDER_FS_SRV.C_PurOrdRefPurConItmType/PurchaseContract">
<Annotation Term="Common.SemanticObject" String="PurchaseContract"/>
</Annotations>
<Annotations Target="C_PURCHASEORDER_FS_SRV.C_PurOrdRefPurConItmType/PurchaseContractItem">
<Annotation Term="Common.SemanticObject" String="PurchaseContractItem"/>
</Annotations>
<Annotations Target="C_PURCHASEORDER_FS_SRV.C_PurOrdRefPurConItmType">
<Annotation Term="UI.FieldGroup" Qualifier="AdditionalData">
<Record>
<PropertyValue Property="Data">
<Collection>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="Plant"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="StorageLocation"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
</Collection>
</PropertyValue>
<PropertyValue Property="Label" String="Additional Data"/>
</Record>
</Annotation>
<Annotation Term="UI.Identification">
<Collection>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="ReleasedQuantity"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="TargetQuantity"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
</Collection>
</Annotation>
<Annotation Term="UI.LineItem">
<Collection/>
</Annotation>
<Annotation Term="UI.LineItem" Qualifier="ContrItem">
<Collection>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="PurchaseContractItem"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="PurchaseContractType"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="ReleasedQuantity"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="TargetQuantity"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
</Collection>
</Annotation>
</Annotations>
<Annotations Target="C_PURCHASEORDER_FS_SRV.C_PurReqItemByPurOrderType/PurchaseRequisitionItemText">
<Annotation Term="Common.SemanticObject" String="PurchaseRequisitionItem"/>
</Annotations>
<Annotations Target="C_PURCHASEORDER_FS_SRV.C_PurReqItemByPurOrderType">
<Annotation Term="UI.LineItem">
<Collection/>
</Annotation>
<Annotation Term="UI.LineItem" Qualifier="PurchReqItemByPurOrder">
<Collection>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="PurchaseRequisitionItemText"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="MaterialGroup"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="Material"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="DeliveryDate"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="RequestedQuantity"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="PurchaseRequisitionPrice"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="PurReqnPriceQuantity"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="PurReqnItemTotalAmount"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
</Collection>
</Annotation>
</Annotations>
<Annotations Target="C_PURCHASEORDER_FS_SRV.C_PurchaseOrderFsType/Supplier">
<Annotation Term="Common.SemanticObject" String="Supplier"/>
</Annotations>
<Annotations Target="C_PURCHASEORDER_FS_SRV.C_PurchaseOrderFsType">
<Annotation Term="UI.DataPoint" Qualifier="DataPoint01">
<Record>
<PropertyValue Property="Value" Path="DataPoint01"/>
<PropertyValue Property="Title" String="Net Value"/>
</Record>
</Annotation>
<Annotation Term="UI.DataPoint" Qualifier="DataPoint02">
<Record>
<PropertyValue Property="Value" Path="DataPoint02"/>
<PropertyValue Property="Title" String="Status"/>
</Record>
</Annotation>
<Annotation Term="UI.DataPoint" Qualifier="PurchaseOrderNetAmount">
<Record>
<PropertyValue Property="Value" Path="PurchaseOrderNetAmount"/>
<PropertyValue Property="Title" String="Net Value"/>
</Record>
</Annotation>
<Annotation Term="UI.DataPoint" Qualifier="PurchasingDocumentStatusName">
<Record>
<PropertyValue Property="Value" Path="PurchasingDocumentStatusName"/>
<PropertyValue Property="Title" String="Status"/>
</Record>
</Annotation>
<Annotation Term="UI.FieldGroup" Qualifier="DelivAndPayment">
<Record>
<PropertyValue Property="Data">
<Collection>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="PaymentTermsDescription"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="IncotermsClassification"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="IncotermsTransferLocation"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
</Collection>
</PropertyValue>
<PropertyValue Property="Label" String="Delivery and Payment"/>
</Record>
</Annotation>
<Annotation Term="UI.FieldGroup" Qualifier="Recipient">
<Record>
<PropertyValue Property="Data">
<Collection>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="CompanyCode"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="PurchasingGroup"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="PurchasingOrganization"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Criticality" Path="CRITICALITY1"/>
<PropertyValue Property="Value" Path="APPROVER1NAME"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Criticality" Path="CRITICALITY2"/>
<PropertyValue Property="Value" Path="APPROVER2NAME"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Criticality" Path="CRITICALITY3"/>
<PropertyValue Property="Value" Path="APPROVER3NAME"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Criticality" Path="CRITICALITY4"/>
<PropertyValue Property="Value" Path="APPROVER4NAME"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
</Collection>
</PropertyValue>
<PropertyValue Property="Label" String="Recipient"/>
</Record>
</Annotation>
<Annotation Term="UI.HeaderInfo">
<Record>
<PropertyValue Property="TypeName" String="Purchase Order"/>
<PropertyValue Property="TypeNamePlural" String="Purchase Order"/>
<PropertyValue Property="TypeImageUrl" String="/sap/bc/ui5_ui5/sap/mm_purorders1/images/purchaseorder.png"/>
<PropertyValue Property="Title">
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="PurchaseOrderType_Text"/>
</Record>
</PropertyValue>
<PropertyValue Property="Description">
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="PurchaseOrder"/>
</Record>
</PropertyValue>
</Record>
</Annotation>
<Annotation Term="UI.Identification">
<Collection>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="Supplier"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="CreationDate"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Label" String="Net Value"/>
<PropertyValue Property="Value" Path="PurchaseOrderNetAmount"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
</Collection>
</Annotation>
<Annotation Term="UI.LineItem">
<Collection>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="PurchaseOrder"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="SupplierName"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="PurchasingDocumentStatusName"/>
</Record>
</Collection>
</Annotation>
</Annotations>
<Annotations Target="C_PURCHASEORDER_FS_SRV.C_SuplInvPurOrdRefType/SupplierInvoice">
<Annotation Term="Common.SemanticObject" String="SupplierInvoice"/>
</Annotations>
<Annotations Target="C_PURCHASEORDER_FS_SRV.C_SuplInvPurOrdRefType">
<Annotation Term="UI.LineItem">
<Collection/>
</Annotation>
<Annotation Term="UI.LineItem" Qualifier="SuplInvPurOrderRefT">
<Collection>
<Record Type="UI.DataField">
<PropertyValue Property="Label" String="Invoice Number"/>
<PropertyValue Property="Value" Path="SupplierInvoice"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="SupplierInvoiceIDByInvcgParty"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="DocumentDate"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="PostingDate"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Label" String="Status"/>
<PropertyValue Property="Value" Path="SupplierInvoiceStatusDesc"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="InvoiceGrossAmount"/>
<Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/>
</Record>
</Collection>
</Annotation>
</Annotations>
</Schema>
</edmx:DataServices>
</edmx:Edmx>
@EndUserText.label: 'Transpose rows into Columns'
define table function /CTSH/DDSL_TRANSPOSE
returns {
MANDT: syst_mandt;
Ebeln : ebeln;
Approver : /ctsh/approver1;
VALUE_NEW :/ctsh/approver1;
Username : char12;
}
implemented by method /CTSH/TRANSPOSE=>transpose;
CLASS /ctsh/transpose DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES if_amdp_marker_hdb.
CLASS-METHODS transpose FOR TABLE FUNCTION /CTSH/DDSL_TRANSPOSE.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS /ctsh/transpose IMPLEMENTATION.
method transpose by database function
for hdb
language sqlscript
options read-only
using /CTSH/DDLS_POREL.
return select mandt,
ebeln,
STRING_AGG(objid, ',') AS APPROVER,
from "/CTSH/DDLS_POREL"
group by MANDT ,ebeln ;
endmethod.
ENDCLASS.
@AbapCatalog.sqlViewName: '/CTSH/DDSL_APPR'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Final approvers Table'
define view /CTSH/ddsl_final as select from /CTSH/DDSL_TRANSPOSE
{
Ebeln,
Approver,
substring(Approver,1,6) as APPROVER1,
substring(Approver,8,6) as APPROVER2,
substring(Approver,15,6) as APPROVER3,
substring(Approver,22,6) as APPROVER4,
substring(Approver,29,6) as APPROVER5,
substring(Approver,36,6) as APPROVER6
}
@AbapCatalog.sqlViewName: '/CTSH/DDSL_ANAME'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Approvers Name'
define view /CTSH/ddsl_name as select distinct from /ctsh/cdsv_PoRel
left outer join /ctsh/cdsv_PoRel as aa1 on aa1.ebeln = /ctsh/cdsv_PoRel.ebeln
and aa1.frgco = '01'
left outer join /ctsh/cdsv_PoRel as bb1 on bb1.ebeln = /ctsh/cdsv_PoRel.ebeln
and bb1.frgco = '02'
left outer join /ctsh/cdsv_PoRel as cc1 on cc1.ebeln = /ctsh/cdsv_PoRel.ebeln
and cc1.frgco = '03'
left outer join /ctsh/cdsv_PoRel as dd1 on dd1.ebeln = /ctsh/cdsv_PoRel.ebeln
and dd1.frgco = '04'
left outer join /ctsh/cdsv_PoRel as ee1 on ee1.ebeln = /ctsh/cdsv_PoRel.ebeln
and ee1.frgco = '05'
{
/ctsh/cdsv_PoRel.ebeln,
aa1.value_new as App1Stat,
aa1.objid as Approver1,
case
when aa1.value_new <> ''
then CONCAT(aa1.Name , ' - Approved')
else CONCAT(aa1.ApproverName , ' - Pending')
end as APPROVER1Name,
case
when aa1.value_new <> ''
then cast(3 as abap.int4)
else cast(2 as abap.int4)
end as Criticality1,
bb1.value_new as App2Stat,
bb1.objid as Approver2,
case
when bb1.value_new <> ''
then CONCAT(bb1.Name, ' - Approved')
else CONCAT(bb1.ApproverName , ' - Pending')
end as APPROVER2Name,
case
when bb1.value_new <> ''
then cast(3 as abap.int4)
else cast(2 as abap.int4)
end as Criticality2,
cc1.value_new as App3Stat,
cc1.objid as Approver3,
case
when cc1.value_new <> ''
then CONCAT(cc1.Name, ' - Approved')
else CONCAT(cc1.ApproverName, ' - Pending')
end as APPROVER3Name,
case
when cc1.value_new <> ''
then cast(3 as abap.int4)
else cast(2 as abap.int4)
end as Criticality3,
dd1.value_new as App4Stat,
dd1.objid as Approver4,
case
when dd1.value_new <> ''
then CONCAT(dd1.Name, ' - Approved')
else CONCAT(dd1.ApproverName, ' - Pending')
end as APPROVER4Name,
case
when dd1.value_new <> ''
then cast(3 as abap.int4)
else cast(2 as abap.int4)
end as Criticality4,
ee1.value_new as App5Stat,
ee1.objid as Approver5,
case
when ee1.value_new <> ''
then CONCAT(ee1.Name , ' - Approved')
else CONCAT(ee1.ApproverName , ' - Pending')
end as APPROVER5Name,
case
when ee1.value_new <> ''
then cast(3 as abap.int4)
else cast(2 as abap.int4)
end as Criticality5
}
@AbapCatalog.sqlViewAppendName: '/CTSH/DDSL_EXT'
@EndUserText.label: 'Approve PO Extension'
extend view C_PurchaseOrderFs with /CTSH/CDSV_EXT
association [1..1] to /CTSH/ddsl_name as _Approver
on I_PurchaseOrderEnhanced.purchaseorder = _Approver.ebeln
{
@UI.fieldGroup: [{
qualifier: 'Recipient',
groupLabel: 'Recipient',
criticality: 'CRITICALITY1',
position: 40,
exclude: false,
importance: #HIGH,
value: 'APPROVER1NAME' }]
@EndUserText.label: 'Approver Level 1'
_Approver.APPROVER1Name,
_Approver.Criticality1,
@UI.fieldGroup: [{
qualifier: 'Recipient',
groupLabel: 'Recipient',
criticality: 'CRITICALITY2',
position: 50,
exclude: false,
importance: #HIGH,
value: 'APPROVER2NAME' }]
@EndUserText.label: 'Approver Level 2'
_Approver.APPROVER2Name,
_Approver.Criticality2,
@UI.fieldGroup: [{
qualifier: 'Recipient',
groupLabel: 'Recipient',
criticality: 'CRITICALITY3',
position: 60,
exclude: false,
importance: #HIGH,
value: 'APPROVER3NAME' }]
@EndUserText.label: 'Approver Level 3'
_Approver.APPROVER3Name,
_Approver.Criticality3,
@UI.fieldGroup: [{
qualifier: 'Recipient',
groupLabel: 'Recipient',
criticality: 'CRITICALITY4',
position: 70,
exclude: false,
importance: #HIGH,
value: 'APPROVER4NAME' }]
@EndUserText.label: 'Approver Level 4'
_Approver.APPROVER4Name ,
_Approver.Criticality4
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |