After what we’ve done in (1), the syclo mobile apps should be running well on your Agentry development server. Next demand would be to enhance the standard functionality. I did some research these days on SCN and found already some very nice documents/guides talking about how to do very initial enhancements for syclo mobile apps like Work Manager. You can check them out first.
And based on that, I would like to group the different requirement types we normally have and share the experience we have on how-to.
Common enhancement types I sorted out
– Enable standard fields from backend in mobile apps
– Add/Remove standard fields in DT/CT/DO
– Add z-fields from backend (or also need to be added in backend) and enable it in mobile apps
– Add z-table from backend (or also need to be added in backend) and enable it in mobile apps (as an attachment of the primary mobile data object.
– Complete new functionality which has to be implemented specifically in backend (new primary object should be created)
Enable standard fields from backend in mobile app.
It is common that for mobile app, not all the fields of the standard object (like work order) are necessary to be displayed in front-end. So the standard app provides a set of fields that are proven to be used commonly and really necessary. But for some customers, these fields might has totally different priorities, that means some other standard fields might be more important. Then this enhancement requirement would come out.
Well, with the syclo-based application like Work Manager, this kind of enhancement is quite easy. And the way we determine how we realize it would be like this:
Step 1: Check out the technical details of the field, and determine the data table and field it might correspond to.
Step 2: Check the corresponding mobile object’s DO handler class. Normally in the Get method, you will check out the initialization of data tables. For example for work order, the method would be /syclo/cl_pm_workorder2_do~/SYCLO/IF_CORE_DO_HANDLER~GET, and you can check the et* tables structure to see if the fields you would like to enable is included. And normally it should be there.
Step 3: If the field is included, then all the necessary steps would be quite easy. Go and get enhance the Agentry project (check the property of the mobile object, add the fields on the screen and link it to the property)
Step 4: Update the corresponding Java project where the object is defined to sort out the code to read the data from the output structure of the BAPI wrapper and add the corresponding logic.
Step 5: Redeploy the agentry project to the Development server, and it is done.
If the standard fields is not available in the Get method, then there might be some additional work in the backend within Step 2. You might need to copy out the standard method and corresponding BAPI, and replace the output structure to be some z-structure where you add the fields you want. And you also might need to enhance some other assistant methods of the DO handler class. More details were already shared in this post by Jemin Tanna.
Add/Remove standard fields in DT/CT/DO.
For removal, we can directly hide the fields from UI. To do this you just need to re-deploy the Agentry project. For adding standard fields in Complex table, it is similar to one of the typical example that will be used in Syclo Agentry Work Manager workshop (create a new Z-complex table and implement from scratch). And steps would like like the following:
Step 1: Prepare the structure that could serve as replacement of the original CT structure (you can also get it through the CT handler class, Get method) in the backend.
Step 2: Prepare the new CT handler with the logic to handle the new fields (of course the type of some Table parameters should be adjusted), and adjust the BAPI Wrapper accordingly.
Step 3: Enhance the CT in the Agentry Project, and change the Java project according to what has been changed in the Agentry project.
Step 4: Change in config panel for the CT handler class assignment and also check the BAPI Wrapper definition, and if needed, don’t forget the key parameters of this Complex Table in the Mobile Application configurations.
Step 5: Restart the server and check the results.
For these two different enhancement requirements, we can see that the approach always start from backend. I think this is the recommended approach to think about the enhancements with all standard fields. Always try to think about where it might be possible for us to dig out the potential existing value of the framework to make this happen.
The other scenarios will follow in next post.