on 07-12-2010 2:48 PM
Hello!
I'm working with CRM7.0 and now i have the requirement to run report from quotation view in web UI. For this purpose i need to create new button which will call my report. I've found that button can be created via BSP Component Workbench.
Who can guide me with creating?
Thanks in advance!
Hi,
you can create a button in do_prepare_output of the view
DATA: ls_button TYPE crmt_thtmlb_button.
IF gt_button IS INITIAL.
ls_button-text = 'TEST BUTTON'.
ls_button-on_click = 'NEW'.
ls_button-enabled = abap_true.
* ls_button-tooltip = 'TEST BUTTON'
APPEND ls_button TO gt_button.
CLEAR ls_button.
ENDIF.
I hope it will help you.
Regards,
Kamesh Bathla
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If someone has problems with display button, try add
actions = "<%= controller->gt_button %>"
into your *.htm page in chtmlb tag. gt_button must be public.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For some reasons i can't post it the way i want to because of an error... here a bad looking part, but it works anyway 😛
Another way could be a seperate button somewhere on your view. For this you have to do some coding in the .htm too:
a thtmlb button with id, type, onClick and text
onclick is filled with the event and text contains the text on the button.
For the type, check the cl_thtmlb_util class for the available attributes for buttons (new, cancel, save, etc.) to change the appearance to your needs.
This coding can be placed anywhere in the .htm where you want to have your button. ontop of some fields, below or where ever you like.
There is also a way to add a button to the overviewpage-toolbar, but i don't think you will need it here.
I hope this guides you through your issue.
Regards
Dennis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Olga,
as promised i give a short hint for 2 variants that I commonly use:
If you want to add a button to the toolbar of your view, you do the coding mentioned by Kamesh.
To display the button afterwards you have to insert some coding into the .htm of the view.
In general it's something like:
<hthmlb:areaFrameSetter toolbarButtons = "<%= controller->gt_button %>"
maxButtonNumber = "<number of buttons in the toolbar> " />
The entry after toolbarButtons is where you defined your gt_button.. in the example it would be defined in the component_controller.
If you defined it on your view, you can simply write
"<%= gt_button %>"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Dennis for your reply! Provide please your examples.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Olga,
yes, you have to redifine this method.
The coding posted by kamesh will customize the appearance of your button ( text 'TEST BUTTON', Tooltip, type, etc. ) wich can be changed due to your needs.
You also have to define an event-hanlder wich name you have to enter in the ls_button-on_click.
As the name tolds you, this event-handler will then be called after clicking the button.
just to mention, you have to define the gt_button with type CRMT_THTMLB_BUTON_T on your view in the implementation class too (if it doesn't already exists).
Depending on where you want to place your button (toolbar, header of a table, somewhere on the view) you have different ways to implement them. If you have problems on this, i can give you some examples.
Regards
Dennis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you mean that i need to redefine method DO_PREPARE_OUTPUT and to put there this code?
As i understand to begin with i need to draw my button(i don't know where) or not?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
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.