2009 May 18 2:03 PM
Hi All,
I have an internal table with following format.
Invoice Item Amount
951 <Blank> 450.00
951 0010 1200.00
951 0020 1300.00
Now i need to display this internal table in such a way that,
Invoice Item Amount
951 0010 1200.00
951 0020 1300.00
951 <Blank> 450.00
How to sort for such requirements?
Basically, the item value is blank for Tax amount.
Hence in the report, the layout should show the details as above.... (Line item 1, 2...and at last Total Tax of all line items Amount).
Please Help me.....
Regards
Pavan
2009 May 18 2:07 PM
>
> Hi All,
>
> I have an internal table with following format.
>
> Invoice Item Amount
> 951 <Blank> 450.00
> 951 0010 1200.00
> 951 0020 1300.00
>
> Now i need to display this internal table in such a way that,
>
> Invoice Item Amount
> 951 0010 1200.00
> 951 0020 1300.00
> 951 <Blank> 450.00
>
>
> How to sort for such requirements?
>
> Basically, the item value is blank for Tax amount.
>
> Hence in the report, the layout should show the details as above.... (Line item 1, 2...and at last Total Tax of all line items Amount).
>
>
> Please Help me.....
>
> Regards
> Pavan
Add another column to the table, copy the item values into this column setting the tax line value to 9999, sort by this column.
Hi All,
I have an internal table with following format.
Invoice Item Amount
951 <Blank> 450.00
951 0010 1200.00
951 0020 1300.00
Now i need to display this internal table in such a way that,
Invoice Item Amount
951 0010 1200.00
951 0020 1300.00
951 <Blank> 450.00
How to sort for such requirements?
Basically, the item value is blank for Tax amount.
Hence in the report, the layout should show the details as above.... (Line item 1, 2...and at last Total Tax of all line items Amount).
Please Help me.....
Regards
Pavan
2009 May 18 2:07 PM
>
> Hi All,
>
> I have an internal table with following format.
>
> Invoice Item Amount
> 951 <Blank> 450.00
> 951 0010 1200.00
> 951 0020 1300.00
>
> Now i need to display this internal table in such a way that,
>
> Invoice Item Amount
> 951 0010 1200.00
> 951 0020 1300.00
> 951 <Blank> 450.00
>
>
> How to sort for such requirements?
>
> Basically, the item value is blank for Tax amount.
>
> Hence in the report, the layout should show the details as above.... (Line item 1, 2...and at last Total Tax of all line items Amount).
>
>
> Please Help me.....
>
> Regards
> Pavan
Add another column to the table, copy the item values into this column setting the tax line value to 9999, sort by this column.
2009 May 18 7:01 PM
Hi,
First move the blank item values of the internal table to the other internal table.
Let the internal table 1 be :
Invoice Item Amount
951 <Blank> 450.00
951 0010 1200.00
951 0020 1300.00
Now loop at the above internal table where item = ' ' and populate the internal table 2.
Now delete the records from internal table 1 where item equals to blank and then sort the internal table 1 as your wish..
Now follow the code as below:
data: v_tabix type sy-tabix.
Loop at table 2.
Loop at table 1 where invoice = table2-invoice.
Endloop.
v_tabix = sy-tabix + 1.
Insert table 1 record index v_tabix.
Endloop.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |