10-24-2013 3:45 PM
hello all,
i have an alv report with 4 columns say(order number,material,actual cost,planned cost ...)
for a partcular order say
order item material actual cost planned cost
90000720 i010 m------- 1000 2000
90000720 i020 sab101 1000 2000
90000720 i030 abc122 1000 2000.
now my question is i want to display actual cost and planned cost only once not all the times for the order,
is it possible if so please suggest me some solution...
thanking u.....
10-24-2013 4:02 PM
Hi Vinay,
As Venkat suggested you can pass these two fields in the sorting parameter, and it will not show repeated rows.
Thanks,
Ajay Bose
10-24-2013 3:50 PM
Hi-
I hope sort option with those two fields will work for you.
-Venkat
10-24-2013 4:02 PM
Hi Vinay,
As Venkat suggested you can pass these two fields in the sorting parameter, and it will not show repeated rows.
Thanks,
Ajay Bose
10-24-2013 4:48 PM
Hi-
If you don't want to use sort option, loop over the final internal table(I hope you are already doing this) and make use of control break statement AT NEW with order number, so that you can pass those two fields only for the first time(first line item) and during the next iterations for the same order you can clear those two fields.
Hope this solves your problem.
-Venkat
10-26-2013 3:05 PM
hai venkat,
AT NEW with order number ,worked fine...
thanks a lot...
bye....
10-24-2013 6:18 PM
First you should Sort the table by orderno, actualcost, planned cost
Then delete duplicate adjacent comparing orderno, actualcost, planned cost
Reward if this is helpful
Regards,
Borland
10-25-2013 6:01 AM
Hi,
In order to sort the fields in ALV, we may have two ways.
1. Sorting the Internal table---The advantage of this methid is, u can sort and can delete the irrelevant line items......
ex: SORT ITAB BY <FIELD NAME> [ASCENDING|DESCENDING]
The above statment will give us the sorted internal with the fields mentioned in Field Name.....
And with the help of the following statment u can reduce the repeated/unwanted line items..
DELETE ADJACENT DUPLICATES FROM ITAB
This method will allow u to filter the datas before displaying it.....
2. Sort Using sort structure----- This is can be used while displaying the data using "REUSE_ALV_GRID_DISPLAY" or " REUSE_ALV_GRID_DISPLAY_LVC" .
it_sort TYPE TABLE OF slis_sortinfo_alv "Internal Table
wa_sort TYPE slis_sortinfo_alv, "Work area
IT_SORT-FIELDNAME = 'Give you field name'.
IT_SORT-UP = 'X'.
APPEND IT_SORT
When calling the function REUSE_ALV_GRID_DISPALY_LVC , U must have to specify the sorting structure
it_sort_lvc = it_sort
10-26-2013 3:04 PM