How to display an status Icon in Table UI web dynpro ABAP?
Hi Experts ,
How to display an status Icon ( Traffic light ) in Table UI web dynpro ABAP? can somebody tell with a coding example. also I need to update status on condition so whats the best way?
Thanks in advance.
Regards,
Hi Laeeq,
click on table cntrol n place it on the screen..
now click on the icon button n place it in the table control area.. a column of icons get created. name it (say) ICON.
in the PBO..
loop at internal table and call module in the loop (say) .
MODULE ICON_DISP.
now in the module try the foll code :
module icon_display output.
check some condition and assign the icon to the variable icon_r
icon_R = 'ICON_GREEN_LIGHT'.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = ICON_R
TEXT = ' '
INFO = ' '
ADD_STDINF = 'X'
IMPORTING
RESULT = ICON
EXCEPTIONS
ICON_NOT_FOUND = 1
OUTPUTFIELD_TOO_SHORT = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endmodule.
where icon(35) and icon_r(35) type c .
hope this helps u..
Regards
Aparna
Similar Messages
-
How to View Smartforms or SAP Script Forms in Web Dynpro ABAP
Do anyone have idea of how to View Smartforms or SAP Script Forms in Web Dynpro ABAP?
Please let me know. ThanksHi Sameeksha,
You can display an smartform in WDA as an pdf file. Try go through this [article |https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6785]where Nanda does explain about the same.
Regards,
Uday -
How to create the Dynamic UI element table in web dynpro in abap
Hi All,
Does anybody have reference note or teach me how to create dynamic UI element table in web dynpro in abap ?
Regards,
LukeHI LukeWong ,
for creating any UI dynamically you shoul use their runtime class that always start with cl_wd_* ui element name*
so for the Table UI element the runtime class is CL_WD_TABLE
now reffer the below code for creating the Table UI dynamically
METHOD wddomodifyview.
DATA lr_table TYPE REF TO cl_wd_table.
DATA lr_flow_data TYPE REF TO cl_wd_flow_data.
DATA lr_container TYPE REF TO cl_wd_uielement_container.
DATA lr_column_name TYPE REF TO cl_wd_table_column.
DATA lr_text_view TYPE REF TO cl_wd_text_view.
DATA lr_table_header TYPE REF TO cl_wd_caption.
DATA lr_column_name_header TYPE REF TO cl_wd_caption.
IF first_time EQ abap_true.
lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
lr_table = cl_wd_table=>new_table(
id = 'TBL_TABLE'
bind_data_source = 'TABLE'
design = cl_wd_table=>e_design-alternating
visible_row_count = 3
lr_flow_data = cl_wd_flow_data=>new_flow_data( element =
lr_table ).
lr_container->add_child( lr_table ).
lr_column_name = cl_wd_table_column=>new_table_column(
id = 'TBL_EXAMPLE_NAME'
lr_table_header ?= cl_wd_caption=>new_caption( text = 'Table UI elem
ent - example').
lr_table->add_column( the_column = lr_column_name ).
lr_table->set_header( lr_table_header ).
lr_text_view = cl_wd_text_view=>new_text_view(
id = 'TXV_NAME'
bind_text = 'TABLE.NAME'
lr_column_name_header ?= cl_wd_caption=>new_caption( text = 'Name').
lr_column_name->set_table_cell_editor( the_table_cell_editor = lr_text_view).
lr_column_name->set_header( lr_column_name_header ).
ENDIF.
ENDMETHOD.
Regards
Chinnaiya P
Edited by: chinnaiya pandiyan on Sep 17, 2010 12:01 PM -
How to display the attached file of DMS in WEB Dynpro
Hello everybody! I have to work with DMS documents on the portal. Do You know, how display the attached files of DMS document in WEB Dynpro?
Pavel TruhlářHi Pavel,
By using the below F.M we can display DMS Document.
CALL FUNCTION 'CVAPI_DOC_VIEW'
EXPORTING
PF_DOKAR = 'ZAP'
PF_DOKNR = LS_DMS_TABLE-DOKNR
PF_DOKVR = '00'
PF_DOKTL = '000'
PF_HOSTNAME = 'DEFAULT'
PF_APPL_START = ' '
PF_GET_URL = 'X'
IMPORTING
PFX_URL = V_URL
EXCEPTIONS
ERROR = 1
NOT_FOUND = 2
NO_AUTH = 3
NO_ORIGINAL = 4
OTHERS = 5.
After getting the V_URL Create External Window.
LO_API_COMPONENT = WD_THIS->WD_GET_API( ).
LO_WINDOW_MANAGER = LO_API_COMPONENT->GET_WINDOW_MANAGER( ).
LO_WINDOW = LO_WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW(
URL = LW_URL ).
BR,
Jack. -
Need to pass values to Internal table in Web dynpro ABAP
Hi all,
I need to pass table values for the below FM in web dynpro.
CALL FUNCTION 'ZFMHR_RWF'
TABLES
PB0006 =
How do we declare and use Internal tables in WEBDYnpro.
Regards,
Vijayakumar S.hi,
u mighnt need to show the internal table value in some table UI in the WebDynpro ABAP. So u can use the method bind_table for the same to bind ur context node with the internal table values.u can declare the internal table in the same way as u do in the normal ABAP.
DATA :itab TYPE STANDARD TABLE OF ztable.
// itab is my internal table which can be of either ztable or standard table type
now u can use the code wizrd(control+F7) and use the method bind_table .
DATA: lo_nd_cn_node TYPE REF TO if_wd_context_node,
lo_el_cn_node TYPE REF TO if_wd_context_element,
ls_cn_node TYPE wd_this->element_cn_node.
* navigate from <CONTEXT> to <CN_NODE> via lead selection
lo_nd_cn_node = wd_context->get_child_node(
name = wd_this->wdctx_cn_node ).
lo_nd_cn_node->bind_table( itab ).
// where cn_node is the context node which is bind to ur table UI and itab is the value which is populated from ur FM
regards,
Amit -
Create dynamic table in web dynpro abap
Hi Friends,
I want to create several tables in a web dynpro. For this reason I have created a View, a group1 and a context node.
Now I want create a table for each characteristic group from cabn in the ui group1.
For this reason I want to use create_table_from_node and I have to craete dynamicly attributes in the node.
Is it the propper way or is there a different approach.
So in this case
1. I read the node
2. craete attribute for each characteristic group in this node
3. create a UI Table with create_table_from_node for each attribute
4. bind the data to the UI Table
Can I do the same without to craete attributes?
Thank in advance.
RG. JimbobHi Jimbob,
Have you looked at using the row-repeater UI element? You could then have as many tables as per your characteristic groups.
Although this would be more difficult if the attributes of each table were to also be only known at run-time. (I'm not sure that this is the case though from your description of the issue.)
so have a context of the form:
Context Root
--->node_characteristic_group (0..n)
>node_char_group_details(0...n) (non-singleton child node)
then bind your row repeater to node "node_characteristic_group " and bind the table inside the row repeater to node "node_char_group_details".
Each time you had a new element in the node_characteristic_group you would get a new table...
Much easier to support that anything dynamically created.
Cheers,
Chris -
Upload .xls file in internal table in web dynpro abap
Hi everyone,
i want to upload .xls(excel file) into an internal table.....after lots of attempts i came to a conclusion that web dynpro only supports .CSV(another format of excel file) to be uploaded into internal table....i tried many ways....is there a way i can upload .xls file...kindly help me in the same. following is the code i m using
DATA LO_EL_CONTEXT TYPE REF TO IF_WD_CONTEXT_ELEMENT.
DATA LS_CONTEXT TYPE WD_THIS->ELEMENT_CONTEXT.
DATA ITEM_FILE TYPE WD_THIS->ELEMENT_CONTEXT-EXCEL_UPLOAD.
get element via lead selection
LO_EL_CONTEXT = WD_CONTEXT->GET_ELEMENT( ).
@TODO handle not set lead selection
IF LO_EL_CONTEXT IS INITIAL.
ENDIF.
get single attribute
LO_EL_CONTEXT->GET_ATTRIBUTE(
EXPORTING
NAME = `EXCEL_UPLOAD`
IMPORTING
VALUE = ITEM_FILE ). "xstring format
DATA S_CONT TYPE STRING.
DATA CONVT TYPE REF TO CL_ABAP_CONV_IN_CE.
DATA: FIELDS1 TYPE STRING_TABLE.
1st tried this code-> using "cl_abap_conv_in_ce"
CALL METHOD cl_abap_conv_in_ce=>create
EXPORTING
*encoding = c_encoding "optional
input = ITEM_FILE
RECEIVING
conv = CONVT.
CALL METHOD CONVT->read
IMPORTING
data = S_CONT.
when it didnt work out...then tried followin function module
CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
EXPORTING
IN_XSTRING = ITEM_FILE "xsrting
IMPORTING
OUT_STRING = S_CONT
TYPES: BEGIN OF TY_TAB,
NAME_CHAR TYPE STRING,
DESCR_CHAR TYPE STRING,
NUMBER_DIGITS TYPE STRING,
END OF TY_TAB.
DATA: FIELDS TYPE STRING_TABLE.
DATA: LV_FIELD TYPE STRING.
DATA: S_TABLE TYPE STRING_TABLE.
DATA: ITAB TYPE TABLE OF TY_TAB.
DATA: STR_ITAB TYPE TY_TAB.
*splits string based on new line
SPLIT S_CONT AT CL_ABAP_CHAR_UTILITIES=>CR_LF INTO TABLE S_TABLE.
FIELD-SYMBOLS: <WA_TABLE> LIKE LINE OF S_TABLE.
LOOP AT S_TABLE ASSIGNING <WA_TABLE>.
splits string on basis of tabs
SPLIT <WA_TABLE> AT ',' INTO
STR_ITAB-NAME_CHAR
STR_ITAB-DESCR_CHAR
STR_ITAB-NUMBER_DIGITS.
APPEND STR_ITAB TO ITAB.
ENDLOOP.
I am able to do the uploading if the file is in .CSV format and not .XLS format....
there are lots of forums on SDN for the same....but at the end there is no solution provided.....
experts kindly solve it this time...thanks in advanceHi,
It is not possible to upload an xls file because it will be having some binary characters. better to go with .csv file format.
Refer this [link too|Re: Excel File Uplaod] it will explain you clearly.
Regards
Arun.P -
Configuration of alv table in web dynpro abap
Hi,
I'm using component SALV_WD_TABLE in my component. I have created a configuration for the alv.
I want to hide a column in the alv.
Do you know how to do it using the configuration?
Thanks in advance
Karim>
Karim Ja wrote:
> Thomas,
>
> In fact, i think that when user changes the global view and clicks on save button, a copy of the view is created(with the same name) and is then available for all other users. This copy can be delete but not the "standard" global one.
> Is this possible?
>
> Now I'm thniking about creating an ehancement for the standard web dynpro component and hide the column using abap code.
>
> Is it a good idea?
>
> Kind regards
> Karim
Make sure that your security is setup correctly. End users without administrative rights can not create globa views. When they get the Save View As Dialog, what values do they see for the Assignement field? When I logon without Adminstrative mode, I only see Assignment of User:
http://www.flickr.com/photos/tjung/3406367817/
When I launch the same transaction in Administrative or Configuration mode, the Assignment Option is All and only then do I have the optoin to transport the View:
http://www.flickr.com/photos/tjung/3407176898/
Is it good to modify the standard ALV component? I would say not. First of all the functionality you seek is already in the system. Perhaps you need a support package application if your system has a very old SP level. In genreal changing the ALV component, would be a bad idea because it is very widely used and very generic. It is also quite often changed by SAP. -
How to select a directory path to inputfield in web dynpro abap?
Hi,
Experts,
I want to select a directory path into a inputfield as like in file_upload browse button but it select only a file but i want the whole directory to select can i achieve this please suggest me on this.
Thanks in advance,
Shabeer Ahmed.Currently not possible in Web Dynpro directly. If you are on 7.01, you could use a FlashIsland to acomplish such a thing. Here is a similiar tutorial.
https://wiki.sdn.sap.com/wiki/display/EmTech/IslandsWDA_MUploader
Next year in 7.02, we add a file dialog option to the ACFUpDownload UI element. It can be used as described to only return a directory path using only native WD UI elements. -
How can i use vertical Scroll in ALV at web dynpro abap?
Normally, i'm using 'UP/DOWN button' while set a alv in web dynpro though,
wanna change to scroll vertically.
well, there is a way using ifram so i cant make alv inside of ifram for make a scroll.
but then, part of header also might be scroll together with data.
so, i'm asking to help is there anybody who can let me know about it?
Thanks.
with Regards,
Yui.Hi Suresh,
I had the same problem. The reason is that the result of
select * from wdy_app_property into table p_property_table
where application_name = p_application.
in CL_WDY_MD_APPLICATION=>GET_PROPERTIES_STATIC
for p_property_table-value is not "SCROLLBAR" but " SCROLLBAR".
Here is a workaround: type in the application parameters "SCROLLBAR " instead of "SCROLLBAR".
Regards from Germany
Udo -
How to delete multiple rows in a table of web dynpro for abap?
hi,
Experts ,
I want to delete the selected multiple records from a table from that i have inserted a check box ui element in a first column of a table what ever checkbox ix checked i want to delete those selected records from table .
please suggest me on
Thanks in advanceHi,
If you have DELETE button, in that action you write this code -
DATA lr_node type ref to if_wd_context_node.
lt_set = lr_node->get_elements( ).
loop at lt_set into ls_set.
ls_set->get_staitc_attributes
importing
static_attirbutes = ls_row.
if ls_row-check = 'X'.
lr_node->remove_element( ).
endif.
endloop.
Check the methods and thier types.
Regards,
Lekha. -
Get index of row selectable in table in web dynpro abap
Hi all,
How i get the index for the row in a table which i selected .
Help me.
Points are Sured.
Sanket sethiHi ,
in the wdevent parameter of the action get the selected element
eg
context_element type ref to if_wd_context_element .
context_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
then call the get_index method..
context_element->get_index( ).
Regards
Yash -
Insert table in between two rows of the table in Web dynpro abap.
Hi All,
I have a requirment like this,
while click on a hide/show button from the first row and last column of the table, want to display a table(or add some rows to insert data) in between the rows of the table and insert data in the new table .
please help me wheather it is possible or not?
Thanks,
Raju.hi raju....
if you want to insert rows.... then read the index of the row clicked and then read the node that is bound to the table and insert an empty row at that index and bind it back again....
if you want another table then make use of table popin.
--regards,
alex b justin -
Scrolling to Standard table in web dynpro abap
Hi Frnds,
HI have created table i need for that scroll vertically and horizontally , as per frnds suggestion keeping in webdynpro application adding the parameters wddonavigator but its getting error can any please explain clearly and any screen shots regards tyo that .
thanks.ok
-
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
Maybe you are looking for
-
IPhone 5S call quality / volume issue. Please help.
Hi, Please can anyone help? I have an iPhone 5S and callers frequently complain (9 out of 10) that the volume fades in and out and my voice sometimes sounds robotic, i.e. digital interference. I always hold the iPhone in the same manner as any other
-
Increase mac book air memory storage
hello to every one, i got a mac book air running os x mavericks 13 inch and has an HDD of 128giga, is that possible for me to increase the memory or replace the hard disk?
-
Writing custom program errors to SLOG
I am looking for a way to put errors from custom program ( which would run as job) to system log, which should be visible via SM21. Can any of you help me with a function module with which I can achieve it ?
-
Inventory sometimes coming to our place in high sea sales scenario?
Dear Experts, Here we have mapped the high sea sales scenario through third party sales process. here in this process since the documents are endorsed on the name of customers when the shipment is sailing only, so here we have to do only statistical
-
Re: Skype access number for South Africa not worki...
Skype most certainly still have a problem in SA since Monday. I use Skype and no calls can be made from or to USA. Not even when calling Cell using Skype credit.