cancel
Showing results for 
Search instead for 
Did you mean: 

in WD application making one WD-table field un-editable.

Former Member
0 Kudos

Hi,

I have changed one WD application and I have added one table(Layout data: Matrix head data),

in which I made one column as editable"Bind to property of the selected attribute-Enabled". My requirement

is to make for one particular row - make that column non-editable.

Please let me know if anyone come across this kind of requirement?

I wrote a code in method for the element(table): WDDOMODIFYVIEW

*    lo_el_nd_partner = lo_nd_nd_partner->get_element( index = sy-tabix ).

*

*    lo_el_nd_partner->set_attribute_property(

*    attribute_name = 'GPARN'

*    property = 3  "Property 3 for read-only

*    value    = 'X'). "Disable vendor number editing for VN row

But still it is editable.

Best regards,

Anilkumar.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
Former Member
0 Kudos

hi Hawkins,

I had seen that first forum and 2nd . I had already used this code but it is still editable,

Code & layout images below.

cant

Please have a look and give exact fix which neeeded.

Best regards,

ANilkumar.

ramakrishnappa
Active Contributor
0 Kudos

Hi Anil,

As you are having a context attribute ZGPARN_READONLY to make the columne GPARN as read only based on the value inside the table.

You just need to bind the READONLY property of GPARN to context attribute ZGPARN_READONLY as below

Now, if you pass value X to attribute, then the particular cell will be made as read only

"Read table data  from context node  into lt_nd_parnter.

loop at lt_nd_partner assigning <ls_partner> where parvw = 'VN'.

    

     <ls_partner>-ZGPARN_READONLY = abap_true.

endloop.

" bind the table to context node

     lo_node->bind_table( new_items = lt_nd_partner ).

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

Thank you Ramakrishnappa, I was points ZGPARN_readonly to Enabled one, now I pointed it to readonly. It worked.

Best regards,

ANilkumar.

Answers (0)