cancel
Showing results for 
Search instead for 
Did you mean: 

Extend fiori app to add a field from LFB1

devagreen
Explorer
0 Kudos
887

Hi,

Requirement :- To add LFB1-PAYMENTCLEARINGGRPID in "Display Supplier List" fiori app.

Process:-

I found the OData service for this fiori tile is FAP_DISPLAY_SUPPLIER_LIST. As part of this service, found the CDS views used. LFB1 data is coming from C_SUPPLIER cds view(Consumption view). So i tried to EXTEND (ZC_SUPPLIER_EXT) the C_SUPPLIER cds view to add LFB1-PAYMENTCLEARINGGRPID.

After ACTIVATING the EXTENDED View, error coming in C_SUPPLIER cds view as "DDLS C_SUPPLIER is inconsistent in active version" and "The association <NAME> cannot be used locally in the view".

Please suggest how this requirement can be implemented?

Screenshot of OData service for 'Display Supplier List' app:-



Screenshot of Extended CDS View code:

Screenshot of Error when activating the Extended View:-

Thanks,

Deva

View Entire Topic
devagreen
Explorer
0 Kudos

This got resolved by extending 2 CDS Views as below.

1. Extend C_Supplier

@AbapCatalog.sqlViewAppendName: 'ZCSUPL_EXT'

@EndUserText.label: 'Sup ext for Payment Clearng Grp ID'

extend view C_Supplier with ZCSUPLEXT

association [1..1] to I_SupplierCompany as _SuppComp

on _SuppComp.Supplier = _SuppCoCodePurOrg.Supplier and

_SuppComp.CompanyCode = _SuppCoCodePurOrg.CompanyCode

{

_SuppComp.PaymentClearingGroup

}

2. Extend C_SupplierList

@AbapCatalog.sqlViewAppendName: 'ZC_SUPLIST_EXT'

@EndUserText.label: 'Sup List Ext for Pay Clr Grp ID'

extend view C_SupplierList with ZCSUPLISTEXT

{

cast( '' as far_payment_clearing_group) as PaymentClearingGroup

}