2017 Oct 04 9:26 AM
Hello all,
in which table agreement item tax values are stored,
i did not find any records in KONP table, is there any FM to get these values..
2017 Oct 05 6:14 AM
2017 Oct 05 4:00 PM
2017 Oct 06 4:54 AM
hi use belo fm
CALCULATE_TAX_ITEM
ex:
CLEAR LS_TAXCOM.
LS_TAXCOM-BUKRS = LS_EKKO-BUKRS.
LS_TAXCOM-BUDAT = LS_EKKO-AEDAT.
LS_TAXCOM-BLDAT = LS_EKKO-BEDAT.
LS_TAXCOM-WAERS = LS_EKKO-WAERS.
LS_TAXCOM-HWAER = LS_EKKO-WAERS.
LS_TAXCOM-KPOSN = LS_EKPO-EBELP.
LS_TAXCOM-MWSKZ = LS_EKPO-MWSKZ.
LS_TAXCOM-WRBTR = LS_EKPO-NETWR.
LS_TAXCOM-XMWST = 'X'.
LS_TAXCOM-SHKZG = 'H'.
LS_TAXCOM-TXJCD = LS_EKPO-TXJCD.
LS_TAXCOM-LIFNR = LS_EKKO-LIFNR.
LS_TAXCOM-EKORG = LS_EKKO-EKORG.
LS_TAXCOM-MATNR = LS_EKPO-MATNR.
LS_TAXCOM-WERKS = LS_EKPO-WERKS.
LS_TAXCOM-MATKL = LS_EKPO-MATKL.
LS_TAXCOM-MEINS = LS_EKPO-MEINS.
LS_TAXCOM-MGLME = LS_EKPO-MENGE.
LS_TAXCOM-MTART = LS_EKPO-MTART.
LS_TAXCOM-LAND1 = LS_EKKO-LANDS.
LS_TAXCOM-EBELN = LS_EKKO-EBELN.
LS_TAXCOM-EBELP = LS_EKPO-EBELP.
LS_TAXCOM-BWTAR = LS_EKPO-BWTAR.
REFRESH:LT_KOMV[].
CALL FUNCTION 'CALCULATE_TAX_ITEM'
EXPORTING
DIALOG = 'DIAKZ'
DISPLAY_ONLY = 'X'
I_TAXCOM = LS_TAXCOM
TABLES
T_XKOMV = LT_KOMV
EXCEPTIONS
MWSKZ_NOT_DEFINED = 1
MWSKZ_NOT_FOUND = 2
MWSKZ_NOT_VALID = 3
STEUERBETRAG_FALSCH = 4
COUNTRY_NOT_FOUND = 5
TXJCD_NOT_VALID = 6
OTHERS = 7.
LOOP AT LT_KOMV INTO LS_KOMV.
CASE LS_KOMV-KVSL1.
WHEN 'JII'.
LS_FINAL-IGST = LS_FINAL-IGST + ( ( LS_KOMV-KBETR / 1000 ) * LS_RSEG-WRBTR ).
WHEN 'JIC'.
LS_FINAL-CGST = LS_FINAL-CGST + ( ( LS_KOMV-KBETR / 1000 ) * LS_RSEG-WRBTR ).
WHEN 'JIS'.
LS_FINAL-SGST = LS_FINAL-SGST + ( ( LS_KOMV-KBETR / 1000 ) * LS_RSEG-WRBTR ).
WHEN 'JIM'.
LS_FINAL-IMGST = LS_FINAL-IMGST + ( ( LS_KOMV-KBETR / 1000 ) * LS_RSEG-WRBTR ).
ENDCASE.
ENDLOOP.
2017 Oct 06 4:54 AM
hi use belo fm
CALCULATE_TAX_ITEM
ex:
CLEAR LS_TAXCOM.
LS_TAXCOM-BUKRS = LS_EKKO-BUKRS.
LS_TAXCOM-BUDAT = LS_EKKO-AEDAT.
LS_TAXCOM-BLDAT = LS_EKKO-BEDAT.
LS_TAXCOM-WAERS = LS_EKKO-WAERS.
LS_TAXCOM-HWAER = LS_EKKO-WAERS.
LS_TAXCOM-KPOSN = LS_EKPO-EBELP.
LS_TAXCOM-MWSKZ = LS_EKPO-MWSKZ.
LS_TAXCOM-WRBTR = LS_EKPO-NETWR.
LS_TAXCOM-XMWST = 'X'.
LS_TAXCOM-SHKZG = 'H'.
LS_TAXCOM-TXJCD = LS_EKPO-TXJCD.
LS_TAXCOM-LIFNR = LS_EKKO-LIFNR.
LS_TAXCOM-EKORG = LS_EKKO-EKORG.
LS_TAXCOM-MATNR = LS_EKPO-MATNR.
LS_TAXCOM-WERKS = LS_EKPO-WERKS.
LS_TAXCOM-MATKL = LS_EKPO-MATKL.
LS_TAXCOM-MEINS = LS_EKPO-MEINS.
LS_TAXCOM-MGLME = LS_EKPO-MENGE.
LS_TAXCOM-MTART = LS_EKPO-MTART.
LS_TAXCOM-LAND1 = LS_EKKO-LANDS.
LS_TAXCOM-EBELN = LS_EKKO-EBELN.
LS_TAXCOM-EBELP = LS_EKPO-EBELP.
LS_TAXCOM-BWTAR = LS_EKPO-BWTAR.
REFRESH:LT_KOMV[].
CALL FUNCTION 'CALCULATE_TAX_ITEM'
EXPORTING
DIALOG = 'DIAKZ'
DISPLAY_ONLY = 'X'
I_TAXCOM = LS_TAXCOM
TABLES
T_XKOMV = LT_KOMV
EXCEPTIONS
MWSKZ_NOT_DEFINED = 1
MWSKZ_NOT_FOUND = 2
MWSKZ_NOT_VALID = 3
STEUERBETRAG_FALSCH = 4
COUNTRY_NOT_FOUND = 5
TXJCD_NOT_VALID = 6
OTHERS = 7.
LOOP AT LT_KOMV INTO LS_KOMV.
CASE LS_KOMV-KVSL1.
WHEN 'JII'.
LS_FINAL-IGST = LS_FINAL-IGST + ( ( LS_KOMV-KBETR / 1000 ) * LS_RSEG-WRBTR ).
WHEN 'JIC'.
LS_FINAL-CGST = LS_FINAL-CGST + ( ( LS_KOMV-KBETR / 1000 ) * LS_RSEG-WRBTR ).
WHEN 'JIS'.
LS_FINAL-SGST = LS_FINAL-SGST + ( ( LS_KOMV-KBETR / 1000 ) * LS_RSEG-WRBTR ).
WHEN 'JIM'.
LS_FINAL-IMGST = LS_FINAL-IMGST + ( ( LS_KOMV-KBETR / 1000 ) * LS_RSEG-WRBTR ).
ENDCASE.
ENDLOOP.
2017 Oct 06 4:54 AM