cancel
Showing results for 
Search instead for 
Did you mean: 

Reg : edit mode for field in Opportunity search and result

former_member198132
Active Participant
0 Kudos

Hi all,

i need to bring the field in EDIT mode in opportunity search results . The component is BT111S_OPPt.

How can i achive this requirement.

regards,

ajay

Accepted Solutions (1)

Accepted Solutions (1)

CarstenKasper
Active Contributor
0 Kudos

Guys honestly stop this! This thread really does contain a lot of nonsense.

Fact: All result objects of type BTQR... only consist of a structure. There is NO application logic, not even a GenIL implementation class behind. Thus they can not be put into EDIT mode or even saved.

The only option you have, while staying in BOL, is to read for every result object the correct BTOrder (look at the relations of the BTQR... object) and then traverse around the BOL tree. This BTOrder can be locked and saved.

Additionally you have to change the tag on the BSP page. Usage RESULTLIST is just not good then...

However I would not recommend it in any way. Executing a search with 100 search results and then trying to lock them all? You must be kidding or have very few users on the system. It is very likely that you will end up with 30 messages telling you that a certain transaction could not be locked because someone else is editing it.

I have been on a project once where this "feature" had been implemented for the account search. It directly operates on a valid BuilHeader. Anyway locking all BPs shown in the search was out of scope.

This may sound harsh, but I just want to help you here.

cheers Carsten

former_member198132
Active Participant
0 Kudos

Thanks ..I am closing the Thread..

0 Kudos

Exactly. I don't see a valid and strong use case for this requirement.

Thanks & Best Regards,

Leon

Answers (4)

Answers (4)

former_member198837
Active Participant
0 Kudos

Hi All,

I have this similar requirement too.

User want to have new search page for Opportunities where he/she is maintained as  Opportunity Owner.

He/She want to see the fields which is edited by him mostly to be shown in result page and there should be Edit List and SAVE ALL button so that user can directly edit multiple Opportunities and save them in one go which save lot of time for him.

I have other requirement too added for it:

Can you kindly check the link:

http://scn.sap.com/thread/3378884

Regards,

Karthik.

CarstenKasper
Active Contributor
0 Kudos

Karthik,

read my message from above and talk to your customer. It is not a good idea. In case you are just a developer go and talk to the consultant that took up the requirement.

Yes it is technically possible, but please think about what really has to be done before poking around in the system. :

- read all BTOrder using relations

- edit BSP page

- edit View to support EDIT mode

- reimplement all the SAVE logic from the original component (including all registered event handlers! Not just the save button)

- throw a data loss popup around the search component

- deactivate everything when you are in SearchHelp mode

- reimplement all Valuehelps for all editable fields

- ...

You will just make you life (your effort estimation is going to be way off) and that of your customer (when the original component is changed/upgraded by SAP or you all logic has to be copied to the search) worse. Maybe even mine when I have to work for your customer and have to repair this.

cheers Carsten

Former Member
0 Kudos

All,

    Our group would like to do the same (make relevant for forecast editable in the opp search results)

In the out of the box Pipeline Performance PPM_OPPLIST, this functionality already exist and I do not believe the all the opportunities in the results are being locked.  We don't use the pipeline feature as multiple organizations can be on an opportunity where that looks pegged to the sales org of the opportunity.

CarstenKasper
Active Contributor
0 Kudos

Glenn Michaels wrote:

In the out of the box Pipeline Performance PPM_OPPLIST, this functionality already exist and I do not believe the all the opportunities in the results are being locked. 

Did you ever have a look and checked for yourself? Knowing is better than believing.

Just follow through the event handler EH_ONSUBMIT on the views implementation class to CL_PPM_OPPL_OPPLISTVIEW_IMPL->SAVE().

But one thing is true: SAP seems to take a slightly different approach here. I believe during the time of CRM 4.0 and ICWC they called it "Optimistic locking": You first do your changes and see afterwards if they can be saved. Has been leading to conflicts if many people work on the same transactions. In ICWC context however it was OK, because you had one customer "logged in". In regular CRM this use case is not very likely.

If someone wants to try and implement such a wrapper around the search so be it. You all probably have noticed the feature to change multiple activities at once regarding a single field like status, etc. . This will do something similar, but in no way put the whole result list into EDIT mode. You just iterate over all results and set the single field. If not possible an error is shown.

cheers Carsten

Former Member
0 Kudos

