This blog is with reference to the blog “Create UI Configuration for Set Types to display on CRM Product Overview page” written by Rupesh.
Using this functionality, we can display the set type in the table form to accept multiple values for a product. For example, a Product can have multiple Positions. Each Position can have multiple Qualifications, and each Qualification can have a Proficiency.
Create an Attribute for the Position ID
Create an Attribute for Qualifications
Create an Attribute for Proficiency
Here, the check box ‘Multiple Values Possible’ is CHECKED.
You can define an attribute for single values or multiple values with the flag “Multiple Values Possible”.
Create a Set type.
By setting the Multiple Use indicator, each data record of a set type is assigned indirectly to a product using an assignment table. This means you could assign the attribute values of a set type to more than one product in future releases. For example, general data such as the units of measure for a product is likely to be the same for several products.
To actually use the attribute as a multiple-value attribute, you must mark the Multiple Values indicator when assigning it to the set type.
If at least one of the attributes of a set type is marked as a key field several entries can be made for each field of this set type when creating or changing product data. The attributes’ data of such set types are maintained in tabular form. Set types for which additional key fields are defined are known as multiline set types.
ZPOSITION_ATTR and ZQUAL_ATTR are the Key Fields. ZPROF_ATTR is the Multi-Value attribute field.
After this, please follow the below steps. These steps are clearly explained in the above mentioned blog (https://wiki.sdn.sap.com/wiki/display/CRM/Creating+UI+Configuration+for+Set+Types+to+display+on+CRM+Product+Overview+page) thanks to Rupesh
- Include the Settype in the transport.
- Assign the Set type to the Product Hierarchy.
- Assign the Set type to the Overview Page. TCode: CRMM_UIU_PROD_GEN.
- Create UI Configuration for the Set type.
- Move new Set type to displayed assignment blocks.
On the Product screen, a new assignment block is visible for generated Set Type.
To Enhance the functionality:
- To handle the fields in the Assignment block, a set type class is created with name ZL_PRD_SettypeName_CN. In our example, ZL_PRD_ZQUALI_SETTYPE_CN. The Super Class for this should be CL_CRM_UIU_PROD_SET_CN_ML.
- Enhance the View PRDGENSET/MLSeteOV in the Enhanced Component PRDGENSET.
- In the View Layout MLSeteOV.htm, change the Associated Type of the Page Attribute ‘SETTYPE’ to ‘CL_CRM_UIU_PROD_SET_CN_ML’.
- The F4 helps for Position ID and Qualifications are maintained by implementing the corresponding GET_V method of the settype class.