@AbapCatalog.sqlViewName : 'CMMPRITEMTYPES'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label : 'Purchase Requisition Item Types'
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #L
@Analytics.dataCategory: #CUBE
@Metadata.allowExtensions:true
@VDM.viewType: #CONSUMPTION
@AccessControl.personalData.blocking: #NOT_REQUIRED
define view C_PurRequisitionItemTypes
with parameters
@Consumption.valueHelpDefinition: [{
entity : {
name:'I_Currency',
element:'Currency'
}
}]
P_DisplayCurrency : displaycurrency,
@Consumption.valueHelpDefinition: [{
entity : {
name:'C_GregorianCalDateFuncVH',
element:'DateFunction'
}
}]
P_DateFunction : datefunctionid,
@Consumption.derivation: { lookupEntity: 'C_SglGregorianCalDateFunction',
resultElement: 'DateFunctionStartDate', binding: [ {
targetParameter: 'P_DateFunction', type: #PARAMETER, value : 'P_DateFunction' } ,
{ targetParameter : 'P_Language' , type : #SYSTEM_FIELD, value : '#SYSTEM_LANGUAGE' } ]
}
@Consumption.hidden: true
P_StartDate: badat,
@Consumption.derivation: { lookupEntity: 'C_SglGregorianCalDateFunction',
resultElement: 'DateFunctionEndDate', binding: [ {
targetParameter: 'P_DateFunction', type: #PARAMETER, value : 'P_DateFunction' } ,
{ targetParameter : 'P_Language' , type : #SYSTEM_FIELD, value : '#SYSTEM_LANGUAGE' } ]
}
@Consumption.hidden: true
P_EndDate: badat
as select from I_Purchaserequisitionitem as RequisitionItem
{
key RequisitionItem.PurchaseRequisition,
key RequisitionItem.PurchaseRequisitionItem,
cast (RequisitionItem.FixedSupplier as flief ) as FixedSupplier,
PurchaseRequisitionItemText,
/*Added for DCL*/
PurchaseRequisitionType,
PurchasingGroup,
PurchasingOrganization,
Plant,
@Semantics.currencyCode:true
cast ( :P_DisplayCurrency as displaycurrency ) as DisplayCurrency,
@Semantics.amount.currencyCode : 'DisplayCurrency'
@DefaultAggregation: #SUM
case
when PurReqnItemCurrency is not null and PurReqnItemCurrency != '' and PurReqCreationDate != '00000000'
and PurReqCreationDate is not null and PurReqnPriceQuantity > 0 and PurchaseRequisitionPrice > 0
then cast (DIVISION(cast (currency_conversion(
amount => PurchaseRequisitionPrice ,
source_currency => PurReqnItemCurrency,
target_currency => :P_DisplayCurrency,
exchange_rate_date => PurReqCreationDate,
exchange_rate_type => 'M'
) as mm_pur_requisition_price ),
PurReqnPriceQuantity,5) as mm_pur_requisition_price )
else cast ( 0 as mm_pur_requisition_price)
end as PurchaseRequisitionPrice ,
cast (case
when PurReqnOrigin = 'S' and PurReqnSSPCatalog = '' and Material = '' //Free-text Item
then '02'
when PurReqnOrigin = 'S' and Material != '' and PurReqnSSPCatalog =''//Material Item
then '03'
when PurReqnSSPCatalog != '' //Catalog Item
then '01'
when PurReqnOrigin = 'R' and Material != '' //Material Item (GUI)
then '05'
when PurReqnOrigin = 'R' and Material = '' //Free-text Item (GUI)
then '04'
end as mm_a_pur_reqn_item_classfctn ) as PurReqnItemClassification
}
where
//ReleaseIsNotCompleted = '' and
( PurReqnOrigin = 'R'
or PurReqnOrigin = 'S' )
and CreationDate <= $parameters .P_EndDate
and CreationDate >= $parameters .P_StartDate
and not (
Material = ''
and IsOutline = 'X'
)
/*+[internal] {
"BASEINFO":
{
"FROM ":
[
"I_PURCHASEREQUISITIONITEM"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Depth:
1
2
3
4
5
All
Reload
C_PurRequisitionItemTypes view