How to trigger MDM Workflow  from ABAP Program.

HI
I have requriment  to trigger MDM Workflow(Design in MDM) from My Module pool program. Suggest how to do it?
Thanks in Advance.
Regards,
Shyam Babu Sah.

Hi,
This question is for forum SAP Netweaver --> Workflow. There are functions and programmes that SAP delivers for this.
[Example here|Re: How can I trigger workflow from my report]

Similar Messages

  • HOW TO TRIGGER AN WORKFLOW FROM A PROGRAM ?

    HELLO THERE ,
    CAN ANYBODY PLZ TELL ME HOW TO TRIGGER AN WORKFLOW FROM AN PROGRAM AND TO PAS THE VALUE TO THE CONTAINER ?

    Hello Neon,
    If you want to trigger the workflow directly, use the FM, SWU_START_WORKFLOW
    CALL FUNCTION 'SWU_START_WORKFLOW'
      EXPORTING
        task                  =
    *   LANGUAGE              = SY-LANGU
        user                  =
    *   SENDER_ID             =
    * IMPORTING
    *   RETURN_CODE           =
    *   WORKITEM_ID           =
      tables
    *   CONTAINER             =
    *   MESSAGE_LINES         =
        attachment_list       =
    A workflow can also be triggered by and event which is in turn triggered by a program.
    By the FM, SWE_CREATE_EVENT
    Example:
    w_key = 'Connie'.
      w_creator-otype = 'US'.
      w_creator-objid = 'SAPDEV02'.
      CALL FUNCTION 'SWE_EVENT_CREATE'
        EXPORTING
          objtype                       = 'YH_BUDDIES'
          objkey                        = w_key
          event                         = 'event'
         creator                        = w_creator
    *     TAKE_WORKITEM_REQUESTER       = ' '
    *     START_WITH_DELAY              = ' '
    *     START_RECFB_SYNCHRON          = ' '
    *     NO_COMMIT_FOR_QUEUE           = ' '
    *     DEBUG_FLAG                    = ' '
    *     NO_LOGGING                    = ' '
    *     IDENT                         =
    *   IMPORTING
    *     EVENT_ID                      =
    *   TABLES
    *     EVENT_CONTAINER               =
       EXCEPTIONS
         objtype_not_found              = 1
         OTHERS                         = 2
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        WRITE: / 'EVENT TRIGGERED'.
      ENDIF.
      COMMIT WORK.
    Hope it helps you.
    Regards
    Indu.

  • How to trigger GP workflow through ABAP Program.

    Hi All.
    i have one scnerio , i want to create BOM through Custom Ztransaction that will be developed in ABAP Modulepool.
    User will create BOM  from this ztransaction through  Transactional Iview in PORTAL,Once the user save transaction , i want to trigger a GP(Guided Procedure ) workflow,from ABAP Program.
    is it possible to trigger GP workflow?
    if yes how  to  do it , please suggest the way out.
    Regards,
    Shyam.

    Hi lingana,
    As u see in my requriment that, Workflow is not designed within SAP , But the Workflow will be designing
    in SAP Netweaver, its a GP Workflow. And Ztransaction(Developed by ABAP) will  be seen by user through portal  and
    he save transaction on PORTAL, In backend  ABAP program will run , and after meeting certain condition, it should create
    or(Initiate) GP workflow(process).
    So my question is , how ABAP Program will call GP workflow, How the connection will be made in between ABAP Code and GP workflow framework.
    If any doubt regarding requriment let me know,
    Regards,
    Shyam.

  • How to Trigger a Workflow from ABAP Webdynpro

    Hi All Gurus,
    I have the following urgent requirement, my client is implementing HR and there is a requirement, where is a ABAP Webdynpro component in which we have integrated a Adobe Interactive Form. When the user calls this from through Portal and fills out the relevant data and submits it, a Workflow in the backend ECC system should lauch,
    I am not familiar with, this concept although I have worked in Workflow this is the first time I am interfacind with ABAP Webdynpro and Adobe Interactive From.
    Can you please let me know in steps what needs to be done to make the workflow trigger for my scenario and also the specific settings to be done in the bacckend.
    Regards,
    Pratima Jain

    Hi,
    If you are using HCM Processes and Forms, the Workflow and form are not directly related, thats true.
    But the method in the task calls the corresponding webdynpro application which responds to the action triggered by the user in turn to trigger the workflow and update the data in the HR Master Data.
    There are 3 layers  1. UI (webdynpro which launches Adobe Interactive form based on ISR Framework)
    2. Workflow
    3. Backend framework (used for retrieving F4 helps, default values, save data in the infotypes).
    for more documentation, please refer it on help.sap.com.
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/82/b6b94278560c31e10000000a1550b0/content.htm
    hope this helps.
    Best Regards,
    Saujanya.

  • Call workflow from ABAP program

    created a zbusiness object (ZPRODH)with
    one key field product hierarchy,
    one attribute level number and
    one method display.
    I tested that zobject and using this object created workflow to display product hierarchy ,it is displaying it. now I have to call it from one abap program.
    In the abap program I am calling the funcion module, I
    CALL FUNCTION 'SWW_WI_START_SIMPLE'
    EXPORTING
    TASK = TASK
    IMPORTING
    WI_ID = WI_ID
    TABLES
    AGENTS = AGENTS
    WI_CONTAINER = WI_CONTAINER.
    It is calling the workflow and subrc is 0, but not passing the value to the workflow. Because of that the method is not working, any idea?
    Thanks in advance

    ttpa,
    Please check this thread:
    Re: Workflow from abap program
    Also check that your Fm do requires any explicit commit or not?
    Hope it will help u
    Cheers
    Jai

  • How to trigger the workflow from the excel sheet

    hello friends,
    my problem is that i should trigger the workflow from a excel sheet which contains a list of appraisers and appraisees.how to do this. can anyone  help on this.
    thanks.

    Hi Murthy,
    If you are asking if a workflow can be started on R/3 while in Excel - may be possible if you can develop some fancy macros that can make RFC calls to an ABAP function module. I won't even attempt to travel that route.
    Save the excel sheet as CSV or Tab delimited file and process it using ABAP. You can use the WAPI function module SAP_WAPI_CREATE_EVENT (Rel 4.7)to start the Workflow by raising the relevant event. In earlier releases, see FM SWE_EVENT_CREATE.
    Please do keep in mind there could be performance and response time issues for dialog users of the system if you are going to start several workflows using a report program.
    Cheers,
    Ramki.

  • Workflow from abap program

    I created one workflow with a zbusines object. I did not create any event for the business object. only key fields and method.
    now my question is, how can I call or trigger the workflow from the abap program. please adive

    Hi Mat,
    u can use FM SAP_WAPI_START_WORKFLOW.
    Please find sample coding
    data: z_bus2080 type swc_object.
    data: begin of bus2080_key,
    id like viqmel-qmnum,
    end of bus2080_key.
    data: wf_cont type SWR_CONT occurs 0 with header line.
    parameters: qmnum like viqmel-qmnum.
    bus2080_key-id = qmnum.
    swc_create_object z_bus2080 'BUS2080' bus2080_key.
    Populate first container element - object type BUS2080
    clear wf_cont.
    move: 'BUS2080' to wf_cont-element,
    z_bus2080 to wf_cont-value.
    append wf_cont.
    Populate second container element - char variable USERNAME
    clear wf_cont.
    move: 'USERNAME' to wf_cont-element,
    sy-uname to wf_cont-value.
    append wf_cont.
    Call WAPI function
    CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
    EXPORTING
    TASK = 'WS94600159' "<-- Your workflow ID
    LANGUAGE = SY-LANGU
    IMPORTING
    RETURN_CODE =
    WORKITEM_ID =
    TABLES
    INPUT_CONTAINER = wf_cont
    MESSAGE_LINES =
    MESSAGE_STRUCT =

  • How to trigger the workflow from RFC

    Hi,
    I need to trigger a workflow from a RFC.How can I call the event and start my workflow?
    How can i do this?
    please advice.
    Thanks,
    Anand

    Hello Anand,
    Goto swetypv transaction.Mention the abap class/bor object with the corresponding event.
    In the receiver type, just mention some unique name.In the receiver function module mention the async RFC.
    Mention the SENDER     TYPE     SIBFLPORB                        Local Persistent Object Reference - BOR Compatible
    EVENT     TYPE     SIBFEVENT                               Event
    RECTYPE     TYPE     SWFERECTYP                               Name of Receiver Type
    HANDLER     TYPE     SIBFLPORB                               Local Persistent Object Reference - BOR Compatible
    EXCEPTIONS_ALLOWED     TYPE     SWEFLAGS-EXC_OK     SPACE     Checkbox
    XML_SIZE     TYPE     SWF_XMLSIZ                               Size in Bytes
    EVENT_CONTAINER     TYPE     SWF_XMLCNT                               Container as XML Stream of Fixed Width
    So that the guid can be used inorder to identify the instance.
    you can use : "sap_wapi_start_workflow" fn module.
    Hope this helps.
    Best Regards,
    Saujanya

  • Trigger MDM workflow from Webdynpro Java

    Hi All,
    After updating records in MDM, I want to trigger an MDM workflow from Webdynpro Java and pass those updated records to workflow. Any inputs on how to accomplish this. Workflow has already been developed using MSVISIO by the MDM team.
    Thanks,
    Tom

    By following steps, it is possible to integrate  workflow (or any workflow designed in MDM) within portal:
    1. UWL (Universal Worklist): The UWL gives users unified and centralized way to access their work and the relevant
    information in the portal. It collects tasks and notifications from multiple provider systems. One can expose MDM
    workflow functionality on Portal using UWL.
    2. JAVA APIu2019s: MDM Java API consists of set of classes related to MDM workflows through which one can create an
    application that provide the MDM workflow functionality and expose the application as an iView in the portal.

  • How to trigger workflow from abap program

    Hi Experts,
    i have a user developed screen in which there is an option to approve (not a std tcode)
    for which there is no event created.
    i am very new to workflow ,
    now how to create an event and also how to trigger the workflow

    Hi,
    You can run a ABAP report or call a transaction from the BOR's Method directly.
    Check this link for more info.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/80/9a3cb3971c11d194c60000e82dec10/frameset.htm.
    In order to trigger an event programmatically, we would use the function module SWE_EVENT_CREATE.
    BUS1001006 ( Standard Material )
    here is the sample code.
    DATA: key LIKE sweinstcou-objkey.
    key = '68." Material Number (hard-coded)
    CALL FUNCTION 'SWE_EVENT_CREATE'
    EXPORTING
    objtype = 'BUS1001006'
    objkey = key
    event = 'CREATED'
    CREATOR = ' '
    TAKE_WORKITEM_REQUESTER = ' '
    START_WITH_DELAY = ' '
    START_RECFB_SYNCHRON = ' '
    NO_COMMIT_FOR_QUEUE = ' '
    DEBUG_FLAG = ' '
    NO_LOGGING = ' '
    IDENT =
    IMPORTING
    EVENT_ID =
    TABLES
    EVENT_CONTAINER =
    EXCEPTIONS
    OBJTYPE_NOT_FOUND = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ELSE.
    WRITE 'Event Triggered'.
    ENDIF.
    COMMIT WORK.
    In order to test whether the event is getting triggered or not, we can make use of Event Trace. Switch on the event trace using the transaction SWELS.
    Press ‘Switch On”.
    Now execute the program developed earlier. Now switch-off the event trace using the same transaction SWELS.
    Now go to transaction SWEL. Here you can list out the events triggered in the particular period of time. Here is the event-trace list:
    Regards

  • Trigger a workflow from ABAP Webdynpro

    My Scenario:
    Step 1: When a user hits the SAVE button on the webdynpro form, check if that data is consistent only and trigger a message(I have a BAPI to handle this check).
    Step 2: If the data is consistent, then trigger a workflow to send an alert to an agent along with the data user entered on the form.
    Step 3: AGENT shall review the data(Same form from step 1 should appear here) and will have the option to SUBMIT / POST or REJECT. If SUBMITTED, data will be posted to R/3(I have a 2nd BAPI to handle this). If REJECTED, send an alert back to the USER who entered data in step 1.
    I checked lots of threads from the forum, none gave me a complete idea. Can any one give me a good documentation to trigger workflow from webdynpro to handle my requirement.
    I am new to webdynpro.
    I checked this blogs & articles also...
    /people/ginger.gatling/blog/2005/12/14/create-new-uis-for-existing-workflow-tasks-with-abap-web-dynpro-and-universal-worklist
    http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20java/wdjava%20archive/using%20web%20dynpro%20java%20and%20web%20dynpro%20abap%20applications%20in%20universal%20work%20list.pdf
    Thanks a lot in advance.
    Best Regards,
    Kiran

    Hello Kiran,
    I slightly misunderstood you requirement earlier. But if I am not wrong this time, here is what you need to do:
    1) The Web dynpro form that you are creating is only for data entry purpose. But the agent who is going to review the data will need an access to this form. So this means that you need to save the content of this form to the database and provide a URL in the workflow workitem which the agent can use to open the web dynpro application with the form data on it.
    2) To access the correct form, you need to save the form data in a Z-table with a GUID attached to it. Generate this GUID using GUID_CREATE function module. In the window controller of the Web dynpro component, there will be a handleDefault method where you can read the parameter'GUID' from the incoming request and use it to read the form data from the database to display the form.
    3) You can use Object Oriented programming approach for creating Workflow. Check the following article to learn how to do that:
    [http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0409e6c-d213-2d10-3cb6-c12d417626c1?quicklink=index&overridelayout=true]
    4) Create a Z-class and use this class as object type in your workflow (instead of BOR object).
    5) In the constructor of this class, pass a parameter GUID, which would be passed when you create an object of this class in the Web Dynpro forms "OnActionSave" method.
    6) Create a method in this class which will do the task of calling the BAPI to save the Acct Document. This method will be used in a Background task in a workflow step (after the agent approves the workitem).
    7) Create a method in the class which generates the URL to the webdynpro application with the GUID passed as parameter.
    (for eg: http://urltoserver/appname?GUID='guidoftheform').
    8) In your save method of WD application, call the method to raise event that triggers the workflow (using OO)
    lv_guid    = '04AE4546EED7101DE10000000A424026'. "use GUID_CREATE
           lv_objtype = 'ZWFCLASS'. " create a Z-class of your own
       TRY.
          CALL METHOD cl_swf_evt_event=>raise
            EXPORTING
              im_objcateg = 'CL'
              im_objtype  = lv_objtype
              im_event    = 'FORM_APPROVE' " this event needs to be defined in ZWFCLASS
              im_objkey   = lv_guid.
        CATCH: cx_swf_evt_exception.
      ENDTRY.
    Please read through the workflow using Object Oriented document in the URL that I have mentioned above before you read through these instructions.
    There would be a way to do this using BOR objects, but this is the way that I have tried and tested to use trigger workflows from Web dynpro applications.
    Best Regards,
    Gaurav
    Edited by: Gaurav Salkar on Apr 6, 2010 6:13 PM

  • How to trigger a workflow in webdynpro programs

    Hi Experts,
    I am new to SRM Workflow, and I need to trigger a workflow in my webdynpro programs.
    But I don't know how to achieve it.
    I am using SAP SRM 7.0, so I want to use Process Controlled workflow.
    Any suggestions would be greatly appreciated.
    Thanks and Regards
    Wei

    Hi, thank you for the attention, and my requirement is as below.
    1. Creating a web dynpro program
    2. User can execute the program and input data on it. Such as Expense application, Leave application...
    3. When the user click the "Apply" button on the form, the application should be sent to the boss for approval.
    *** I want to trigger a workflow when the user click the "apply" button.***
    I have achieved the similar functions in SAP ERP systems, by generating Events in my custom programs.
    But I don't konw how to do it in SRM 7.0.
    Or it is impossible to achieve it, under Process Controlled workflow architecture.
    Thanks and Regards
    Wei

  • How to connect to DB2 from ABAP program

    Hi,
    In my ABAP program I need to retrieve 3 fields from one table of DB2 database. I have tried creating an RFC connection in SM59 and then using native SQL in abap code but could not succeed.
    I have also maintained an entry in DBCON table but am unable to connect through program.
    Pls suggest.
    Thanx in advance.

    Preeti-
    DBCON may not work for you because your target is DB2. You SAP system should have the suitable driver files for connecting to DB2 and I don't think currently this is supported.
    However, there are other ways of doing it. One ofcourse is to use a middleware tool, which I guess you don't have in your landscape.
    If investing on a middleware tool is out of scope, here are other options
    1) If you are a microsoft shop, use .NET connector (freely downlaodable from SAP service market place). You can develop a .NET component which will use .NET connector for connecting to SAP and OBDC to connect to your AS400 system. The OBDC drivers can be obtained from IBM.
    2) If you are a java shop, you can develop a java code which can run on your AS400 system or a separte server (windows,unix..).
    This java code will use JRFC/JCO (again downloadable for free from SAP service market place) to connect to SAP while it will use Client access ODBC drivers or JT400 drivers (google JT400) to connect to your DB2 database.
    Though developing this is not a great deal, could be bit challenging if done for the first time. Let me know which way you wanna go and I can guide with more information/code samples.
    KK

  • How  to execute os command from ABAP program?

    I want to execute some window commands from ABAP. What is the way to do it?

    Hi,
    See ht e coding below, I have used these Fm to connect to FTP server and get the Files..
    *types for the ftp command result internal table
    TYPES : BEGIN OF ty_result,
            text TYPE char512,
            END OF ty_result.
    data it_result type standard table of ty_result.
    *Connect to the FTP server
      CALL FUNCTION 'FTP_CONNECT'
        EXPORTING
          user            = lv_user           " user name pass word to connect
          password        = l_v_pwd
          host            = 'dev.eu.pm.com' " Host name here
          rfc_destination = 'SAPFTPA'   "destination name
    *Ask your functional people for the above data
        IMPORTING
          handle          = v_handle
        EXCEPTIONS
          not_connected   = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
      ENDIF.
    *Changing directory
      CONCATENATE 'cd' '<file path>' INTO l_v_cmd SEPARATED BY space.
    you can also ser 'DIR in l_v_cmd which opens the directory and all the folders *get into it_result table..
    *Execute the FTP Command
      CALL FUNCTION 'FTP_COMMAND'
        EXPORTING
          handle        = v_handle
          command       = l_v_cmd
        TABLES
          data          = it_result
        EXCEPTIONS
          tcpip_error   = 1
          command_error = 2
          data_error    = 3
          OTHERS        = 4.
      IF sy-subrc <> 0.
      ENDIF.
    rewards if useful,
    regards,
    nazeer

  • How to trigger a workflow from event - newbie question

    Hi,
    I have a simple workflow, with the start node triggered by an XML event.
    What JMS destination I am supposed to send the XML document to in order for
    the workflow to be triggered. I thought that it was the wlpiEvent, but the
    workflow doesn't start. Also tried WLI_BPM_EVENT, with no joy.
    If anyone can point me in the right direction, then I would be grateful
    Lucy

    If it is one workflow sending a message to another, you can use internal destination.
    If it is another application then it would be WLI_BPM_EVENT ( which goes by the
    jndi name com.bea.wli.bpm.EventQueue in default installation ).
    "Lucy Collins" <[email protected]> wrote:
    Hi,
    I have a simple workflow, with the start node triggered by an XML event.
    What JMS destination I am supposed to send the XML document to in order
    for
    the workflow to be triggered. I thought that it was the wlpiEvent, but
    the
    workflow doesn't start. Also tried WLI_BPM_EVENT, with no joy.
    If anyone can point me in the right direction, then I would be grateful
    Lucy

Maybe you are looking for

  • How to get all possible values of a property

    I have a single-valued restricted property which has a number of predefined values. I want to be able to get all of these values to use to populate a drop down list in my portlet. Does anyone know how I can do this?

  • Problem with checkbox and drop down menu

    I am using DW8 with PHP/MySQL. I made a insertion form and a couple of the fields are checkboxes and another is a drop down menu. Everything works fine, however, when I create an update form and the recordset calls the data it doesn't retain its valu

  • Formatted Search inside a Price List

    Hi, Is it possible to put a formatted search inside a Price List which will auto-update? I created a query which looks at Special Prices tables OSPP and put an FMS in Price List 10. However, this FMS does not auto-update - it only updates when I clic

  • For Adobe Reader

    When I convert a 13 page ebook to pdf I receive this message: Cannot extract the embedded font 'HWNDJR+13gerjrwlenkqok' some characters may not display or print correctly. I check the downloaded pdf I just created and there are characters missing fro

  • Show the nulls first in a query

    hi all i have a query like below select dept_code,dept_name from department select null,null from dual order by dept_codei need the sorting order should be dept_code and at the same time null should come first. now null is displaying as a last record