‎2011 Jun 22 1:52 PM
Hi,
I have a text editor in my custom made transaction. I would like to enable the SAVE button immediatly in the application toolbar while chaging the text(after entering a character) in the text editor.
Kindly provide your inputs.
Regards,
Satish.
‎2011 Jun 22 2:06 PM
Hi,
the class cl_gui_textedit does not have an event for your purpose. Either you keep the button active always or you have to create your own class with an additional event (and the corresponding handler method) for your task.
‎2011 Jun 22 2:16 PM
Hi Jorge,
Thanks for your reply.
I can not keep the save button active always since it is depending on other screen fields.
May be i can try for 2nd option, but i have created the text editor using the standard class CL_GUI_TEXTEDIT.
If i have use my own class and event i think i have to change the complete design of that part.
is there any other possibility?
- Satish
‎2011 Jun 22 2:22 PM
Hi.,
there is no such Event., In ABAP you have to press enter then Enable the Button. Unfortunately there are no events like OnBlur, OnKeyPress, OnKeyUp ( which offered by java script ). You have to press Enter
Once you enter the text in text editor and press Enter
if lv_text is not initial.
enable button.
endif.
hope this helps u.,
Thanks & regards,
Kiran
‎2011 Jun 22 2:58 PM
Hi Kiran,
Where can i add the sample code which you have given?
Regards,
Satish.
Hi.,
>
> there is no such Event., In ABAP you have to press enter then Enable the Button. Unfortunately there are no events like OnBlur, OnKeyPress, OnKeyUp ( which offered by java script ). You have to press Enter
>
> Once you enter the text in text editor and press Enter
>
> if lv_text is not initial.
>
> enable button.
>
> endif.
>
>
> hope this helps u.,
>
> Thanks & regards,
> Kiran
‎2011 Jun 23 5:22 AM
Hi.,
In PAI you have to do.,
check sy-ucomm = space. " space for Enter key.
if lv_text is not initial .
do for enabling save., " else set a flag here., In PBO if flag is set do for enable save. ( loop at screen ..... )
endif.,
Thanks & Regards,
Kiran
‎2011 Jun 23 4:24 PM
Hi Kiran,
PAI will not be triggered by pressing enter in the text editor. That is the problem i am facing.
Is there any other alternative?
Regards,
Satish.
‎2011 Jun 24 5:04 AM
Hi.,
> PAI will not be triggered by pressing enter in the text editor. That is the problem i am facing.
.
Why..!!
Ok then code in At User Command Event.
hope this helps u.,
Thanks & Regards,
Kiran
‎2011 Jun 24 12:14 PM
Hi Kiran,
I am not working with Interactive reports.
I have my own screen which has a text editor. I want to trigger an event as soon as i enter a character in that text editor.
is it possible? if possible how?
Regards,
Satish.
‎2011 Jun 27 5:14 AM
Hi.,
It is not possible as soon as we enter in text editor., ( which was discussed previously ). As you said you have custom screen. So for custom screen PAI Event has to be there..!! You have to press Enter after Entering in text editor,, And in PAI based on sy-ucomm you have to make button enable.
Thanks & Regards,
Kiran
‎2011 Jun 27 6:16 AM
Hi,
As it has been discussed, it is not possible to trigger an event and make the save button active as soon as you type into the text editor. Unfortunately you cannot do with the ENTER also as there is no event for the ENTER button in the text editor. The only way I find is to keep the save button active and when you are saving, check if the user has entered any new text or made any changes, then only save and give the message as "saved successfully" otherwise do not save.
Thanks,
Sri.