‎2005 May 29 11:22 PM
Hi All,
I am having a Table control with Two Columns (material number and material description). This table control runs into multiple pages.
Material numbers are unique in first column. <b>I want to high light Specific Row in table control depending upon Material number.</b>How Can I achieve this? Please post sample code. How to find a Material number on Table Control and after finding it i want to high light that Line.
Thanks in advance.
Message was edited by: Vipin Nagpal
‎2005 May 29 11:54 PM
Hi,
Lets assume that we have screen 100 with table control MATER_CTRL:
CONTROLS: MATER_CTRL TYPE TABLEVIEW USING SCREEN 100.
Table content will be stored in internal table MATER_TAB with two fields: MATNR and MAKTX.
These two fields are used as columns in table control MATER_CTRL on screen 100.
Following is screen logic for PBO:
PROCESS BEFORE OUTPUT.
LOOP AT MATER_TAB WITH CONTROL MATER_CTRL.
MODULE MODIFY_LINE.
ENDLOOP.
MODULE MODIFY_LINE OUTPUT.
READ TABLE MATER_TAB INDEX MATER_CTRL-CURRENT_LINE.
LOOP AT SCREEN.
IF SCREEN-NAME = 'MATER_TAB-MATNR'.
IF MATER_TAB-MATNR <...>
SCREEN-INTENSIFIED = 1.
ELSE.
SCREEN-INTENSIFIED = 0.
ENDIF.
MODIFY SCREEN.
EXIT.
ENDIF.
ENDLOOP.
ENDMODULE.
Code shown above should give you possibility to highlight selected material numbers.
Krzys
‎2005 May 29 11:54 PM
Hi,
Lets assume that we have screen 100 with table control MATER_CTRL:
CONTROLS: MATER_CTRL TYPE TABLEVIEW USING SCREEN 100.
Table content will be stored in internal table MATER_TAB with two fields: MATNR and MAKTX.
These two fields are used as columns in table control MATER_CTRL on screen 100.
Following is screen logic for PBO:
PROCESS BEFORE OUTPUT.
LOOP AT MATER_TAB WITH CONTROL MATER_CTRL.
MODULE MODIFY_LINE.
ENDLOOP.
MODULE MODIFY_LINE OUTPUT.
READ TABLE MATER_TAB INDEX MATER_CTRL-CURRENT_LINE.
LOOP AT SCREEN.
IF SCREEN-NAME = 'MATER_TAB-MATNR'.
IF MATER_TAB-MATNR <...>
SCREEN-INTENSIFIED = 1.
ELSE.
SCREEN-INTENSIFIED = 0.
ENDIF.
MODIFY SCREEN.
EXIT.
ENDIF.
ENDLOOP.
ENDMODULE.
Code shown above should give you possibility to highlight selected material numbers.
Krzys
‎2005 May 30 12:46 AM
Thanks for your Answer.
Desired Row is getting highlighted but Automatic scrolling is not happening.
Means Selected row is not appearing at TOP of Table control,
Any Suggestion for this.
Message was edited by: Vipin Nagpal
‎2005 May 30 4:56 AM
‎2005 May 30 2:39 PM
Hi,
If you find appropriate line in your internal table you can move selected line on top using:
TAB_CTRL-TOP_LINE = LINE_NO.
where TAB_CTRL is your table control and LINE_NO is line which you would like to be on top.
Krzys
‎2005 Jun 01 6:10 AM
‎2005 Jun 01 6:11 AM
‎2005 Jun 01 6:13 AM