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: 
Read only

ALV report problem

former_member185116
Active Participant
0 Likes
864

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.....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
824

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

7 REPLIES 7
Read only

venkat_aileni
Contributor
0 Likes
824

Hi-

I hope sort option with those two fields will work for you.

-Venkat

Read only

Former Member
0 Likes
825

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

Read only

0 Likes
824

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

Read only

0 Likes
824

hai venkat,

AT NEW with order number ,worked fine...

thanks a lot...

bye....

Read only

Former Member
0 Likes
824

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

Read only

Former Member
0 Likes
824

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

Read only

0 Likes
824

hai rajan,

thanks for u r helpful answer...