‎2008 May 05 8:28 AM
Hi friends....
I was developed one table control... it contains no. of records....
so here i want to highlight.. one perticuler ROW or VALUE.... in this table control like bold or italic...or with colors....
once again iam saying.....
i dont want to highlight entire column or whole values of one field.....
i need ...only one row or one perticuler value of one field with in table control....
Thank you,
Naveen Inuganti..
‎2008 May 06 6:42 AM
Refer the following code. It will intensified the following fields of the table control:
1. Row1-column1
2.Row2-column2
3.Row3-column3
process before output.
*&SPWIZARD: MODULE TABLE_CONTROL_CHANGE_COL_ATTR.
loop at itab
into wa
with control table_control
cursor table_control-current_line.
*&SPWIZARD: MODULE TABLE_CONTROL_CHANGE_FIELD_ATTR
module help_display.
endloop.
Module Logic:
MODULE help_display OUTPUT.
DATA: lv_tabix TYPE sy-tabix,
lv_tabix1 TYPE sy-tabix.
FIELD-SYMBOLS: <fs> TYPE ANY,
<fs_wa> TYPE ANY.
ASSIGN ('TABLE_CONTROL') TO <fs>.
ASSIGN COMPONENT 4 OF STRUCTURE <fs> TO <fs_wa>.
LOOP AT SCREEN.
lv_tabix1 = lv_tabix1 + 1.
IF lv_tabix1 EQ <fs_wa>.
SCREEN-INTENSIFIED = '1'.
MODIFY SCREEN.
else.
SCREEN-INTENSIFIED = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
clear: lv_tabix1.
ENDMODULE. " help_display OUTPUT
‎2008 May 06 6:32 AM
In a standard table control you only get the "bright" attribute to highlight the row which is generally a blue colour in the SAPGui (intensified = '1')... an ALV grid would give you more choices...
As for the "how", just include a conditional "loop at screen" it in a module inside the "loop at table control" in the PBO flow of the dynpro... (there have been prior examples in SDN of this).
‎2008 May 06 6:42 AM
Refer the following code. It will intensified the following fields of the table control:
1. Row1-column1
2.Row2-column2
3.Row3-column3
process before output.
*&SPWIZARD: MODULE TABLE_CONTROL_CHANGE_COL_ATTR.
loop at itab
into wa
with control table_control
cursor table_control-current_line.
*&SPWIZARD: MODULE TABLE_CONTROL_CHANGE_FIELD_ATTR
module help_display.
endloop.
Module Logic:
MODULE help_display OUTPUT.
DATA: lv_tabix TYPE sy-tabix,
lv_tabix1 TYPE sy-tabix.
FIELD-SYMBOLS: <fs> TYPE ANY,
<fs_wa> TYPE ANY.
ASSIGN ('TABLE_CONTROL') TO <fs>.
ASSIGN COMPONENT 4 OF STRUCTURE <fs> TO <fs_wa>.
LOOP AT SCREEN.
lv_tabix1 = lv_tabix1 + 1.
IF lv_tabix1 EQ <fs_wa>.
SCREEN-INTENSIFIED = '1'.
MODIFY SCREEN.
else.
SCREEN-INTENSIFIED = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
clear: lv_tabix1.
ENDMODULE. " help_display OUTPUT