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

ALV OO issue

Former Member
0 Likes
364

Hello All,

I have implemented double click method correctly, but if the user sorts the ALV with the toolbar button, it is not working properly, because the internal table IT_OUTPUT is not sorted, only the view, How can I sort the internal table in order to get the rigth index of the alv table??

The code I have is the following....

FORM handle_double_click USING p_e_row

p_e_column

p_es_row_no TYPE lvc_s_roid.

DATA: batch_bdc TYPE TABLE OF bdcdata,

evrtn LIKE rm06e-evrtn,

opt TYPE ctu_params .

READ TABLE ti_output INDEX p_e_row.

*->>IF THE TABLE WAS SORTED BY THE ALV BUTTON TI_OUTPUT IS NOT SORTED

->> WHICH WILL READ THE WRONG FIELD ON THE TABLE!!!*

evrtn = ti_output-ebeln.

IF evrtn(1) EQ '3'.

......

ELSE.

......

ENDIF.

ENDFORM. " handle_double_click

Any help will be rewarded,,,,

Thanks

Gabriel P-

Hello All,

I have implemented double click method correctly, but if the user sorts the ALV with the toolbar button, it is not working properly, because the internal table IT_OUTPUT is not sorted, only the view, How can I sort the internal table in order to get the rigth index of the alv table??

The code I have is the following....

FORM handle_double_click USING p_e_row

p_e_column

p_es_row_no TYPE lvc_s_roid.

DATA: batch_bdc TYPE TABLE OF bdcdata,

evrtn LIKE rm06e-evrtn,

opt TYPE ctu_params .

READ TABLE ti_output INDEX p_e_row.

*->>IF THE TABLE WAS SORTED BY THE ALV BUTTON TI_OUTPUT IS NOT SORTED

->> WHICH WILL READ THE WRONG FIELD ON THE TABLE!!!*

evrtn = ti_output-ebeln.

IF evrtn(1) EQ '3'.

......

ELSE.

......

ENDIF.

ENDFORM. " handle_double_click

Any help will be rewarded,,,,

Thanks

Gabriel P-

2 REPLIES 2
Read only

Former Member
0 Likes
336

Hi,

Check the program BCALV_GRID_02. Sort the list on any field, still the double click event is working fine. The program don't have any additional code (logic) to handled sorting of the displayed list.

Hope it is helpful.

Pavan

Read only

Former Member
0 Likes
336

Solved myself.