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

Table Control - line selection

Former Member
0 Likes
817

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

1 ACCEPTED SOLUTION
Read only

krzysztof_konitz4
Contributor
0 Likes
735

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

7 REPLIES 7
Read only

krzysztof_konitz4
Contributor
0 Likes
736

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

Read only

0 Likes
735

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

Read only

0 Likes
735

Hi,

For achieving find in table control,check this link.

Read only

0 Likes
735

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

Read only

0 Likes
735

Hi Krzys,

How about using FM SCROLLING_IN_TABLE?

Got some info from link

Message was edited by: Vipin Nagpal

Read only

0 Likes
735

Hi Jayanthi Jayaraman,

I am also facing a same issue as posted by user in

so I droped above idea.

Read only

Former Member