on 09-15-2016 3:30 AM
Hi All,
I want to create HTML editor so that user's can create email and send. Please see the below image, it is from CRM Web UI screen. Here we have a component BT126H_MAIL but it is not showing the email body screen design.
Email body working just like word document so that we can design our own format and can send email.
Can you please suggest is there any way to create HTML View editor in SAP GUI screen.
Regards,
Siva Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Łukasz Pęgiel,
Thank you very much for your help.
Now I am getting the HTML editor in my module program screen please find the attached image .
is there any way to insert new button in the Tool bar. Because after changing data I need to send email.
if I add button in my program then new changes in the HTML editor is not capturing as no event triggered at HTMl level.
in the above link which you have given in the 'SAVE' Button we have some custom event to refresh HTML container.
If I can insert a button there then I will refresh and send the data.
Regards,
Siva Krishna
You can insert new button there, but you need to do it in the code of the nicEdit. The documentation is available on here NicEdit - WYSIWYG Content Editor, Inline Rich Text Application.
Cheers
Łukasz
I'm afraid not, means you have to edit this html file which is attached, inside you'll find Javascript which you need to update.
Currently I cannot help more as I can't remember exact place of inserting the button there, but for sure I was taking this info from nicEdit site.
BTW, have you consider using SAP class for editor? Seems you could do this easier with this class.
Hi Łukasz ,
i have created a class z class in SAP with following methods
created a module pool program and placed Custom Button "Send" and placed Container.
in PBO method
filled custom container by using below code
htmleditor = zcl_html_editor=>create(
io_container = NEW cl_gui_custom_container( container_name = 'CC_EDITOR' )
).
used below method to display data
htmleditor->show(
iv_html = lv_string
iv_height = 3000
iv_width = 3000
).
and created one event
CREATE OBJECT event_handler.
SET HANDLER event_handler->html_changed FOR htmleditor.
up to now everything is looking fine.
if I change and click "Send" button I am not able to receive the changed values
instead of that I am getting previous values only.
if I click 'Save' button in Tool bar then 'ON_SAPEVENT' is triggering and updating the value.
my questions are
1) by clicking SAP 'Send' button is it possible to trigger event to get updated data from container.
2) is there any possibility to add new button 'Send' in the application tool bar so that I can trigger save event code also before collecting data from container to get latest data.
3) if I add custom button is it possible to close the SAP GUI popup after clicking that button.
Please suggest.
Very much appreciated for your help.
Regards,
Krishna
Hi Siva,
1) here I'm not 100% sure but rather not, I think you need to do action on the html side to be able to get current values
2) It's possible of course, I was adding save button as far as I rememeber (icon was already available) but I can't remember exact place now. I'd need to dig in a bit but till next week it's impossible
3) if you look on the code of the editor class, you'll see that once "Save" button is pressed then the data goes to GUI so here you can do anything you want, including closing window.
Cheers
Łukasz
Hi Łukasz,
Thank you very much for your time.
I have added the button by just copy and past of existing code of Save button. But I am getting same logo for new button( As I copied but I don't know to where to change ). After triggering even I am able to control to SAP GUI screen.
After adding that it showing like below.
Code point which i have added is
/* START CONFIG */
var nicSaveOptions = {
buttons : {
'save' : {name : __('Send this content'), type : 'nicEditorSaveButton'}
}
};
/* END CONFIG */
var nicEditorSaveButton = nicEditorButton.extend({
init : function() {
if(!this.ne.options.onSave) {
this.margin.setStyle({'display' : 'none'});
}
},
mouseClick : function() {
var onSave = this.ne.options.onSave;
var selectedInstance = this.ne.selectedInstance;
onSave(selectedInstance.getContent(), selectedInstance.elm.id, selectedInstance);
}
});
nicEditors.registerPlugin(nicPlugin,nicSaveOptions);
Please suggest.
Regards,
Krishna
HI Siva,
U can convert Sap Screen in HTML format using ITS Services using Transaction LM01(Program name : RLMENU)
Thanks,
Paul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
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.