Application Development 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: 

Screen Programming-Table Control

Former Member
0 Kudos

Dear all,

I have to highlight the rown in a table control that does not satesfy a certain crateria. can you please suggest me how to approch this?

I either have to highlight the row or show them in a different color!!

Please help,

Vj

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

So you probably have something like this in your screen flow of the screen.

PROCESS BEFORE OUTPUT.

* PBO FLOW LOGIC FOR TABLECONTROL 'I_ITABCON'
* MODULE I_ITABCON_CHANGE_TC_ATTR.
* MODULE I_ITABCON_CHANGE_COL_ATTR.
  LOOP AT   I_ITAB
       WITH CONTROL I_ITABCON
       CURSOR I_ITABCON-CURRENT_LINE.

    MODULE I_ITABCON_CHANGE_FIELD_ATTR.     "<---  Here is where you are going to change the attributes of the one line.
  ENDLOOP.

So in this module, the coding can look like this.



module i_itabcon_change_field_attr output.

  modify i_itab index i_itabcon-current_line.

  loop at screen.

    if i_itab-level = 'B'.     "<- If condition is satisfied
      screen-INTENSIFIED = '1'.    "<- Make Blue
    endif.
       modify screen.
  endloop.

endmodule.



Regards,

RIch Heilman

3 REPLIES 3

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

The only way to hightlight, is really just changing the text to blue instead of black.

Regards,

Rich Heilman

0 Kudos

how to change the color of the text> can you please suggest some code for this

Thanks,

Vj

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

So you probably have something like this in your screen flow of the screen.

PROCESS BEFORE OUTPUT.

* PBO FLOW LOGIC FOR TABLECONTROL 'I_ITABCON'
* MODULE I_ITABCON_CHANGE_TC_ATTR.
* MODULE I_ITABCON_CHANGE_COL_ATTR.
  LOOP AT   I_ITAB
       WITH CONTROL I_ITABCON
       CURSOR I_ITABCON-CURRENT_LINE.

    MODULE I_ITABCON_CHANGE_FIELD_ATTR.     "<---  Here is where you are going to change the attributes of the one line.
  ENDLOOP.

So in this module, the coding can look like this.



module i_itabcon_change_field_attr output.

  modify i_itab index i_itabcon-current_line.

  loop at screen.

    if i_itab-level = 'B'.     "<- If condition is satisfied
      screen-INTENSIFIED = '1'.    "<- Make Blue
    endif.
       modify screen.
  endloop.

endmodule.



Regards,

RIch Heilman