0% found this document useful (0 votes)
208 views2 pages

CDS View for Provision Statement Data

This document describes a CDS view to fetch data for provision statements. It defines a union of two selects - one from tables BSEG and one from BSEG_ADD to retrieve accounting document information along with fields for the document number, fiscal year, currency, transaction code, and more. It performs various joins to tables like BKPF, FAGLFLEXA, CEPC, and SKAT to supplement the accounting data with additional text descriptions and attributes.

Uploaded by

krishna kiran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
208 views2 pages

CDS View for Provision Statement Data

This document describes a CDS view to fetch data for provision statements. It defines a union of two selects - one from tables BSEG and one from BSEG_ADD to retrieve accounting document information along with fields for the document number, fiscal year, currency, transaction code, and more. It performs various joins to tables like BKPF, FAGLFLEXA, CEPC, and SKAT to supplement the accounting data with additional text descriptions and attributes.

Uploaded by

krishna kiran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

/************** Thyssenkrupp BAIS SAP Program Header ************************&

*& Program Name : /TKIS/C_CDS_FI_PROV_STAT *&


*& Application : Report Program *&
*& Module Team : FI *&
*& CR-ID : R_WG5_221_BR00061 *&
*& Transport-ID : D1IK927538 *&
*& Requester : Nadine G�ldenpfennig *&
*& Programmer : Aditya(10563578) *&
*& Short description : Provision Statement: *&
*& CDS to fetch data *&
****************************************************************************/
@[Link]: '/tkis/c_ddl_psr'
@[Link]: true
@[Link]: #CHECK
@[Link]: 'CDS View To Fetch Data For Prov. Stat.'
define view /tkis/c_Cds_Fi_Prov_Stat
as
// 1 -> BSEG
select
from bkpf as bkpf
inner join bseg as bseg on [Link] = [Link]
and [Link] = [Link]
and [Link] = [Link]
// and [Link] <> 'FB1S' //or [Link] <> 'LGXT')
left outer join faglflexa as faglflexa on [Link] = [Link]
and [Link] = [Link]
and [Link] = [Link]
and [Link] = [Link]
left outer join cepc as cepc on [Link] = [Link]
or [Link] = [Link]
left outer join t001 as t001 on [Link] = [Link] //included on16102019
left outer join skat on [Link] = [Link] and [Link] =
$session.system_language
and [Link] = [Link]
//left outer join skat on [Link] = [Link] and [Link] =
$session.system_language

{
cast( '1' as [Link](1) ) as items_bseg,
cast ( '' as TV_NODEKEY ) as NODE_KEY,
cast ( '' as TV_NODEKEY ) as RELAT_KEY,
[Link],
[Link],
[Link],
[Link],
[Link] as buzei,
// cast ( [Link] as [Link](6) )as buzei,
[Link] as C_GL_ACCOUNT,
skat.txt20 as c_gl_acc_txt,
[Link],
[Link] as C_PROF_CENT,
[Link] as C_PROF_CNTG,
[Link] as C_SEGMENT,
[Link] as docln ,
cast ( [Link] as [Link](50) ) as C_ASSIGNMENT,
[Link] as shkzg,
[Link],
[Link] as dmbtr,
[Link] as pswbt,
[Link] as C_FISCAL_YR,
[Link] as C_CURRENCY,
'X' as check_sce,
[Link] as C_TRANSACTION
}

// 2 -> BSEG_ADD
union
select
from bkpf as bkpf
inner join bseg_add as bseg on [Link] = [Link]
and [Link] = [Link]
and [Link] = [Link]
// and [Link] <> 'FB1S' //or [Link] <> 'LGXT')
left outer join ygtledgerlga as ygtledgerlga on [Link] = [Link]
and [Link] = [Link]
and [Link] = [Link]
and [Link] = [Link]
// and [Link] = [Link]
left outer join cepc as cepc on [Link] = [Link]
or [Link] = [Link]
left outer join skat on [Link] = [Link] and [Link] =
$session.system_language
{
cast( '2' as [Link](1) ) as items_bseg,
cast ( '' as TV_NODEKEY ) as NODE_KEY,
cast ( '' as TV_NODEKEY ) as RELAT_KEY,
[Link],
[Link],
[Link],
[Link],
[Link] as buzei,
// cast([Link] as [Link](6) )as buzei,
[Link] as C_GL_ACCOUNT,
skat.txt20 as c_gl_acc_txt,
[Link],
[Link] as C_PROF_CENT,
[Link] as C_PROF_CNTG,
[Link] as C_SEGMENT,
[Link] as docln,
cast ( [Link] as [Link](50) ) as C_ASSIGNMENT,
[Link] as shkzg,
[Link],
[Link] as dmbtr,
[Link] as pswbt,
[Link] as C_FISCAL_YR,
[Link] as C_CURRENCY,
'X' as check_sce,
[Link] as C_TRANSACTION
}

You might also like