Aik Leemreize
Read all my blogsDesign Layer
First of all, a little background knowledge about the design layer in SAP CRM. This layer is used by the WebUI to change the representation of a business object before passing it to the presentation layer. The picture below shows how where the design layer is located. As a starting point, I have taken SAP’s standard layer-picture.
It consists of design objects that can group business content (as in…business objects) together, so this content is available for presentation in the WebUI and can be used in the same business context. Most of the standard SAP UI object types contain a lot of attributes, to be able to serve all customers.
SAP has already created a lot of design objects that you can copy which are used as a standard , so let’s first take a look at the WebUI. Suppose I want to change the label of the NAME2-field everywhere it has been used by a different label. I navigated to a Business Partner, selected the standard account details view – Name2-field and clicked F2. There is part in the technical data, which is specifically for design objects:
Customer Relationship Management -> UI Framework à UI Framework Definition -> Design Layer -> Copy SAP Design Objects
Navigate to the UI Object BP_ACCOUNT, select it and click on the Design Object – node. You can see all the design objects that are linked to this UI Object (SAP Standard). We already know that we use BUSINESSPARTNER, have a look in here by selecting it and clicking the(not the node Design). You can see that there is a reference between a more generic UI Object Type BP with the design object BUILHEADER.
Without going into details of the BUILHEADER yet, we first want to know where this object is used.
Click on the ‘Where Used’ –button. It shows all the views this design object is used and as you can see, our view is also in this list:
This means, that if we change anything in the design of this object, this might influence the behavior of all the views listed. ‘What do you mean, “might”…..?’ Well, to refresh your memory :
- The standard configuration of the field NAME2,
- of the UI-object type BP_ACCOUNT,
- linked to design object BUSINESSPARTNER
- Is referenced by a different Design Object called BUILHEADER
- For a different UI Object Type called BP
Changing the design
Still following? Well, if I click on the Display button, I see the actual design of the object BUILHEADER, which contains all the attributes that can be used in the configuration of a UI component is used that is assigned to this Design object.
The configuration of these attributes influences the behaviour of the design object BUSINESSPARTNER.
This means, that if I don’t have any attributes listed in the design of BUSINESSPARTNER, it takes the values over from design object BUILHEADER.
- Go back and click on ‘Copy from SAP’. The label speaks for itself I assume
- Click on ‘Go to copies’
- Leave all the entries as they are, except that you uncheck the ‘Preferred Design object
- Click on the Design-node on the left hand side
- Add an attribute called ‘NAME2’ with the field label ‘This is my field label’
- Save your entries into a transport.
And this is what that looks like:
Take-aways:
- Remember the existence design objects before starting to configure your whole WebUI;
- Think of which objects are to be used with what attributes;
- Keep in mind that there is hierarchy in inheriting design settings :
- Customer objects before SAP objects
- Design objects before Configuration
- If you keep the same names as the SAP standard, you don’t have to make assignments in the component workbench by yourself, this is done automatically.
- First play with the basics before ‘optimizing’ your complete CRM-box and end up with a mess