ABAP Classes in Workflow

I am planning to use ABAP classes instead of BOR Objects in Workflow and would appreciate
1) any elaborate documentation on the use of ABAP classes in workflow (SAP help has very limited documentation)
2) comparision of using either approach with advantages of using ABAP classes over the use of BOR Objects and limitations of using ABAP classes,if any.
3) any examples of ABAP classes used in Projects
Thanks for your help.
Saurabh

Hi,
check the wiki, in the design and development part are listed all of Jocelyn darts blogs about OO in workflow:
<a href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/2.DesignandDevelopment&">https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/2.DesignandDevelopment&</a>
regards, Rob Dielemans

Similar Messages

  • Include in ABAP class for Workflow

    Hi,
    In order to use BOR macros inside ABAP class, (From SAP help) came to know that we need to use include <cntn02> .
    How to add this include to ABAP class for workflow?
    Regds,
    Akshay

    Hi Akshay,
    Slight difference, I said "keeping the class clean of BOR <i>code</i>". By all means use BO's in the class: basically create a ZCL_MATERIAL, and use BUS1001 as an attribute (I use a naming convention BO_* for these). As long as it's the right type (SIBFLPORB I think - no system handy right now), and the key values are populated correctly the system will instantiate it as necessary. So in WF I can refer to ZCL_MATERIAL.BO_MATERIAL whenever I need any of the BO's functionality.
    You are correct though, creating a proper business class which you can instantiate such as material does involve a fair bit of effort and coding to set up. e.g. my last project I ended up creating one ZBOR subtype because all I needed was one new attribute - definitely not worthwhile creating a new class for. (USR01.zEmailAddress for what it's worth).
    I've said before somewhere, it's not without pain, so if you're under time pressure etc, then it may be better to do whatever's quickest. There's nothing wrong with using BOR macros, it will still work for quite a few versions. I just meant to say that pure class(y) code is a preferred way to go if it makes sense to do so. This is not always the case.
    Hope that helps,
    Mike

  • Calling a custom tcode using abap class from workflow

    Hi Experts,
    I have a requirement of calling a custom tcode from my workflow.
    For this i have created a class zcl_test ( has if_workflow ) .
    I created a method ztest which will call the tcode.
    CALL TRANSACTION 'ZTX'.  ( My tcode just has 1 input field, for testing purpose )
    Then i created a task in whichi hv used this abap class and method.
    But the tcode does not run when i execute the workflow.
    Please help.
    Thank You,
    Radhika Vadher.

    Radhika Vadher 
    use the sample code to get the data from the task container into the ABAP class
    DATA :
             w_ref        TYPE  REF TO      if_swf_run_wim_internal,
             w_ref_cnt  TYPE  REF TO      if_wapi_workitem_context,
              w_wi_ref   TYPE  REF TO      if_swf_ifs_parameter_container.
    TRY.
        CALL METHOD cl_swf_run_wim_factory=>find_by_wiid
          EXPORTING
            im_wiid     = w_wiid
          RECEIVING
            re_instance = w_ref.
      CATCH cx_swf_run_wim_enq_failed .
      CATCH cx_swf_run_wim_read_failed .
      CATCH cx_swf_run_wim .
    ENDTRY.
    CALL METHOD w_ref->get_workitem_context
      RECEIVING
        re_ctx = w_ref_cnt.
    CALL METHOD w_ref_cnt->get_wi_container
      RECEIVING
        re_container = w_wi_ref.
    and the w_wi_ref is having a method GET use that method to get the values of the task container into the ABAP class.

  • How to use ABAP Class to modify Web Query Result ??

    Hi all !
    We are using Web Templates to display our Query.
    What I would like to do ( and seems a really important issue for our users! ) is to have a "PAGE BREAK" everytime the value of a charateristics change in the report
    For Example :
    -Page 1-
    Division     Project
       A               1
                        2
                        3
    -Page 2-
    Division     Project
       B               1
                        2
                        3
    and so on....
    I read threads about using ABAP CLASS but no example what so ever...
    We are presently under BW 3.1 but are considering upgrading to 7.0 by the end of the year so if there is a solution to my problem on either version i'd like to know.
    If anyone has any information about how I can do this it would be most appreciated
    Thx
    JB.

    Hi Yong,
    Ravi is right, first check the blogs by Jocelyn, and if you still have specific questions you can ask them. I have used ABAP classes in workflow and I know Mike Pokraka tries to use classes exclusively.
    Regards,
    Martin

  • ASUG Presentation - April 2007 - Do you have the ABAP Classes presentation?

    Hi all,
    does anyone have a copy of the ASUG presentation that supported the session:
    "Classy Workflows: Moving from Business Objects to ABAP Classes - practical examples, and case studies, for using ABAP Classes in Workflow applications".
    Can you please send it to [email protected]
    Much thanks and regards,
    Cristiana

    Hi there
    In Captivate, try opening the preferences by pressing Shift+F8 and navigating to the Project > Start and End and clearing the Auto Play option. Re-publish and re-insert into the PowerPoint and see if that helps.
    Cheers... Rick
    Helpful and Handy Links
    Begin learning Captivate 5 moments from now! $29.95
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcererStone Blog
    Captivate eBooks

  • ABAP CLASS in work flow

    Hi all.
         Can you pls let me know what is the use of ABAP CLASS in workflow with one sample scenario.
    How it differs from  BOR. Thanks in advance.
    Kind Regards,
    sami.

    Hi Sami,
    ABAP classes are pure representation of OOPS. They provide additional functionality that is not provided by business objects.
    If you search SDN you would find ample information on the same, you can refer the following blogs to start with:
    /people/jocelyn.dart/blog/2006/06/19/why-use-abap-oo-with-workflow
    /people/jocelyn.dart/blog/2006/07/27/raising-abap-oo-events-for-workflow
    Hope this helps!
    Regards,
    Saumya

  • Polymorphic classes in workflow?

    Hi Workflowers,
    A very technical question: Has anyone tried to use some sort of polymorphism with ABAP classes in workflow?
    I am working on 620 at the moment and the trouble is that the WF builder doesn't let you specify an interface as a class container element type. I have even tried to get it to work via inheritance (i.e. binding a subtype to it's supertype and vice versa) and having spent most of a day on it have had no success whatsoever. It seems that the class you define is the class you're stuck with thoughout the WF.
    This is rather annoying and negates one of the more useful benefits of using classes. Even though I am sitting on a 620 system, I would also be interested in any experience on NW04/s because it would be handy to know how things work and which direction things will go as we also have upgrade plans around the corner.
    Any input appreciated.
    Cheers,
    Mike
    (Cross-posted on WUG and SDN)

    Mike Pokraka wrote:>
    > Closed due to lack of interest...
    Actually: closed due to no-one else having tried such advanced features (yet) is probably closer to the truth
    It's not that I (and I am sure others) have no interest, but I'm swamped in BUS2012 and BUS2081 extensions.

  • Error handling in Abap Class for SAP Workflow

    Hi Experts,
    I would like to know if we have an option in abap classes used in workflows to send errors to the workflow log. We can achieve this in BOR Object methods by using the EXIT_RETURN <CODE> var 1 var 2 to send the errors back to the workflow, but how is this achieved through methods from classes  used in workflows.
    Appreciate your quick responses,
    Chaitanya

    Just raise exceptions in the normal OO way. Any exception that is a subclass of CX_BO_ERROR should be automatically available in workflow. Use subclasses of CX_BO_TEMPORARY for temporary errors.

  • Create Attachment in workflow through ABAP Class in ECC 5.0

    Hi,
    Wr are using SAP ECC 5.0 and i am trying to create attachment through ABAP class.
    Here in ECC 5.0, macro INCLUDE cntn01_swc is not available.
    I am getting an error in declaration of SOFM object, because again SWC0_OBJECT is not available.
    I've tried creating the parameter as type SOFM and of type table of SOFM but it also not working.
    Can anybody help me how i can create SOFM instance in ABAP class in ECC 5.0?
    Regards,
    Smit

    Hi
    I am not very much sure about ECC 5.0 environment. Firstly are you looking to create a SOFM object inside any class or program or Function module , If yes then you need to include a include INCLUDE CNTN01_SWC (No arrow brackets) if this include is not available then use INCLUDE<CNTN01>  then declare a variable of type SWC0_OBJECT if you are using first include or declare of type SWC_OBJECT.
    Once you include any of the includes then by making use of SWC macros you can create a object
    SWC0_CREATE_OBJECT <VARAIBLE> <BOR NAME> <BORKEY> for first include.
    SWC_CREATE_OBJECT <VARAIBLE> <BOR NAME> <BORKEY> for second include.
    Regards
    Pavan

  • BOR Object and ABAP Class

    Hi,
        Can anybody say when to use BOR object and Abap class in the task with an example.
    Thanks,
    Mugundhan

    There is no any specific condition or rule that for this purpose you need to use BOR and Class , it depends on your requirement. not only the requirement but also the new techniques to make classes not just as simple way to create objects but when you use classes in the Workflows they are not simple classes but they are BUSINESS CLASSES which makes a lot of difference.
    Check the blogs of [Jocelyn Dart|https://www.sdn.sap.com/irj/scn/wiki?path=/pages/viewpage.action%3fpageid=55566]

  • BOR reference in ABAP Class

    Hello,
    I am writing method in ABAP class which I will link to the Workflow Step. I want  to access values of one of the Workflow Element which is Multiline and refering to BOR Object Type. My queries are as below:
    1. How should I define Importing Parameter of Method which will import values from the Workflow Element which is Multiline and refering to BOR object type.
    2. If I change value of that Workflow Element (Multipline refering to BOR object type)  in ABAP class method, will it be automatically reflected in Workflow Container due to binding?
    Edited by: Ashwin Sonkusare on Apr 1, 2011 3:35 PM

    Hi,
    1. How should I define Importing Parameter of Method which will import values from the Workflow Element which is Multiline and refering to BOR object type.
    Please create a table type same as workflow multiline element type. ( You can also use standard table if present ).
    Then use this table type as the type of the import parameter of the class.
    Then u can pass the multiline element of workflow to  abab calss
    2. If I change value of that Workflow Element (Multipline refering to BOR object type) in ABAP class method, will it be automatically reflected in Workflow Container due to binding?
    If u change the Workflow Element (Multipline refering to BOR object type) in ABAP class method, then  u need to update the values of the workflow multiline element through reverse binging ( binding abap class to WF ).
    Thanks and regards,
    SNJY

  • Reg : Using ABAP OO in Workflow

    Hi All,
    I have very simple question and this is the place where I am still lacking in workflow?
    1. How do I identify when to use ABAP class and when to use BOR in workflow?
    2. How do I identify which class to be used? Do we have any similar to BOR (SWO3) for ABAP class as well?
    3. Anything to be kept in mind while working with ABAP classes?
    Thanks & Regards,
    Raj

    How do I identify when to use ABAP class and
    when to use BOR in workflow?
    Upto my knowledge it depends on your thinking, but personnaly I feel that instead of creating a BOR, It is very easy to maitain Business classes ( When a class is used in workflow then we call it as Business Class , because it handles the business process )..
    How do I identify which class to be used?
    Do we have any similar to BOR (SWO3) for ABAP class as well?
    When ever you find a interface IF_WORKFLOW in the class definition under interface tab then you can make use of that class in the workflow  steps.
    Anything to be kept in mind while working with ABAP classes?
    [Check the blog series of Joycelin|http://www.sdn.sap.com/irj/scn/advancedsearch?query=joycelin+]

  • Event triggering by abap class & ISR

    hi gurus
    1 ) can i able to see the event triggering by abap class in SWEL ?  ,
    2) in custom  ISR scenario , new form scenario has been created by our functional consultant , and asking me to trigger a workflow for approval ,  when employee fills that particular ISR FORM , workflow should start and to go his HR administrator , when HR administrator double click on workitem he should get the ISR form in display mode  & also with some descpition text  is to be added in the screen (like user decision description ) with approval button ..... my question is how to trigger a event from in form scenario ? , how to bring the FORM screen to display mode  to the HR administrator ?
    regards
    surya

    Hi Surya
    The BO for ISR forms is BUS7051 - Notification. Turn on the trace via SWELS and create a PCR/ISR form and you should see the events being triggered in SWEL.
    Good Luck
    Ravi

  • ABAP Objects and Workflow

    Can anyone tell me if it is possible to use objects created in ABAP within a workflow without creating an object in the BOR ?

    It's surely not possible in 4.6C .
    Regarding 4.7 also , I am not sure if it is possible using Object Category....
    It does not seem to possible on miniSAP..
    Ok i think it's supported in 4.7.
    You can check the object category field ( e.g in transaction PFTC ), you can specify the category of the object type used. Currently only object types from the Business Object Repository and from ABAP classes are supported.
    Cheers,
    Ram
    Message was edited by: Ram Manohar Tiwari

  • Abap-Class-Event in Wait Step

    Hi guys,
    in my workflow i have an activity with an abap method. This method works like a dialog. This means, i get a workitem in the business-workplace which shows a webdynpro where a pdf is displayed and where i can choose whether i click on button1 or button2.
    When i click on one button, an abap-class event will be created. This event has a container. My target is, to bring the user desicion back to the workflow via event.
    When i start a new workflow with this event then it works fine. But i dont want 2 workflows. I need a solution with one workflow. So i use a fork in my workflow. In branch 1 i have the activity which displays the pdf and create the event. In the other branch i have a waiting step, which waits for the event and bring the user-desision from the event-container to my workflow-container.
    That was my plan, but it dont works this way. I checked the event-trace and theres no receaiver entered for my event. So my workflow stoped at the wait-step (wait step is ready).
    I read, the the workflow system is automatikly doing the type-linkage and the instance-linkage, but i found only the instance-linkage filled. Can it be, that the wait step is only working with BOR-Events?
    Any ideas?

    Hi swangir,
    i tryed this FW SAP_WAPI_WRITE_CONTAINER some days ago. I can use SAP_WAPI_READ_CONTAINER easylie but when i try to modify the container then i get an enqeue exception in the SAP_WAPI_WRITE_CONTAINER FM. I guess this came up, because i call the webdynpro from an activie-step in the workflow and not a dialog-step. So i guess the container is locked and i cant write. I also tried to unlock it with dequee_e_ .. FM i forgot the name. But it also didnt work.
    Thats why i tryed to bring the user desision via event back to the workflow. And it works, as long i use 2 workflows, like i explained in my first post.
    What do u mean with...
    "Alternatively, you can bind back the class event container to workflow container by binding back from the dialogue step."
    Andre

