Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8509

Re: Dynamic Decimals in SAP SCRIPT

$
0
0

Hi

If it you require the dynamic option between 2 decimals or 3 decimals only then do as follows.

 

1. Create three variables  l_val3  type  MENGE  ( quantity type with 3 decimals ) 

                                         l_val2  type  DMBTR  ( amount type with 2 decimals )

                                         l_val    type  C length 15.

 

2. Based on your value &DEC&

    assign the value to either of the above  to final value l_val and print l_val.

 

:/  IF  &DEC& = 2

    l_val2 = &your variable&

    l_val = l_val2

:/  ELSE

    l_val3 = &your variable&

:/  l_val = l_val3

 

:/  &l_val(RC)&

 

Regards,

Venkat


Viewing all articles
Browse latest Browse all 8509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>