Generate Random Number from
ABAP
REPORT ZRANDOM.
* -------------------------------------------------------------------
* Random Numbers
* -------------------------------------------------------------------
DATA : MYAMOUNT LIKE BBSEG-WRBTR.
DO 5 TIMES.
PERFORM GENERATE_RND.
ENDDO.
FORM GENERATE_RND.
CALL FUNCTION 'RANDOM_AMOUNT'
EXPORTING
RND_MIN = '1'
RND_MAX = '100'
VALCURR = 'DEM'
IMPORTING
RND_AMOUNT = MYAMOUNT
EXCEPTIONS
OTHERS = 1.
WRITE:/ MYAMOUNT.
ENDFORM.
" GENERATE_RND
More Function Module
Functions / SAP
Script / ALV
Tables
Database Table
ABAP Books List
ABAP/4 Certification,
Programming, Smartforms, Sapscripts and Object Oriented Programming Books
Smart Forms
SAP Smartforms
ABAP Menu:
ABAP Example Hints
and Tips
Return to Index:-
SAP ABAP/4 Programming,
Basis Administration, Configuration Hints and Tips
(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.
Information used on this site is at your own risk.
All product names are trademarks of their respective
companies. The site www.gotothings.com is in no way affiliated with
SAP AG.
Any unauthorised copying or mirroring is prohibited.
|