2008 Sep 10 11:14 AM
Hi How to disable and enable table control fields? depending on some condition?
2008 Sep 10 11:18 AM
Hi,
To disable the row then you can use
in pbo module, create a module in side loop,
loop at itab with control tc.
module change_screen.
endloop.
in module,,,,,
loop at screen.
if condition.
screen-input = 0.
modify screen.
endif.
endloop.
Regards,
Harish
2008 Sep 10 11:16 AM
Hi Rock,
Go through this [Link|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=howtodisableandenabletablecontrol+fields&cat=sdn_all]
Regards,
Swapna.
2008 Sep 10 11:17 AM
Hi...
In PBO event of that screen...you have to develop code like...
loop at screen.
if screen name = tcitab-f1 and tcitab-f1 is initial.
screen-input = 0.
modify screen.
endif.
endloop.here TCITAB is your internal table for table control...
And with above code we are enabling the fields of TC for which F1 is not initail.
thanks,
Naveen.I
2008 Sep 10 11:17 AM
2008 Sep 10 11:18 AM
Hi,
To disable the row then you can use
in pbo module, create a module in side loop,
loop at itab with control tc.
module change_screen.
endloop.
in module,,,,,
loop at screen.
if condition.
screen-input = 0.
modify screen.
endif.
endloop.
Regards,
Harish
2008 Sep 10 11:19 AM
Hi,
You can disable individual columns by using:
LOOP AT SCREEN.
CASE SCREEN-FIELDNAME.
WHEN 'ABC'.
SCREEN-INPUT = 0.
WHEN OTHERS.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.Above code is just a prototype.... Kindly re-write the CASE statement as per your requirement..
If you are talking about disabling individual fields....This is not possible in Table Control... Use Editable ALV Grid for the same...
Regards,
Kunjal
2008 Sep 10 11:22 AM
Hi,
If <condition>.
LOOP AT SCREEN.
IF screen-name CS <fieldname_initials>.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
endif.
Write this into flow logic as
PROCESS BEFORE OUTPUT.
MODULE <module_name>.
LOOP AT <tablecontrol_workarea> WITH CONTROL <tablecontrol_name>.
above code.
ENDLOOP.
The above code is for disabling.
For enabling, put screen-input = 1.
Hiope this will help you.
Regards
Natasha Garg
2008 Nov 06 8:58 AM
hi
loop at itab_item.
IF itab_item-ITEM_CATEG = 'ZFRS' .
IF zsd_tab-current_line = sy-tabix.
loop at screen.
if screen-name = 'field name'
screen-input = 0.
modify screen .
endif
endloop.
endif.
ENDIF.
endloop.
2010 Dec 16 7:03 AM
Closing the old open question Thanks for all the replies guys.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |