‎2009 Jul 24 10:43 AM
Hi,
my output is
*formno* *vendorname* *vendoraddress* *code * * formdate* * invoiceamount* * invoiceno* * invoicedate*
905780 xxxxx chennai 12.12.2008 4564 123444 13.07.2008
905780 xxxxx chennai 11.12.2008 54734 85556 12.09.2008
905780 xxxxx chennai 10.12.2008 4366 435346 10.10.2008
905782 yyyyy mumbai 23.05.2008 465786 5657674 07.10.2008
905782 yyyyy mumbai 30.05.2008 74565 854905 08.07.2009
but my requirement is
*formno* *vendorname* *vendoraddress* *code * * formdate* * invoiceamount* * invoiceno* * invoicedate*
905780 xxxxx chennai 12.12.2008 4564 123444 13.07.2008
11.12.2008 54734 85556 12.09.2008
10.12.2008 4366 435346 10.10.2008
905782 yyyyy mumbai 23.05.2008 465786 5657674 07.10.2008
30.05.2008 74565 854905 08.07.2009i want output in alv_grid disply and also i need CODE in edit mode .
in your program the output is coming properly but it will not sort.
can you help me.
Regards,
K.Karthikeyan.
‎2009 Jul 24 10:52 AM
Hi ,
In order to display the ALV grid as per your requirement, you have to sort the corresponding fields.
you can try the following code.
perform sf1 using 'formno' 'X'.
perform sf1 using 'vendorname' 'X'.
perform sf1 using 'vendoraddress' 'X'.
perform sf1 using 'invoiceamount' 'X'.
form sf1 using fieldname sortup.
v_count = v_count + 1.
clear w_sort.
w_sort-fieldname = fieldname.
w_sort-spos = v_count.
w_sort-up = sortup.
append w_sort to t_sort.
endform.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = l_repid
i_callback_user_command = 'ALV_USER_COMMAND'
is_layout = l_str_lay
it_fieldcat = t_catalog[]
i_grid_title = sy-title
i_default = c_x
i_save = c_a
it_sort = t_sort[] ----------------> add the sorted field table here.
is_variant = l_str_var
is_print = l_str_prn
tables
t_outtab = t_data
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
endif.
Hope it helps.
Regards,
Vik
‎2009 Jul 24 10:47 AM
>in your program the output is coming properly but it will not sort.
I don't know whom you are addressing.. what is the use of Sort in case of Editable report..??
‎2009 Jul 24 11:01 AM
hi vijay,
my output is coming properly but at a time work any one (sort or edit).
but i need both.
if edit works sort will not work.
Regards,
K.Karthikeyan.
‎2009 Jul 24 11:07 AM
>if edit works sort will not work.
thats correct. I never worked the case where both options available.
So i am not sure, this can be achieved or not.
‎2009 Jul 24 11:13 AM
Hi Vjiaya Babu,
You can use control events.
formno vendorname vendoraddress *code * * formdate* * invoiceamount* * invoiceno* * invoicedate*
Here if you do not want to display same data for FORMNO, VENDORNAME, VENDORADDRESS and CODE combination, then sort your internal table by FORMNO, VENDORNAME, VENDORADDRESS and CODE.
loop at itab.
on change of code.
Display other fields like formno vendorname vendoraddress *code *
endon.
Display other fields like * formdate* * invoiceamount* * invoiceno* * invoicedate*
endloop.
Regards,
Anil Salekar
‎2009 Jul 24 11:17 AM
Hi,
i dont want to sort in edit mode.
but other fields i want to sort(vendor name,vendor addrerss, etc..)
Regards,
K.Karthikeyan.
‎2009 Jul 24 11:19 AM
Hi,
its not a report.
i want in alv_grid_display.
Regards,
K.Karthikeyan.
‎2009 Jul 24 11:20 AM
First of all on change is Obsolete, and it is not a Control break statement.
on change of code.
endon.And Read the question carefully Once. Sorry if the question is related to Control break statements...
As per my Knowledge it is not possible to use SORT option with the editable Grid.
‎2009 Jul 24 10:48 AM
Hi,
Use function module REUSE_ALV_GRID_DISPLAY and pass edit_mask = X and pass the events in IT_EVENTS.
And handle the events.
‎2009 Jul 24 10:52 AM
‎2009 Jul 24 10:52 AM
Hi ,
In order to display the ALV grid as per your requirement, you have to sort the corresponding fields.
you can try the following code.
perform sf1 using 'formno' 'X'.
perform sf1 using 'vendorname' 'X'.
perform sf1 using 'vendoraddress' 'X'.
perform sf1 using 'invoiceamount' 'X'.
form sf1 using fieldname sortup.
v_count = v_count + 1.
clear w_sort.
w_sort-fieldname = fieldname.
w_sort-spos = v_count.
w_sort-up = sortup.
append w_sort to t_sort.
endform.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = l_repid
i_callback_user_command = 'ALV_USER_COMMAND'
is_layout = l_str_lay
it_fieldcat = t_catalog[]
i_grid_title = sy-title
i_default = c_x
i_save = c_a
it_sort = t_sort[] ----------------> add the sorted field table here.
is_variant = l_str_var
is_print = l_str_prn
tables
t_outtab = t_data
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
endif.
Hope it helps.
Regards,
Vik
‎2009 Jul 24 11:56 AM
Hi,
i want edit mode.
but the edit mode shoud not be sorted.
Regards,
K.Karthikeyan.
‎2009 Jul 28 7:49 AM
Hi,
My output is sorting but the edit mode is not working.
I need at a time both sort(other than edit mode ) and edit mode(should not sort)
.Regards,
K.Karthikeyan.
‎2009 Jul 28 7:50 AM
Hi,
My output is sorting but the edit mode is not working.
I need at a time both sort(other than edit mode ) and edit mode(should not sort)
.Regards,
K.Karthikeyan.