‎2009 Jul 28 6:54 AM
1. I have the below fields in my internal table
SAles order no
Sales order item no
Billing no
Billing item no
sample data
Sales order Sales order item billing NO Billing item
100 10 12 1
2
3
2.My requirement :
2.1 - i am displaying in an ALV Output
2.2 - when i display the output i see the values for sales order 100 in all the line items
2.3 - i need to know if we can use some group feature..
this is a sample test case ..if i get the logic i can apply on my real report..
Note :I am new to ABAP
reg
dsk
‎2009 Jul 28 7:13 AM
Hi,
You have two options:
1) Take another internal table with a similar structure to that of your final ALV o/p table and delete duplicates comparing sales order no. Then a third internal table to populate your values comparing these both tables.
2) Sort the report & subtotal it on order value or invoice value so that you see order number only in the 1st line item and others for the same order remain blank.
In both cases there's a hitch. In scenarios like multiple deliveries & invoices pls test the report as compared to normal scenarios we have one sales order with one delivery & one invoice.
Regards,
Amit
‎2009 Jul 28 7:19 AM
SAMPLE DATA IN DETAIL:
1. Actually i noticed the sample data has collapsed..
2. The real strucuture is like below
Sales order Sales orderitem billing NO Billing item
100 xxxxxxxx10xxxxxxxxxxx 12xxxxxxxx 1
100 xxxxxxxx10xxxxxxxxxxx 12xxxxxxxx 2
100 xxxxxxxx10xxxxxxxxxxx 12xxxxxxxx 3
100 xxxxxxxx10xxxxxxxxxxx 12xxxxxxxx 4
Note: 'x' is onlyfor representing the space
3. In this case in my output i dont want to show the sales order / item and billing no ..for all lines i want to show it only
in my first line.
sorry for the trouble
reg
dsk
Edited by: Dhandapani Satheeshkumar on Jul 28, 2009 11:49 AM
‎2009 Jul 28 7:32 AM
In this case, say you have these data in Internal Table IT1. First Sort these data in ascendig order by Sales order, Sales orderitem, billing NO. Now Loop at these table and use the concept of ON CHANGE ON billing NO ..... else ... ENDON. Inside the ON CHANGE ON loop, append the records the in other internal table say IT2 having same structure IT1 and pass it the ALV to display.
Hope this will solve your problem.
‎2009 Jul 28 7:34 AM
sumesh,
1. Thanks for your response.
2. I will try the ON CHANGE ON - concept and will update you the results.
Thanks in advance.
Satheesh
‎2009 Jul 28 7:19 AM
Hi,
Please use separate internals tables to fetch order & Billing data for header as well line items details respectively.
like I_VBAK, I_VBAP, I_VBRK, I_VBRP.
For final output create a final table with all the fields you want to display like I_FINAL.
Finally within the loop for I_VBAK, you can read all other internals tables and append the required values into I_FINAL table.
Thats it.
Hope it is clear to you.
Regds,
Anil
‎2009 Jul 28 7:32 AM
Anil and amit.
1. thanks for your reply.
2.Currently also i am doing the same "logic" but what happens in the output i am seeing my order no and few other fields for all the lines of billing lines..
3. My requirement is to show the sales order no, customer no etc only in my first line..i need your expertise in the final display in the output.
tahnks in advance
sathees
‎2009 Oct 09 6:47 AM