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+]

Similar Messages

  • 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

  • Workflow with delay using ABAP OO

    Hi,
    I am new to workflow and trying to design a workflow where the workflow should be triggered after certain number of days.
    For ex: Suppose the sales order is created. Then, I need to fire parallel workflows for Administrator like -
    1) 10 days after sales order is created contact department X
    2) 15 days after sales order is created, create dispatch order.
    I thought of having a workflow with start event 'ABC' and trigger this event 'ABC' from function module which creates sales order. Then have fork for parallel flows mentioned above. But how can I introduce this delay? I checked wait step, but it waits for an event.
    Also, is there any document/weblog which describes creating workflows along with ABAP class(Not using BOR object). I checked this link
    /people/jocelyn.dart/blog/2006/06/28/getting-started-with-abap-oo-for-workflow-using-the-ifworkflow-interface,
    but it does not give corresponding workflow integration.
    Regards,
    Srini.

    Hi,
    sorry it took so long to answer.
    It is possible to evaluate the latest end date by expression. Therefore you chose expression in field: Reference date.
    To get your requested start, you habe to do some work in advance.
    Create two new container elements in your workflow for your sales order end date -10  and your sales order end date.
    Create a step that calls a Z-Task (you have to create this one!) where you evaluate your Sales order end date and your Sales order end date-10  and write that back into a container element (please check your binding). Alternative back in your workflow include a container operation as a step, where you calculate your latest start date (Sales order end date-10).
    Back in your original Step you can now maintain latest start and end date based on your new container elements.
    Hth
    Ute

  • How to send SMS by using ABAP program

    HI Gurus,
    I need to notify the vendor through sms when his goods are received. His details are stored in vendor master.
    My problem is that I am not able to find any function module for the same.
    Do any of you know how to send 'sms' to particular mobile number using ABAP.
    Are there any basis settings required for the same?
    Thanks and Regards,
    Saurabh

    Hi,
    Pls check the below links
    http://help.sap.com/saphelp_nw04/helpdata/en/58/97c43af280463ee10000000a114084/frameset.htm
    /people/ronen.fox/blog/2007/12/06/sending-sms-notification-via-business-workflow
    http://www.****************/Tutorials/Workflow/Workflow.htm
    You can use the FM: 'SO_DOCUMENT_SEND_API1' &
    'SO_DOCUMENT_SEND_API1_NEW'.
    to send the mail,sms etc.
    But you have to make some chamnges in the reciever table, jus go thru FM documnetaion once, you will fine the option for sending SMS thru either of this FM.
    Below is a sample code for sending e-mail.
    so, u can take help from this.
    data declarations
    DATA : v_sender TYPE soextreci1-receiver,
    v_doc TYPE sodocchgi1,
    it_paklist TYPE STANDARD TABLE OF sopcklsti1 ,
    wa_paklist TYPE sopcklsti1 ,
    it_obj_head TYPE STANDARD TABLE OF solisti1 ,
    it_obj_bin TYPE STANDARD TABLE OF solisti1 ,
    it_obj_txt TYPE STANDARD TABLE OF solisti1 ,
    it_obj_rcv TYPE STANDARD TABLE OF somlreci1 ,
    wa_obj_rcv TYPE somlreci1 ,
    v_desc(100).
    CONSTANTS: c_start(12) TYPE c VALUE '000000000000001',
    c_num(12) TYPE c VALUE '000000000000002',
    c_num1(12) TYPE c VALUE '000000000010030',
    c_raw(3) TYPE c VALUE 'RAW',
    c_test(4) TYPE c VALUE 'TEST',
    c_X(1) TYPE c VALUE 'X'.
    refresh internal tables
    REFRESH : it_paklist, it_obj_rcv.
    clear internal tables
    CLEAR : it_paklist, it_obj_rcv, v_sender.
    v_sender = sy-uname.
    fill internal table it_paklist
    wa_paklist-head_start = c_start.
    wa_paklist-head_num = c_num.
    wa_paklist-body_start = c_start.
    wa_paklist-body_num = c_num1.
    wa_paklist-obj_name = c_test .
    wa_paklist-doc_type = c_raw .
    wa_paklist-transf_bin = c_X .
    APPEND wa_paklist TO it_paklist.
    clear: wa_paklist.
    Data in the Header/subject Line
    v_desc = text-005 .
    v_doc-obj_name = c_objname .
    v_doc-obj_descr = v_desc.
    Mail text
    APPEND v_desc TO it_obj_txt.
    Preparing the receiver list
    wa_obj_rcv-rec_type = 'U'.
    wa_obj_rcv-rec_type = 'C'.
    v_dlist = 'SCE_TEST'.
    wa_obj_rcv-receiver = v_dlist. "Distribution list.
    wa_obj_rcv-receiver = Enter the mail id .
    APPEND wa_obj_rcv TO it_obj_rcv.
    Call the function module to send mail
    IF NOT it_obj_rcv[] IS INITIAL.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
    EXPORTING
    document_data = v_doc
    sender_address = v_sender
    sender_address_type = 'B'
    put_in_outbox = 'X'
    commit_work = 'X'
    TABLES
    packing_list = it_paklist
    object_header = it_obj_head
    contents_bin = it_obj_bin
    contents_txt = it_obj_txt
    receivers = it_obj_rcv
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8.
    IF sy-subrc NE 0.
    MESSAGE text-006 TYPE 'I' .
    ENDIF.
    ENDIF .

  • How to call the abap program in workflow

    HI Exeprts,
    I need to call one abap program in workflow.
    can any tell me how to call the abap program in workflow.
    thanks &regards
    ramesh

    Dear Ramesh,
    U can use REPORT business object.
    Method : EXECUTE_2
    Regards,
    Sagar

  • 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

  • WOrkflow related table and zfunction modules used in a particular workflow

    hi gurus,
                  we need to develop a tool to findout the custom WF, custom BOR and workflow related Zfunction modules used in a particular workflows in the client system.
    Eg-
          I have a custom workflow i need to find the list of all zfunction modules , z includes used in that Workflow.
    please suggest us  the table names which stores ZFunction module or z includes used in particular workflow
    Regards,
    Hari

    The only way to do this is to read through the source code of all the objects accessed within workflow and look for the relevant ABAP statements that access Z tables or function modules.
    [This wiki|https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/utilitytosearchABAPsourcecodeandTextelementsfora+string] should get you started on that part.
    As far as the objects are concerned, this is another story altogether. Something as simple as using an SAP standard object attribute in work item text could actually be a delegated subtypes with a redefined virtual attribute.
    So you need to scan everything: all tasks in a workflow and methods, as well as all container elements of each step. You will also need to navigate the object hierarchy to deal with delegation and subtypes. Then you need to consider propagation, what about Zfunction modules called by Zfunction modules in workflow? What if the method submits a report - you would need to scan that report and everything else that it calls and so on.
    This could be a fiendish challenge but sounds like a fun project. Good luck!

  • 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

  • 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

  • Function module equivalent to SWE_EVENT_CREATE while using ABAP classes

    Hi there,
    I used to use SWE_CREATE_EVENT to fire the events linked to my BOR objects, in order to start certain workflows.
    Now I am using ABAP classes within the WorkFlows, and the name of the classes MUST (in my case) be longer than 10 characters, and SWE_EVENT_CREATE is cutting the name so it does not work
    Do you know any FM equivalent to start an event from a ABAP class (SE24) object?
    I have tried to use SAP_WAPI_START_WORKFLOW, but I cannot find the way to include my object in the container. Any ideas on this point would be welcome as well
    Thanks so much,
    Miguel

    Thanks for such a quick reply,
    You were right. I actually did follow Jocelyn's blogs, but somehow I skipped the raising event section.
    Just for information, the URL with the solution to this problem is:
    /people/jocelyn.dart/blog/2006/07/27/raising-abap-oo-events-for-workflow
    Have a good one

  • ABAP API - MDM Workflow execute

    Hi,
    Do we have any methods/function modules available to access MDM Workflow using ABAP API?
    I have checked through the 19 tutorials of MDM ABAP API available at service.sap.com but was not successful.
    Regards,
    Subramanian V.

    Up to now the MDM workflow is not supported by the MDM ABAP API.
    Regards
      Andreas

  • Launching webdynpro ABAP application from workflow task  (without UWL)

    Hello,
    How can i start webdynpro ABAP application from workflow without portal?
    Workflow and webdynpro ABAP are located on the same system.
    I assume it must be possible without transaction SWFVISU.
    thanks
    Regards
    Paul

    First you need to define a external service then you have to generate a task from this external service and then you need to include this task id in you workflow for a ACTIVITY step then this step can be either background or can be assigned to any agent
    you have to make use the below two Txn
    WF_HANDCUST and WF_EXTSRV

  • How to call web dynpro ABAp application into workflow

    Hello All,
    How to call webdynpro application into workflow .Is it possible ?
    Scenario is : A web dynpro application should flow into 3 levels of approvals .
    Please share your knowledge .
    Thanks
    Sonal

    >
    Saurav Mago wrote:
    > hi,
    > I dont think from workflow , you can call WD application. 
    >
    > Thanx.
    Actually you can configure a workitem to launch WDA via UWL ( http://help.sap.com/saphelp_nw70ehp1/helpdata/en/59/d516690e854c7090ae15bf492a869f/frameset.htm ) or in the NetWeaver Business Client using the Business Workflow Workplace (WDA Application SWF_WORKPLACE).
    There is also a chapter in the upcomming SAP Press 2nd edtion workflow book on different aspects of Web Dynpro ABAP integration into Workflow:
    http://www.sappress.com/product.cfm?account=&product=H3057

  • How to Attach permit automatically to an work order using abap

    how to Attach permit automatically to an work order using abap
    Moderator message : Not enough re-search before posting, show the work you have already done, thread locked.
    Edited by: Vinod Kumar on Jan 30, 2012 2:16 PM

    At least make sure that you have a default method 'browse' in your class. I mean that make a method for "displaying" or "browsing" or whatever you want to happen when you click the object, and make it default. OR actually if I remember correctly there is a default method existing already, but put your code to there.
    Also try this:
    -Create a container element of type 'sales order' into your task
    -Bind the sales order object from workflow to the the task
    Regards,
    Karri

Maybe you are looking for

  • Folder Redirection and Offline Files

    I have Users documents and Favorites redirected using GPO Folder redirection. So everyone has their data redirected to the server. With the feature Always available offline. Then My raid crashed and that Drive become offline. after 24 HRS everyone go

  • XML Editor capable of decoding iTunes "Location" key?

    I'm looking for an XML editor that will allow me to select all entries in the iTunes Music Library XML file with the same Location key, and search and replace those files so all of them become part of the same playlist folder. This is using iTunes 8.

  • JTABLE - FocusEvent on CelEditor!

    Hi, I�m have a little problem: when im editing a cell in jtable and then i click in a button, the cellEditor do not do the event to update my TableModel, resuming: its like i did not have typed anything in table! I really need help... i guess that it

  • Row Visibility in SSRS

    I am using the Switch function in Reporting Services to determine the visibility of a row. It happens that I am using more that one column or field to test my expression like so: =Switch(Parameters!View.Value = "Green" AND Fields!Tax.Value = "N",TRUE

  • Driving me insane!

    If I send an item from Notes, iThoughts, Outliner, even Mail my iMac and or my iPad will receive THREE copies of the same e-mail! I have checked my iPad settings, all is as my Mac is set up. Anyone else experiencing this? Any ideas on how to fix it?