Skip to Content
avatar image
Former Member

auto add one to the amount in Script

hi all,

i would want to show the total amount in cheque, as below

<b>USD 726,112 AND SEN 50 ONLY</b>

the code is as below:

&'USD 'REGUH-RWBTR(C.0)&&'AND SEN 'SPELL-DECIMAL(2)' '&ONLY

however, the output is as below

<b>USD 726,113 AND SEN 50 ONLY</b>

having a different of adding 1.

which mean with the code above, when the sen is more the .45, then it will auto add 1 into the amount. what is the problem here?

please help. thanks

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Sep 25, 2007 at 10:06 AM

    Change your code like this

    &'USD '<b>SPELL-NUMBER(C)</b>&&'AND SEN 'SPELL-DECIMAL(2)' '&ONLY

    Close the thread if your question is answered.

    Regards,

    SaiRam

    Add comment
    10|10000 characters needed characters exceeded

    • If you want thousand separator , write the following code

      Go through this example

      Ex.

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

      /:USING SPELL-NUMBER&

      /:CHANGING &AMOUNT&

      /: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 : amount type p.

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

      Read int_cond table index 1.

      value = int_cond-value.

      MOVE VALUE TO AMOUNT.

      Read outt_cond table index 1.

      outt_cond-value = AMOUNT.

      Modify outt_cond index 1.

      ENDFORM.

      Just rough idea given above.

      Now in form replace SPELL-NUMBER with AMOUNT.

      Regards,

      SaiRam