Look at the above screen. We need to give one implementation class and two tables one is Object table and another is Model table. Now let us create all these object.
One important thing with creating the implementation class is you need to specify super class for this implementation class and redefine specific methods. For Creation a record, editing the record (modify) and for Searching you have redefine specific super class methods. While creating views (insert, edit and search) you need to specify specific Super class(not the methods).
We really dont want to reinvent the wheel. Let us copy form the SAP Object. I am copying from the MP following object. Look at the following screen shot.
First let us create the tables ztest_object and ztest_model copying from crmc_objs_mpil and crmc_model_mpil. See the following screen shots.
Now we got the tables. We need to change the check table in ztest_model. See the following screen shot.
Now let us create the data structure and add the structure and the data structure model in this BOL object tables. For this example this is a plain simple data structure and I am going to add the hierarchy for search.
See the following screen shot for the structure.
Now add this information in the BOL object Tables. Look at the following infomration I entered in the table. Always the object table needs to have a root object and the other object that are associated to their parent. Here all the object are associated to the root. If you have complex hierarchy then it takes time to do the correct design and come up with the information. Always try to see the existing code in the sap component and try to use that , this way it will be always easy to follow. See the following screen shot for the data.
Now enter this information in the model table. Now Enter the data structure hierarchy. See the following screen shot.