‎2009 Apr 14 7:01 AM
Hi GURU ,
I want to row colour at Modulepool Table Control .
I have two screen at modulepool and I am using Table Control .I want to colour the row of thats Table Control .
How Can I do this , Is there any Method to do this .
Please reply me .
Thanks and Regards
Tarak
‎2009 Apr 14 7:07 AM
In the module program the condition on which the colour change / input
status etc has to be changed using
IF condition = true
LOOP AT SCREEN
IF SCREEN-NAME = column name
Make your colour / input status change
MODIFY SCREEN
ENDIF
ENDLOOP
ENDIF
I hope this helps you.
Regards
Bhanu
‎2009 Apr 14 7:12 AM
Hi ,
I want to colour row not column ,, So please tell me where I have to pass the colour code ,,,,,
‎2009 Apr 14 7:57 AM
Hi,
You can color a row in table control, but you can color text.
If you want tot color a row, then go for ALV.
Color text in module pool:-
it_zekpo is my internal table w/o header line,
wa_zekpo is work area.
Name of input/output fields on screen are:-
wa_zekpo-field1,
wa_zekpo-field2, and so on...
Take the group1 for all textboxes as 'ABC' in the table control
Try using code:-
At screen logic:
PROCESS BEFORE OUTPUT.
* MODULE status_8003.
LOOP WITH CONTROL po_tb.
MODULE read_data.
ENDLOOP.
PROCESS AFTER INPUT.
* MODULE user_command_8003.
LOOP WITH CONTROL po_tb.
MODULE modify_data.
ENDLOOP.
In PBO
*&---------------------------------------------------------------------*
*& Module READ_DATA OUTPUT
*&---------------------------------------------------------------------*
MODULE read_data OUTPUT.
READ TABLE it_zekpo INTO wa_zekpo INDEX po_tb-current_line. "po_tab is table control name
data : line_count type i.
describe it_zekpo
lines line_count.
po_tb-lines = line_count + 10.
"to increase the number of lines in table control dynamically
if po_tb-current_line = '4'. "<--say u want to color text in 4 row
if screen-group1 = 'ABC'.
loop at screen.
screen-intensified = 1.
endloop.
modify screen.
endif.
endif.
ENDMODULE. " READ_DATA OUTPUT
In PAI
*&---------------------------------------------------------------------*
*& Module MODIFY_DATA INPUT
*&---------------------------------------------------------------------*
MODULE MODIFY_DATA INPUT.
MODIFY IT_ZEKPO FROM WA_ZEKPO INDEX po_tb-currentline.
"this will insert a new line
"and will modify the contents of existing line
ENDMODULE. " MODIFY_DATA INPUT
Hope this helps you.
Regards,
Tarun