63499266 set type customer how to guide

14
Customer How-To Guide for Creation of Set Types in SAP CRM Valid from CRM 7.0 onwards Version Status Date Reviewed/Approved by 1 Released

Upload: tom-marks

Post on 18-Apr-2015

237 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 63499266 Set Type Customer How to Guide

Customer How-To Guide

for Creation of Set Types

in SAP CRM

Valid from CRM 7.0 onwards

Version Status Date Reviewed/Approved by

1 Released

Page 2: 63499266 Set Type Customer How to Guide

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

© Copyright SAP AG 2010 Page 2 of 14

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 _____________________________________________ 5

3.2 Creating an UI configuration __________________________________________________ 6 3.2.1 Creating a default UI configuration ____________________________________________ 6 3.2.2 Adapting the UI configuration _________________________________________________ 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 Assigning the set type to a product application __________________________________ 7

7.2 Add the assignment block to the list of visible views ______________________________ 7

8 Adding the set type’s attributes to the product search (optional) _______________ 9

8.1 Add fields to search query structures via appends _______________________________ 9

8.2 Add fields to Design Layer (see also step 5) ____________________________________ 10 8.2.1 Determine the actual used design layer object __________________________________ 10 8.2.2 Maintain the design object __________________________________________________ 11

8.3 Add fields to configuration of search views ____________________________________ 11

8.4 Add a special search value help to the search field ______________________________ 11

8.5 Add fields to CRMC_PRSEA_ATTR ____________________________________________ 12

8.6 Add field to search result list _________________________________________________ 12

8.7 Add fields of search result list to design layer __________________________________ 13

Page 3: 63499266 Set Type Customer How to Guide

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

© Copyright SAP AG 2010 Page 3 of 14

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 Key Fields Multiple-Value Attributes Organizational Dependency

Multiple use No Yes Can be organization-dependent

Yes No

No multiple use No No Organization-independent

Yes No

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.

Page 4: 63499266 Set Type Customer How to Guide

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

© Copyright SAP AG 2010 Page 4 of 14

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 single-line or multiline, are always organization-independent. Template-Enabled Templates allow you to predefine and therefore standardize data for set types. This data is referenced

Page 5: 63499266 Set Type Customer How to Guide

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

© Copyright SAP AG 2010 Page 5 of 14

by the set types on the Product page. The templates themselves are defined in Customizing for Cross-

Application 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

Page 6: 63499266 Set Type Customer How to Guide

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

© Copyright SAP AG 2010 Page 6 of 14

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 View

Single Line Set Types PRDGENSET/SLSeteOV

Single Line Set Types with Multi Value Attributes PRDGENSET/SLMVSeteOVVS PRDGENSET/SLSeteOV PRDGENSET/SLMVAttreOV

Multi Line Set Types PRDGENSET/MLSeteOV

Single Line Set Types (Distribution Chain Dependent)

PRDGENSET/SLSetEF PRDGENSET/SLDCSetEF

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

PRDGENSET/SLMVDCSetELVS PRDGENSET/SLMVDCAttrEL PRDGENSET/SLSetEF

Multi Line Set Types (Distribution Chain Dependent)

PRDGENSET/MLDCSetEL

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

Page 7: 63499266 Set Type Customer How to Guide

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

© Copyright SAP AG 2010 Page 7 of 14

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

Application Component Overview Page

01 Product PRD01OV PRD01OV/MaterialOV

01 Competitor Product PRDCPOV PRDCPOV/CompetitorProductOV

01 Object PRDIOOV PRDIOOV/ObjectOV

01 Distribution Chain View PRDDC PRDDC/DCOV

02 Service PRD02OV PRD02OV/ServiceOV

02 Distribution Chain View PRDDC PRDDC/DCOV

03 Financing PRD07OV PRD07OV/FSProdOV

03 Distribution Chain View PRDDC PRDDC/DCOV

04 IP PRD04OV PRD04OV/IPProdOV

04 Distribution Chain View PRDDC PRDDC/DCOV

05 Warranty PRD05OV PRD05OV/WarrantyOV

07 Financial Service PRD07OV PRD07OV/FSProdOV

07 Distribution Chain View PRDDC 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

Page 8: 63499266 Set Type Customer How to Guide

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

© Copyright SAP AG 2010 Page 8 of 14

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.

Page 9: 63499266 Set Type Customer How to Guide

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

© Copyright SAP AG 2010 Page 9 of 14

8 Adding the set type’s attributes to the product search (optional)

Searches are implemented in own UI-components. The naming follows the pattern PRD??QR:

PRD01QR for product type material and service

PRD02QR for product type service

PRD05QR for product type warranty

PRDCPQR for competitor products

PRDICQR for product type material and service This search has the fields “amount” and “unit” in the search result

PRDIOQR 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 Advanced Search for Competitor Products

CRMT_PRIL_QUERY_ADVSEARCH_ES Advanced Search for Products for Enterprise Search

CRMT_PRIL_QUERY_ADVSEARCH_IOBJ Advanced Search for Individual Objects

CRMT_PRIL_QUERY_ADVSEARCH_PROD Advanced Search for Products

CRMT_PRIL_QUERY_ADVSEARCH_TERR Advanced Search for Products with Territories

CRMT_PRIL_QUERY_ADVSEARCH_WTY Advanced Searches for Products/Warranties

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

Page 10: 63499266 Set Type Customer How to Guide

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

© Copyright SAP AG 2010 Page 10 of 14

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 Search-View 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.

Page 11: 63499266 Set Type Customer How to Guide

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

© Copyright SAP AG 2010 Page 11 of 14

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.

Page 12: 63499266 Set Type Customer How to Guide

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

© Copyright SAP AG 2010 Page 12 of 14

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.

Page 13: 63499266 Set Type Customer How to Guide

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

© Copyright SAP AG 2010 Page 13 of 14

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.

Page 14: 63499266 Set Type Customer How to Guide

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

© Copyright SAP AG 2010 Page 14 of 14