Anda di halaman 1dari 14

Customer How-To Guide for Creation of Set Types in SAP CRM

Valid from CRM 7.0 onwards

Version Status 1 Released

Date

Reviewed/Approved by

Customer How-To Guide for Creation of Standard Set Types in CRM

Contents
1 Creating Attributes and Set Types _________________________________________ 3
1.1 Implementing a check routine (optional) ________________________________________ 5

2 Assigning the set type to a product category ________________________________ 5 3 UI configuration ________________________________________________________ 5


3.1 Creating a customer enhancement _____________________________________________ 3.2 Creating an UI configuration __________________________________________________ 3.2.1 Creating a default UI configuration ____________________________________________ 3.2.2 Adapting the UI configuration _________________________________________________ 5 6 6 6

4 Custom-defined context nodes (optional)___________________________________ 6 5 Maintain Design Layer___________________________________________________ 6 6 Assigning the set type to the product header (optional) _______________________ 7 7 Assigning the set type to the different product applications ___________________ 7
7.1 7.2 8.1 8.2 8.2.1 8.2.2 8.3 8.4 8.5 8.6 8.7 Assigning the set type to a product application __________________________________ 7 Add the assignment block to the list of visible views ______________________________ 7 Add fields to search query structures via appends _______________________________ 9 Add fields to Design Layer (see also step 5) ____________________________________ 10 Determine the actual used design layer object __________________________________ 10 Maintain the design object __________________________________________________ 11 Add fields to configuration of search views ____________________________________ 11 Add a special search value help to the search field ______________________________ 11 Add fields to CRMC_PRSEA_ATTR ____________________________________________ 12 Add field to search result list _________________________________________________ 12 Add fields of search result list to design layer __________________________________ 13

8 Adding the set types attributes to the product search (optional) _______________ 9

Copyright SAP AG 2010

Page 2 of 14

Customer How-To Guide for Creation of Standard Set Types in CRM

1 Creating Attributes and Set Types


In transaction COMM_ATTRSET you can display, create or change attributes and set types. This section gives an overview about the settings you can make. Attributes An attribute is defined by a combination of its data type (for example, integer, character string, or date) and its length. Optional is a value range (for example, single values or intervals) or a value table. If you enter a table name, the attribute type and length are filled by the system. On the Value Range tab page, you can specify either single values or value ranges for the attribute. You can define an attribute for single values or multiple values with the flag Multiple Values Possible. Example You define the attribute Colour with the values Red, Green, and Blue. A car can be red, green, or blue. However, you define the attribute Optional Extras with the values Radio and Sunroof. This is a multiple-value attribute, as a car can have both a radio and a sunroof. To actually use the attribute as a multiple-value attribute, you must mark the Multiple Values indicator when assigning it to the set type. Please note Do not define attributes for other master data IDs (e.g. for Business Partner Number or Product ID). This can lead to data inconsistencies when archiving master data. Use Interlinkages in such cases instead of set types. In case of any doubts please contact someone from the product master data team. Set Types The table below outlines the options available to you when working with set types. Depending on which settings you make, other options may or may not be available: Set Type Multiple use No multiple use Key Fields No Yes No Yes Multiple-Value Attributes Yes No No No Organizational Dependency Can be organization-dependent Organization-independent

Multiple Use (Product:Set Type: 1:1 - Extensions,n:1 - Multiple Use) This is a technical setting which does not directly affect the appearance of the set type. It does however influence which other options are available to you and the performance of your system: 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. By not setting the Multiple Use indicator, each data record is assigned directly to one product. This is beneficial for performance and data volume, particularly where large numbers of products are expected. If you are expecting a large number of products, and it is not likely that the various data records of a set type will be used by more than one product, you should not set this indicator. For example, the serial number of a technical device will probably not be used by more than one object. Set types with technical details are often also only valid for one product. Key Fields 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, whereas single-line set types are those without additional key fields.

Copyright SAP AG 2010

Page 3 of 14

