{"title":"System.Abs(Decimal) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/system/system-abs-method/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/system/system-abs-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/system/system-abs-method","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Calculates the absolute value of a number (Decimal, Integer or BigInteger).","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"System.Abs(Decimal) Method","slug":"systemabsdecimal-method","at":0,"chars":1095},{"level":2,"title":"Syntax","slug":"syntax","at":218,"chars":138},{"level":2,"title":"Parameters","slug":"parameters","at":356,"chars":73},{"level":2,"title":"Return Value","slug":"return-value","at":429,"chars":61},{"level":2,"title":"Remarks","slug":"remarks","at":490,"chars":84},{"level":2,"title":"Example","slug":"example","at":574,"chars":387},{"level":2,"title":"Related information","slug":"related-information","at":961,"chars":134}],"text":"# System.Abs(Decimal) Method\n> Version: _Available or changed with runtime version 1.0._\nCalculates the absolute value of a number (Decimal, Integer or BigInteger). ABS always returns a positive numeric value or zero.\n## Syntax\n```al\nNewNumber :=   System.Abs(Number: Decimal)\n```\n> NOTE\n> This method can be invoked without specifying the data type name.\n## Parameters\nNumber\nType: ../decimal/decimal-data-type\nThe input value.\n## Return Value\nNewNumber\nType: ../decimal/decimal-data-type\n## Remarks\nThe system automatically converts all of the numeric data types for you.\n## Example\nThis example shows how to remove the sign from a negative numeric value.\n```al\nvar\n    x: Decimal;\n    y: Decimal;\n    Text000: Label \"x = %1, y = %2\";\nbegin\n    x := -10.235; // x is assigned a negative value\n    y := ABS(x); // y is assigned the value of x without sign\n    Message(Text000, x, y);\nend;\n```\nThe message window displays the following:\nx = -10.235, y = 10.235\n## Related information\nsystem-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}