C_NO_SAFTGenLedgerCustomer

DDL: C_NO_SAFTGENLEDGERCUSTOMER SQL: CSAFTNOGLCUST Type: view CONSUMPTION

SAF-T Norway General Ledger Customer

C_NO_SAFTGenLedgerCustomer is a Consumption CDS View that provides data about "SAF-T Norway General Ledger Customer" in SAP S/4HANA. It reads from 2 data sources (I_CompanyCode, I_SAFTCustomerBalance) and exposes 31 fields with key fields CompanyCode, Customer, AccountingDocument, LedgerGLLineItem.

Data Sources (2)

SourceAliasJoin Type
I_CompanyCode Company inner
I_SAFTCustomerBalance I_SAFTCustomerBalance inner

Parameters (4)

NameTypeDefault
P_FromPostingDate abap.dats
P_ToPostingDate abap.dats
P_Ledger fins_ledger
P_FiscalYear gjahr

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName CSAFTNOGLCUST view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #CONSUMPTION view
EndUserText.label SAF-T Norway General Ledger Customer view

Fields (31)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode Customer CompanyCode Receiver Company Code
KEY Customer Customer Customer Sold-to Party
KEY AccountingDocument Customer AccountingDocument Journal Entry
KEY LedgerGLLineItem Customer LedgerGLLineItem Journal Entry Item
BusinessPartner Customer BusinessPartner Issuing Authority
BusinessPartnerUUID Customer BusinessPartnerUUID UUID
GLAccountelseendasGLAccount
NO_SAFTCustomerID Customer NO_SAFTCustomerID Customer ID
CustomerVATRegistration Customer VATRegistration VAT Registration No.
TaxNumber1 Customer TaxNumber1 VAT Reg. No.
TaxNumber2 Customer TaxNumber2 Tax Number 2
VATRegistrationendasVATRegistration
BusinessPartnerName2170endasCompanyName
CityName135endasCityName
StreetNameelseNAendendasStreetName
PostalCodeelseNAendendasPostalCode
Region Customer Region Venue Region
RegionName Customer RegionName Description
HouseNumber Customer HouseNumber House Number
Country Customer Country Venue: Ctry/Reg
POBox Customer POBox PO Box
POBoxPostalCode Customer POBoxPostalCode PO Box Postal Code
IsOneTimeAccount Customer IsOneTimeAccount One-time acct
CompanyCodeCurrency CustomerBalance CompanyCodeCurrency Local Currency
curr232endasDebitStartingBalAmtInCCCrcy
curr232endasCreditStartingBalAmtInCCCrcy
curr232endasDebitEndingBalAmtInCCCrcy
curr232endasCreditEndingBalAmtInCCCrcy
ItemIsReportingRelevant
_CompanyCode Customer _CompanyCode
_Customer Customer _Customer

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 C_NO_SAFTGenLedgerCustomer.
-- 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.
-- SQL view name: CSAFTNOGLCUST
-- Parameters: P_FromPostingDate : abap.dats, P_ToPostingDate : abap.dats, P_Ledger : fins_ledger, P_FiscalYear : gjahr

CREATE VIEW C_NO_SAFTGenLedgerCustomer AS
SELECT
  Customer.CompanyCode AS CompanyCode,
  Customer.Customer AS Customer,
  Customer.AccountingDocument AS AccountingDocument,
  Customer.LedgerGLLineItem AS LedgerGLLineItem,
  Customer.BusinessPartner AS BusinessPartner,
  Customer.BusinessPartnerUUID AS BusinessPartnerUUID,
  case when CustomerSPGL.SpecialGLCode is null then Customer.GLAccount else '' end as GLAccount AS GLAccountelseendasGLAccount,
  Customer.NO_SAFTCustomerID AS NO_SAFTCustomerID,
  Customer.VATRegistration AS CustomerVATRegistration,
  Customer.TaxNumber1 AS TaxNumber1,
  Customer.TaxNumber2 AS TaxNumber2,
  case when Customer.Country = 'NO' then case when Customer.TaxNumber1 like 'NO%MVA' then Customer.TaxNumber1 when Customer.TaxNumber1 like '%MVA' then concat('NO', Customer.TaxNumber1) when Customer.TaxNumber1 like 'NO%' then concat(Customer.TaxNumber1, 'MVA') else ' ' end else Customer.VATRegistration end as VATRegistration AS VATRegistrationendasVATRegistration,
  case when Customer.BusinessPartnerName1 is initial and Customer.BusinessPartnerName2 is initial then 'NA' else left(concat_with_space(Customer.BusinessPartnerName1, Customer.BusinessPartnerName2, 1), 70) end as CompanyName AS BusinessPartnerName2170endasCompanyName,
  case when Customer.CityName is initial then 'NA' else substring(Customer.CityName,1,35) end as CityName AS CityName135endasCityName,
  case when Customer.POBox is not initial then Customer.POBox else case when Customer.StreetName is not initial then Customer.StreetName else 'NA' end end as StreetName AS StreetNameelseNAendendasStreetName,
  case when Customer.POBoxPostalCode is not initial and Customer.POBox is not initial then Customer.POBoxPostalCode else case when Customer.PostalCode is not initial and Customer.StreetName is not initial then Customer.PostalCode else 'NA' end end as PostalCode AS PostalCodeelseNAendendasPostalCode,
  Customer.Region AS Region,
  Customer.RegionName AS RegionName,
  Customer.HouseNumber AS HouseNumber,
  Customer.Country AS Country,
  Customer.POBox AS POBox,
  Customer.POBoxPostalCode AS POBoxPostalCode,
  Customer.IsOneTimeAccount AS IsOneTimeAccount,
  CustomerBalance.CompanyCodeCurrency AS CompanyCodeCurrency,
  case when CustomerBalance.StartingBalanceAmtInCoCodeCrcy > 0 then CustomerBalance.StartingBalanceAmtInCoCodeCrcy else cast( 0 as abap.curr(23,2) ) end as DebitStartingBalAmtInCCCrcy AS curr232endasDebitStartingBalAmtInCCCrcy,
  case when CustomerBalance.StartingBalanceAmtInCoCodeCrcy < 0 then abs(CustomerBalance.StartingBalanceAmtInCoCodeCrcy) else cast( 0 as abap.curr(23,2) ) end as CreditStartingBalAmtInCCCrcy AS curr232endasCreditStartingBalAmtInCCCrcy,
  case when CustomerBalance.EndingBalanceAmtInCoCodeCrcy > 0 then CustomerBalance.EndingBalanceAmtInCoCodeCrcy else cast( 0 as abap.curr(23,2) ) end as DebitEndingBalAmtInCCCrcy AS curr232endasDebitEndingBalAmtInCCCrcy,
  case when CustomerBalance.EndingBalanceAmtInCoCodeCrcy < 0 then abs(CustomerBalance.EndingBalanceAmtInCoCodeCrcy) else cast( 0 as abap.curr(23,2) ) end as CreditEndingBalAmtInCCCrcy AS curr232endasCreditEndingBalAmtInCCCrcy,
  'X' AS ItemIsReportingRelevant,
  Customer._CompanyCode AS _CompanyCode,
  Customer._Customer AS _Customer
INNER JOIN I_CompanyCode AS Company ON /* join condition not captured in parsed metadata */
INNER JOIN I_SAFTCustomerBalance ON /* join condition not captured in parsed metadata */
;