Customer How-To Guide for Creation of Standard Set Types in CRM

Example: Single-Line Set Type:

Example: Multiline Set Type:

Multiple Values Allows you to assign more than one value to an attribute in the relevant table when creating or changing product data. Example: Single-Line Set Type with Multiple-Value Attributes:

Organizational Dependency Allows you to generate set types dependent or independent of distribution chains. This means that the values of all attributes for distribution-chain-dependent set types are specified for a specific combination of sales organization and distribution channel. Set types designated for multiple use - be it single-line or multiline - can be organization-dependent. On the other hand, set types not designated for multiple use, irrespective of whether they are singleline or multiline, are always organization-independent. Template-Enabled Templates allow you to predefine and therefore standardize data for set types. This data is referenced Copyright SAP AG 2010 Page 4 of 14

Customer How-To Guide for Creation of Standard Set Types in CRM

by the set types on the Product page. The templates themselves are defined in Customizing for CrossApplication Components, by choosing SAP Product Templates . SAP NetWeaver Business Intelligence (BI) To extract an attribute to SAP NetWeaver BI, you set the BW-Relevant indicator. The extraction structure will contain a field for the selected attribute. By setting the Relevant for BW Selection indicator, you can use this attribute for data selection in SAP NetWeaver BI.

1.1 Implementing a check routine (optional)


In case you want to do consistency checks for your set type, you can create an implementation of BAdI PRODUCT_SET for it. The method check_before_update is called before the product is saved.

2 Assigning the set type to a product category


The set type assignment block will only be visible in the product application if the set type is assigned to a category and this category is assigned to the product. To assign the set type to a category, search for Product Hierarchies in the Web UI and select a category of it. In the assignment block Assigned Set Types you can add your newly created set type. Note: You can do a where-used-search via transaction COMM_ATTRSET to see in which product categories a specific set type is used.

3 UI configuration
3.1 Creating a customer enhancement
Unless not already done, create a customer enhancement set. An enhancement set is a Customer Relationship Management (CRM) concept to group several UI component enhancements together. It is a required logical bracket for more advanced enhancements. The actual client has to have an active enhancement set. For more information how to create a customer enhancement, please refer to external documentation: http://help.sap.com/saphelp_crm70/helpdata/en/51/dfdf460f464db1b483d9c2a1bcd488/frameset.htm

Copyright SAP AG 2010

Page 5 of 14

Customer How-To Guide for Creation of Standard Set Types in CRM

3.2 Creating an UI configuration


3.2.1 Creating a default UI configuration
Start transaction CRMM_UIU_PROD_CONFIG to create a default configuration for the assignment block of your set type. Choose your set type ID, press F8 and provide a transport request. Depending on the kind of your set type, a configuration for one of the following views in BSP component PRDGENSET will be created:

Set Type Kind Single Line Set Types Single Line Set Types with Multi Value Attributes

View PRDGENSET/SLSeteOV PRDGENSET/SLMVSeteOVVS PRDGENSET/SLSeteOV PRDGENSET/SLMVAttreOV PRDGENSET/MLSeteOV PRDGENSET/SLSetEF PRDGENSET/SLDCSetEF PRDGENSET/SLMVDCSetELVS PRDGENSET/SLMVDCAttrEL PRDGENSET/SLSetEF PRDGENSET/MLDCSetEL

Multi Line Set Types Single Line Set Types (Distribution Chain Dependent) Single Line Set Types with Multi Value Attributes (Distribution Chain Dependent) Multi Line Set Types (Distribution Chain Dependent)

The sub object type of the generated configuration will correspond to your set type ID.

3.2.2 Adapting the UI configuration


Of course, you can adapt the generated configuration to your needs afterwards in transaction BSP_WD_CMPWB for component PRDGENSET.

4 Custom-defined context nodes (optional)