Maybe you are looking for

  • How to prevent a problen in ONE TAB from hanging ALL FIREFOX ?

    The problem is that a problem causing a hang in one tab can hangup all of firefox so I can't do anything. For example, an unresponsive script invoked by one tab (one website) causes all of firefox to stop running., and I can't use the mouse or keyboa

  • Flash Player on Firefox is Crashing again and again, Why?

    Since last few months Flash player is frequently crashing on fire fox.... i am facing the same issue on all the machines. Any permanent solution? My OS is Windows 7 32 bit (I have already try  with OS reinstallation ) but still facing same issue -  S

  • Configuring SharePoint Connector for LiveCycle

    Hello, I am having some trouble setting up the SharePoint connect for LiveCycle. When entering the user credentials in the configuration page, I get a 401 Unauthorized error from Share Point server. However, using the same credentials, I am able to l

  • Notifications (specifically for the Facebook app)

    I just bought a Nokia 720, and so far I'm very disappointed because the notifications for the Facebook app don't come through at all. When I get messages on FB chat I expect to be notified, and having used Android and iOS in the past this isusually 

  • Problem in EP6 SP6, DQE

    Hi All, I installed WAS 6.40 SP7 and then EP6 SP6 on Windows Platform. Installation was successfull. But when I tried to create Database iViews, its not opening the tables for the configured DB. Then i tried to open in Portal content page... System A