cancel
Showing results for 
Search instead for 
Did you mean: 

Add a Button in a table header Webdynpro

Former Member
0 Kudos

Hi all,

how can'i add a button in a table header ? and how/where schould be implemented?

thank you all

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Right click on table->insert toolbar.

Once you have the toolbar then right click->insert toolbar item->toolbar button. - it adds toolbar button, just create onaction method to implement this like as normal button.

cheers,

Kris

former_member187977
Participant
0 Kudos

hi,

kissnas is right. please do as kissnas suggested.

regards

seventyros

Edited by: seventyros on May 7, 2011 6:40 AM

Former Member
0 Kudos

hello,

i tryed it several times, and each time the new button is not displayed on the table header, either up or down !!!

this new button should be displayed on the same table header (where already toolbar buttons of the table are displayed)

is this possible? if not? is there a way to hide to table header that i can display all new button in the right place?

thank you all

Former Member
0 Kudos

Hi,

I am not getting what is your problem exaclty? Tell me what you done, there is no difficulty to create Header toolbar items.

Cheers,

Kris.

Former Member
0 Kudos

hi,

i just created a table UI element, this table has some toolbar buttons ( exampl : Print version export..) adding to those buttons, i want add a new button (on the same row)

thank you for your replayy

gill367
Active Contributor
0 Kudos

how r u trying to add new buttons.

if it is same toolbar

buttons will be autmatically aligned

they wont be up or down.

check where are the previous buttons added. is it a toolbar of simply textview above the table which contains the buttons

thanks

sarbjeet singh

Former Member
0 Kudos

this is the component of the table (SALV_WD_TABLE) some buttons will be displayyed automaticaly with the table( on the table header) I dont know where or how this works, and i dont get nothing with the right click on the table UI element. the Toolbar UI element is not included in table UI element ( means i have to create Toolbar buttons extra and then table UI element) but not create table UI lement and create in it a toolbar buttons

Former Member
0 Kudos

Hi,

If you want to create Some custom buttons in ALV, you need to write some coding.

Please go through this...

If you want to create button is table toolbar. steps :

1. create TABLE UI Element in view - go to ROOT UI ELEMENT CONTAINER( right side here you find inserted Table ) - Right click on that ->you fined one option INSERT TOOLBAR, click this-> it will insert Toolbar again right click on this tool bar-> You wil find insert

toolbar element->select Toolbar button. It will insert toolbar and buttons.

Cheers,

Kris.

Former Member
0 Kudos

hi,

all you said is right, and i did it, but the button is not dispayed on the (same) table header !!! this is my issue. either up of te table header or down !

and right click on the table is not showing an add element .

BR

gill367
Active Contributor
0 Kudos

SALV_WD_TABLE is the componenet which is used by other component .

you should not modify anything there.

the table displayed in this comp is used in your actual comp by using comp ussage.

there you intialize this comp (SALV_WD_TABLE) and then use it to display the data.

so there in the using component. you need to write the logic for adding a button in the toolbar.

follow this article, here they are adding "search flight" button to the toolbar.

follow the same procedure.

thanks

sarbjeet singh

Former Member
0 Kudos

Hi,

thank you for you replay, would you please give more explanation, cause i didnt get your point, and which article do you mean?

and how can I initialize this comp usage?

thank you

gill367
Active Contributor
0 Kudos

oh sorry i forgot to paste the link .

[ Adding custom button to ALV table|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/101df93f-4b5c-2910-14aa-9eb0338c2110]

follow the same as procedure.

thanks

sarbjeet singh

Former Member
0 Kudos

wd_this->wd_cpuse_process_tab( ).

or wd_this->wd_cpuse_alv( ).

which one shall I use then?

thank you

gill367
Active Contributor
0 Kudos

whatever name you have given to the component usage will eb used.

do one thing go to the code wizard (press ctrl + F7)

then one window opens there select the third radio button "instantiate Used Component"

in the below input field go and select the used comp using F4.

then press enter and automatically it will coem in the code.

thanks

sarbjeet singh

Former Member
0 Kudos

thank you very much, it works now

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Do you mean toolbar button or you mean in the column header ?

Column header is not possible.

If you mean a tool bar button then insert a Toolbar UI element by right clicking the table UI element and insert a toolbar

Once you have the toolbar then right click->insert toolbar item->toolbar button.

Former Member
0 Kudos

If you are using a table UI element, right click on table ui element, it will give an option to include header. In that header, you can add a button. Then add the event/method to it.

If you are using an ALV, check this link

Link: [ALV Table Header|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/101df93f-4b5c-2910-14aa-9eb0338c2110?quicklink=index&overridelayout=true].

Basically, get a reference to ALV component and use the methods provided to add the button.

Regards,

Santosh