‎2007 May 17 5:15 AM
Dear firends.
I wish to know, how i can print the item no which's amount is calculated using collect keyword.
i wish to print item 1,2,3 at vat 12% Rs.34300 this way
as per my code i am receiving this;... VAT 12% : Rs. 34300.
can any body suggest me how i add item which i have summarized.
COLLECT l_saltax1 INto it_saltax. <- here i am adding the similar percentage taxed item, this prints this way only item at vat 15% 23000.
i wish to print this way items 1,2 ,3 at vat 12% 23000
4,5 at vat 5 % 2300
6 at vat 7 % 1000
( as per the below code i have recieved the out put this way)
item 1 at vat 12% 1000
item 2 at vat 12% 1000)
please look at my code. and help me regards
naeem
Determine Excise Duty
CLEAR: g_vtext,g_kwert,l_kwert.
data: l_vat type ty_tax occurs 0 with header line.
data: l_stax type ty_tax occurs 0 with header line.
data: l_saltax type ty_tax occurs 0 with header line.
data : TAXCOM like TAXCOM.
DATA L_STAX1 LIKE SORTED TABLE OF L_STAX WITH NON-UNIQUE KEY per
WITH HEADER LINE.
DATA L_VAT1 LIKE SORTED TABLE OF L_VAT WITH NON-UNIQUE KEY per
WITH HEADER LINE.
DATA l_saltax1 LIKE SORTED TABLE OF l_saltax WITH NON-UNIQUE KEY per
WITH HEADER LINE.
data: begin of t_komv occurs 0.
include structure komv.
data: end of t_komv.
move-corresponding <fs> to TAXCOM.
taxcom-BUDAT = zxekko-BEDAT.
taxcom-BlDAT = zxekko-BEDAT.
taxcom-kposn = <fs>-EBELP.
taxcom-WAERS = taxcom-HWAER = zxekko-WAERS.
taxcom-XMWST = 'X'.
taxcom-WRBTR = <fs>-netwr.
taxcom-mglme = <fs>-menge.
taxcom-SHKZG = 'H'.
taxcom-lifnr = zxekko-lifnr.
taxcom-ekorg = zxekko-ekorg.
taxcom-land1 = zxekko-lands.
*break-point.
CALL FUNCTION 'CALCULATE_TAX_ITEM'
EXPORTING
ANZAHLUNG = ' '
DIALOG = ' '
DISPLAY_ONLY = ' '
INKLUSIVE = ' '
I_ANWTYP = ' '
I_DMBTR = '0'
I_MWSTS = '0'
I_TAXCOM = taxcom
PRUEFEN = ' '
RESET = ' '
IMPORTING
E_NAVFW =
E_TAXCOM =
E_XSTVR =
NAV_ANTEIL =
TABLES
T_XKOMV = t_komv
EXCEPTIONS
MWSKZ_NOT_DEFINED = 1
MWSKZ_NOT_FOUND = 2
MWSKZ_NOT_VALID = 3
STEUERBETRAG_FALSCH = 4
COUNTRY_NOT_FOUND = 5
OTHERS = 6
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop at t_komv where kposn = <fs>-ebelp.
SELECT SINGLE vtext INTO g_vtext FROM t685t
WHERE spras = sy-langu
AND kschl = t_komv-kschl.
IF g_vtext CS '%'.
MOVE t_komv-kwert TO g_kwert.
ADD: g_kwert TO g_excise.
CLEAR g_kwert.
ENDIF.
Determin tax for Non Service PO
if ( t_komv-kschl = 'JIPL' ).
ADD: t_komv-kwert TO G_SLTAX.
ADD: t_komv-kwert TO l_saltax1-amt.
l_saltax1-per = t_komv-kbetr / 10.
COLLECT l_saltax1 INto it_saltax. <- here i am adding the similar percentage taxed item, i wish to print this way items 1,2 ,3 at vat 12% 23000
4,5 at vat 5 % 2300
6 at vat 7 % 1000
( as per the below code i have recieved the out put this way)
item 1 at vat 12% 1000
item 2 at vat 12% 1000)
*l_saltax-item_no = t_komv-kposn.
*l_saltax-amt = t_komv-kwert.
*l_saltax1-per = t_komv-kbetr / 10.
*append l_saltax to it_saltax.
endif.
ENDLOOP.
Message was edited by:
Naim Khan S Babi
‎2007 May 18 12:47 PM