Hello Carsten,

      I'm more functional than technical.   We see in the pipeline screens the icon to open or close the briefing card. In our EhP2 we only see the opportunity is locked when the briefing card is opened and soon as the briefing card is closed the opportunity is editable and if any changes were made we see the count in table CDHDR increase by 1, so closing the briefing card looks to commit any changes.

     If we could bring the briefing card to the regular opportunity BT111S_OPPT results that would be acceptable.  We have a developer doing some investigation.

Former Member
0 Kudos

Hi Ajay

If the field is Read only attribute you cannot change into EDIT mode

and if you directly use GET_I method changeable fields will not get into EDIT mode . . .

( mostly GET_I  will work perfectly for value node fields )

You need to lock the entity first and then it will turn into edit mode ( note : only changeable fields will get into edit mode )

handle the code in the EH_ONSELECT event of result view ( Get the selected entity ) . Follow the steps in the below link then selected line ( Changeable fields  ) will get into edit mode

http://scn.sap.com/thread/3327457

Hope it helps

Regards,

Dinesh Gurram

0 Kudos

Hi Ajay,

Before coming to the solution, I would like to know what are you trying to achieve by making the field editable in the result view.

I would like to point out here, that search result object is read-only. So if you want to perform Save/Update on opportunity, then you will have to implement it differently.

Thanks & Best Regards,

Leon

former_member198132
Active Participant
0 Kudos

Hi Leon, yes correct!!

user want try to change some data into Result list level, then automatically it will needs to get updates the opportunity.

regards,

ajay

0 Kudos

Hi Ajay,

It would be better if you can explain your requirement in detail. That will help us to guide you better.

Thanks and Best Regards,

Leon

former_member198132
Active Participant
0 Kudos

Hi Leon, First of all Thanks for your replies .

When  ever  Opportunity result is displayed , user will select the any of the column data ( means he will be selected that column) then that field data should come into EDIT Mode.

User may edit the existing data or Enter  new data( if that column does not have any have data).

Once he completes that exercise , Opportunity  data would be save automatically.

Regards,

ajay

Former Member
0 Kudos

Hi Ajay,

First go to .htm page of your  in the configuration tab add this line

                     allRowsEditable       = "TRUE"

Now when you select the row, Get the index of selected row into a variable gv_selectedindex.

Now in GET_I_XYZ

DATA: lr_entity      TYPE REF TO cl_crm_bol_entity.


 
IF iterator IS BOUND.
    current
= iterator->get_current( ).
    lr_entity ?= current
.

   

   lv_curr = iterator->get_current_index( ).

         IF lv_curr = gv_selectedindex.

    IF lr_entity IS BOUND AND lr_entity->is_changeable( ) = abap_false.
      lr_entity
->switch_to_change_mode( ).

       rv_disabled = abap_false.


   
ENDIF.

     ENDIF.

  ENDIF.

Regards,

Pratheek

former_member198132
Active Participant
0 Kudos

Hi Pratheek, still those results fields are not coming to editable.

user want directly change the data in result list . that is my requirement

regards,

ajay

0 Kudos

Hi Ajay,

Are you sure you have a valid use case for this requirement? If not, I would suggest not to spend time for this.

Thanks and Best Regards,

Leon

Former Member
0 Kudos

Hi Ajay,

Did you Lock the entity?

Are you getting New Result Object as Search Result or is the object same as the object you want to edit?

If you have a separate Result Object then I dont think you can get it into edit mode.

Regards,

Pratheek

former_member188098
Active Contributor
0 Kudos

Hi,

You can make a particular field editable by get_i method of attribute.

in GET_I method of field.

rv_disabled = 'FALSE'.

But what do you want to achieve after making field editable in result view.

You also need to check the properties of search result node in genil_model_browser, if its attribute are changeable or not.


Regards,

Harish Kumar

former_member198132
Active Participant
0 Kudos

Hi Harish, Yes !! you are correct .

But here My case is When user placed or selected that column then only that field data should be editable mode.

I saw one event method EH_ONSINGLESELECTION . Its confusing to me.

regards,

ajay

former_member198132
Active Participant
0 Kudos

Hi Harish, even though we implemented the  in method GET_I_<Attribute>,

that field is not coming in Edit Mode.

regards,

ajay

former_member188098
Active Contributor
0 Kudos

hi,

i think search result node's attributes have the property of not changeable. Even if you make these fields editable, you will not able to lock these object.

check your node in genil_model_browser as :-

And one simple way is try to  save changes after search in genil_model_browser.If you are able to save changes then you can do it by code.

Regards,

Harish