cancel
Showing results for 
Search instead for 
Did you mean: 

Manual Excise values calculation in PO

Former Member
0 Kudos

Hi All,

I have created Z print program and Z Smartform for Purchase Order. Using 'Calculate_tax_item' function module i got Excise duty and Sales tax values correctly.Now my client requirment is calculating Manual Excise values,pls let me know how to use this Function Module for this requirment.

client have maintained manual Excise in Condition JEXC. IF required this condition can also be

included in the out put program. Calculation should be taken place considering this

condition value in place of JMOP. Either JMOP or JEXC and always JEXC if the values

were maintained in manual Excise JEXC.

regards

murugesh

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

dear Murugesh

give me your email id.

I will send you that smartform. You upload it to your system and check the detail code.

Regards

Girija S Mohanty

Former Member
0 Kudos

hi,

mail id (murugesh.mitin gmail)

Thanks and Regards

MurugeshRajeev

Edited by: Murugesh P on Feb 11, 2009 12:01 PM

0 Kudos

Hi,

try this.

debug the code carefully.

read table it_komv with key kschl = 'JEXC'.

IF SY-SUBRC = 0.

delete it_tab where kschl = 'JMOP'.

endif.

loop at i_komv.

if ( i_komv-kschl = 'JEC1' or

i_komv-kschl = 'JEC2' or

i_komv-kschl = 'JA1S' or

i_komv-kschl = 'ZSEC' or

i_komv-kschl = 'JNAC' or

i_komv-kschl = 'JCES' or

i_komv-kschl = 'JMOP' or

i_komv-kschl = 'JECS' or

i_komv-kschl = 'JEXC').

clear vp_ecess.

vp_ecess = i_komv-kawrt * ( ( i_komv-kbetr / 10 ) / 100 ).

w_exciseval = w_exciseval + vp_ecess.

endif.

ENDLOOP.

loop at i_komv.

if ( i_komv-kschl = 'JIP1' Or

i_komv-kschl = 'JIP4' or

i_komv-kschl = 'JVRD' Or

i_komv-kschl = 'JVRN' Or

i_komv-kschl = 'JVCD' Or

i_komv-kschl = 'JVCN' Or

i_komv-kschl = 'JVCS' Or

i_komv-kschl = 'JIPL' ).

v_edamt = i_komv-kawrt * ( ( i_komv-kbetr / 10 ) / 100 ).

w_salestx = w_salestx + v_edamt.

CLEAR v_edamt.

endif.

endloop.

Former Member
0 Kudos

Dear Mohanty,

I didn't get correct soluction.

Regards

murugesh

0 Kudos

Hi,

see below code. I think it solve your prob.

<1st part>

SELECT SINGLE vtext INTO gv_vtext FROM t685t

WHERE spras = 'EN'

AND kschl = <komv>-kschl.

*CODE BY G S MOHANTY DT.11.02.2009

IF <KOMV>-KSCHL = 'JEXC'.

JEXC_FLAG = 'X'.

ENDIF.

*END CODE

IF <komv>-kschl = 'ZPBX' or <komv>-kschl = 'PBXX' or <komv>-kschl =

'PB00'.

gv_vtext = 'Basic price'.

endif.

.......

<second part>

DATA l_ekpo LIKE ekpo.

DATA ls_komk TYPE komk.

DATA ls_komp TYPE komp.

DATA:V_KALSM TYPE T005-KALSM.

REFRESH gt_komvd.

CLEAR : l_stax.

IF <fs>-uebpo NE space.

EXIT.

ENDIF.

SELECT SINGLE KALSM FROM T005

INTO V_KALSM

WHERE LAND1 = IS_EKKO-LANDS

AND SPRAS = IS_EKKO-SPRAS.

REFRESH gt_komvd.

REFRESH gs_komv_1.

SELECT SINGLE steuc FROM marc INTO v_steuc

WHERE matnr = <fs>-matnr AND werks = <fs>-werks.

*CODE BY G S MOHANTY DT.17.12.2008

LS_KOMK-MANDT = SY-MANDT.

ls_komk-kappl = 'TX'.

ls_komk-kalsm = V_KALSM. "'TAXINJ'.

ls_komk-lifnr = is_ekko-lifnr.

ls_komk-waerk = is_ekko-waers.

LS_KOMK-KUNNR = IS_EKKO-KUNNR.

