FGL_LIB_P_DOC_HEADER

DDL: FGL_LIB_P_DOC_HEADER SQL: FILIBPDOCH Type: view

Parked Items: Document Header

FGL_LIB_P_DOC_HEADER is a CDS View that provides data about "Parked Items: Document Header" in SAP S/4HANA. It reads from 3 data sources (bkpf, t001, FINS_T001A) and exposes 108 fields with key fields belnr, bukrs, gjahr.

Data Sources (3)

SourceAliasJoin Type
bkpf bkpf from
t001 t001 inner
FINS_T001A t001a left_outer

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName FILIBPDOCH view
EndUserText.label Parked Items: Document Header view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
AccessControl.personalData.blocking #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view

Fields (108)

KeyFieldSource TableSource FieldDescription
KEY belnr bkpf belnr
KEY bukrs bkpf bukrs
KEY gjahr bkpf gjahr
currkey_0d bkpf waers
currkey_10 bkpf hwaer
curtp FINS_T001A curtp
curtp2 FINS_T001A curtp2
adisc bkpf adisc
aedat bkpf aedat
arcid bkpf arcid
ausbk bkpf ausbk
awkey bkpf awkey
aworg_rev bkpf aworg_rev
awref_rev bkpf awref_rev
awsys bkpf awsys
awtyp bkpf awtyp
basw2 bkpf basw2
basw3 bkpf basw3
belnr_sender bkpf belnr_sender
bktxt bkpf bktxt
blart bkpf blart
bldat bkpf bldat
brnch bkpf brnch
bstat bkpf bstat
budat bkpf budat
bukrs_sender bkpf bukrs_sender
bvorg bkpf bvorg
cash_alloc bkpf cash_alloc
co_alebn bkpf co_alebn
co_refbt bkpf co_refbt
co_valdt bkpf co_valdt
co_vrgng bkpf co_vrgng
cpudt bkpf cpudt
cputm bkpf cputm
ctxkrs bkpf ctxkrs
curt2 bkpf curt2
curt3 bkpf curt3
dbblg bkpf dbblg
doccat bkpf doccat
dokid bkpf dokid
duefl bkpf duefl
fikrs bkpf fikrs
follow_on bkpf follow_on
frath bkpf frath
gjahr_sender bkpf gjahr_sender
glbtgrp bkpf glbtgrp
glvor bkpf glvor
grpid bkpf grpid
hwae2 bkpf hwae2
hwae3 bkpf hwae3
hwaer bkpf hwaer
iblar bkpf iblar
intsubid bkpf intsubid
kokrs_sender bkpf kokrs_sender
kur2x bkpf kur2x
kur3x bkpf kur3x
kurs2 bkpf kurs2
kurs3 bkpf kurs3
kursf bkpf kursf
kurst bkpf kurst
kursx bkpf kursx
kuty2 bkpf kuty2
kuty3 bkpf kuty3
kzkrs bkpf kzkrs
kzwrs bkpf kzwrs
ldgrp bkpf ldgrp
lotkz bkpf lotkz
monat bkpf monat
numpg bkpf numpg
ppdat bkpf ppdat
ppnam bkpf ppnam
pptcod bkpf pptcod
pptme bkpf pptme
propmano bkpf propmano
reindat bkpf reindat
resubmission bkpf resubmission
rldnr bkpf rldnr
stblg bkpf stblg
stgrd bkpf stgrd
stjah bkpf stjah
stodt bkpf stodt
subset bkpf subset
tcode bkpf tcode
txkrs bkpf txkrs
umrd2 bkpf umrd2
umrd3 bkpf umrd3
upddt bkpf upddt
usnam bkpf usnam
vatdate bkpf vatdate
wwert bkpf wwert
xblnr bkpf xblnr
xblnr_alt bkpf xblnr_alt
xmca bkpf xmca
xmwst bkpf xmwst
xnetb bkpf xnetb
xref1_hd bkpf xref1_hd
xref2_hd bkpf xref2_hd
xreorg bkpf xreorg
xreversal bkpf xreversal
xreversed bkpf xreversed
xreversing bkpf xreversing
xrueb bkpf xrueb
xsnet bkpf xsnet
xsplit bkpf xsplit
xstov bkpf xstov
xusvr bkpf xusvr
xwvof bkpf xwvof
ktopl t001 ktopl
@AbapCatalog.sqlViewName: 'FILIBPDOCH'
@EndUserText.label: 'Parked Items: Document Header'

