If your data can be conveniently expressed as a table, use tabular boundary conditions. Mechanical APDL applies function boundary conditions to a model using the tabular boundary condition process described in Applying Loads Using Tabular Input. You must define your function and load it as a table array before you try to add it as a load.
You cannot use function boundary conditions to circumvent the restrictions on boundary conditions and their corresponding primary variables as supported by tabular boundary conditions. For example, in a structural analysis, the primary variables supported with a pressure load are TIME, X, Y, Z, and TEMP; therefore, when using a function boundary condition, the only primary variables allowed in the equation are TIME, X, Y, Z, and TEMP. The list in Using the Function Editor shows which primary variables are available for each type of operation.