cancel
Showing results for 
Search instead for 
Did you mean: 

regarding script PO CALUCULATION

Former Member
0 Kudos

HI EXPERTS,

IM MANI. IM DOING THE SAP SCRIPT, IN THIS I WANT SOME CALCULATIONS THAT IS REGARDING PURCHASE ORDER.

IN BODY I CAN PUT SOME FIELDS I.E,

SUBTOTAL : 19,000

P&F :

ED@16% :3040

CESS@2% :60.80

HE CESS@1% :30.40

VAT@4% :885.00

ENTRY TAX :0.00

FREIGHT :0.00

INSURENCE :0.00

NET TOTAL :23,016.20

(RUPEES TWENTY-THREE THOUSAND SIXTEEN AND PAISE TWENTY ONLY)

THESE ARE FIELDS WE SHOULD MAINTAIN. CAN I WANT THAT HOW THESE FIELDS ARE SHOULD BE PLACED IN SCRIPT.AND FINALLY THE NET VALUE SHOULD PRINTED IN WORDS.

THANKS & REGARDS,

MANI.......

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member196280
Active Contributor
0 Kudos

you can use below logic for doing your calculations...

Ex.

/: PERFORM <Subroutine name> IN PROGRAM <subroutine prog name>

/:USING &<field name>&

/:CHANGING &<field name1&

/:ENDPERFORM

Then create subroutine pool program and you have to write the code.

FORM ><subroutine name> tables int_cond structure itcsy

outt_cond structure itcsy.

data : value(20), value1(20). "do your own declarations

Read int_cond table index 1.

value = int_cond-value.

value1 = value1 + value.

Read outt_cond table index 1.

outt_cond-value = value1.

Modify outt_cond index 1.

ENDFORM.

Just rough idea given above.

for displaying total in words use the following FM

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

AMOUNT = amouno

CURRENCY = 'USD'

  • FILLER = ' '

LANGUAGE = SY-LANGU

IMPORTING

IN_WORDS = SPELL

EXCEPTIONS

NOT_FOUND = 1

TOO_LARGE = 2

OTHERS = 3

close the thread once your question is answered.

Regards,

SaiRam

Former Member
0 Kudos

Dear Sir,

i need this field name pls tell me

ECCNO:

VAT NO:

PAN NO:

CST NO:

DT :

RELATED TO PURSHACE ORDER..

PLS TELL ME...

THANKS

MANI

Former Member
0 Kudos

Hi

Goto the MEDRUCK script

copy it to ZFORM

and goto MAIN WINDOW

check the Text element ITEM_CONDITIONS

in which the KSCHL,KWERT fields are maintained

there check for the different condition Types with thier Texts(VTEXT) and the amounts (KWERT) fields

These are all has to come from PRICING tabes KONV and KONP

Take the EKKO-KNUMV and with that pass to KONV-KNUMV and fetch the condition type (KSCHL) based amount

Regards

Anji