on 07-03-2013 6:52 AM
Hi experts,
we are using Solman 7.1 and also the CRM inthere (based on WebUI).
Now we would like to add a column to a table.
How can I achieve this?
E.g. with bsp_wd_cmpwb?
Thx in advance
Hi Christain
If you want to add colums dynamically to a table you can go thtrough the below link ( it is explained step by step here )
http://scn.sap.com/community/crm/blog/2012/09/24/dynamic-columns-in-a-table-view
Hope it will help
Regards
Dinesh Gurram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christain
You just want to add a new column ( ie., new field ) to your table view
Am i right???
If so just add a field to your table view node by going to component workbench and by configuring the view a new column will appear in your table view
don't forget to add the field to the design layer
Let me know if any issue with this
Regards
Dinesh Gurram
Hi Christain
Goto the view of component CRM_BT_TRANSINB which contains the table view ( for which you want to add a column )
{ you can also get the table view details by using F2 function key on any field of table view in WEBUI }
*** First enhance the view by right clicking on the view
*** Now goto the context node class ( node of table view ) . Right click and enhance
*** Now you can right click on the Node ( Table view node ) and add a field( attribute )
*** After creating right click on the field and Click on Add to Design Layer
*** Now go to the view configuration tab and Add the new attribute to the table view . so that new column will be displalyed
Let me know if any issue with this
Regards
Dinesh Gurram
Hello Christian,
To add a column in table view you need not to write any code. Just follow the below steps.
->Go to the UI component you are using and enhance it
->Go to the view in which you are containg your table view and enhance it.
-> Then go to the context node of your table view and enhance it
->Then create a attribute which you want to display in your table view
->Go to configuration and move the newly created field from available to displayel fields .
Regards,
Santosh
Hi Dinesh,
thx again for great help.
I've now debugged and played with the method.
In standard-coding it always false at the line "dref = current->get_property...."
Is this an error?
Because when I delete all the coding and set the return-value it will be displayed in the table.
What should I do?
BTW,l do you know in which field of "iterator" or "current" I find the data-id?
TRY.
dref = current->get_property( 'ZSTEAM' )."#EC NOTEXT
CATCH cx_sy_ref_is_initial.
RETURN.
ENDTRY.
Hi Christain
Once check the iterator in the debug mode . In the entity all the attributes will have data except the new field ( because all the other fields got data ie., code is handled some where . For new field no code is being handled , so you will not get any data for that field ).
When ever you write this code
dref = current->get_property( 'ZSTEAM' )."#EC NOTEXT
now DREF will be initial because ZSTEAM value is initial.
if you pass any thing to returning parameter VALUE that will we displayed for each row . Because GET method of a attribute is triggered every time.
If you want to display any data for this field , get the other attributes from the entity and using those fill the return parameter VALUE . So that a specific value will be displayed in each row .
Hope you understand
Regards
Dinesh Gurram
Hello christian,
You want to get the value for the attribute 'ZSTEAM' . you are created this attribute for only display the value or you also want to save.If you want to save the data and then display then make sure that the attribute is added to attribute structure of your bol entity or it is a field from Ztable.
If it is only for display purpose and field of z table then you can directly fetch the value from your ztable and assign the value to 'value' attribute in get-method.
Regards,
Santosh
First, thank you very much for great help.
BUt still one problem with development.
I would like to access the attribute "OBJECT_KEY", this seems to work with the following command:
lo_dref = lo_current->get_property('OBJECT_KEY' ).
After that I would like to move the value from lo_dref to lv_object, which is having the type
crmt_object_guid.
But how can I do this?
with lv_object = lo_dref it don't works, I don't know how to convert this value to the other variable.
Thx in advance
Hi Christain
If you want to add new search criteria , you can create a new field using AET . While creating you can make it as Search relevant or Search Result relevant field. So that the new field will also appear in search page node.
Also you can do search enhancements through BADI . But using AET it is very easy . If we go through BADI we need to handle the code . If we go through AET code will be already handled in the backend.
Regards
Dinesh Gurram
Hi Dinesh,
I've defined the fields as Search-relevant and also relevant for the result-list.
But I don't see the field in the worklist of ITSM???
(also not in the configuration-mode)
How can I add this field to the search-criteria of this?
Do I've to add it again with BSP_WD_CMPWB, to the "SerachView" as attribute and then I've to develop my own coding?
Thank you
Hi Christian
If you select as search criteria relevant while creating field through AET , that field should appear in the Search Query node.
May be you didn't select the Exact business object and Sub object while creating . . . . . . If you did everything right then the field will appear in the Appropriate Structures
Once check with this
Kindly open a new thread so that it helps easily for others in the future
Regards
Dinesh Gurram
Hi dinesh,
I've again a problem.
I tried to add a new column and in development system it did work great.
But in the productive system it want work.
I always get the mismatch "No corresponding EFC-Elemnt" on my field.
And it is a bit confusing, because in the "default" configuration of the layout the column is not available.
But in development it works great, what is my error?
I think I made exactly the same steps like on other columns.
Thank you in advance
Hi Christian,
If you want to add a column in a form view from web ui you need to follow the below procedure.
Step 1: Log on web ui.
Step 2 : Click on the business role.
Step 3 : click on the configuration button on the web page as shown in the below image.
Step 4 : Now click on Make 16 Columns/2 Panels Button to add another column for the form view.
If you want to add a column in a Table view you need to follow the below procedure if the field dosent exist in the available fields.
Step 1 : Open the BSP component.
Step 2 : Open the table view.
Step 3 : Open the context node.
Step 4 : In the that context node we have attributes, now right click on the attributes and click on create.
Step 5 : Now the wizard starts. By using this wizard we have to create the attribute in the table view.
step 6 : After creation of the attribute. Go to the configuration tab and click on the edit button and move the field from available to displayed.
step 7 : Then you can see it on web ui.
Thanks,
Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.