2009 Nov 19 11:31 AM
Hi Team,
I am working on ALV with sort criteria.
I have 2 columns of data elements with domains as follows:
EISBE -- MENG13
LABST -- MENG13V
I have also applied a sort criteria on these both fields, as follows:
l_wa_sort-fieldname = 'EISBE'.
l_wa_sort-spos = 1.
l_wa_sort-tabname = 'FP_I_OUTPUT'.
l_wa_sort-up = c_x.
l_wa_sort-group = '*'.
l_wa_sort-subtot = c_x.
append l_wa_sort to l_i_sort.
l_wa_sort-fieldname = 'LABST'.
l_wa_sort-spos = 2.
l_wa_sort-tabname = 'FP_I_OUTPUT'.
l_wa_sort-up = c_x.
l_wa_sort-group = '*'.
append l_wa_sort to l_i_sort.
Now, passed the sort criteria to the FM " Reuse_Alv_grid_display".
Unfortunately, sort is working on the second column, but not on the first.
Kindly help me on the same.
Note:
1. I have also tried by using the same data elements for my internal table.
2. In SE16 in MARC table, we can find this data element, and when we display the contents as ALV grid, the same sort operations are not working.
Thank you,
Regards,
Shashi
Edited by: Shashikanth Divakaruni on Nov 19, 2009 12:45 PM
2009 Nov 19 2:07 PM
Hi Shashikanth Div...,
in display, in an area outside the grid values displayed (right of or below), hold left shift-key and double-right-click(!) the mouse. The ALV consistency check comes up. Click on the fieldcatalog button so see if you really use the correct field and table names for the sorting. You can also click the SORT button to see what is used for sorting.
I think the error will be obvious.
Regards,
Clemens
Hi Team,
I am working on ALV with sort criteria.
I have 2 columns of data elements with domains as follows:
EISBE -- MENG13
LABST -- MENG13V
I have also applied a sort criteria on these both fields, as follows:
l_wa_sort-fieldname = 'EISBE'.
l_wa_sort-spos = 1.
l_wa_sort-tabname = 'FP_I_OUTPUT'.
l_wa_sort-up = c_x.
l_wa_sort-group = '*'.
l_wa_sort-subtot = c_x.
append l_wa_sort to l_i_sort.
l_wa_sort-fieldname = 'LABST'.
l_wa_sort-spos = 2.
l_wa_sort-tabname = 'FP_I_OUTPUT'.
l_wa_sort-up = c_x.
l_wa_sort-group = '*'.
append l_wa_sort to l_i_sort.
Now, passed the sort criteria to the FM " Reuse_Alv_grid_display".
Unfortunately, sort is working on the second column, but not on the first.
Kindly help me on the same.
Note:
1. I have also tried by using the same data elements for my internal table.
2. In SE16 in MARC table, we can find this data element, and when we display the contents as ALV grid, the same sort operations are not working.
Thank you,
Regards,
Shashi
Edited by: Shashikanth Divakaruni on Nov 19, 2009 12:45 PM
2009 Nov 19 11:54 AM
Hi,
try to pass below options in fieldcatalog and see
i_fieldcatalog-QUANTITY = 'X'.
i_filedcatalog-QFIELDNAME = MENGE.
thanks & regards,
sateesh.
Edited by: sateesh kumar on Nov 19, 2009 12:56 PM
2009 Nov 19 12:06 PM
Hi Sateesh,
The suggestion does not give the result..
Please let me know if there are any other ways for it.
Thank you,
Regards,
Shashikanth. D
2009 Nov 19 1:03 PM
Hi Shashikanth,
use the below code to sort.
l_wa_sort-fieldname = 'EISBE'.
l_wa_sort-spos = 1.
l_wa_sort-tabname = 'FP_I_OUTPUT'.
l_wa_sort-up = c_x.
append l_wa_sort to l_i_sort.
l_wa_sort-fieldname = 'LABST'.
l_wa_sort-spos = 2.
l_wa_sort-tabname = 'FP_I_OUTPUT'.
l_wa_sort-up = c_x.
append l_wa_sort to l_i_sort.
Hope this might help you.
Regards,
Phani.
2009 Nov 19 2:07 PM
Hi Shashikanth Div...,
in display, in an area outside the grid values displayed (right of or below), hold left shift-key and double-right-click(!) the mouse. The ALV consistency check comes up. Click on the fieldcatalog button so see if you really use the correct field and table names for the sorting. You can also click the SORT button to see what is used for sorting.
I think the error will be obvious.
Regards,
Clemens
2010 May 31 7:57 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |