Skip to Content
Author's profile photo Former Member

Syclo-based SAP Mobile Application Deployment & Enhancement (2)

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.

And this post by David Clavey would be more helpful for this kind of enhancements.

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.

Assigned Tags

      7 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo David Clavey
      David Clavey

      Nice Blog, a better explaination than mine !

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi David,

      Thanks! I will post the other parts later this week.

      Cheers,

      Raymond

      Author's profile photo Manish Meshram
      Manish Meshram

      Waiting for the post Raymond and David.

      Author's profile photo Matt Harding
      Matt Harding

      Thanks Raymond. Just trying to help someone do this right now. Looking at doing a super class of the existing JAVA classes is a little cryptic since we don't have access to the original super class'es source code (unless we reverse engineer the code). Any advice for that?

      Also, any chance you can get Jemin's post moved to public domain (it's currently only in the SAP Corporate network - e.g. https://community.wdf.sap.corp/docs/DOC-207484)

      Cheers,

      Matt

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Matt,

      Yes you are right. The source code of the application (sap work manager for example) is not provided out-of-box even if you purchased the license. If you have resources from SAP's mobility product team, maybe you could have chances to get the source. But from my perspective, most of the enhancement requirements could be done without creating new "superclasses" but only some copy and change of the existing classes (for which the code is available). So if you could be more specific on the scenarios which you need a new superclass to fit, maybe we can see how to proceed without complete source code.

      As for Jemin's post, basically it is some hands-on experience sharing. If you are interested, leave me your contact and I can send you the documents. But I don't think moving to public without the author's approval is a wise option. Hope you can understand. 🙂

      Cheers,

      Raymond

      Author's profile photo Matt Harding
      Matt Harding

      Thanks Raymond. Not too big an issue from the JAVA perspective (as I said, I'm just helping someone logically, and lack of recent end to end examples hinders my helping - luckily SAP TechEd is only a couple of weeks away)!

      Keep up the great work.


      Cheers,

      Matt

      Author's profile photo Manish Meshram
      Manish Meshram

      Hello Raymond,

      I have requested in SMP webinar to post some docs on Agentry Editor, they have agreed to my request. Appreciate if you send document to me as well at manish.mshrm@hotmail.com