@romsar gotcha. Well for your original question it looks like the only thing left to explain with the examples from the code you and I have shared is: “I don’t fully understand why the 3rd parameter must be ‘Customer’ but not ‘CUSTOMER’ as ‘CUSTOMER’ is a value in the IDENTITY_INVOICE_INFO_TAB table “
Based on the standard call I shared the code for. You would pass the client value (‘Customer’).
because of this line
“party_type_db_ identity_invoice_info_tab.party_type%TYPE := Party_Type_API.Encode(party_type_);”
It Encodes the client value to the db value. This acts as a guard in the IF condition, because the encode must resolve to a stored value in the Enumeration PartyType.enumeration, It doesn’t simply just UPPER() any value.
Your cfp also takes the client value (as you know), because it simply uses it directly in the WHERE clause.
For reference for how all of this is generated and some keywords to look up in the technical documentation. To learn what the features are and see why IFS makes certain choices you can look at the first section of the entity IdentityInvoiceInfo.entity from 25r1
entityname IdentityInvoiceInfo;
component INVOIC;
codegenproperties {
DbImplementation "micro-cache-array";
DbObjversionStyle "number";
DbRmcomAccess "IdentityInvoiceInfo(identity, identity, party_type), BelongToParent";
DbDataSync "true";
DbDataSyncDirection "hub";
}
attributes {
parentkey Company TEXT(20)/UPPERCASE PMI-- {
DbRowLevelSecurity "company-basic,company-views";
}
key Identity TEXT(20)/UPPERCASE KMI--;
key PartyType ENUMERATION(PartyType) KMI-L;
……..