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

Sorting internal table

Former Member
0 Likes
406

I have a table which contains 3 fields material no, sub material no and price

materialno sub material no price

05-004 001 100

05-004 002 20

05-004 003 500

05-005 001 20

05-006 001 50

05-006 002 10

05-006 003 5

depending on the highest price of the material no i need to make the whole record bold. Suppose in case of 05-004 i need to highlight the record 05-004 003 500. I dont want to sort the table because if i sort the table accoring to price the submaterialno gets interchanged. I want the records in the same order but highlight the whole record with the hghest price.

<REMOVED BY MODERATOR>

Thank you,

Juli

Edited by: Alvaro Tejada Galindo on Apr 10, 2008 11:58 AM

2 REPLIES 2
Read only

Former Member
0 Likes
383

You could sort the table like this..


sort i_tab by material submaterial ascending price descending.

That way you don't loose the submaterial sort -;)

Greetings,

Blag.

Read only

Former Member
0 Likes
383

HI Juli,

here is a logic u can use...

first find the record number which has maximum price in ur itab.

loop at itab

write a if condition which match ur index number of max record..

in if condition provide write statement with bold or color format.

else write statement with normal format

endif.

like....

loop at itab.

if sy-tabix NE index_max.

write: .............

else.

format on.

write:..................

format off.

endif.

Regards

Syed A