ls_komk-aland = IS_EKKO-LANDS.

ls_komk-hwaer ='INR'.

ls_komk-bukrs = is_ekko-bukrs.

ls_komk-brsch = l_brsch.

ls_komk-prsdt = <fs>-prdat.

ls_komk-ekorg = is_ekko-ekorg.

ls_komk-mwskz = <fs>-mwskz.

ls_komp-kposn = <fs>-ebelp.

ls_komp-matnr = <fs>-matnr.

ls_komp-werks = <fs>-werks.

ls_komp-matkl = <fs>-matkl.

ls_komp-meins = <fs>-meins.

ls_komp-vrkme = <fs>-bprme.

ls_komp-netwr = <fs>-netwr.

ls_komp-wrbtr = <fs>-netwr.

ls_komp-mwskz = <fs>-mwskz.

ls_komp-netpr = <fs>-netpr.

ls_komp-mtart = <fs>-mtart.

ls_komp-kursk_dat = <fs>-prdat.

ls_komp-steuc = v_steuc.

ls_komp-mgame = quant.

ls_komp-mglme = quant.

**ls_komp-geaend = 'X'.

**ls_komp-mprok = 'X'.

CALL FUNCTION 'PRICING'

EXPORTING

calculation_type = 'B'

comm_head_i = ls_komk

comm_item_i = ls_komp

  • PRELIMINARY = ' '

  • NO_CALCULATION = ' '

  • IMPORTING

COMM_HEAD_E = LS_KOMK

COMM_ITEM_E = LS_KOMP

TABLES

tkomv = gs_komv_1.

  • SVBAP =

  • CHANGING

  • REBATE_DETERMINED = ' '

*ADDED BY G S MOHANTY DT.11.02.2009

IF JEXC_FLAG = 'X'.

CLEAR JEXC_FLAG.

DELETE GS_KOMV_1 WHERE KSCHL = 'JMO1'.

DELETE GS_KOMV_1 WHERE KSCHL = 'JMO2'.

ENDIF.

*CODE END

DELETE gs_komv_1 WHERE kschl = 'BASB'.

DELETE GS_KOMV_1 WHERE KWERT = '0.00'.

You try with func module 'Pricing'

and delete 'JMO1' AND 'JMO2' when 'JEXC' is used.

Former Member
0 Kudos

hi mohanty,

Thanks for ur reply..

Currently i am getting Excise value and salestax values correctly.Excise value is combination of JMOP,JAIS,JEC1(adding this 3 condition type),it's working perfectly.They have to calculate the Manual excise value in JEXC so i have to give first priority to JEXC.Suppose values in JMOP and JEXC means,program have to take the values from JEXC only.values not in JEXC means that time only JMOP should be calculate.

i will attach my coding for reference..

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

  • Calculating Sales tax Value and Excise values *

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

loop at i_komv.

if ( i_komv-kschl = 'JEC1' or

i_komv-kschl = 'JEC2' or

i_komv-kschl = 'JA1S' or

i_komv-kschl = 'ZSEC' or

i_komv-kschl = 'JNAC' or

i_komv-kschl = 'JCES' or

i_komv-kschl = 'JMOP' or

i_komv-kschl = 'JECS' ).

clear vp_ecess.

vp_ecess = i_komv-kawrt * ( ( i_komv-kbetr / 10 ) / 100 ).

w_exciseval = w_exciseval + vp_ecess.

endif.

ENDLOOP.

loop at i_komv.

if ( i_komv-kschl = 'JIP1' Or

i_komv-kschl = 'JIP4' or

i_komv-kschl = 'JVRD' Or

i_komv-kschl = 'JVRN' Or

i_komv-kschl = 'JVCD' Or

i_komv-kschl = 'JVCN' Or

i_komv-kschl = 'JVCS' Or

i_komv-kschl = 'JIPL' ).

v_edamt = i_komv-kawrt * ( ( i_komv-kbetr / 10 ) / 100 ).

w_salestx = w_salestx + v_edamt.

CLEAR v_edamt.

endif.

endloop.

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

  • End of Calcultation *

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

sum = amount + w_packfard + w_insurance + w_exciseval + w_salestx +

w_servicetx + w_fright - w_totdiscnt.

Regards

Murugesh

Edited by: Murugesh P on Feb 11, 2009 8:33 AM