Application Development and Automation 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: 
Read only

Multiplying 2 values in scripts

Former Member
0 Likes
598

Hi all,

I want to multiply values from 2 fields in one script and print it ( multiply amt in usd with exchange rate to get in eur ) When i tried with '*' operator , i couldnt obatin the result .

Any suggestion will be of great help . Thanks in advance .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
557

Hi Anil

You can write a perform in your script and then in this perform you can do the required calculations.

Check this link for more info:

http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm

4 REPLIES 4
Read only

Former Member
0 Likes
558

Hi Anil

You can write a perform in your script and then in this perform you can do the required calculations.

Check this link for more info:

http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm

Read only

Former Member
0 Likes
557

Hi,

Output Field = fld11 * fld2.

for this first check whether values are coming into fld1 and fld2 or not.

if values are there ,

den u hav to write this in text editor.

Read only

Former Member
0 Likes
557

HI,

Check this....

/: PERFORM ALAMATAG IN PROGRAM ZXXXXX

/: USING &IVBDKR-VBELN&

/: Changing &YYY&

/: &TLP&

*in ABAP

FORM ALAMATAG TABLES CO_USE STRUCTURE CO_SET_TYPE

CO_SET STRUCTURE CO_SET_TYPE.

*Get using parameter

READ TABLE CO_USE WITH KEY NAME = 'VBDKR-VBELN'.

IF SY-SUBRC EQ 0.

MOVE CO_USE-VALUE TO NIV.

ENDIF.

*Store Changing parameter

LOOP AT CO_SET.

IF CO_SET-NAME EQ 'YYY'.

MOVE YYY TO CO_SET-VALUE.

MODIFY CO_SET.

ENDIF.

IF CO_SET-NAME EQ 'TLP'.

MOVE TLP TO CO_SET-VALUE.

MODIFY CO_SET.

ENDIF.

ENDLOOP.

ENDFORM.

Read only

0 Likes
557

Hi all,

I dint get the answer by multiplying 2 values and assigning it to another field .

I got the result by multiplyin values in the driver program and printing the same in script...

Thanks for the help.