@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.viewEnhancementCategory: [#PROJECTION_LIST]
--@AbapCatalog.preserveKey:true

@AccessControl.authorizationCheck:#NOT_REQUIRED
@AccessControl.personalData.blocking:#NOT_REQUIRED

@ClientHandling.algorithm: #SESSION_VARIABLE

@Metadata.ignorePropagatedAnnotations: true

@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #L,
  dataClass: #MIXED
}
define view FGL_LIB_P_DOC_HEADER
  as select from    bkpf
    inner join      t001                on t001.bukrs = bkpf.bukrs
    left outer join FINS_T001A as t001a on t001a.bukrs = bkpf.bukrs
{
  key bkpf.belnr,
  key bkpf.bukrs,
  key bkpf.gjahr,

      bkpf.waers             as currkey_0d,
      bkpf.hwaer             as currkey_10,

      cast(
        case
          when  t001a.curtp = '11' then bkpf.hwae2
          when  t001a.curtp2 = '11' then bkpf.hwae3
          else  ''
        end
      as fagl_currkey_11 )
        as currkey_11,

      cast(
        case
          when  t001a.curtp = '12' then bkpf.hwae2
          when  t001a.curtp2 = '12' then bkpf.hwae3
          else  ''
        end
      as fagl_currkey_12 )
        as currkey_12,

      cast(
        case
          when  t001a.curtp = '30' then bkpf.hwae2
          when  t001a.curtp2 = '30' then bkpf.hwae3
          else  ''
        end
      as fagl_currkey_30 )
        as currkey_30,

      cast(
        case
          when  t001a.curtp = '31' then bkpf.hwae2
          when  t001a.curtp2 = '31' then bkpf.hwae3
          else  ''
        end
      as fagl_currkey_31 )
        as currkey_31,

      cast(
        case
          when  t001a.curtp = '32' then bkpf.hwae2
          when  t001a.curtp2 = '32' then bkpf.hwae3
          else  ''
        end
      as fagl_currkey_32 )
        as currkey_32,

      cast(
        case
          when  t001a.curtp = '40' then bkpf.hwae2
          when  t001a.curtp2 = '40' then bkpf.hwae3
          else  ''
        end
      as fagl_currkey_40 )
        as currkey_40,

      cast(
        case
          when  t001a.curtp = '50' then bkpf.hwae2
          when  t001a.curtp2 = '50' then bkpf.hwae3
          else  ''
        end
      as fagl_currkey_50 )
        as currkey_50,

      cast(
        case
          when  t001a.curtp = '60' then bkpf.hwae2
          when  t001a.curtp2 = '60' then bkpf.hwae3
          else  ''
        end
      as fagl_currkey_11)
        as currkey_60,

      //fiscal year period

      cast(
        concat(concat(bkpf.gjahr, '0'), bkpf.monat)
      as rsfiscper )
        as fiscper,

      // fields from T001A

      t001a.curtp             as curtp,
      t001a.curtp2            as curtp2,

      // fields from bkpf

      bkpf.adisc,
      bkpf.aedat,
      bkpf.arcid,
      bkpf.ausbk,
      bkpf.awkey,
      bkpf.aworg_rev,
      bkpf.awref_rev,
      bkpf.awsys,
      bkpf.awtyp,
      bkpf.basw2,
      bkpf.basw3,
      bkpf.belnr_sender,
      bkpf.bktxt,
      bkpf.blart,
      bkpf.bldat,
      bkpf.brnch,
      bkpf.bstat,
      bkpf.budat,
      bkpf.bukrs_sender,
      bkpf.bvorg,
      bkpf.cash_alloc,
      bkpf.co_alebn,
      bkpf.co_belnr_sender,
      bkpf.co_refbt,
      bkpf.co_valdt,
      bkpf.co_vrgng,
      bkpf.cpudt,
      bkpf.cputm,
      bkpf.ctxkrs,
      bkpf.curt2,
      bkpf.curt3,
      bkpf.dbblg,
      bkpf.doccat,
      bkpf.dokid,
      bkpf.duefl,
      bkpf.fikrs,
      bkpf.follow_on,
      @Semantics.amount.currencyCode: 'CURRKEY_0D'
      bkpf.frath,
      bkpf.gjahr_sender,
      bkpf.glbtgrp,
      bkpf.glvor,
      bkpf.grpid,
      bkpf.hwae2,
      bkpf.hwae3,
      bkpf.hwaer,
      bkpf.iblar,
      bkpf.intsubid,
      bkpf.kokrs_sender,
      bkpf.kur2x,
      bkpf.kur3x,
      bkpf.kurs2,
      bkpf.kurs3,
      bkpf.kursf,
      bkpf.kurst,
      bkpf.kursx,
      bkpf.kuty2,
      bkpf.kuty3,
      bkpf.kzkrs,
      bkpf.kzwrs,
      bkpf.ldgrp,
      bkpf.logsystem_sender,
      bkpf.lotkz,
      bkpf.monat,
      bkpf.numpg,
      bkpf.ppdat,
      bkpf.ppnam,
      bkpf.pptcod,
      bkpf.pptme,
      bkpf.propmano,
      bkpf.reindat,
      bkpf.reprocessing_status_code,
      bkpf.resubmission,
      bkpf.rldnr,
      bkpf.stblg,
      bkpf.stgrd,
      bkpf.stjah,
      bkpf.stodt,
      bkpf.subset,
      bkpf.tcode,
      bkpf.txkrs,
      bkpf.umrd2,
      bkpf.umrd3,
      bkpf.upddt,
      bkpf.usnam,
      bkpf.vatdate,
      bkpf.wwert,
      bkpf.xblnr,
      bkpf.xblnr_alt,
      bkpf.xmca,
      bkpf.xmwst,
      bkpf.xnetb,
      bkpf.xref1_hd,
      bkpf.xref2_hd,
      bkpf.xreorg,
      bkpf.xreversal,
      bkpf.xreversed,
      bkpf.xreversing,
      bkpf.xrueb,
      bkpf.xsnet,
      bkpf.xsplit,
      bkpf.xstov,
      bkpf.xusvr,
      bkpf.xwvof,

      // fields from T001

      t001.ktopl              as ktopl
}

where bkpf.bstat = 'V'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"FINS_T001A",
"BKPF",
"T001"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/