Code List feature enables the content developers to easily create value helps for various fields. Code Values can come from different backend systems or from a single backend system. Code values can also come from different sources like fixed values associated with domain from the QueryCodeList ESA service, or from the value helps defined for BAPI parameters.
Currently the code list functionality supports value helps fetched from domains with fixed values, value helps for BAPI parameters as well as value helps fetched from the QueryCode List ESA service.
In real time business scenarios, it is possible for field, to have a different set of valid values based on the context. For example, while creating a document in CRM, the list of possible values for DocumentType is different from the list of valid DocumentTypes while creating a document in ERP.
In addition to this, it is also possible for the source of the possible DocumentTypes to be different in each of these scenarios. For example, the list of valid document types for an ERP document may come from an ESA service, while the list of valid DocumentTypes for a CRM document may come from a domain, i.e. the source of valid values is different depending on the software version. Code List has been developed to cater to these scenarios.
For a user to enter a partner role and wants to fetch the list of valid partner roles, the content developer needs to do the following: .
Create a User-Centric SAP Gateway Data Model for Partner Roles. See Creating a SAP Gateway Data Model based on the Code List PS model for more information.
Create the associated SAP Gateway Consumption Model and then fetch the list of Partner Roles using this Service. See Creating a SAP Gateway Consumption Model based on the SAP Gateway Data Model for more information.
The content developer needs to create an Entity Provider class to specify the technical details of the source of the value helps. See Creating Entity Data Provider Class for more information.
By using Code List function the target system can be determined based on the configuration entries maintained while registering the OData service for a specific code. See Creating a SAP Gateway Data Model based on the Code List PS model and Creating a SAP Gateway Consumption Model based on the SAP Gateway Data Model for more information