@AbapCatalog.sqlViewName : 'WLFCDSWBRPNETWRP'
@AbapCatalog.preserveKey:true
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label : 'provides NETWR based on POST_PARTY'
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #X
@ObjectModel.usageType.sizeCategory: #XXL
@ClientHandling.type: #INHERITED
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking : #('TRANSACTIONAL_DATA')
/*+[hideWarning] { "IDS" : [ "KEY_CHECK" ] } */
define view WLF_CDS_WBRP_NETWR_POST_PARTY
as select from db_wbrk_wbrp_new
left outer join twcbcontrtype as twcbcontrtype_h
on db_wbrk_wbrp_new.contr_type = twcbcontrtype_h.contract_type
left outer join twcbcontrtype as twcbcontrtype_i
on db_wbrk_wbrp_new.contr_type_i = twcbcontrtype_i.contract_type
{
key wbeln as wbeln,
key posnr as posnr,
@Semantics.currencyCode:true
waerl as waerl,
lftyp as lftyp,
knumv as knumv,
knumvd as knumvd,
cast ( case
when post_party = '2'
or ( post_party = '3' and kalsm = ' ' )
then 'D'
when post_party = ' '
and ( twcbcontrtype_i.rebate_type = '2'
or twcbcontrtype_h.rebate_type = '2' )
then 'D'
else 'K'
end as koart preserving type ) as koart,
@Semantics.amount.currencyCode : 'WAERL'
case
when post_party = '2'
or ( post_party = '3' and kalsm = ' ' )
then netwrd
when post_party = ' '
and ( twcbcontrtype_i.rebate_type = '2'
or twcbcontrtype_h.rebate_type = '2' )
then netwrd
else netwr
end as netwr,
@Semantics.amount.currencyCode : 'WAERL'
case
when post_party = '2'
or ( post_party = '3' and kalsm = ' ' )
then mwsbpd
when post_party = ' '
and ( twcbcontrtype_i.rebate_type = '2'
or twcbcontrtype_h.rebate_type = '2' )
then mwsbpd
else mwsbp
end as mwsbp,
@Semantics.amount.currencyCode : 'WAERL'
case
when post_party = '2'
or ( post_party = '3' and kalsm = ' ' )
then brtwrd
when post_party = ' '
and ( twcbcontrtype_i.rebate_type = '2'
or twcbcontrtype_h.rebate_type = '2' )
then brtwrd
else brtwr
end as brtwr,
@Semantics.amount.currencyCode : 'WAERL'
case
when post_party = '2'
or ( post_party = '3' and kalsm = ' ' )
then bonbad
when post_party = ' '
and ( twcbcontrtype_i.rebate_type = '2'
or twcbcontrtype_h.rebate_type = '2' )
then bonbad
else bonba
end as bonba,
@Semantics.amount.currencyCode : 'WAERL'
case
when post_party = '2'
or ( post_party = '3' and kalsm = ' ' )
then kzwi1d
when post_party = ' '
and ( twcbcontrtype_i.rebate_type = '2'
or twcbcontrtype_h.rebate_type = '2' )
then kzwi1d
else kzwi1
end as kzwi1,
@Semantics.amount.currencyCode : 'WAERL'
case
when post_party = '2'
or ( post_party = '3' and kalsm = ' ' )
then kzwi2d
when post_party = ' '
and ( twcbcontrtype_i.rebate_type = '2'
or twcbcontrtype_h.rebate_type = '2' )
then kzwi2d
else kzwi2
end as kzwi2,
@Semantics.amount.currencyCode : 'WAERL'
case
when post_party = '2'
or ( post_party = '3' and kalsm = ' ' )
then kzwi3d
when post_party = ' '
and ( twcbcontrtype_i.rebate_type = '2'
or twcbcontrtype_h.rebate_type = '2' )
then kzwi3d
else kzwi3
end as kzwi3,
@Semantics.amount.currencyCode : 'WAERL'
case
when post_party = '2'
or ( post_party = '3' and kalsm = ' ' )
then kzwi4d
when post_party = ' '
and ( twcbcontrtype_i.rebate_type = '2'
or twcbcontrtype_h.rebate_type = '2' )
then kzwi4d
else kzwi4
end as kzwi4,
@Semantics.amount.currencyCode : 'WAERL'
case
when post_party = '2'
or ( post_party = '3' and kalsm = ' ' )
then kzwi5d
when post_party = ' '
and ( twcbcontrtype_i.rebate_type = '2'
or twcbcontrtype_h.rebate_type = '2' )
then kzwi5d
else kzwi5
end as kzwi5,
@Semantics.amount.currencyCode : 'WAERL'
case
when post_party = '2'
or ( post_party = '3' and kalsm = ' ' )
then kzwi6d
when post_party = ' '
and ( twcbcontrtype_i.rebate_type = '2'
or twcbcontrtype_h.rebate_type = '2' )
then kzwi6d
else kzwi6
end as kzwi6
}
/*+[internal] {
"BASEINFO":
{
"FROM ":
[
"TWCBCONTRTYPE",
"DB_WBRK_WBRP_NEW"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Depth:
1
2
3
4
5
All
Reload
WLF_CDS_WBRP_NETWR_POST_PARTY view