SAP is a customized solution providing certain predefined processes in a predefined way. When its implemented, the consultant do a study of the business processes then try to find whether that process in the way required is present in SAP or not.
If its available in SAP then the consultant will go ahead and do the customization but if its not available then there is a GAP between sap and the business requirements. This analysis if called Gap Analysis in SAP.
During your analysis If you find any gaps then the consultant with consultation of the business owner will change the process according the way you want or else they have to develop a new program with a help of technical team to fill the gap in sap.
To develop a program requires both the functional team and technical team’s involvement. As the processes are known to functional team, they prepares functional specification based on the gap found out in gap analysis phase by showing the requirement and the way they want it to be fixed. On the basis of functional specifications the technical team creates the program that can accommodate your existing system.