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: 

ALV list display

Former Member
0 Kudos

Hi all,

I am having a problem in list display.I want the following output in list display.

Material brandcode

10000 abcd

empty abcd1

empty abcd2

10002 xyz

empty xyz

for the same material no we had three brand code and the material number should not be displayed for the second and remaininig brand codes.

Please help me.

Thanks & regards,

vijay.

5 REPLIES 5

Former Member
0 Kudos

Hi Vijay,

I could not understand your problem here. The data which need to be displayed in the ALV should be placed in an internal table and that table can be used to display ALV.

Fill your internal table as you are showing the data.

Let the field value be initial where material no. is same.

athavanraja
Active Contributor
0 Kudos

this can only be done in GRID display and not in list display. (this will automatically happen , if you just sort on material column - provided "without cell merging during sort" is unchecked in display attributes.)

Regards

Raja

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

As Raja,that will automatically happen if you click sort button in the Grid display.

Check this link for sample programs.

http://www.geocities.com/mpioud/Abap_programs.html

Kindly reward points by clicking on the star on the left button if it is useful.Otherwise,get back.

Former Member
0 Kudos

Hi,

You can use the parameter IT_SORT of the fm REUSE_ALV_LIST_DISPLAY. Here you pass the fields and their positions and the table name to this structure. So that once the output is displayed the records are sorted and you will get your display.

Former Member
0 Kudos

Yes, it will automatically happen if u sort it based on material.

If u dont want to do that do it by code.

Put this code before you call the ALV.

sort itab by matnr.

loop at itab.

at new matnr.

new_matl = 'X'

endat.

if new_matl <> 'X'.

clear itab-matnr.

modify itab.

clear new_matl.

endif.

endloop.

Remember to reward points to the replies that answered your question.