cancel
Showing results for 
Search instead for 
Did you mean: 

ALV Grid: Read-Only fields based a given field value.

Former Member
0 Kudos

Hello ABAPers,

I have a Web-Dynpro program with an ALV Grid with several of the colums being editable.

If I have a certain value in field A (for example), I want to change my editable fields to read-only just for that row.

I know I can do this for a single field, but I'm not so about an ALV Grid.

Any suggestions?

Thanking you in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you Sumit, THAT DID IT!!!!!!!

Former Member
0 Kudos

Hi,

Create a context attribute READ_ONLY in the node to which the ALV is bound.

The field that have mentioned is inside this node or a separate UI element.

Is there any lead selection being set. If so what is the type of it.

Regards,

Lekha.

Former Member
0 Kudos

Hi Lekha,

I was able to create the READ_ONLY attribute within the node for the ALV.

I don't see "Lead Selection" parameter for this ALV Grid. Additionally the ALV Grid is within a View-Container.

Is it possible to get a snap-shot from you, so I can get a better understanding of what you are looking for.

Thanks

Paul

Former Member
0 Kudos

Hi,

If you check the cl_salv_wd_config_table->if_salv_wd_table_settings->set_selection_mode(SINGLE/MULTI etc)

have you set this.

Is lead selection required for your case.

Regards,

Lekha.

Former Member
0 Kudos

Hi Lekha,

"Lead Selection", is not required for this program.

I'm assuming that I would have to use the value "07" Single no lead selection??

Thanks.

Paul

Former Member
0 Kudos

Hi,

Have the lead selection as None and also uncheck the initialization lead selection for that node to whcih the ALV is bound.

After your done with, IS field(A) part of ALV column or separate UI element.

Please explain this.

Regards,

Lekha.

Edited by: Lekha on Oct 13, 2009 8:56 PM

Former Member
0 Kudos

Hi Lekha,

The field (A) is part of the ALV Column.

Question: Because I'm using a field in the ALV table to determine the editability of a given row, should this be done before or after the binding of the internal table???? Binding Example: lo_nd_ecd_table->bind_table(lt_zout_export).

Thanks for your help.

Paul

Former Member
0 Kudos

Hi Paul ,

You can do that before binding.

You can set the read_only flag value on the basis of a condition by iterating through all rows.

Just hide that field on the screen and bind the node with table.

Please see this [article|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f0625002-596c-2b10-46af-91cb31b71393] which deals with the same thing.

Please let me know in case of any issues.

Regards,

Sumit