cancel
Showing results for 
Search instead for 
Did you mean: 

ALV numerator

Former Member
0 Kudos

hello,

I am trying to create a column that will be a running number (this is not problem)...

the problem comes when i sort the ALV... the numbers in the columns change...

i want to create a constant column that the content of the column will never change.

regards,

roi grosfeld

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

hi,

there is no event AFTER_REFRESH in REUSE_ALV_GRID_DISPLAY.

maybe it only exist in the class.

Regards,

Roi Grosfeld

Former Member
0 Kudos

hi,

I had program with function REUSE_ALV_GRID_DISPLAY and because of necessity of this column i made over my program. In event AFTER_REFRESH i add such processing :

IF fl = 'n_done'.

fl = ''.

ELSE.

count = 0.

LOOP AT t_reestr INTO wa_reestr.

count = count + 1.

move count TO wa_reestr-num.

MODIFY t_reestr FROM wa_reestr TRANSPORTING num.

ENDLOOP.

fl = 'n_done'.

CALL METHOD alv-alv_grid->refresh_table_display.

ENDIF.

And it works!

This recast takes 15 minutes and it isn`t complicated

Good luck!

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

For dynamic sorting,check this link.

http://www.sapgenie.com/abap/code/chap2302.txt

Former Member
0 Kudos

hi,

sorry but i am using ALV_GRID_DISPLAY function and not the class...

regards,

roi grosfeld

Former Member
0 Kudos

hi,

you can use event AFTER_REFRESH, if you create ALV with object programming (cl_gui_alv_grid).

Former Member
0 Kudos

hi,

i have already worked on a solution for this problem.

i created a conversion exit and tried to keep the numbers in the same place...

this worked but when i print preview it, it's all messed up.

maybe this will give you a direction about the solution.

regards,

roi grosfeld

P.S.

it will be very helpful and kind of you if you could send me the link to the other tread.

Former Member
Former Member
0 Kudos

Hi,

It is not possible to make the column no fixed, it will get sorted along with other columns.

I have already discussed the same problem in some thread, kindly have a search.

Thanks & Regards,

Judith.

Former Member
0 Kudos

Hi Roi,

IMHO, I think the only way is to compute this column after every ok_code.

Any other idea, guys?

Best regards,

Alvaro