cancel
Showing results for 
Search instead for 
Did you mean: 

how to add value of two char fields into another char field.

Former Member
0 Kudos

Hi Experts,

I have 2 char fields lv_kwert and lv_kwert1 type char and both fields holds value like 10.10 and 10.20. I want to add these value but when use statement lv_kwert2 = lv_kwert + lv_kwert1 its gives run time error enable to interpret the value.

Iam working sap script for PO and using standered form and program. want the add of kwert but not able to complete the process. its very urgent Pls help ASAP .

Thanks in advance.

Abhishek Pandey.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Here the Example coding,

DATA: T1(5) TYPE C VALUE '10.05',

T2(5) TYPE C VALUE '10.15',

T3(6) TYPE C,

P1 TYPE P DECIMALS 2,

P2 TYPE P DECIMALS 2,

P3 TYPE P DECIMALS 2.

MOVE T1 TO P1.

MOVE T2 TO P2.

P3 = P1 + P2.

WRITE:/ P3.

Thanks,

Arunprasad.P

Reward if useful.

Former Member
0 Kudos

Hi,

You need to convert them to currency/integer/numc and then only you can do arithematic operations.

Regards,

Narendra.