Start of Content Area

Procedure documentation Enhancing the View Context Locate the document in its SAP Library structure

In the next step, you create context elements for the total price, the quantity, and the currency. These need to be kept in the context so that different UI elements can access them. Since the data is required only in this view, it does not need to be mapped to the component controller context.

Procedure

       1.      Choose TutWD_Table_Init à Web Dynpro à Web Dynpro Components à TableComp à Views à TableCompBasketView.

       2.      With the secondary mouse button, click the Component Controller and choose Edit.

       3.      Switch to the Context tab, click Context with the secondary mouse button, and choose New  ® Value Node.

       4.      Enter TotalPrice as name, activate Create with structure binding, and confirm with Next >.

       5.      Start Dictionaries  ® Local Dictionary  ® com.sap.tut.wd.tutwd_table_init, choose Price  and click Next >.

       6.      Select all the available attributes by activating TotalPrice and choose Finish.
The following graphic illustrates the structure binding:

This graphic is explained in the accompanying text

       7.      Select the TotalPrice context node.

¡        Choose the value 1..1 for the cardinality property.

¡        Choose the value 1..1 for the selection property.

       8.      Select the value attribute AMOUNT.

¡        Choose the value true for the calculated property.

¡        Choose the value true for the readOnly property. The set method is deleted.

       9.      Save the current status of your project by choosing This graphic is explained in the accompanying textSave all Metadata.

                            a.       

Result

You have now created all the context nodes and attributes that are necessary in order to ensure availability and to save the data.

Next Step:

Creating the Table

 

End of Content Area