on 07-21-2014 5:20 PM
Hi gurus, I am trying to change the text-001 and text-002 in method EH_ONSEARCH at CL_CRM_BT_T_SEARCHVIEW_IMPL.
I've amplied the component, but I could do it, because, Do you know any nice way to change these texts ..
Thanks in advance.
Regards
I see two options here, one is change the translation (in the texts maintenance go to->translate) this doesn't require a standard modification but I must be aware this change will be overwritten if you apply a note/sp/etc. which involve the text object.
Another option can be modify the text directly, the advantage of this is you have control during the SPAU to keep the modifications or not.
SAP Library - Changing the SAP Standard (BC)
You can also create a custom text in the Z class and overwrite the logic where the text is called
super->redefined_method( )
* All my logic here
I did the third option when I was dealing with Window titles and worked fine
Cheers!
Luis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Diego,
If i understood your question properly, below is the solution for that
Enhance your component then Z_*IMPL class will be created.
Then redefine the search method.
But don't call the super class method.
Copy the code from super class and place the code in the Sub class . Now you can change the text-symbols by creating new texts.
Hope it will be fine.
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.
Sorry but I must disagree, What will happen if you don't call the super and a note or SP applies to that code to...increase the some functionality or fix something? I would rather modify the text than do that, at least I have control via SPAU.
You can also create an implicit enhancement spot, at the beginning or end of the standard code, but this will lead to problems if there's a return/exit sentence, specially if you place the enhancement at the end.
Yes i agree with you . . . Thanks Luis . .
Diego . .
No need of changing the text symbols . . In the standard code he is setting the global variable GV_RESULT_TITLE . .
So what you do is call the super class method and after this you overwrite the GV_RESULT_TITLE value . ( Use the procedure which standard is following to fill gv_result_title by passing your own text symbols )
Regards
Dnesh Gurram
No i am telling to change gv_result_title.
eg : after calling super method gv_result_title = 'more entries 123 found'.
Why can't we completely overwrite gv_result_title ( which is global variable ) by our own technique with the texts required.
( Ofcourse we are doing independently . Thing is we need to change the texts . We don't need the standard text and then why do we need dependence here )
Maybe we are running in circles,
of course you can overwrite the field after calling the supper, my point is the field can have different values:
eg1: "more entries 123 found"
eg2: "Nothing found"
eg3: "blahblahblah"
If we assume the eg1 is the one which points to the text-001, in order to have control and just modify the variable according if the text-001 was used, otherwise you will be always overwriting the text, not respecting the logic inside the SUPER
Everybody can represent his view on how to "redefine" method and overwrite values. Both of you guys do have a point. Sometimes it's easier to overwrite the value, sometimes it's better to call a super-method and analyze the value deeply afterwards. Please, let the topic starter decide what he wants.
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.