on 12-01-2009 5:40 AM
Hi,
I have created a table of 2 columns. They are employee number and result. Now if the result for an employee is Pass then I need to make Pass as link to action and if it is "FAIL' then it is normal text view.
Note : There can be only two values for the field 'RESULT' (Pass or Fail). I repeat Pass should be link to action and fail should be normal text view.
How do I get it dynamically in a table for the field result.
Regards,
Abhishek
Hi Pankaj,
With your logic the Pass is coming with hyperlink but fail will not come at all as you have set it to abap_false.
I need both Pass and Fail. Visiblity for both of them should be set to Abap_true but Fail should not have any hyperlink only Pass will have hyperlink
Regards,
Pritam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pankaj,
Its working absolutely fine. Simply Great. Thanks a ton. I give u full marks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Pritam ,
i suppose u shud keep in refernce the following ,while referring the code :
1 u need to create a context node and two attributes under it
ca_attr1 of type string and ca_attr2 of type WDY_BOOLEAN
2 bind the TEXT property( wid values PASS n FAIL) of ur UI to the attribute ca_attr1
and its enable property to attribute ca_attr2
I hope it wud help u
regards,
anand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Have a linktoaction UI element in ur second column. Bind it with a attribute of type string.
Now bind the enable property of the link to action with a attribute of type WDY_BOOLEAN.
Have this attribute in the node which is binded to the table.
Now based on the values of the pass and fail set the value of the attribute.
check this code...
DATA lo_nd_cn_link_pass TYPE REF TO if_wd_context_node.
DATA lo_el_cn_link_pass TYPE REF TO if_wd_context_element.
DATA ls_cn_link_pass TYPE wd_this->element_cn_link_pass.
DATA itab TYPE wd_this->elements_cn_link_pass.
* navigate from <CONTEXT> to <CN_LINK_PASS> via lead selection
lo_nd_cn_link_pass = wd_context->get_child_node( name = wd_this->wdctx_cn_link_pass ).
ls_cn_link_pass-ca_attr1 = 'first'.
ls_cn_link_pass-ca_attr2 = 'fail'.
ls_cn_link_pass-enable = abap_false.
APPEND ls_cn_link_pass TO itab.
ls_cn_link_pass-ca_attr1 = 'second'.
ls_cn_link_pass-ca_attr2 = 'pass'.
ls_cn_link_pass-enable = abap_true.
APPEND ls_cn_link_pass TO itab.
lo_nd_cn_link_pass->bind_table( itab ).
enable is my attribute in the node which is binded to the table, of type wdy_boolean.
regards,
Pankaj Aggarwal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.