It is possible to implement an own context node class (for example to override default value helps, to implement cross-application navigation and so on). To do so, create a class named your class has to inherit from CL_PRD_<SETTYPE_ID>_CN. This class has to inherit from the corresponding subclass of CL_CRM_UIU_PROD_SET_CN (e.g. CL_CRM_UIU_PROD_SET_CN_SL for a single line set type). Do not use the wizard of the component workbench to create your P/G//-getters but implement them manually in your created class. To enable cross-component navigation, you can provide the outbound plug CROSSNAV with your navigation descriptor and fire it.

5 Maintain Design Layer


The Design Layer is a virtual layer that is positioned between Context and Business Object Layer (BOL). With it you can influence the usable context for different business purposes (i.e. such as hiding and rename fields). This may be desirable as the BOL object models are usually more of technical/generic nature. Please refer to external documentation if usage of the design layer is required: http://help.sap.com/saphelp_crm70/helpdata/EN/46/79ae572abc49c9a4f7a45d5b94ce7c/frameset.htm

Copyright SAP AG 2010

Page 6 of 14

Customer How-To Guide for Creation of Standard Set Types in CRM

6 Assigning the set type to the product header (optional)


You might want to make additional fields available on the UI in the product header data (general data). These could be fields from your own set types. To do so, create a new context node for the view PRDHS/CustomHeaderFields for your set type. You need to have a created enhancement set and enhance the view PRDHS/CustomHeaderFields first. Please refer to note 1088910 for adding additional fields for any Product-type. Change the inheritance of the generated context node class to the super class CL_PRD_HEADER_CONTEXT_NODE. Create a constructor for your class with the following code: CALL METHOD super->constructor. me->base_entity_name_inst = base_entity_name. me->base_entity_relation = '<GenIL_Relation_Name>'. Please change <GenIL_Relation_Name> to the real relation name of your set type (something like (Z)ProdSetXYZ). Please assign this node to your design object as well. In the configuration of the view you can now add your set type fields to the corresponding configuration. Remark: This feature allows to provide few important fields of set types with many attributes or not to be required to shown an own assignment block in case the set type has just a few fields.

7 Assigning the set type to the different product applications


7.1 Assigning the set type to a product application
Assign your set types to the relevant overview pages with transaction CRMM_UIU_PROD_GEN. It generates the runtime repository for the set types so that they can be displayed on the overview page. Execute the report for every set type and overview page in which the set type is to be included (PRD0xOV, where x = product type). The standard overview pages are as follows:

Product Type 01 01 01 01 02 02 03 03 04 04 05 07 07

Application Product Competitor Product Object Distribution Chain View Service Distribution Chain View Financing Distribution Chain View IP Distribution Chain View Warranty Financial Service Distribution Chain View

Component PRD01OV PRDCPOV PRDIOOV PRDDC PRD02OV PRDDC PRD07OV PRDDC PRD04OV PRDDC PRD05OV PRD07OV PRDDC

Overview Page PRD01OV/MaterialOV PRDCPOV/CompetitorProductOV PRDIOOV/ObjectOV PRDDC/DCOV PRD02OV/ServiceOV PRDDC/DCOV PRD07OV/FSProdOV PRDDC/DCOV PRD04OV/IPProdOV PRDDC/DCOV PRD05OV/WarrantyOV PRD07OV/FSProdOV PRDDC/DCOV

7.2 Add the assignment block to the list of visible views


After you have assigned the set type to the applications, start transaction BSP_WD_CMPWB and open the configuration of the overview page. Display technical details. You will find an entry for your Copyright SAP AG 2010 Page 7 of 14

Customer How-To Guide for Creation of Standard Set Types in CRM

set type in the list of available assignment blocks. Switch to edit mode and move the entry to the list of displayed assignment blocks. Please provide an appropriate description for the assignment block and save the configuration.

Copyright SAP AG 2010

Page 8 of 14

Customer How-To Guide for Creation of Standard Set Types in CRM

8 Adding the set types attributes to the product search (optional)


Searches are implemented in own UI-components. The naming follows the pattern PRD??QR: PRD01QR PRD02QR PRD05QR PRDCPQR PRDICQR PRDIOQR for product type material and service for product type service for product type warranty for competitor products for product type material and service This search has the fields amount and unit in the search result for objects

