The concept of Mixed Node: Can a value attribute be added to Model node?
The concept of Mixed Node: Can a value attribute be added to Model node? The answer is yes!
We might encounter a situation where we need to add an additional field to the existing model node. For example, we have the employees' personal data and one more field needs to be added for his age in years. As the data for employee would be containing the field for date of birth but we need to just display the age upon calculation, we can add a value attribute to the existing node.
1. Create a component using the t-code: BSP_WD_CMPWB
Here the context node is model node with BOL object as BTSrvRequestH. The model added to this component is ONEORDER.
The attributes for the node OVPAGENODE are as shown below:
2. Now we want to add a value attribute to this node: For this we need to expand the context attribute->OVPAGENODE->Attributes.
Right click on Attributes and click on Create:
3. A wizard will get opened. Click on continue at the start screen. The next screen will show the option for Selecting the attribute type: Choose the radiobutton for Add Value Attribute and click on Continue.
4. Enter the attribute name and the DDIC Type as shown below: Click on Continue:
5. Click on Complete on next screen.
6. We can find the attribute added to our model node as shown below:
7. Also, the method IF_BSP_MODEL~INIT get redefined with following declaration by the wizard.
We can go further with attribute added in this way.