How to add button ui element in alv table data in web Dynpro ABAP
Hi Experts,
I have one requirement,
Actually I was devloped normal table in web Dynpro ABAP
in that i have one column Display as a button .
when i select that button need to display some data.
same requirement i need to devlope in alv table.
i am going to attach file please check.
Thanks in advance.
Regards,
Subba Reddy.
Hi,
You can create Button in your ALV table column with below code
DATA lo_button TYPE REF TO cl_salv_wd_uie_button.
CREATE OBJECT lo_button.
CALL METHOD lv_value->if_salv_wd_column_settings~get_column
EXPORTING
id = <your column name>
RECEIVING
value = lo_system_select_hdr.
lo_button->set_enabled( value = abap_true ).
lo_button->set_text( value = 'Avaliable List' ).
lo_button->set_tooltip( value = 'Avaliable List' ).
lo_system_select_hdr->set_cell_editor( value = lo_button ).
And for button click action,
Create a method (say SHOW_DATA( ) ) with on_click event handler.And when you click button on your ALV table, SHOW_DATA( ) method will trigger.
Thanks
KH
Similar Messages
-
How to display the rows dynamically in the table display in web dynpro abap
Hi experts,
There is a visible row count tab where you can give the no of rows to be displayed in the output table, but i want it to be done dynamically as the row count of my table may change dynamically at runtime.
And i want to know how to reduce the width of a column as my table display is taking the length as per the binded table specifications.Can anyone please help me out in this issue.
Thanks in advance,
Anita.Hi Anita
You can bind the visiblerowcount property to the a context attribute. and at runtime you can set the context attribute to the no of rows you want in your table,
Regards
Naresh -
How to set the First Line of Table UI in Web Dynpro ABAP
Hi Team,
I have a scenario where I'm displaying two Table controls one below the other. When a line is selected in the first(Top) table, I have a supply function(Event) and I fill the second(bottom) table. Everything works fine till here.
The problem starts when I scroll the bottom table. Lets assume that I'm at line 20 of the second table and I press the lead selection to select another line on the first table. Here the second table is filled with new data but it is automatically scrolled to line 20. My questions:
1) Do I have to set some specific property of the second table? If yes, which one and where should I set it (In the supply function? I already have the "visibleRowCount" set to "10")
2) How do I dynamically get access to the Table Control properties?
Thanks for your timeThank you Maksim,
I did set the "selectionMode" to "Auto". I don't understand where In supply function I have to set lead selection of nested node to first element. Please elaborate on this. Are you talking about the context attribute bound to the second table? OR do I have to change the Importing parameters "Node" and "Parent_Element" of my supply function?
Thanks for your time. -
How to add file type fiter in FileUpload component in Java Web Dynpro
Hi All,
In FileUpload UI, i want to set file type filter, for example as *.PDF, *.JPG, is that possibel in Java WebDynpro?
Thanks a lot!
Huang Jiahi!
you can achieve this filter thing of file type by just taking some strings for diffrent types as extension and assign those to the resource type .
eg.
String extension = ".doc";
WDWebResourceType.getWebResourceTypeForFileExtension(extension)); -
How to handle marked rows in an ALV table
Hi Experts,
there is an ALV table in my Web Dynpro. It has a functionality to handle one marked row via lead selection. This is the coding to get the marked row:
lr_nd_ma_leist = wd_context->get_child_node( name = wd_this->wdctx_tab_ma_leist ).
lr_el_ma_leist = lr_nd_ma_leist->get_lead_selection( ).
idx = lr_el_ma_leist->get_index( ).
My problem is to handle more than one marked row. I changed the contexts' properties to allow to mark more than one row. But how can I get the number and the index of all the marked rows?
Thanks in advance,
Tanuse the method get_element_selected( ) and get_index( ).
data sel type WDR_CONTEXT_ELEMENT_SET.
sel = lo_nd_zdealer->get_selected_elements( INCLUDING_LEAD_SELECTION = abap_true ).
data el type ref to if_wd_context_element.
data indx type i.
loop at sel into el.
indx = el->get_index( ).
endloop.
thanks
sarbjeet singh -
How to put dynamic search help in web dynpro ABAP.
Hi,
I have a table element with two columns in my web dynpro ABAP.Both the columns are F4 helps.
Based on the value of the first column,the F4 help of second column must change dynamically.Kindly tell me how to do this.
Thanks & Regards,
Raji.Hi ,
Use this code to dynamically assign search help and to deactivate search helps.
data lo_nd_info type if_wd_context_node_info.
lo_nd_info = lo_nd->get_node_info( ).
CALL METHOD lo_nd_info->set_attribute_value_help
EXPORTING
name = 'ATTR1' " Your attribute Name
value_help_mode = '121' " Valid value help mode
value_help = 'Z187442'. " Search help name
The various possible values that you can pass to value_help_mode are as shown below.
deactivated 101
automatic 111
ddic 121
ovs 131 -
E-Recruiting u0096 Web Dynpro ABAP UI u0096 Button, Tab, RMP steps Color change.
Hi,
I need to change the color of Heading, buttons, Tabs and Road Map Pattern steps in Web Dynpro ABAP UI for external candidate. Im looking into WDA component HRRCF_C_STARTPAGE to change the color of Heading, buttons, Tabs and Road Map Pattern.
I would appreciate for your valuable input.
also i need to change the Loago. Is logo is configurable through IMG path (SPRO)?
Do let me know, if you need anything else.
See -> Error - when opening/downloading 'NW04SP14EclipseThemesEditor.zip'.
Regards,
...Naddy
Edited by: Naddy on May 14, 2008 11:06 PMHi Naddy,
Export the them from the file system of portal through BSP_UPDATE_MIMEREPOS and change it then import the theme using BSP_UPDATE_MIMEREPOS program and apply the theme.
go through this links hope these help you to solve your probelm.
[url]http://help.sap.com/saphelp_nw2004s/helpdata/en/4e/7feef553415e4fb357e80f7a6223b1/content.htm [url]
[url]http://help.sap.com/saphelp_nw04s/helpdata/en/43/d8e0a488ef05f6e10000000a11466f/content.htm [url]
[url]/people/sergio.ferrari2/blog/2007/04/06/bsphowto--customizing-the-design-of-system-logon-page-in-netweaver-04 [url]
[url]/people/sergio.ferrari2/blog/2007/02/16/sap-web-ashowto--customizing-the-design-of-system-logon-page-new-options-of-the-netweaver-04s [url] -
How to add screen elements at run time on button click in Web Dynpro abap?
Hello All,
I have a requirement wherein the user wants to add the textbox dynamically at runtime on button click action. My questions is, Is it feasible to dynamically add screen elements at runtime? If yes, how?
Please help.
ThanksHi Ajinkya,
This is absolutely possible! Adding view elements at runtime is called "dynamic programming". There are a lot of good resources and tutorials on SCN if you do a search. To start you off, here is an excellent series by Thomas Szücs:
Dynamic Programming in Web Dynpro ABAP - Introduction and Part I: Understanding UI Elements
Dynamic Programming in Web Dynpro ABAP - Part II: Handling ViewElements
Dynamic Programming in Web Dynpro ABAP - Part III: Aggregations and DDIC-Binding of ViewElements
Another option that avoids dynamic programming is to create the view element at design time but bind its visible property to a context attribute of type WDUI_VISIBILITY. You could initially set its visibility to "none" until the user clicks the button, then you could change its visibility to "visible".
Cheers,
Amy -
How to add the double headings in Alv Report.
Hi All,
Plz suggest me how to add the double headings in ALv Report.
RamHi,
Try out this program....
REPORT ypm_historycard_rep.
TYPE-POOLS : slis.
DATA : it_cbm TYPE STANDARD TABLE OF mara.
DATA : it_layout TYPE STANDARD TABLE OF slis_layout_alv WITH HEADER LINE,
wa_fcat TYPE slis_fieldcat_alv,
it_fcat TYPE slis_t_fieldcat_alv.
START-OF-SELECTION.
SELECT *
FROM mara
INTO CORRESPONDING FIELDS OF TABLE it_cbm
where matnr = 'D80K7'.
END-OF-SELECTION.
it_layout-zebra = 'X'.
it_layout-colwidth_optimize = 'X'.
it_layout-f2code = '&ETA'.
APPEND it_layout.
DEFINE macro4fcat.
wa_fcat-col_pos = &1.
wa_fcat-fieldname = &2.
wa_fcat-tabname = &3.
wa_fcat-seltext_l = &4.
append wa_fcat to it_fcat.
clear wa_fcat.
END-OF-DEFINITION.
macro4fcat '1' 'MATNR' 'IT_CBM' 'MATERIAL NO' .
DESCRIBE TABLE it_cbm.
IF sy-ucomm = '&F03'.
MESSAGE 'hi hello good morning "press enter button" this is quiz' TYPE 'S'.
ENDIF.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE'
is_layout = it_layout
it_fieldcat = it_fcat
i_save = 'A'
TABLES
t_outtab = it_cbm
EXCEPTIONS
program_error = 1
OTHERS = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*& Form html_top_of_page
* text
* -->TOP text
FORM html_top_of_page USING top TYPE REF TO cl_dd_document.
DATA: l_text(255) TYPE c.
DATA: text1(255) TYPE c.
DATA: t_header TYPE REF TO cl_dd_table_element ,
wa_header TYPE REF TO cl_dd_table_area.
CALL METHOD top->add_gap
EXPORTING
width = 10.
CALL METHOD top->add_text
EXPORTING
text = 'hello'
sap_style = 'HEADING'
CALL METHOD top->add_gap
EXPORTING
width = 20.
CALL METHOD top->add_text
EXPORTING
text = 'HOW ARE YOU'
sap_style = 'HEADING'.
CALL METHOD TOP->new_line
* EXPORTING
* repeat =
CALL METHOD top->add_gap
EXPORTING
width = 50.
CALL METHOD top->add_text
EXPORTING
text = '____________________________________________________________'
sap_style = 'HEADING'.
CALL METHOD TOP->new_line
* EXPORTING
* repeat =
CALL METHOD top->add_gap
EXPORTING
width = 90.
CALL METHOD top->add_text
EXPORTING
text = 'YOU CAN TRY LIKE THIS'
sap_style = 'HEADING'.
ENDFORM. "html_top_of_page
Regards
Debarshi -
How to add a new element to a model node in the view controller?
View Context
myNode
attri1
attri2
myNode is a web service model node. How to add a new element to this node?
Regards,
Hui
Edited by: Hui Wang on Feb 15, 2008 12:05 PMSudhir Gorantla wrote:>
> Hi,
>
> myNode
> attri1
> attri2
>
> IMyNodeElement ele=wdContext.myNode().createMyNodeElement();
>
> ele.setAttri1("");
> ele.setAttri2("");
>
> wdContext.nodeMyNode().addElement(ele);
>
> Regards,
> Sudhir
Hi we need a model as an input parameter when creating a element for a model node. How to get the instance of the model?
Regards,
Hui -
Urgent - How to add buttons to a Table
How to add buttons to a Table and enable them for Mouse Listeners/ Action Listeners
extends the defaultcellrenderer make it return a Jbutton as the component to draw.
class OverCellRendererClass extends DefaultTableCellRenderer {
public Component getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column) {
//put your stuff here to make or get a button
return myButton;
Use something like this to set the renderer for the column :
tb.getColumnModel().getColumn(4).setCellRenderer(new YourCellRendererClass()); -
How to add actions to Elements 10
How does one add actions to elements 10? I have access to some PS action files but the help file does not explain how to add them to Elements. Helps says to Click Add on the Actions panel, but there is no where "add" option.
Install Actions in PSE
scroll down to Install Actions in PSE 9 and 10. -
How to delete a particular row in ALV table
Hi,
How to delete a particular row in ALV table based on some condition(by checking value for one of the columns in a row)
Thanks
Bala DuvvuriHello Bala,
Can you please be a bit more clear as to how you intend to delete the rows from your ALV? By the way deleting rows from an ALV is no different from deleting rows from a normal table. Suppose you have enabled selection property in ALV & then select multiple rows and click up on a button to delete the rows then below would be the coding: (Also keep in mind that you would have to maintain the Selection property of the context node that you are binding to your ALV to 0..n)
data : lr_table_settings TYPE REF TO if_salv_wd_table_settings,
lr_config TYPE REF TO cl_salv_wd_config_table.
lr_table_settings ?= lr_config.
** Setting the ALV selection to multiple selection with no lead selection
lr_table_settings->set_selection_mode( value = cl_wd_table=>e_selection_mode-multi_no_lead ).
Next delete the selected rows in the action triggered by the button:
METHOD onactiondelete_rows .
DATA: wd_node TYPE REF TO if_wd_context_node,
lt_node1 TYPE ig_componentcontroller=>elements_node,
wa_temp TYPE REF TO if_wd_context_element,
lt_temp TYPE wdr_context_element_set,
row_number TYPE i VALUE 0.
wd_node = wd_context->get_child_node( name = 'NODE' ).
CALL METHOD wd_node->get_selected_elements
RECEIVING
set = lt_temp.
LOOP AT lt_temp INTO wa_temp.
wd_node->remove_element( EXPORTING element = wa_temp ).
ENDLOOP.
CALL METHOD wd_node->get_static_attributes_table
EXPORTING
from = 1
to = 2147483647
IMPORTING
table = lt_node1.
wd_node->bind_table( new_items = lt_node1 ).
ENDMETHOD.
If in case this isn't your requirement please do let me know so that I can try come up with another analysis.
Regards,
Uday -
Web Dynpro ABAP ALV menu button icon image
Hi
Does anybody know how to add or link an image or an icon to a menu button in a
Web Dynpro ABAP ALV view?
I know how to do it in the alv table column but can't find a method for a menu button.
Best regards
LarsHi
Found the answer:
DATA: lr_febutton TYPE REF TO cl_salv_wd_fe_button.
lr_febutton->set_image_source( '@4B@' ).
Just used a wrong class.
Best regards
Lars -
Add/Delete elements from viewcontaineruielement in web dynpro abap
Dear all,
Please let me know how to Add/Delete elements from viewcontaineruielement in web dynpro abap? I have copied a viewcontaineruielement from another program and now i dont want few elements from that viewcontaineruielement in my view. Please guideHi Ajinkya,
I have copied a viewcontaineruielement from another program and now i dont want few elements from that viewcontaineruielement in my view. Please guide
Have you saved that VC element as template and using that template in another component?.If so,on resuing that VC element template it populates all the screen elements which you've save as template.
Now, select that VC element which you've re-used,based on you're requirement add/remove UI elements as Kiran suggested.
Hope it will resolve your issue.
Thanks
KH
Maybe you are looking for
-
Transactions and Locking Rows for Update
I have a problem in the application I am currently working on, which it seems to me should be easily solvable via appropriate use of transactions and database locking, but I'm having trouble figuring out exactly how to do it. The database we are usin
-
How do I save a jpeg image to kijiji in firefox?
When I try to copy picture with a jpeg extension I am told there is a problem with the format of picture.
-
Why wifi in Iphone 5 is always disconect???
wifi on my Iphone 5 is always disconet but is working perfect on Iphone 3.
-
Can't edit pictures in new Photos update bring back iPhoto !!
My pictures display fine but when I go to edit them they don't show up in the edit window and the tool bar is barely visible. These are simple jpegs not RAW files.
-
How do I totally permanently DELETE photos from iPhoto?
How do I totally permanently DELETE photos from iPhoto?