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: 

Sort Sequence Issue in ALV Output

0 Kudos
780

Hello Everyone ,

We have one Custom ALV report where after executing users are changing the layout multiple times . We have another logic to go into different T codes by double clicking in different O/P Fields . Problem is after this layout change a change in the initial sequence is happening and after double clicking while going to different t codes wrong data is going .

I tried to store the initial sequence while the code is moving into ucomm perform and then to re use that even after users are changing the layout ( sorting / filtering based on multiple fields ) but that is not working . Also I tried to add a sequence field in o/p columns and try to sort on that but that too did not work as there was multiple times o/p sequnce changing by the user. Could you please provide any solution here .

Thanking you in advance !

4 REPLIES 4

FredericGirod
Active Contributor
0 Kudos
646

because you don't use the good method to get the line selected

if you want more information, give part of your code regarding how you display & get selected line

0 Kudos
646
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
IF gt_data_copy IS INITIAL.
gt_data_copy[] = gt_data[].
ELSE.
gt_data[] = gt_data_copy[].
"" SORT gt_data_copy .
ENDIF.
CASE ucomm.
READ TABLE gt_data INTO gs_data INDEX selfield-tabindex.
* READ TABLE gt_data_copy INTO DATA(gs_data_copy) INDEX selfield-tabindex.
* IF gs_data-zsort NE gs_data_copy-zsort.
* gs_data = gs_data_copy.
* ENDIF.
WHEN 'REFRESH'.
""PERFORM get_data.
WHEN 'CONVERT'.
SET PARAMETER ID 'PAF' FIELD gs_data-plnum.
"" SET PARAMETER ID 'MAT' FIELD gs_data-matnr. "" { INS 66655
AUTHORITY-CHECK OBJECT 'S_TCODE' ID 'TCD' FIELD 'CO40'.
IF sy-subrc = 0.
CALL TRANSACTION 'CO40' AND SKIP FIRST SCREEN.
ELSE.
MESSAGE e000 WITH 'No authorisation to convert planorders'.

ENDIF.

Eduardo-CE
Active Participant
646

Hi,

Please take a look to the sample program BCALV_EDIT_05.

Regards.

Sandra_Rossi
Active Contributor
0 Kudos
646

Your question is unclear, could you please provide code and exact scenario to reproduce your issue?

NB: