cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Unable to extend E_JournalEntryItem with association

EgbertVenema
Explorer
0 Kudos
640

To be able to add custom fields to the I_JournalEntryItem CDS view, we're given the E_JournalEntryItem view entity. However in our case I need to extend it with a new association. I thought this would be simple enough, but but setting up the correct link to the custom CDS will not work.

association1.png 

I have a custom CDS view, which needs to be linked to every JournalEntryItem. The logical link would then of course be the AccountingDocument. It is part of the E_JournalEntryItem entity... but not permitted. These key fields are used to uniquely link it to a I_JournalEntryItem record.

define view entity E_JournalEntryItem
  as select from acdoca as Persistence
{
  key Persistence.rldnr  as SourceLedger,
  key Persistence.rbukrs as CompanyCode,
  key Persistence.gjahr  as FiscalYear,
  key Persistence.belnr  as AccountingDocument,
  key Persistence.docln  as LedgerGLLineItem
}

Tried to link it using the Persistence.belnr field as an alternative, but no go.
association2.png

And of course simply naming it AccountingDocument does not work either, it has to be a full qualified expression.
association3.png

That leaves be out of ideas. How can I extend the I_JournalEntryItem with a new association based on AccountingDocument?

Using the 'Custom Fields' app does not give me enough flexibility in populating the value, so that's not a viable alternative.

 

Accepted Solutions (0)

Answers (1)

Answers (1)

junwu
SAP Champion
SAP Champion
0 Kudos

that view is for extending additional fields, not for association.

EgbertVenema
Explorer
0 Kudos
Hmm well that is sub-optimal 😉 Was there any way I could have seen this beforehand?
junwu
SAP Champion
SAP Champion
0 Kudos
just extend I_JournalEntryItem for new association
EgbertVenema
Explorer
0 Kudos

Unfortunately, you can't. At least not in a S/4 HANA Public Edition environment.

association4.png
Which it indeed is not. You can use it in Key User Apps, not in Cloud Development... which this is, Developer Extensibility.
association5.png

Will try to find a way around it, let's see what we can find.

junwu
SAP Champion
SAP Champion
0 Kudos

=======