This document discusses implementing customer planning logic in SQL script procedures running in the HANA layer for SAP PAK planning functions. The SQL procedures can be called by implementing specific interfaces and have input and output tables matching the aggregation level structure. Parameters are passed to the procedure which executes and returns results by aggregating values in the output table to the original inputs. An example implementation of the interface and calling method is provided.