5.7 ALE Function Module의 생성
Customer Hierarchy에 대하여 change document를 생성해 낼 수 있도록 SAP application프로그램을 enhance 했으므로, 이제는 Customer Hierarchy와 관련된 change pointer를 읽어서, 우리가 이미 생성한 IDOC type ZKNVHM01에 값을 채워서 IDOC을 생성해 내는 ALE function module을 작성할 필요가 있다. 대부분의 master data에 대한 ALE function module은 표준적인 접근방식을 따르고 있는데, 이들은 먼저 필요한 자료를 수집하고, IDOC이 필요로 하는 값을 채워서 IDOC을 만들고, 만들어진 IDOC을 분배하는 절차를 거친다. 먼저, 특정 message type에 대해서 아직까지 처리되지 않은 모든 change pointer자료를 수집하고, 그 각각에 대하여 key값을 찾아서 internal table로 만들어 주는 표준 function module이 있다. 이렇게 해서 생성된 internal table은 다른 function module로 전달되어, 그에 대응하는 IDOC type에서 필요로 하는 값을 결정하여 IDOC을 생성하게 되고, 이렇게 생성된 IDOC은 표준 ALE function module을 사용하여 통신계층(communication layer)으로 전송되는 것이다.