cancel
Showing results for 
Search instead for 
Did you mean: 

CRM - Add column

Private_Member_19084
Active Contributor
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Private_Member_19084
Active Contributor
0 Kudos

Hi Dinesh,

thank you very much for fast reply.

It don't must be a dynamic column.

I would prefer a static one, because I think it is easier to develop

Do you also have a link for this?

Thank you

Former Member
0 Kudos

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

Private_Member_19084
Active Contributor
0 Kudos

Hi Dinesh,

yes this is exactly what I want.

Could you please just give me a crash guide how to do this?

My component is CRM_BT_TRANSINB.

I've now created an enhancement-set for this component in BSP_WD_CMPWB.

But how can I add now the node?

And in which method can I fill this column?

Thank you

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Private_Member_19084
Active Contributor
0 Kudos

Thank you Dinesh for this reply.

But how do I assign it to design layer?

so how I think I know, but to which Object do I've to assign this?

It is a long list available

Private_Member_19084
Active Contributor
0 Kudos

Hi again,

so now I did assign to Design Layer with option "No Design Layer".


The column is now available in my table.

But how can I fill it?

Is it with method GET_ZSTEAM???

But if yes, wherefrom do I get the current object lines?

Thank you

Former Member
0 Kudos

Hi Christain

You will have importing parameter ITERATOR in GET method

Based on conditions you can get the data and Set there

Regards

Dinesh Gurram

Private_Member_19084
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Private_Member_19084
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Christian

I think LO_DREF is a data reference variable . So you cannot move it to a data object.

Declare LO_dref as a string.

Now you can move Lo_dref to Lv_object

Lv_object = Lo_dref.

Regards

Dinesh Gurram

Private_Member_19084
Active Contributor
0 Kudos

Hi Dinesh,

thank you very very much. I am so sorry for this mistake. I just have to use the method

get_property_as_string instead of get_property.

BTW: Do you also know a guide, how to add a new "Search Criteria"???

Thank you

Former Member
0 Kudos

Hello Christian,

                           You can follow as suggested by . (OR) you can follow like this.In the get method you  already have a attribute 'value' of type string.

value = if_bsp_model_util~convert_to_string( data_ref = dref

                                                                 attribute_path = attribute_path )

Regards,

Santosh

Former Member
0 Kudos

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

Private_Member_19084
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hello Christian,

                        You can achive your requirement through adding new field through AET. while creating new AET field you should selct the option corresponding to your requirement  in 'Search Relevance' field.

                          Please open a new thread and post it as seperate Query.

Regards,

Santosh

Former Member
0 Kudos

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

Private_Member_19084
Active Contributor
0 Kudos

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

Private_Member_19084
Active Contributor
0 Kudos

any ideas on that?

Former Member
0 Kudos

Hi Christain

No idea right now . .

Former Member
0 Kudos

Hi Chris,

I have the same issue, my field appears fine in my pilot system, but gives me this error  "No corresponding EFC-Elemnt" on my field. How did u fix it ?

Thanks

Answers (1)

Answers (1)

venkata_bharath
Participant
0 Kudos

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