Skip to Content
avatar image
Former Member

smartforms

Moved to correct forum by moderator. Please use a more meaningful subject line in future.

Hi Guru's

i retrieved the value in text from sales order item text.

item text value is integer and my text is character . i want to calculate sum of that retrieved value .

i try following code.

data: r type i.

move text to r.

rells = rells + r.

but it not work properly.

regards.

sam.

Edited by: Matt on Nov 12, 2008 9:32 AM

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 12, 2008 at 06:37 AM

    hi,

    use thr tool LOOP in smartfrom....there is one tab called "CALCULATIONS".....here choose operation as Total....give you field name...and give the target field name.....then drag & drop that target field where you want to display...

    Arunima

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Calculate the total and take the total value in integer only, after your calculation assign the total value to the corresponding field.

      Try following code.

      data: 
        r type i,
        total type i.
      
      Loop at table
       r = table-vtxt.
       total = r + total.
      endloop.

      Regards,

      Mahi.

      Edited by: Maheswari Chegu on Nov 12, 2008 7:46 AM

  • avatar image
    Former Member
    Nov 12, 2008 at 06:42 AM

    Hi *sam *,

    You can assign directly but not by using move to, then your problem may solved.

    Regards,

    Mahi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 12, 2008 at 10:12 AM

    Hi,

    Try this code.

    Data: x type string value '1',

    r type i,

    tot type i value 2.

    move x to r.

    tot = tot + r.

    write tot.

    Add comment
    10|10000 characters needed characters exceeded