Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

tax field table in purchase order

Former Member
0 Kudos

Hi,

What is the table of the tax details that appear in the invoice tab of t-code ME23N.

Thanks in Advance.

Regard

Sam.

6 REPLIES 6

GauthamV
Active Contributor
0 Kudos

Tables : KONV,KONH,KONP.

Former Member
0 Kudos

Hi,

But i want invoice tab condition type in purchase order.

Regards.

Sam.

GauthamV
Active Contributor
0 Kudos

All the tables i have mentioned will have condition type.

If you want to link with Po then use this relation.

EKKO-KNUMV = KONV-KNUMV.

Former Member
0 Kudos

Hi,

in konv EKKO-KNUMV = KONV-KNUMV ok but only material condition type available.

or in konh and konp EKKO-KNUMV = KONH-KNUMV OR EKKO-KNUMV = KONP-KNUMV

not match only condition type match.

Regards.

Sam

Former Member
0 Kudos

Hi,

Check this Function module 'CALCULATE_TAX_ITEM'.

Former Member
0 Kudos

this may help u...


TABLES:ekko,ekpo,t001,marc.

DATA:rkomk LIKE komk,
     rkomp LIKE komp.

DATA:kalsm TYPE t005-kalsm.

DATA:pc_komv LIKE komv OCCURS 0 WITH HEADER LINE.

DATA : taxcom TYPE taxcom.


  CALL FUNCTION 'REFRESH_TAX_TABLES'
    EXCEPTIONS
      OTHERS = 1.

  SELECT SINGLE * FROM ekko
         WHERE ebeln = w_ebeln.    "<-----PO number

  SELECT SINGLE * FROM ekpo
          WHERE ebeln = ekko-ebeln   "<-----PO number
            AND ebelp = w_ebelp .     "<-----PO item

  taxcom-bukrs = ekpo-bukrs.
  taxcom-budat = ekko-bedat.
  taxcom-waers = ekko-waers.
  taxcom-kposn = ekpo-ebelp.
  taxcom-mwskz = ekpo-mwskz.
  taxcom-txjcd = ekpo-txjcd.
  taxcom-shkzg = 'H'.
  taxcom-xmwst = 'X'.
  IF ekko-bstyp EQ 'F'.
    taxcom-wrbtr = ekpo-netwr.
  ELSE.
    taxcom-wrbtr = ekpo-zwert.
  ENDIF.
  taxcom-lifnr = ekko-lifnr.
  taxcom-land1 = ekko-lands.                      
  taxcom-ekorg = ekko-ekorg.
  taxcom-hwaer = ekko-waers.
  taxcom-llief = ekko-llief.
  taxcom-bldat = ekko-bedat.
  taxcom-matnr = ekpo-matnr.       
  taxcom-werks = ekpo-werks.
  taxcom-bwtar = ekpo-bwtar.
  taxcom-matkl = ekpo-matkl.
  taxcom-meins = ekpo-meins.

  IF ekko-bstyp EQ 'F'.
    taxcom-mglme = ekpo-menge.
  ELSE.
    IF ekko-bstyp EQ 'K' AND ekpo-abmng GT 0.
      taxcom-mglme = ekpo-abmng.
    ELSE.
      taxcom-mglme = ekpo-ktmng.
    ENDIF.
  ENDIF.

  IF taxcom-mglme EQ 0. 
    taxcom-mglme = 1000. 
  ENDIF.

  taxcom-mtart = ekpo-mtart.
  IF NOT ekko-llief IS INITIAL.
    taxcom-lifnr = ekko-llief.
  ENDIF.

  CALL FUNCTION 'CALCULATE_TAX_ITEM'
    EXPORTING
      i_taxcom     = taxcom
      display_only = 'X'
      dialog       = ' '
    IMPORTING
      e_taxcom     = taxcom
*    nav_anteil   = hwert
  TABLES
     t_xkomv      = pc_komv    "Tax Table
  EXCEPTIONS
      OTHERS       = 01.