@AbapCatalog.sqlViewName: 'PWLFSMTADDINF1'
@AbapCatalog.preserveKey: true@VDM.viewType: #BASIC@VDM.private: true@ObjectModel.usageType.serviceQuality: #B@ObjectModel.usageType.dataClass: #TRANSACTIONAL@ObjectModel.usageType.sizeCategory: #XXL@ClientHandling.type: #INHERITED@ClientHandling.algorithm: #SESSION_VARIABLE@AccessControl.authorizationCheck: #NOT_REQUIRED@AbapCatalog.compiler.compareFilter: truedefineview P_SettlDocAddInfo1
asselectfrom wbrk
{
key wbrk.wbeln as wbeln,
wbrk.wdtyp as wdtyp,
wbrk.bukrs as bukrs,
case wbrk.bukrs_deb
when ''
then wbrk.bukrs
else wbrk.bukrs_deb
endas bukrs_deb,
casewhen ( wbrk.wdtyp = 'G' or wbrk.wdtyp = 'H' )
thencase wbrk.kalsmd
when ''
then wbrk.kalsm
else wbrk.kalsmd
end//wdtyp <> 'G' and wdtyp <> 'H':
else wbrk.kalsmd
endas kalsm_deb,
casewhen ( wbrk.wdtyp = 'G' or wbrk.wdtyp = 'H' )
thencast( ' ' as kalsm_d )
else wbrk.kalsm
endas kalsm,
case wbrk.contract_type
when '1'
thencast( wbrk.contract as wcb_coco_num )
when '2'
thencast( ' ' as wcb_coco_num )
when '3'
thencast( ' ' as wcb_coco_num )
when '4'
thencast( ' ' as wcb_coco_num )
elsecast( ' ' as wcb_coco_num )
endas related_coco_num,
case wbrk.contract_type
when '1'
thencast( ' ' as tkonn )
when '2'
thencast( wbrk.contract as tkonn )
when '3'
thencast( ' ' as tkonn )
when '4'
thencast( ' ' as tkonn )
elsecast( ' ' as tkonn )
endas related_tkonn,
case wbrk.contract_type
when '1'
thencast( ' ' as ebeln )
when '2'
thencast( ' ' as ebeln )
when '3'
thencast( wbrk.contract as ebeln )
when '4'
thencast( ' ' as ebeln )
elsecast( ' ' as ebeln )
endas related_ebeln,
case wbrk.contract_type
when '1'
thencast( ' ' as vbeln_vf )
when '2'
thencast( ' ' as vbeln_vf )
when '3'
thencast( ' ' as vbeln_vf )
when '4'
thencast( wbrk.contract as vbeln_vf )
elsecast( ' ' as vbeln_vf )
endas related_vbeln,
case wbrk.partner_exp_type
when '1'
thencast( wbrk.partner_exp as lifnr )
when '2'
thencast( ' ' as lifnr )
when ' '
thencase wbrk.lifre
when ' '
thencast( ' ' as lifnr )
elsecast( wbrk.partner_exp as lifnr )
endelsecast( ' ' as lifnr )
endas trdg_expn_supplier,
case wbrk.partner_exp_type
when '1'
thencast( ' ' as kunnr )
when '2'
thencast( wbrk.partner_exp as kunnr )
when ' '
thencase wbrk.kunrg
when ' '
thencast( ' ' as kunnr )
elsecast( wbrk.partner_exp as kunnr )
endelsecast( ' ' as kunnr )
endas trdg_expn_customer,
casewhen wbrk.landtx_bukrs_deb = ''
thencasewhen wbrk.bukrs_deb = ''
thencast( wbrk.landtx_bukrs as wlf_landtx_bukrs_deb preserving type )
when wbrk.bukrs_deb = wbrk.bukrs
thencast( wbrk.landtx_bukrs as wlf_landtx_bukrs_deb preserving type )
else wbrk.landtx_bukrs_deb
endelse wbrk.landtx_bukrs_deb
endas landtx_bukrs_deb
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"WBRK"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/