Skip to Content
Author's profile photo Former Member

Syclo Customization Extension-First Steps

Scope

The target of this document is to take a user through changes required to add a customer field in work order header and reflect it on works manager application.

Of course the ABAP part, specially the master table enhancements is not in scope of mobility consultant, however understanding from holistic view point can help.

Step 1:  ERP CHANGES

Go to order master table and click on include CI_AUFK

                    AUFK.png

Click yes and continue

  CI_AUFK-YES.png

Enhance CI_AUFK with required extension fields

  CI_AUFK-ENHN.png

Use database utility to adjust AUFK and VSAUFK_CN. Transaction SE14.

ALERT: Makes sure CI_AUFK is successfully activate post adjustments.

DDIC-ADJUST.png

Copy /SYCLO/PM_DONOTIFICATION2_GET to Z namespace

Check that ET_WORKORDER_HEADER  type /SYCLO/PM_CAUFV_STR reflects the new field

  SYCLOPM_DONOTIFICATION2_GET.png

Copy the data object handler  /SYCLO/CL_PM_WORKORDER2_DO to Z namespace

Edit GET_WORK_ORDER_HEADER

  SYCLOPM_DONOTIFICATION2_GET-GET METHOD.png

Enhance code to fill the custom field. In this example we mark the field as X if the function location is SYC1.

  GET_WORK_ORDER_HEADER.png

Step 2 Config. Panel Changes

Mobile Application Configuration:

  ConfigPanel1.png

Mobile Data Object Configuration:

  ConfigPanel2.png

BAPI Wrapper Configuration:

ConfigPanel3.png

Step 3: Agentry Changes

Route the steplet to custom code

  Agentry2.png

Enhance screen to show the field

  Agentry1.pngAgentry3.png

Step4: JAVA code changes

Object class: WorkOrder

Here either we extend the existing work order object or create a whole new order object. For this example we copy the work order object without extension. Also copy the stepHandler and corresponding BAPI classes in a new JAVA project. Add the relevant jars in build path so that the project compiles.

    JAVA1.pngJAVA2.png

JAVA3.png

  JAVA4.png

Note*  Adjust config panel to point to these new custom classes

Export the java project as JAR to C:\SAP Work Manager\ServerDev\Java\

  JAVA5.png

Edit the Agentry.ini to include this jar name

AGENTRYINI.png

Step 5: Publish your application, restart the server, reset test client in ATE and see the changes

WORKMANAGER-MODIFIED.png

