fgl_lib_c

DDL: FGL_LIB_C Type: view_entity

LIB Base View

fgl_lib_c is a CDS View that provides data about "LIB Base View" in SAP S/4HANA. It reads from 4 data sources (bkpf, bkpf, bseg, bseg_add) and exposes 40 fields with key fields bukrs, gjahr, belnr, buzei.

Data Sources (4)

SourceAliasJoin Type
bkpf bkpf inner
bkpf bkpf inner
bseg bseg from
bseg_add bseg union_all

Parameters (3)

NameTypeDefault
p_langu spras
p_refdate sydatum
p_ale abap.char( 1 )

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
AccessControl.personalData.blocking #NOT_REQUIRED view
EndUserText.label LIB Base View view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view

Fields (40)

KeyFieldSource TableSource FieldDescription
KEY bukrs
KEY gjahr
KEY belnr
KEY buzei
counter
quanunit
currkey_00
currkey_0d
currkey_10
shkzgwhenHthen1else1endasnebtrasnebtr
shkzgwhenHthen1else1endasskntoassknto
shkzgwhenHthen1else1endasskfbtasskfbt
pycur
fiscper
kktpl
land1
periv
fikrs
ktopl
ktop2
koart
lifnr
kunnr
hkont
gkont
gkart
rp_ktext
rp_ltext
sp_ktext
sp_ltext
rf_fkbtx
sf_fkbtx
cc_ktext
cc_ltext
or_ktext
mm_maktx
ga_txt20
ga_txt50
sk_txt20
sk_txt50

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view fgl_lib_c.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- Parameters: p_langu : spras, p_refdate : sydatum, p_ale : abap.char( 1 )

CREATE VIEW fgl_lib_c AS
SELECT
  cast( bseg.bukrs as bukrs preserving type ) AS bukrs,
  cast( bseg.gjahr as gjahr preserving type ) AS gjahr,
  cast( bseg.belnr as belnr_d preserving type ) AS belnr,
  cast( bseg.buzei as buzei preserving type ) AS buzei,
  cast( 1 as sydbcnt) AS counter,
  cast( bseg.meins as rounit preserving type ) AS quanunit,
  cast( bseg.pswsl as fagl_currkey_00 preserving type ) AS currkey_00,
  cast( bkpf.waers as fagl_currkey_0d preserving type ) AS currkey_0d,
  cast( bkpf.hwaer as fagl_currkey_10 preserving type ) AS currkey_10,
  cast ( cast ( bseg.nebtr as abap.dec(23,2) ) * case bseg.shkzg when 'H' then -1 else 1 end as nebtr ) as nebtr AS shkzgwhenHthen1else1endasnebtrasnebtr,
  cast ( cast ( bseg.sknto as abap.dec(23,2) ) * case bseg.shkzg when 'H' then -1 else 1 end as sknto ) as sknto AS shkzgwhenHthen1else1endasskntoassknto,
  cast ( cast ( bseg.skfbt as abap.dec(23,2) ) * case bseg.shkzg when 'H' then -1 else 1 end as skfbt ) as skfbt AS shkzgwhenHthen1else1endasskfbtasskfbt,
  cast( bseg.pycur as pycur preserving type ) AS pycur,
  cast( concat(bseg.gjahr,concat('0',bseg.h_monat)) as rsfiscper ) AS fiscper,
  cast( t004.kktpl as kktpl preserving type ) AS kktpl,
  cast( t001.land1 as land1 preserving type ) AS land1,
  cast( t001.periv as periv preserving type ) AS periv,
  cast( t001.fikrs as fikrs preserving type ) AS fikrs,
  cast( t001.ktopl as ktopl preserving type ) AS ktopl,
  cast( t001.ktop2 as ktop2 preserving type ) AS ktop2,
  cast( bseg.koart as koart preserving type ) AS koart,
  cast( bseg.lifnr as lifnr preserving type ) AS lifnr,
  cast( bseg.kunnr as kunnr preserving type ) AS kunnr,
  cast( bseg.hkont as hkont preserving type ) AS hkont,
  cast( bseg.gkont as gkont preserving type ) AS gkont,
  cast( bseg.gkart as gkart preserving type ) AS gkart,
  cast( coalesce( rprctr.ktext, cast( '' as fagl_text_prctr_short ) ) as fagl_text_prctr_short preserving type ) AS rp_ktext,
  cast( coalesce( rprctr.ltext, cast( '' as fagl_text_prctr_long ) ) as fagl_text_prctr_long preserving type ) AS rp_ltext,
  cast( coalesce( sprctr.ktext, cast( '' as fagl_text_pprctr_short ) ) as fagl_text_pprctr_short preserving type ) AS sp_ktext,
  cast( coalesce( sprctr.ltext, cast( '' as fagl_text_pprctr_long ) ) as fagl_text_pprctr_long preserving type ) AS sp_ltext,
  cast( coalesce( rfkbt.fkbtx, cast( '' as fagl_text_farea ) ) as fagl_text_farea preserving type ) AS rf_fkbtx,
  cast( coalesce( sfkbt.fkbtx, cast( '' as fagl_text_pfarea ) ) as fagl_text_pfarea preserving type ) AS sf_fkbtx,
  cast( coalesce( rkostl.ktext, cast( '' as fagl_text_ccntr_short ) ) as fagl_text_ccntr_short preserving type ) AS cc_ktext,
  cast( coalesce( rkostl.ltext, cast( '' as fagl_text_ccntr_long ) ) as fagl_text_ccntr_long preserving type ) AS cc_ltext,
  cast( coalesce( aufk.ktext, cast( '' as fagl_text_order_short ) ) as fagl_text_order_short preserving type ) AS or_ktext,
  cast( coalesce( rmatnr.maktx, cast( '' as fagl_text_material ) ) as fagl_text_material preserving type ) AS mm_maktx,
  cast( coalesce( hkont.txt20, cast( '' as fagl_text_gl_account_short ) ) as fagl_text_gl_account_short preserving type ) AS ga_txt20,
  cast( coalesce( hkont.txt50, cast( '' as fagl_text_gl_account_long ) ) as fagl_text_gl_account_long preserving type ) AS ga_txt50,
  cast( coalesce( saknr.txt20, cast( '' as fagl_text_saknr_short ) ) as fagl_text_saknr_short preserving type ) AS sk_txt20,
  cast( coalesce( saknr.txt50, cast( '' as fagl_text_saknr_long ) ) as fagl_text_saknr_long preserving type ) AS sk_txt50
FROM bseg
INNER JOIN bkpf ON /* join condition not captured in parsed metadata */
-- UNION ALL with additional select branch(es): bseg_add
;