Application Development and Automation 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: 
Read only

disable / enable table control field at runtime

Former Member
0 Likes
1,061

hi ,

i am working on a custom transaction in which i have a table control...depending on a table value i have to disable an input field inside the table control...

i know in a normal field we use

loop at screen.

if screen- name = 'XXX' or screen-group = 'XXX'

screen-output = 0.

endif.

but inside a table control field how to modify it.

Regards

Harish Ramakrishnan

1 ACCEPTED SOLUTION
Read only

LucianoBentiveg
Active Contributor
0 Likes
797

Same questiom yesterday:

4 REPLIES 4
Read only

LucianoBentiveg
Active Contributor
0 Likes
798

Same questiom yesterday:

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
797

All you need to do is put some code in a module of your PBO. This will change the cell attribute of a single row.



PROCESS BEFORE OUTPUT.
* PBO FLOW LOGIC FOR TABLECONTROL 'I_INTRCON'
* MODULE I_INTRCON_CHANGE_TC_ATTR.
* MODULE I_INTRCON_CHANGE_COL_ATTR.
  LOOP AT   I_INTR
       WITH CONTROL I_INTRCON
       CURSOR I_INTRCON-CURRENT_LINE.

<b>    MODULE I_INTRCON_CHANGE_FIELD_ATTR.</b>
  ENDLOOP.

  MODULE SET_CURSOR_FIELD.

  MODULE STATUS_0200.



module i_intrcon_change_field_attr output.                                                                                
modify i_intr index i_intrcon-current_line.                                                                                
if i_intr-check = 'X'.                                     
    loop at screen.                                          
      if screen-name = 'I_INTR-RCVQTY'.                      
        screen-input = '1'.                                  
      endif.                                                 
      modify screen.                                         
    endloop.                                                 
  endif.                                                                                
endmodule.                                                   


Regards,

RIch Heilman

Read only

0 Likes
797

well thank you for your code ...

but one stupid thing i did is i copied it because of lazyness in typing and i forgot to note that input is 1 in ur case and input has to be 0 for me

ended up debugging

Thnks agn

Harish r

Read only

Former Member
0 Likes
797

Hi,

check this demo program <b>demo_dynpro_tabcont_loop_at</b>

Regards

vijay