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

Custom Field value is not picked up by SAP21 Customer Invoice Form

JastinC1
Explorer
0 Kudos
469

I'm doing implementation in S/4 Public Cloud Edition.

I've created a custom field in business context 'FINS_JOURNAL_ENTRY_ITEM' and implemented custom logic 'FIN_ACDOC_EXT_CHG_SUBSTITUTION' to populate the said custom field. I've had enabled the usage of the custom field to the custom form template.

Though custom field is recognized by form template and has been bound in a form field, value is not picked up when doing a form preview in Create Correspondence App.

Any steps I missed on why this is happening?

Accepted Solutions (0)

Answers (2)

Answers (2)

Chuma
Active Contributor
0 Kudos

Hello @JastinC1 

When the C_FinInvoiceHeaderFDP form’s item node pulls data from I_OperationalAcctgDocItem, your custom field on business context FINS_JOURNAL_ENTRY_ITEM is not automatically included. To resolve this issue, it is necessary to extend the FDP data source to enable the form to access your YY1 field. The feature 'Maintain Data Source Extensions' is particularly useful in this regard. SAP Help Portal-Accounting Document Item: Operational View

Recommended checklist

In Custom Fields: open your YY1 field → Enable Usage for Form Templates and Data Source Extensions → Publish. SAP Help Portal-Creating Custom Fields in SAP S/4HANA Cloud System

In Maintain Data Source Extensions: pick C_FinInvoiceHeaderFDP → add your YY1 field by navigating the association to the item (I_OperationalAcctgDocItem) node → Publish. SAP Help Portal: Creating Data Source Extensions

In Maintain Form Templates: re-download/update your template, rebind the new field on the item context, upload it, and test in Create Correspondence. SAP Help Portal

Just a quick note: if your YY1 field doesn’t appear in the association browser when extending C_FinInvoiceHeaderFDP, create a tiny Custom CDS View that exposes the YY1 value for the accounting line, then pull it in via the data-source extension path. This is the standard workaround when a field isn’t reachable directly in the FDP’s association graph. SAP Help Portal-Create CDS Views for Debit and Credit Line
GenAI Assisted Content (SAP S/4HANA Cloud Public Edition). SAP Help – Custom Fields & Maintain Data Source Extensions; CDS view documents for I_OperationalAcctgDocItem; App Extensibility for Create Correspondence. SAP Help Portal: Creating Data Source Extensions

SAP Learning-Using Custom Fields and Logic

Custom Fields and Logic App F1481

SAP Community blog-Simple extensibility of Data Sources for Output Forms in SAP S/4HANA Cloud

Let me know if it works

With regards

Chuma

DiegoValdivia
Active Participant
0 Kudos

Hi @JastinC1 

Did you create a new Custom Invoice? Most of Custom Logic is designed to modify fields at save. If you are trying to display a Custom Invoice created before you created the Custom Logic, then the Custom Field will be empty in the database, which will therefore be empty in the form.

Regards.

JastinC1
Explorer
0 Kudos
Yes. field value is already stored in the database. It looks like the cds entity "C_FinInvoiceHeaderFDP" of the form template specifically the items "I_OperationalAcctgDocItem" does not contain the custom fields unlike cds entity "i_journalentryitem"