01-15-2009 10:28 AM
Hi ,
I have a program with a variable used to store percentage , so let us assume ithas length 6 with 2 decimal places .
What i would like to know is there some command or a FM which can give me the max value that can be stored in this varaible . I do not want to write to much code or hardcode the value in the program .
Regards
Arun
01-15-2009 12:08 PM
Hi Arun,
Yo can use the FM 'MAXIMAL_VALUE_GET' for this.
Eg: Here I wanto calculate the max value for variable 'max'
DATA: max(5) TYPE p DECIMALS 3.
CALL FUNCTION 'MAXIMAL_VALUE_GET'
IMPORTING
e_value = max.
WRITE: / max.
o/p: 999999,999
Hope this helps you.
Regards,
Manoj Kumar P
Edited by: Manoj Kumar on Jan 15, 2009 1:11 PM
01-15-2009 10:45 AM
01-15-2009 10:54 AM
01-15-2009 12:08 PM
Hi Arun,
Yo can use the FM 'MAXIMAL_VALUE_GET' for this.
Eg: Here I wanto calculate the max value for variable 'max'
DATA: max(5) TYPE p DECIMALS 3.
CALL FUNCTION 'MAXIMAL_VALUE_GET'
IMPORTING
e_value = max.
WRITE: / max.
o/p: 999999,999
Hope this helps you.
Regards,
Manoj Kumar P
Edited by: Manoj Kumar on Jan 15, 2009 1:11 PM
01-15-2009 12:10 PM
Sorry,
Duplicate post.
Edited by: Manoj Kumar on Jan 15, 2009 1:10 PM