P_AR_JrnlEntryWthOfclDocType

DDL: P_AR_JRNLENTRYWTHOFCLDOCTYPE Type: view_entity CONSUMPTION Package: GLO_FIN_IS_VAT_AR

Argentina Journal Entry with Official Document Type Fields

P_AR_JrnlEntryWthOfclDocType is a Consumption CDS View that provides data about "Argentina Journal Entry with Official Document Type Fields" in SAP S/4HANA. It reads from 2 data sources (I_CompanyCode, P_AR_JournalEntry) and exposes 16 fields with key fields CompanyCode, FiscalYear, AccountingDocument. Part of development package GLO_FIN_IS_VAT_AR.

Data Sources (2)

SourceAliasJoin Type
I_CompanyCode CompanyCode inner
P_AR_JournalEntry JournalEntry from

Parameters (1)

NameTypeDefault
P_AR_Report progname

Annotations (6)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #CONSUMPTION view
VDM.private true view

Fields (16)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_AR_JournalEntry CompanyCode
KEY FiscalYear P_AR_JournalEntry FiscalYear
KEY AccountingDocument P_AR_JournalEntry AccountingDocument
FiscalPeriod P_AR_JournalEntry FiscalPeriod
PostingDate P_AR_JournalEntry PostingDate
DocumentDate P_AR_JournalEntry DocumentDate
TaxReportingDate P_AR_JournalEntry TaxReportingDate
ReportingDate P_AR_JournalEntry ReportingDate
AccountingDocumentType P_AR_JournalEntry AccountingDocumentType
AccountingDocumentCategory P_AR_JournalEntry AccountingDocumentCategory
DocumentReferenceID P_AR_JournalEntry DocumentReferenceID
ExchangeRateDate P_AR_JournalEntry ExchangeRateDate
ExchangeRate P_AR_JournalEntry ExchangeRate
CompanyCodeCurrency P_AR_JournalEntry CompanyCodeCurrency
TransactionCurrency P_AR_JournalEntry TransactionCurrency
_OneTimeAccountBP P_AR_JournalEntry _OneTimeAccountBP
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.dataClass: #MIXED
@VDM.viewType: #CONSUMPTION
@VDM.private: true
define view entity P_AR_JrnlEntryWthOfclDocType
  with parameters
    @EndUserText.label: 'Statutory Report Name'
    P_AR_Report : progname

  as select from           P_AR_JournalEntry             as JournalEntry

    inner join             I_CompanyCode                 as CompanyCode                    on JournalEntry.CompanyCode = CompanyCode.CompanyCode

    left outer to one join I_CountrySpecificDocumentType as CountrySpecificDocumentType    on  CountrySpecificDocumentType.Country                = CompanyCode.Country
                                                                                           and CountrySpecificDocumentType.AccountingDocumentType = JournalEntry.AccountingDocumentType

    left outer to one join I_AR_OfficialDocumentTypeDetn as OfficialDocumentTypeDetn       on  OfficialDocumentTypeDetn.AR_OfficialDocumentClass = CountrySpecificDocumentType.AR_OfficialDocumentClass
                                                                                           and OfficialDocumentTypeDetn.Country                  = CompanyCode.Country
                                                                                           and OfficialDocumentTypeDetn.AR_Report                = $parameters.P_AR_Report
                                                                                           and OfficialDocumentTypeDetn.AR_PrintCharacter        = JournalEntry.AR_PrintCharacter

    left outer to one join I_AR_OfficialDocumentTypeDetn as OfclDocTypeDetnWthBlnkPrntChar on  OfclDocTypeDetnWthBlnkPrntChar.AR_OfficialDocumentClass = CountrySpecificDocumentType.AR_OfficialDocumentClass
                                                                                           and OfclDocTypeDetnWthBlnkPrntChar.Country                  = CompanyCode.Country
                                                                                           and OfclDocTypeDetnWthBlnkPrntChar.AR_Report                = $parameters.P_AR_Report
                                                                                           and OfclDocTypeDetnWthBlnkPrntChar.AR_PrintCharacter        = ''
{
  key JournalEntry.CompanyCode,
  key JournalEntry.FiscalYear,
  key JournalEntry.AccountingDocument,
      JournalEntry.FiscalPeriod,
      JournalEntry.PostingDate,
      JournalEntry.DocumentDate,
      JournalEntry.TaxReportingDate,
      JournalEntry.ReportingDate,
      JournalEntry.AccountingDocumentType,
      JournalEntry.AccountingDocumentCategory,
      JournalEntry.DocumentReferenceID,

      cast(
        case
          when OfficialDocumentTypeDetn.AR_PrintCharacter is not null
            then JournalEntry.AR_Branch
         else ''
        end as fiar_branch preserving type
      ) as AR_Branch,

      cast(
        case
          when OfficialDocumentTypeDetn.AR_PrintCharacter is not null
            then OfficialDocumentTypeDetn.AR_PrintCharacter
         else ''
        end as j_1apchar preserving type
      ) as AR_PrintCharacter,

      cast(
        case
          when OfficialDocumentTypeDetn.AR_PrintCharacter is not null
            then JournalEntry.AR_OfficialDocumentNumber
         else ''
        end as fiar_odn preserving type
      ) as AR_OfficialDocumentNumber,

      cast(
        case 
          when OfficialDocumentTypeDetn.AR_PrintCharacter is not null
            then OfficialDocumentTypeDetn.AR_OfficialDocumentType
         else OfclDocTypeDetnWthBlnkPrntChar.AR_OfficialDocumentType
        end as j_1aoftp_d preserving type
      ) as AR_OfficialDocumentType,

      cast(
        case 
          when OfficialDocumentTypeDetn.AR_OfficialDocumentClass is not null
            then OfficialDocumentTypeDetn.AR_OfficialDocumentClass
         else OfclDocTypeDetnWthBlnkPrntChar.AR_OfficialDocumentClass
        end as doccls preserving type
      ) as AR_OfficialDocumentClass,
      
      
      JournalEntry.ExchangeRateDate,
      JournalEntry.ExchangeRate,
      JournalEntry.CompanyCodeCurrency,
      JournalEntry.TransactionCurrency,
      JournalEntry._OneTimeAccountBP
}