You are on page 1of 9

(http://w

ww.sap.c
Products
om/) (https://www.sap.com/products.html)

Industries (https://www.sap.com/industries.html)

Support (https://www.sap.com/support.html)

Training (https://www.sap.com/training-certi cation.html)

Community (https://www.sap.com/community.html)

Developer (https://www.sap.com/developer.html)

Partner About
(https://www.sap.com/partner.html) About (https://www.sap.com/corporate/en.html)

 

(https://sharedui.services.sap.com/v2/protected.html?ref=https://archive.sap.com/)
Home (https://www.sap.com) / Community (https://www.sap.com/community.html) / Archives (/) / Discussions + Actions
Archive (/discussions) / SAP ERP - Logistics Materials Management (SAP MM)
(/discussions/space/erp/logistics-mm)

Archived discussions are read-only. Learn more about SAP Q&A


(https://go.sap.com/community/about/questions-and-answers.html)

PO tax calculated amt in output


Dear All,

My req is i need to make the Tax calculated amount to be flown in the PO output...

total po value is 10000

tax amount 200

total value 10200 like this my po output should come......


1. from which table i should take this 200 tax amount

2. How to bring this 200 to my mm pricing in the sense i created one new condn type when
system should flow the total tax calculated amt to that condition.

Tags: sap_erp_logistics_materials_management, enterprise_resource_planning

(https://people.sap.com/sapmm.sap)

Sachein Pravanesh (https://people.sap.com/sapmm.sap)


May 12, 2012 at 07:14 AM
2 Likes

ere looking for? View more on this topic (https://go.sap.com/community/tag.html?


99213261950044802925335) or

(https://answers.sap.com/questions/ask.html?primaryTagId=477297786799213261950044802925335)

4 replies

(https://people.sap.com/kailas.ugale)
kailas ugale (https://people.sap.com/kailas.ugale)replied

March 25, 2012 at 09:34 AM

HI,

Dear friend I am sorry I am not getting 200 logic its total tax
amount from tax procedure or from po pricing procedure

as you wrote its new condition ,so you have to take help of
your ABAP consultant have to add this condition in Logic of
PO print form in NCAE

In table for Po number EKKO , take the field EKKO-KNUMV (doc


condition) , Pass this field to KONP table and table KONV table, in
KONV you will get the itemwise details of Conditions maintained in PO.

Kailas Ugale

0
likes
(https://people.sap.com/biju.k)
Bijay Kumar Barik (https://people.sap.com/biju.k)replied March 25, 2012 at 14:27 PM

Hi,

1. For PO Taxes(Excise Value & Sales Tax Value): The tax values you can determine
using the function module - CALCULATE_TAX_ITEM.

NOTE: For PO print ,all condition types( normal condition types and tax condition
types) to included in smartforms.The PO header and item values can fetch from the
table KONV with respect to the condition types for which the value is to be fetched.
Logic: Pass the value EKKO-KNUMV in the field KONV-KNUMV.

2. You need to customize (M/06) a new condition type ,for example new condition type
as ZTAX where you can have all tax value that will flow from Tax procedure to MM
pricing procedure. You can have following vital parameter for customize a condition
type ZTAX

Cond. Class: D,Calculat.type: B and Cond.category: N

AND

Keep BLANK access sequence filed & make it as item condition and then add this
condition type in MM pricing procedure (M/08) with a logic just before calculation of
TOTAL price.

Now do create new PO with all taxes and now you can view/check ,all tax amount
appear in condition type ZTAX in PO Condition TAB( which flow from tax procedure to
MM pricing procedure with your customize condition type ZTAX)

Regards,

Biju K

0
likes
(https://people.sap.com/pushkar.dhale)

Pushkar Dhale (https://people.sap.com/pushkar.dhale)replied May 12, 2012 at 06:35 AM

Kindly use following Sample code which will help you to calculate Tax as per tax code.

******************************************************************

REPORT zreport10 .

TABLES : ekko , ekpo , t001 , komk , komp .


DATA mwsbp TYPE komp-mwsbp .
PARAMETERS : p_ebeln TYPE ekpo-ebeln ,
p_ebelp TYPE ekpo-ebelp,
p_mwskz TYPE ekpo-mwskz.
START-OF-SELECTION .

PERFORM calculate_tax USING p_ebeln p_ebelp CHANGING mwsbp .

WRITE mwsbp .

___________________________________________________________________
____
FORM calculate_tax USING p_ebeln TYPE ekpo-ebeln
p_ebelp TYPE ekpo-ebelp
CHANGING p_mwsbp TYPE komp-mwsbp .

CONSTANTS: bstyp-info VALUE 'I',


bstyp-ordr VALUE 'W',
bstyp-banf VALUE 'B',
bstyp-best VALUE 'F',
bstyp-anfr VALUE 'A',
bstyp-kont VALUE 'K',
bstyp-lfpl VALUE 'L',
bstyp-lerf VALUE 'Q'.

DATA : taxcom TYPE taxcom ,


t_konv TYPE TABLE OF komv WITH HEADER LINE .

DATA: BEGIN OF tkomv OCCURS 50.


INCLUDE STRUCTURE komv.
DATA: END OF tkomv.

DATA: BEGIN OF tkomvd OCCURS 50. "Belegkonditionen


INCLUDE STRUCTURE komvd.
DATA: END OF tkomvd.

DATA : BEGIN OF tkomvh OCCURS 50.


INCLUDE STRUCTURE komv.
DATA : vtext LIKE t685t-vtext.
DATA : END OF tkomvh.

SELECT SINGLE *
INTO ekko
FROM ekko
WHERE ebeln = p_ebeln .

SELECT SINGLE *
INTO ekpo
FROM ekpo
WHERE ebeln = p_ebeln
AND ebelp = p_ebelp .

SELECT SINGLE *
INTO t001
FROM t001
WHERE bukrs = ekko-bukrs .

taxcom-bukrs = ekpo-bukrs.
taxcom-budat = ekko-bedat.
taxcom-waers = ekko-waers.
taxcom-kposn = ekpo-ebelp.
taxcom-mwskz = ekpo-mwskz.
IF p_mwskz is NOT INITIAL.
taxcom-mwskz = p_mwskz . "ekpo-mwskz.
ENDIF.

taxcom-txjcd = ekpo-txjcd.
taxcom-shkzg = 'H'.
taxcom-xmwst = 'X'.
IF ekko-bstyp EQ bstyp-best.
taxcom-wrbtr = ekpo-netwr.
ELSE.
taxcom-wrbtr = ekpo-zwert.
ENDIF.

taxcom-lifnr = ekko-lifnr.
taxcom-land1 = ekko-lands.
taxcom-ekorg = ekko-ekorg.
taxcom-hwaer = t001-waers.
taxcom-llief = ekko-llief.
taxcom-bldat = ekko-bedat.
taxcom-matnr = ekpo-ematn.
taxcom-werks = ekpo-werks.
taxcom-bwtar = ekpo-bwtar.
taxcom-matkl = ekpo-matkl.
taxcom-meins = ekpo-meins.

IF ekko-bstyp EQ bstyp-best.
taxcom-mglme = ekpo-menge.
ELSE.
IF ekko-bstyp EQ bstyp-kont 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 sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

CALL FUNCTION 'J_1BSA_COMPONENT_ACTIVE'


EXPORTING
bukrs = ekko-bukrs
component = 'BR'
EXCEPTIONS
component_not_active = 1
OTHERS = 2.

IF sy-subrc IS INITIAL.

komk-mandt = ekko-mandt.
komk-kalsm = ekko-kalsm.
IF ekko-kalsm = ''.
komk-kalsm = 'RM0000'.
ENDIF.
komk-kappl = 'M'.
komk-waerk = ekko-waers.
komk-knumv = ekko-knumv.
komk-lifnr = ekko-lifnr.
komp-kposn = ekpo-ebelp.
komp-matnr = ekpo-matnr.
komp-werks = ekpo-werks.
komp-matkl = ekpo-matkl.
komp-infnr = ekpo-infnr.
komp-evrtn = ekpo-konnr.
komp-evrtp = ekpo-ktpnr.

CALL FUNCTION 'RV_PRICE_PRINT_ITEM'


EXPORTING
comm_head_i = komk
comm_item_i = komp
language = 'E'
TABLES
tkomv = tkomv
tkomvd = tkomvd.

CALL FUNCTION 'J_1B_NF_PO_DISCOUNTS'


EXPORTING
i_kalsm = ekko-kalsm
i_ekpo = ekpo
IMPORTING
e_ekpo = ekpo
TABLES
i_konv = t_konv.

IF NOT ekko-llief IS INITIAL.


taxcom-lifnr = ekko-llief.
ENDIF.

ENDIF.

CALL FUNCTION 'FIND_TAX_SPREADSHEET'


EXPORTING
buchungskreis = t001-bukrs
EXCEPTIONS
not_found = 1
OTHERS = 2.

CALL FUNCTION 'CALCULATE_TAX_ITEM'


EXPORTING
i_taxcom = taxcom
IMPORTING
e_taxcom = taxcom
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.

p_mwsbp = taxcom-wmwst .

ENDFORM. " calculate_tax

**************************************************************

Regards,

Pushkar

1
likes
(https://people.sap.com/avinash.goswami)

Avinash Goswami (https://people.sap.com/avinash.goswami)replied May 12, 2012 at 07:14 AM

hi,

u need not create new condition type , standard SAP already provide condition "JEXS
- Taxes on the PO" which if inserted in pricing procedure automatically collects all
taxes in PO.

Having JEXS condition inserted in pricing procedure

Now get KNUMV from EKKO and pass KNUMV , KPOSN (PO line item ) and KSCHL
="JEXS" to get

KBETR = total tax ( 200 in ur case)

0
likes
Share & Follow
(https://www.facebook.com/sapcommunity) (https://twitter.com/SAPCommunity)

(https://www.youtube.com/c/SAPCommunities) (https://www.linkedin.com/company/sap)

(https://plus.google.com/+SAPCommunities) (https://instagram.com/sap/) (http://www.slideshare.net/SAP)

Privacy (http://go.sap.com/about/legal/privacy.html) Terms of Use (http://go.sap.com/corporate/en/legal/terms-of-use.html)


Legal Disclosure (http://go.sap.com/about/legal/impressum.html) Copyright (http://go.sap.com/about/legal/copyright.html)
Trademark (http://go.sap.com/about/legal/trademark.html) Sitemap (http://www.sap.com/sitemap/index.html) Newsletter
(https://go.sap.com/registration/newsletter.html)

You might also like