Assigned Tags

      25 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Jemin,

      Very nice to see that SAP employees share the steps to enhance syclo applications. Good and easy to understand post. Wel done.

      I'll see if our development team is willing to write up a little bit too. I bet our new SAP Mentor Roel van den Berge will write a blog about his experiences with rex3.0 on SUP 2.2.

      Roel will be at sithh as well with a story about rex3.0 and I do know that our lead developer in our first Syclo project (Wim Snoep ) is sharing is experiences with SAP Work Manager (syclo ) at sithh: http://wiki.sdn.sap.com/wiki/display/events/SAP+Inside+Track+Hamburg+2013

      Regards,

      Jan Laros

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

      Hi Jan,

      Thanks a lot for the feedback. I will definitely write more on various topics as and when I draft something worth sharing.

      Regards,

      Jemin

      Author's profile photo Syam Babu
      Syam Babu

      Hi Jemin,

      Nice to Explain the step by step Syclo Customization .

      Thanks,

      syamallu

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

      Thanks Syam.

      Author's profile photo Shankar Agarwal
      Shankar Agarwal

      Hi Jemin

      Kudos on excellent blog.I am new to syclo and trying to add some custom fields.Can you explain the ideal way to make a customer copy of Syclo Application in Config panel.Which objects need to be changed manually and general trouble shooting?

      Regards

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

      thanks Shankar,

      Copying of a syclo project in config panel is really very simple wizard and we should simply follow it.

      So it will ask for renaming all the DO and other config objects which can be done by find and replace..so example just find and replace SAPWM with ZSAPWM

      and thats about it

      Author's profile photo Shankar Agarwal
      Shankar Agarwal

      Thanks Jemin

      It worked fine.After that I have created an Agentry project by importing agentry.ini into eclipse.But I do not see any java src files based structure.How do I add custom java logic in this project.

      Regards

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

      Java is a separate project setup.the agentry is a 4GL for control flow logic etc of the client. Via steps it just points at java code.

      The actual custom java code..can be any normal java project which then u can export into the application directory in say JAVA folder and then give that path in  Agentry.ini

      Also u can get out of box java code by asking support@syclo.com and then get reference of how to make custom coding in it.

      Author's profile photo Manish Meshram
      Manish Meshram

      Hi Jemin,

      I dont want to copy from WM 5.3.

      Can we define our own mobile application

      If yes what steps i need too follow.

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

      Sure you can do this too..well there are lot of things to be considered while doing this...may be in some days I will write a blog a simplified usecase of creating mobile application from scratch.

      -Jemin

      Author's profile photo Manish Meshram
      Manish Meshram

      Is it possible for you tell me steps , i can try myself for now

      Author's profile photo Former Member
      Former Member

      Hi Jemin

      I am trying to build a custom app on SMP 2.3 Agentry platform.While the help guide says one needs to include the Agentry -v5 jar file,this jar does not contain common java files like JCO,SAPObject or StepHandler.Can you please suggest how should one go ahead with designing the step handler classes in a  custom development?

      Thanks in advance for your suggestions.

      Regards

      Shweta

      Author's profile photo Shankar Agarwal
      Shankar Agarwal

      Hi Jemin

      Would be grateful if you can comment on this thread.

      http://scn.sap.com/thread/3381387

      Regards

      Author's profile photo Vijay Chanchlani
      Vijay Chanchlani

      Hi Jemin,

      While using the wizard to replace the application along with its contents to the Customer namespace I am getting two errors as following.

      • MOBILE_APP object ZJT_SAP_WORK_MANAGER_53_CPY is not allowed. It is in protected SAP namespace.
      • Choose the key from the allowed namespace.

      Could you please help me me on this issue.

      Regards.

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

      Hi Vijay,

      The problem is not with namespace of the application..but that of related objects...

      So you will have Source Exchange Objects and Target Exchange Objects below in table while copying a project...also MDO, Push Scen, and outbound triggers.

      All of these must have targets in Z name space...it can easily done on each tab by Using Find What: SWM53      an Replace with ZJT_WM53 for example.

      All the best

      Author's profile photo Vijay Chanchlani
      Vijay Chanchlani

      Hi Jemin,

      Thanks for replying.

      I guess I have already done the step that you have advised i.e changing not only the application but also all of its components to the Z namespace using the wizard.

      Even then I am facing the same two error messages.

      It would be really helpful if you could reply to the above issue which I have posted along with the screenshot in the following thread:

      http://scn.sap.com/thread/3389550

      Regards.

      Author's profile photo Matt Harding
      Matt Harding

      Hi Jemin,

      With WM 6.0, SAP no longer release the source code, and I'm wondering if you wanted to add an attribute to a work order sub object like a work order operation, how you would go about doing this without reverse engineering the JAVA code?

      e.g. I would not only need to extend the work order operation (and associated classes/configuration), but also extend work order to leverage the new work order operation rather than the out of the box work order operation.

      I believe extension is the only real way forward as otherwise you have a complex upgrade path to take care of.

      Cheers,

      Matt

      ps. The example I've seen where I am has copied the entire WM java source code as a new Z JAR file (without changing namespace) so that the complex extending of classes was avoided but also means we have no real separation of SAP versus custom.

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

      Hi Matt,

      Yes, agreed...for any of the subobject extension I would also have followed extension approach...so instead of extending SAPObject, I would extend the standard workorder object and take it forward from there....

      And yes, its a bit lengthy chaining where we will land up extending the delegate classes too which are actually responsible of transfering call from workorder object to its subclass.

      In any case doing it in standard SAP namespace is not a good idea because the we will have no support from SAP standard and upgrade process will be very tough.

      Cheers,

      Jemin Tanna

      Author's profile photo Matt Harding
      Matt Harding

      Hi Jemin,

      Further to my previous comment, I was helping the consultant here refactor their java to move away from a pure modification approach, but as part of extending the stephandler for work order to include additional objects (like attachments since we are on 5.3 and not 6.0), firstly there is this use of createSAPObject which seems to rely on introspection that isn't well documented, but then there is code within updateMOBIStatus that is a private method that you would have no way of replicating without the source code.

      Focusing on the updateMOBIStatus, any ideas how you would extend the GetWorkOrdersStepHandler without knowing there was a private method that updates each work order with a mobile status???

      FYI - My opinion is that it is too early for SAP to stop releasing SAP source code for Work Manager based on this.

      For reference, the whole SAPObjectFactory seems like overkill also that makes extensions more complicated than necessary.

      Interested in your thoughts.

      Cheers,

      Matt

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

      Hi Matt,

      I could not agree more...but it is how it is....

      For the status the Mobi status config gives in indication that we need to write a conversion logic somewhere to send to backend...but yes, it would have been nicer to get the standard code too.

      Syclo, from before SAP has been too protective of their code 🙂

      -Jemin

      Author's profile photo Matt Harding
      Matt Harding

      Thanks Jemin. In my books, that means the new approach to not give code is a flaw in the solution - They either need to change the code to make it properly and safely extendable, or provide full source code. Hidden required methods to be implemented by you within BAPI functionality is a shortcoming with the solution.

      And I think it's a SAP thing, not a Syclo thing since you used to be able to get source code always.

      FYI - There's always decompiling, which works but I think that's frowned upon under the license agreement.

      Cheers,

      Matt

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

      Cheers! it is! For now 🙂

      Author's profile photo Jason Latko
      Jason Latko

      Yes, it is definitely an SAP decision.  Our product Java source was always freely available to customers and consultants working on customizations prior to us (Syclo) being purchased by SAP.  We at Syclo (SAP) realize that not having the source can make implementing customazations a challenge for the reasons Matt outlined.  We added javadocs for all classes in all products recently, but this is not always sufficient depending on the complexity of the proposed extensions.  We are working with the powers that be to make the source available to those that need it, but it is a slow process.  In the interim, let us know how we can help you with your implementations and we will do our best.

      Jason Latko - Senior Product Deveoper at SAP

      Author's profile photo Mike Reader
      Mike Reader

      Jemin,

      Excellent post, I am new to Syclo WM and had a question regarding the copying of the

      /SYCLO/PM_DONOTIFICATION2_GET to Z namespace

      Is there a way to do these enhancements without copying (or mod'ing) the Syclo code?  I have some concerns about upgrades and having to re-do the changes.

      Does Syclo take advantage of enhancement options like BADI's etc?

      Thanks, Mike

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

      Hi Mike,

      Sorry for the late reply and thanks for the feedback.

      as far as I understand there is not extension model like Badis. However we should not worry about upgrades as we would have Z lib mapped in our config files which would only have the extended objects...which should still work after the original libs are upgraded.

      Cheers,

      Jemin