Anda di halaman 1dari 10

Generated by Jive on 2014-06-22+02:00

1
Creating a Custom field and display it in a
table view
This document will help you how to add a new filed in the table view, so that we can display any data related
to that node. So for that we have to create a z (custom) field for that and add it to this screen. Now we will see
standard filed and display data in a table view.
We may sometime come across a requirement of adding standard field to table view in CRM web UI. This
article explains how to add standard field to the table view and display data based on search.
Procedure:
1) Add value attributes to the table view context node
2) redefine GET_TABLE_LINE_SAMPLE and extend the existing structure by adding z fields
3) go to SPRO and search for design layer. There you have to check disable hiding of fields by design layer
checkbox
4) Find out the relation between context nodes.
5) populate the value in the fields by using relation name in GETTER and SETTER method.
Step 1: Add value attributes to the table view context node
go to table context node right click and create.
Creating a Custom field and display it in a table view
Generated by Jive on 2014-06-22+02:00
2
Provide the attribute name any name which is relevant to your requirement and DDIC structure that is data
element for that field.
Creating a Custom field and display it in a table view
Generated by Jive on 2014-06-22+02:00
3
click on continue.
Creating a Custom field and display it in a table view
Generated by Jive on 2014-06-22+02:00
4
Click on complete the wizard will generate one filed under your context node.
While creating table view at that moment wizard will create one structure in GET_TABLE_LINE_SAMPLE.
Step 2 : redefine GET_TABLE_LINE_SAMPLE and extend the existing structure by adding z fields
Creating a Custom field and display it in a table view
Generated by Jive on 2014-06-22+02:00
5
Enhance the GET_TABLE_LINE_SAMPLE method under your context node..
Extending the structure by adding your field in to GET_TABLE_LINE_SAMPLE.
Creating a Custom field and display it in a table view
Generated by Jive on 2014-06-22+02:00
6
Step 3 : go to SPRO and search for design layer. There you have to check disable hiding of fields by design
layer checkbox

SPRO->CRM->UI Framework->Design layer-> Deactivate Hiding of Fields.
Go to table view click on configuration move your filed form available to display.
Creating a Custom field and display it in a table view
Generated by Jive on 2014-06-22+02:00
7
Then we can see your filed in result view.
If we want to display data for that filed we can write the code in getter and setter methods.
Based on the relation we can fetch the data.
Step 4: Find out the relation between nodes.
Go to web ui in which field u have to identify the relation place a cursor on that field click on f2 then u can
identify the component name, view name, context node.
Go to that component there is a method do_prepare_method.
Place a breakpoint
Creating a Custom field and display it in a table view
Generated by Jive on 2014-06-22+02:00
8
We have to pass typed_context->context_node->collection_wrapper right side same as like above.
Double click on that.
Click on collection_ref-> ENTITY_LIST-> CONTAINER_PROXY->data_ref-> RELATIONS
Under this is the relation.
This relation we have to use.
Step 5: In getter and setter method write this code.
Creating a Custom field and display it in a table view
Generated by Jive on 2014-06-22+02:00
9
In setter method .
Creating a Custom field and display it in a table view
Generated by Jive on 2014-06-22+02:00
10
This is the out put..
Thanks & Regards
Srinivas

Anda mungkin juga menyukai