Application Development and Automation 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: 
Read only

module pool.....???

naveen_inuganti2
Active Contributor
0 Likes
376

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..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
358

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

2 REPLIES 2
Read only

naveen_inuganti2
Active Contributor
0 Likes
358

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).

Read only

Former Member
0 Likes
359

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