cancel
Showing results for 
Search instead for 
Did you mean: 

Vat Code N Service Tax in same main window

Former Member
0 Kudos

Hi all,

I designed a layout to print item details, vat details and service tax details within the same main window with different Tables. The result whould be , if there are same Vat codes for each line item, then the vatable amount should be summed up and printed with respect to that particular VAT code. if code is seperate ,then to print diffently. but the problem is, if there are 25 line items then all 25 Vat codes are being printed. they are not summed up into one variable.

Example:

Now the output is:

*lineitemno taxrate vatcode amount.

1 12.5 V1 100.00

2 12.5 V1 200.00

3 12.5 V1 100.00

4 4.00 M1 500.00

5 3.00 M2 700.00*

where as the output should be:

V1 12.5 400.00

M1 4.00 500.00

M2 3.00 700.00

Please help me out.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Kumar,

Use the sort begin with the tax rate and sum up the vatcode amout and using the subtotal and display.

Regards,

Sravanthi

Former Member
0 Kudos

Try to use:

SORT itab

COLLECT itab

Former Member
0 Kudos

you can add the amount based on tax code in your internal table and pass this value ti your window.

loop at itab,

sum = amount + sum.

at end of taxcode.

amount = sum.

endat.

endloop.

Former Member
0 Kudos

hi,

I USED THE CODE YOU SENT STILL THE PROBLEM IS SAME,, AT END OF STATEMENT IS NOT ADDING SUM.