Skip to Content
Author's profile photo Sergei Korolev

SAPLink plugin for Workflow objects

Recently I found myself as a SAPLink user- a client of mine was not offering a remote access and at the same time they were expecting some pilot solution ASAP. So I had to do developments in a comercially accessible IDES system and then tranport it to the client’s. And as Workflow was involved I had to trasnport not only conventional ABAP code but also a number of Workflow objects. Unfortunately I did not find a plugin for Workflow objects and so I had to develop one.

Those who need it feel free to download attached XML file which is actually a NUGGET containing 4 classes for export/import Workflow objects: Standard Tasks (object PDTS), Agent determination rules (object PDAC), and Workflow templates (object PDWS).

This all is just out of the oven, so let’s say it’s in “alpha”.

Tested on NW 7.02.

Assigned Tags

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

      Thank you Sergey Korolev.

      You have reduced an effort by proiving the attachment.But when i imported that WF plugin and after activating the imported classed individually and after executing the program ZSAPLINK, it is giving dump.

          An exception occurred that is explained in detail belo

          The exception, which is assigned to class 'CX_SY_CREAT

           caught in

          procedure "GETPLUGINS" "(METHOD)", nor was it propagat

          Since the caller of the procedure could not have antic

          exception would occur, the current program is terminat

          The reason for the exception is:

          The dynamically specified class "ZSAPLINK_WF" at CREAT

           You

          cannot create instances from abstract classes.

          Note: A class is 'abstract' if it was defined with the

          'ABSTRACT', for example, because one or several method

          implemented, and are to be implemented in a subclass.

      BR

      Katrice

      Author's profile photo Sergei Korolev
      Sergei Korolev
      Blog Post Author

      Hello Katrice,

      Seems you have an old version of ZSAPLINK class. In the varsion I have there is a TRY... CATCH block around plugin instanciation statement in GETPLUGINS method:

      TRY.

               CREATE OBJECT classobject

                 TYPE

                   (clsname)

                 EXPORTING

                   name      = 'foo'.

               objtype = classobject->getobjecttype( ).

             CATCH cx_root.

               CONTINUE.

           ENDTRY.

      Either download more recent version or fix it yourself.

      HTH.

      Author's profile photo Former Member
      Former Member

      Yes Sergey,

      You are correct.When i corrected the code as shown above,It works.But in ZSAPLINK program "export object to slinkee" in Slinkee tab, i cannot see any object types related to workflow.

      Thanks

      Katrice

      Author's profile photo Sergei Korolev
      Sergei Korolev
      Blog Post Author

      Katrice,

      I can see Workflow objects in the search help on slinkee tab. It is likely they are at the bottom: PDWS, PDAC, PDTS.

      Author's profile photo Gregor Wolf
      Gregor Wolf

      Dear Sergey,

      great to see SAPlink getting support for Workflow. It would be great if you can join the SAPlink plug-in's project and host your code there. This would allow to include the code in the SAPlink plugins package.

      Best regards

      Gregor

      Author's profile photo Sergei Korolev
      Sergei Korolev
      Blog Post Author

      Hello Gregor,

      I created assembla account with ID slkorolev. Please let me know what I should do next.

      Thanks.

      Author's profile photo Gregor Wolf
      Gregor Wolf

      Hi Sergey,

      I've just promoted you to a project member. Hope you're OK to put the Code under the Apache 2.0 License.

      Best regards

      Gregor

      Author's profile photo Sergei Korolev
      Sergei Korolev
      Blog Post Author

      Hi Gregor,

      I uploaded nugget file as rar archive.

      Kind regards,

      Sergey

      Author's profile photo Former Member
      Former Member

      Hi Sergey,


      Thanks for your valuable contributions.

      I have query regarding the number range while replicating the Wflow objects in the target system.

      In general, all workflow objects produce unique numbers during creation.

      Would these classes able to assign new number range for to be created Wflow objects using SAPLink.

      Please clarify.


      Regards,

      Ravi



      Author's profile photo Former Member
      Former Member

      Hi Gregor,

      I am looking forward to create nuggets for Workflow Objects .

      I uploaded the .XML file in this thread .but am not able to activate the plugin classes , i am getting Errors while attempting to activate them .

      Author's profile photo Sergei Korolev
      Sergei Korolev
      Blog Post Author

      Hi Amruth,

      What errors do you have?

      Author's profile photo Former Member
      Former Member

      An exception occurred that is explained in detail below.

      Error :


      CREATE OBJECT on abstract class not possible.

      Error Analysis :


      The exception, which is assigned to class 'CX_SY_CREATE_OBJECT_ERROR', was not

        caught in procedure "GETPLUGINS" "(METHOD)", nor was it propagated by a RAISING clause.

      Since the caller of the procedure could not have anticipated that the exception would occur, the current program is terminated. The reason for the exception is: The dynamically specified class "ZSAPLINK_WF" at CREATE OBJECT is 'abstract'.

      You cannot create instances from abstract classes. Note: A class is 'abstract' if it was defined with the addition  'ABSTRACT', for example, because one or several methods are not

      implemented, and are to be implemented in a subclass.

      Author's profile photo Former Member
      Former Member

      I followed the above guided steps of using a try catch 

      I am not getting the above dump on GETPLUGIN method of ZSAPLINK class.

      but still am not able to see the "workflow object type"  during the execution of saplink report

      Author's profile photo Former Member
      Former Member

      Hi Gregor,

      And error during activation of individual classes exists in source server .

      Sorry i think am posting lot of issues..

      but am facing these issues , need your support...

      Thank you .

      Author's profile photo Former Member
      Former Member

      Hi Gregor,

      In another server I get following error while trying to activate the Individual class

      Class ZSAPLINK_WF_TEMPLATE

      Error :

      Protected section Method "AFTER_SAVE" is not declared or inherited in class   "ZSAPLINK_WF_TEMPLATE".

       

      Class ZSAPLINK_WF:

      Error :

      Method APPEND_TABLE_NODE : Unable to interpret "I_NODE".

      Possible causes of error: Incorrect spelling or comma error.    

         

      Class ZSAPLINK_WF_STASK

      Error :

      Protected section - 5     

      Method "FILL_ROOT_NODE" is not declared or inherited in class ZSAPLINK_WF_STASK"

      Class ZSAPLINK_WF_ACTOR_RULE:

      Error :

      Protected section - 5     

        Method "CREATE_WF_CNT_INSTANCE" is not declared or inherited in class ZSAPLINK_WF_ACTOR_RULE

      Author's profile photo Sergei Korolev
      Sergei Korolev
      Blog Post Author

      Hi Amruth,

      What ABAP version you are on? (see in System -> Status... )

      Author's profile photo Former Member
      Former Member

      Hi Sergey,

      Server 1 SAP system data :

      Component version EHP6 FOR SAP ER

      Server 2 : SAP System Data :

      Component version SAP ECC 6.0
      Author's profile photo Sergei Korolev
      Sergei Korolev
      Blog Post Author

      Hi Amruth,

      Open System -> status again and click magnifying glass button under Component version. See what says for SAP_ABA and SAP_BASIS in columns Version and Level.

      Author's profile photo Former Member
      Former Member

      Hi Sergey,

      Server 1:

                                     R              L

      SAP_BASIS            731         0002

      SAP_ABA               731         0002

      server 2 :

                                   R             L

      SAP_ABA            700         0013

      SAP_BASIS         700         0014

      Author's profile photo Former Member
      Former Member

      Server 1 :

      SAP System Data

      Component version :  EHP6 FOR SAP ERP 6.0

      Server 2 :

      SAP System Data

      Component version :  SAP ECC 6.0

      Author's profile photo Gregor Wolf
      Gregor Wolf

      Hello Amruth,

      have you updated to the latest SAPlink Version available at http://www.saplink.org ?

      Best regards

      Gregor

      Author's profile photo Former Member
      Former Member

      I am not finding workflow related object types in the F4 help of the object_types field. in the selection screen of zsaplink program

      Author's profile photo Sergei Korolev
      Sergei Korolev
      Blog Post Author

      Hi Amruth,

      They should be at the bottom of the list: PDAC for Agent determination rule, PDTS for Standard task, and PDWS for Workflow template.

      Author's profile photo Former Member
      Former Member

      🙂 , No am not getting your mentioned object type in the F4 help of ZSAPLINK  Program ,

      I was gettig dump while running the ZSAPLINK  Program .So I used the Try....Catch in  ZSAPLINK Class,as mentioned in the  thread above

      Like Bellow...........

      TRY.

               CREATE OBJECT classobject

                 TYPE

                   (clsname)

                 EXPORTING

                   name      = 'foo'.

               objtype = classobject->getobjecttype( ).

             CATCH cx_root.

               CONTINUE.

           ENDTRY.

      Author's profile photo Former Member
      Former Member

      I am not finding workflow related object types in the F4 help of the object_types field. in the selection screen of zsaplink program

      I was gettig dump while running the ZSAPLINK  Program .So I used the Try....Catch in  ZSAPLINK Class,as mentioned in the  thread above .

      Kindly Guide me on what to be done .

      code changes made to ZSAPLINK  Program

      TRY.

               CREATE OBJECT classobject

                 TYPE

                   (clsname)

                 EXPORTING

                   name      = 'foo'.

               objtype = classobject->getobjecttype( ).

             CATCH cx_root.

               CONTINUE.

           ENDTRY.

      Author's profile photo Former Member
      Former Member

      Hi Sergey,

      Its an urgent requirement .

      Can you guide me more closely on this .

      Kindly give let me know how I can contact you .

      It would be great if we could plan for a call...! 🙂

      Author's profile photo Sergei Korolev
      Sergei Korolev
      Blog Post Author

      Hi Amruth,

      Actually it should be enough to activate 4 classes:
      ZSAPLINK_WF

      ZSAPLINK_WF_ACTOR_RULE

      ZSAPLINK_WF_STASK

      ZSAPLINK_WF_TEMPLATE

      After that ZSAPLINK report should recognize object type PDWS, PDTS, and PDAC.

      Author's profile photo Wallace Ferreira e Silva
      Wallace Ferreira e Silva

      I´m activated all 4 classes, and  PDWS, PDTS and PDAC objects don´t show in search help.

      Author's profile photo Sergei Korolev
      Sergei Korolev
      Blog Post Author

      Hello Wallace,

      Cannot reproduce the case. What SAP ABAP version are you on? Did you try to restart ZSAPLINK report after activating classes?

      Author's profile photo Wallace Ferreira e Silva
      Wallace Ferreira e Silva

      Hello Sergey,

      I´m activated ZSAPLINK reporte after activating classes.

      SapLink Version : SAPlink_install-0.1.4

      SAP Abap :

                                R         L

      SAP_basis       731       007

      SAP_aba         731       007

      Thanks in advance.

      Author's profile photo Sergei Korolev
      Sergei Korolev
      Blog Post Author

      Hello Wallace,

      Unfortunately I don't have 7.31 at hand and thus I am afraid cannot help with the issue.
      When creating the list of available objects ZSAPLINK tries to create an instance of each plugin class inside TRY...CATCH cx_root block. Apparently there is something incompatible with 7.31 in the code. If you have time you can check this by testing one of classes (e.g. ZSAPLINK_WF_STASK) in SE24 separately. It should report some error when creating instance.


      Author's profile photo Wallace Ferreira e Silva
      Wallace Ferreira e Silva

      Hi Sergey,

      My Master co-work made some workaround changes in zsaplink class GETPLUGINS method, like that code bellow :

           tabletypeline-object = objtype.

           APPEND tabletypeline TO tabletypesin.

           IF classline-clsname = 'ZSAPLINK_WF'.

             FREE tabletypesin.

             tabletypeline-object = 'PDAC'.

             APPEND tabletypeline TO tabletypesin.

             tabletypeline-object = 'PDTG'.

             APPEND tabletypeline TO tabletypesin.

             tabletypeline-object = 'PDTS'.

             APPEND tabletypeline TO tabletypesin.

             tabletypeline-object = 'PDWA'.

             APPEND tabletypeline TO tabletypesin.

             tabletypeline-object = 'PDWS'.

             APPEND tabletypeline TO tabletypesin.

           ENDIF.

           CALL FUNCTION 'TRINT_OBJECT_TABLE'

             TABLES

               tt_types_in  = tabletypesin

               tt_types_out = tabletypesout.

      Author's profile photo Vinicius Eustaquio
      Vinicius Eustaquio

      Thanks Wallace! In this case, the return of the GET_OTYPE method of the ZSAPLINK_WF class should be one table category (array). However this change reflected in the other classes (plugins). But, the GETPLUGINS method of the ZSAPLINK class must be prepared. I changed quickly for solved my problem. But is not  better solution, ok?

      Author's profile photo Wallace Ferreira e Silva
      Wallace Ferreira e Silva

      Vinicius, it´s a workaround solution. It´ will fixed in future by saplink team, I hope 🙂

      Author's profile photo Juan David Lopez Santa
      Juan David Lopez Santa

      Append de code below in zsaplink method GETPLUGINS:

      -----------------------------------------------

      SELECT * FROM vseoextend APPENDING TABLE classlist

             WHERE refclsname = 'ZSAPLINK_WF'

             AND version = '1'.

      -------------------------------

      Now the program see the class:

      ZSAPLINK_WF_ACTOR_RULE

      ZSAPLINK_WF_STASK

      ZSAPLINK_WF_TEMPLATE

      and show PDWS, PDTS and PDAC objects in search help.

      Author's profile photo Former Member
      Former Member

      Or even better:

      Instead of appending the above code in the GETPLUGINS method of class ZSAPLINK, simply modify the "SELECT * FROM VSEOEXTEND ..." command at the very beginning of the same method and replace:

      refclsname = 'ZSAPLINK'

      in WHERE clause by:

      refclsname LIKE 'ZSAPLINK%'

      Then, the only restriction would be that all SAPLINK plugin classes would have to be a descendant of classes whose names begin with ZSAPLINK.

      This is exactly the case with ZSAPLINK_WH, This class, which descends from ZSAPLINK, is the superclass of all three workflow-related plugin classes.

      Author's profile photo Former Member
      Former Member

      Hi All,

      Since workflows and BORs often work together, I have developed a SAPLINK plugin to deal with BOR objects.

      I couldn't find a way to upload it here, so anyone who wants it, just drop me a line and I'll email it to you: lino@hr.com.br

      Cheers!

      Author's profile photo Former Member
      Former Member

      Hi Lino,

      It's great to see that for BOR objects SAPLink plugin is available. Please send it to my mail id sunrays08@gmail.com.

      I request you to make this plugin available on the SDN or any web portal for everyone.

      Appreciate your efforts.

      Thanks,

      Ravi

      Author's profile photo Gregor Wolf
      Gregor Wolf

      Dear Lino,

      please join the SAPlink Plugins project at Home | saplink-plugins Project | Assembla and I make you a committer. So you can share your code.

      Best regards

      Gregor

      Author's profile photo Former Member
      Former Member

      Attachment deleted?

      Author's profile photo Mithun Kumar
      Mithun Kumar

      I came in too late to this blog. It seems the attachment is removed already.

      Dear Sergei, Any other place I can download and use your plugin, please? I've the latest SAPlink installed.

      Author's profile photo Sergei Korolev
      Sergei Korolev
      Blog Post Author

      Hi Mithun,

      Sorry, I haven't supported the plugin for a long-long time.  Probably you should contact @Gregor for it, though I don't see it at Home | saplink-plugins Project | Assembla site.