‎2006 Nov 18 8:25 AM
o/p should look like this:
gl account materialno
40000 4
40000 4
40000 4
40000 a
40000 a
40001 4
40001 4
40001 4
40001 b
40001 b
i need the answer as soon as possible with coding.
bye for now ,
sivagopal.
‎2006 Nov 18 8:38 AM
SORT itab by GLACCOUNT MATERIALNO.
This should fix your issue.
If the issue is the columns the same data getting merged, the in the layout of the ALV, there should be MERGE attribute, make sure that is empty.
regards,
Ravi
Note - Please mark the helpful answers
Message was edited by:
Ravikumar Allampallam
‎2006 Nov 18 8:48 AM
Hi,
Check this,
Step1 : Add data declaration for sort catalogue
data: it_sortcat type slis_sortinfo_alv occurs 1,
wa_sort like line of it_sortcat.
Step 2. Add code to build sort catalogue table
wa_sort-spos = 1.
wa_sort-fieldname = 'EBELN'.
gd_sortcat-tabname
APPEND wa_sort TO it_sortcat.
wa_sort-spos = 2.
wa_sort-fieldname = 'EBELP'.
gd_sortcat-tabname
APPEND wa_sort TO it_sortcat.
Keep u r field names instead of EBELN and EBELP
Step 3. Update 'REUSE_ALV_GRID_DISPLAY' FM call to include parameter 'it_sort',
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_sort = it_sortcat
i_save = 'X'
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
Keep u r internal table instead of it_ekko
‎2006 Nov 18 10:31 AM
Hi,
use sort command before passing final table to alv Fm
sort itab by acct matnr.
default sort will be ascending you also also use
sort itab by acct matnr descending
REgards
amole
‎2006 Nov 18 11:00 AM
before passing your intenal table to alv,
sort the internal table by glaccount materialno
sort itab glacc matno.
it will solve your problem
‎2006 Nov 18 2:40 PM
Hi,
In ALV display, hold down the conrol key, mark the columns to be sorted by clicking on the top of each columns, click the SORT icon.
Then save the actual order as an ALVstandard layout (name starts with /).
Goto menu, layout administration, mark the layout as default, save.From this menu, you can also transport the layout to target system. Depending on your release, after transport it may be not marked as default layout. In this case you have to do it in target system.
This way you stay flexible.
Regards,
Clemens