‎2007 Feb 06 12:43 AM
hi all,
i am using table control which is referring to internal table and working area.
i have 1 field in the chain endchain under PAI is using check box.
may i know where should i do so that when show the data, record that already checked should appear grey out whereas those unchecked should allow user to do check in the check box?
for example, the second record status should grey out. actually material and quantity is read only column in table control. so basically the whole record should grey out if status has 'X'.
material quantity status
123 5000
321 2345 X
thanks
‎2007 Feb 06 12:50 AM
Hi,
In the LOOP..ENDLOOP of the PBO..You can disable the line..
Example
-
PROCESS BEFORE OUTPUT.
LOOP AT ITAB.
MODULE DISABLE_OUTPUT.
ENDLOOP.
MODULE DISABLE_OUTPUT.
IF ITAB-STATUS = 'X'.
LOOP AT SCREEN.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDLOOP.
Thanks,
Naren
‎2007 Feb 06 12:50 AM
Hi,
In the LOOP..ENDLOOP of the PBO..You can disable the line..
Example
-
PROCESS BEFORE OUTPUT.
LOOP AT ITAB.
MODULE DISABLE_OUTPUT.
ENDLOOP.
MODULE DISABLE_OUTPUT.
IF ITAB-STATUS = 'X'.
LOOP AT SCREEN.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDLOOP.
Thanks,
Naren
‎2007 Feb 06 12:51 AM
You will have to do this in the PBO of the screen.
write a module in the flow logic
module change_screen.
now in the module write as below
if itab-status = 'X'.
loop at screen.
if screen-name = 'screen field name for material' or
screen-name = 'screen field name for quantity' or
screen-name = 'screen field name for status'.
screen-input = 0.
modify screen.
endif.
endloop.
endif.
Regards
Gopi
‎2007 Feb 06 1:17 AM
hi,
screen cannot be used as i am modifying the table control.
i do not know what is the component, for example TC-? to disable the line if the status in the line has X.
thanks
‎2007 Feb 06 1:33 AM
Ok, in the PBO of the table control, use the same logic.
u can get the name of the TC from the layout. in the PBO u can use it like this
read table itab index <TC Name>-current_line.
if sy-subrc = 0.
if itab-status = 'X'.
loop at screen.
use the same logic here....
endloop.
endif.
endif.
Regards
Gopi
‎2007 Feb 06 1:52 AM
hi gopi and all,
thanks alot
gopi, your statement can work.
thanks again
i will reward accordingly.