Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in disabling table control fields of particular row

laxmipriya
Discoverer
0 Kudos

Hi ,

I have created a table via table control wizard. I want to dynamically disable/enable a field based on value of another field. I have written code in PBO, inside loop and endloop of table control . The whole column is getting disabled instead of particular row alone.

PROCESS BEFORE OUTPUT.
  LOOP AT it_stop INTO wa_stop WITH CONTROL contrl. 
    MODULE get_lines.
  ENDLOOP.


MODULE get_lines.
IF wa_stop-matnr <> 'X'.
LOOP AT SCREEN .
IF screen-name = 'WA_STOP-PLANT'.
screen-input = 0.
MODIFY SCREEN .
ENDIF.
ENDLOOP.
ENDIF.
ENDMODULE.
1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor

Your code successfully makes the cell PLANT in read-only mode in every row that has MATNR <> 'X' i.e. all rows except those ones which have MATNR = 'X', so maybe your condition is wrong.

EDIT: I adapted my answer to be coherent with the latest edit made to the question.

4 REPLIES 4

Sandra_Rossi
Active Contributor

Your code successfully makes the cell PLANT in read-only mode in every row that has MATNR <> 'X' i.e. all rows except those ones which have MATNR = 'X', so maybe your condition is wrong.

EDIT: I adapted my answer to be coherent with the latest edit made to the question.

0 Kudos

Hi Sandra,

I have written the code in the module that you have shared only and also, I am checking for field value only of it is 'X' I am modifying

the screen , where do you want me to specify row number ? Can you kindly guide me.

Sandra_Rossi
Active Contributor

Please edit your question, select your code and press the "CODE" button to make it correctly colorized/indented, so that it's easier for us to analyze it. Thank you.

Sandra_Rossi
Active Contributor

Your code successfully makes the cell PLANT in read-only mode in every row that has MATNR <> 'X'. What is your exact question please?