Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP Function to set negative value to zero

former_member357073
Discoverer
0 Likes
908

Can i know if there is a function in ABAP to set a negative value to zero instead of using the code

if field < 0.

field = 0.

endif.

1 ACCEPTED SOLUTION
Read only

vinod_vemuru2
Active Contributor
0 Likes
618

Hi,

There is a general perception that we should always use FMs instead of own logic.

But my feeling is, if the logic is very simple (As in this example) why do you want to load the whole function group when ever you run your program. (if you are not aware, This happens for the function call during runtime ).

Thanks,

Vinod.

1 REPLY 1
Read only

vinod_vemuru2
Active Contributor
0 Likes
619

Hi,

There is a general perception that we should always use FMs instead of own logic.

But my feeling is, if the logic is very simple (As in this example) why do you want to load the whole function group when ever you run your program. (if you are not aware, This happens for the function call during runtime ).

Thanks,

Vinod.