Extend the search attribute structure of the corresponding search with a new field (data type of your attribute. Proceed with the following steps:

8.1 Add fields to search query structures via appends


The structures which need to be enhanced via appends are as follows:

CRMT_PRIL_QUERY_ADVSEARCH_CP CRMT_PRIL_QUERY_ADVSEARCH_ES CRMT_PRIL_QUERY_ADVSEARCH_IOBJ CRMT_PRIL_QUERY_ADVSEARCH_PROD CRMT_PRIL_QUERY_ADVSEARCH_TERR CRMT_PRIL_QUERY_ADVSEARCH_WTY

Advanced Search for Competitor Products Advanced Search for Products for Enterprise Search Advanced Search for Individual Objects Advanced Search for Products Advanced Search for Products with Territories Advanced Searches for Products/Warranties

Please also refer to notes 1026956 and 1430798 for more specific information on this topic.

Copyright SAP AG 2010

Page 9 of 14

Customer How-To Guide for Creation of Standard Set Types in CRM

8.2 Add fields to Design Layer (see also step 5)


You have to add the new fields to the design layer in order to add them in the configuration of the corresponding views of the BSP components PRD??QR.

8.2.1 Determine the actual used design layer object


Open in the transaction BSP_WD_CMPWB the search component PRD??QR. Position in the SearchView on the context node SEARCH. With a right mouse click is it possible to open the Assignment to Design Layer. Please note the object type and design object for the next step.

Copyright SAP AG 2010

Page 10 of 14

Customer How-To Guide for Creation of Standard Set Types in CRM

8.2.2

Maintain the design object

Use the transaction BSP_DLC_SDESIGN_DISP and the UI object type/design object from the previous stept. Copy the corresponding design object and modify it.

External Documentation of the design layer: http://help.sap.com/saphelp_crm70/helpdata/EN/46/79ae572abc49c9a4f7a45d5b94ce7c/frameset.htm

8.3 Add fields to configuration of search views


You now can add your field to the configuration of the search parameters(BSP component PRD??QR, view PRD??QR/Search, PRD??QR/SearchHelp). Use the configuration with object type SEARCH. Do this with transaction BSP_WD_CMPWB.

8.4 Add a special search value help to the search field


Suitable value helps can be provided for the additional attributes using the method IF_CRM_PRIL_SEARCHEXIT~CHANGE_DQUERY_DEF_EXTENSION of the BAdI CRM_PRIL_SEARCHEXIT. You can define your own implementations for this method in your own BAdI implementation.

Copyright SAP AG 2010

Page 11 of 14

Customer How-To Guide for Creation of Standard Set Types in CRM

8.5 Add fields to CRMC_PRSEA_ATTR


Make an entry for this attribute with the set type id and the attribute name transaction SM30 in view CRMC_PRSEA_ATTR and transport it. The name of the attribute has to be the same as specified in the append structure.

8.6 Add field to search result list


Enhance the corresponding SearchResult view via the BSP workbench with the enhancement set. Create a new context model attribute via the wizard and use your created set type relation (something like (Z)ProdSetXYZ). The according setters and getters will be automatically generated. The method of the context node class PRD??QR/SearchResult GET_TABLE_LINE_SAMPLE has to be enhanced with the field name.

Copyright SAP AG 2010

Page 12 of 14

Customer How-To Guide for Creation of Standard Set Types in CRM

8.7 Add fields of search result list to design layer


You have to add the new fields to the design layer in order to add them in the configuration of the corresponding SearchResult-views of the BSP components PRD??QR Please identify at the context node RESULT the actually used design object and object type. Use the transaction BSP_DLC_SDESIGN_DISP to maintain the design.

Copyright SAP AG 2010

Page 13 of 14

Customer How-To Guide for Creation of Standard Set Types in CRM

Copyright SAP AG 2010

Page 14 of 14

Anda mungkin juga menyukai