Binding at Manual triggering of workflow.

Hi,
As per requirement I triggered workflow manually from an userexit. That workflow is basically to trigger mails for every personnel action at PA40. Now the container at function module 'EWW_WORKFLOW_START'(Used for manual triggering) is filled with personnel number (pernr), but how can I bind this value in workflow.
If anybody experienced in this. Please kindly guide me asap.
Thanks in advance.

Check the below snippet
DEFINE SWC_SET_ELEMENT.
  CALL FUNCTION 'SWC_ELEMENT_SET'
    EXPORTING
      ELEMENT   = &2
      FIELD     = &3
    TABLES
      CONTAINER = &1
    EXCEPTIONS
      OTHERS    = 1.
END-OF-DEFINITION.
IT_CONTAINER TYPE TABLE OF SWCONT
IF data IS NOT INITIAL.
      value3 = data->value.
      value1 = value3 / 2.
      value2 = value3 / 2.
    ENDIF.
* Set the data into Workflow container
    SWC_SET_ELEMENT IT_CONTAINER 'basic' value1.
    SWC_SET_ELEMENT IT_CONTAINER 'hra' value2.
* Start the Workflow
    CALL FUNCTION 'EWW_WORKFLOW_START'
      EXPORTING
        X_TASK          = 'WS99900280'
      IMPORTING
        Y_WORKFLOW_ID   = WF_ID
      TABLES
        X_CONTAINER     = IT_CONTAINER
      EXCEPTIONS
        INVALID_TASK    = 1
        NO_ACTIVE_PLVAR = 2
        START_FAILED    = 3
        GENERAL_ERROR   = 4
        OTHERS          = 5.
    IF SY-SUBRC = 0.
      COMMIT WORK.
    ELSE.
      V_MESSAGE = 'Work Flow not triggered'.
    ENDIF.
here Iam passing BASIC and HRA from my exit. Make sure that you should declare with the same names even in the workflow container.

Similar Messages

  • Problem in triggering of workflow

    Hi All,
    We have custom events assigned to bus2104.In Event linkage transaction SWW_WI_CREATE_VIA_EVENT is passed to Receiver Function Module and "Linkage Activated" = 'X'.
    In  quality server after approval request (t.code IMA1N) is created and status of approval is changed to "Request for POP inclusion" the workflow is triggered. But in testing workflow is not triggering.
    In test system if i am manully executing the workflow using SWUE t.code & selecting "trigger receive FM synchronus" then only the workflow is triggered.
    If i execute workflow manully through SWUE & unselecting " trigger receive FM synchronus"  the workflow is not triggered.
    Could you plz let me know why the worklfow is not triggered in qualtiy system automaticly.
    *Please do not use words like "Urgent" in the forum.Hence i edit the message as per the forum guidelines. Edited by: Saujanya GN on May 12, 2008 5:41 AM

    Hi
    Thanks for your response.
    The settings in SWEL are identical in Quality & test system.But if i am manually running the workflow fro SWUE with "tigger receiver function module  synchronouly" = X
    in workflow graph its shown that the workflow is triggered through event but in SWEL data is not available.
    Regards
    Deepthi

  • How do I manually start a workflow to...

    I have a list with 2000+ items in it. I create a 2013 workflow in SPD that will look at an item and if it date is less than 1/1/2013 it will create a copy of the item on a list used for archiving, then delete the existing list item. 
    My question is how do i manually start this workflow on the entire list (instead of selecting 1 item at a time)?
    Thanks
    James T.F

    @Romeo
    I've found to potential PowerShell scripts that could launch a list workflow from powershell, but they both throw errors for me. 
    # URL of the Site
    $web = Get-SPWeb -Identity "https://sharepointsrv/site1"
    $manager = $web.Site.WorkFlowManager
    # Name of the list
    $list = $web.Lists["Shared Documents"]
    # Name of the Workflow
    $assoc = $list.WorkflowAssociations.GetAssociationByName("On Item Created","en-US")
    $data = $assoc.AssociationData
    $items = $list.Items
    foreach($item in $items)
    $wf = $manager.StartWorkFlow($item,$assoc,$data,$true)
    $manager.Dispose()
    $web.Dispose()
    this gives me the following error
    Exception calling "StartWorkflow" with "4" argument(s): "Value cannot be null."
    At line:15 char:28
    + foreach($item in $items) { $workflow = $workFlowManager.StartWorkFlow($item,$wor ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException
    The other PS Script
    $sourceWebURL = '<URL>'
    $sourceListName = '<List Name>'
    $TargetWorkflow = '<Workflow Name>'
    $spSourceWeb = Get-SPWeb $sourceWebURL
    $spSourceList = $spSourceWeb.Lists[$sourceListName]
    #Getting a Workflow manager object to work with.
    $wfm = New-object Microsoft.SharePoint.WorkflowServices.WorkflowServicesManager($spSourceweb)
    #Getting the subscriptions
    $sub = $wfm.GetWorkflowSubscriptionService()
    #Getting the specific workflow within the list of subscriptions on the specific list. (SP2010 associated workflows basically)
    $WF = $sub.EnumerateSubscriptionsByList($spSourcelist.ID) | Where-Object {$_.Name -eq "$TargetWorkflow"}
    #Getting a Workflow instance in order to perform my commands.
    $wfis=$wfm.GetWorkflowInstanceService()
    Foreach($item in $spSourceList){
    #Creating the dictonary object I need to parse into StartWorkflow. This could be most other workflow commands.
    $object = New-Object 'system.collections.generic.dictionary[string,object]'
    $object.Add("WorkflowStart", "StartWorkflow");
    $wfis.StartWorkflowOnListItem($WF, $item.ID, $object)}
    Which then gives me this error.
    Cannot convert argument "itemId", with value: "GUID", for "StartWorkflowOnListItem" to type "System.Int32": "Cannot convert the "GUID" value of type "System.Guid" to type
    "System.Int32"."
    At line:23 char:5
    + $wfis.StartWorkflowOnListItem($WF, $item.ID, $object)
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument

  • BTE 1030 - we use for AP documents, create an event that triggers a workflow

    Hello all,
    We use SAP's program RFBIBL00 to post AP documents.  We coded a function module that is called when BTE 1030 is reached.  Our FM creates an event that triggers a workflow.
    We are now doing some testing with an external vendor who is creating AP documents by doing an RFC  using function module BAPI_ACC_DOCUMENT_POST.
    It seems that this BTE, 1030, is not being triggered when the IDOC created by this function module posts the AP document.
    Has anybody else seen this issue and found a way to deal with it?
    Thanks
    Bruce

    AFAIK BAPI_ACC_DOCUMENT_POST and FI posting should trigger BTE 00001030 but BAPI_INCOMINGINVOICE_CREATE and AC interfacewould trigger BTE 00001050. (or is BAPI_ACC_DOCUMENT_POST also using AC interface, I will let you check it)
    Nevertheless call your FM triggered thru BTE 1030 also in a FM triggered thru BTE 1050. Also in the call check for update task
    function z_fi_00001050.
    call function 'TH_IN_UPDATE_TASK'
         importing
           in_update_task = in_update_task.
       if in_update_task eq 0 and i_xvbup eq 'X'.
         call function 'Z_FI_00001030' in update task
           exporting
             i_xvbup = ' '
           tables
             t_bkpf  = t_bkpf
             t_bseg  = t_bseg..
       else.
         call function 'Z_FI_00001030'
           exporting
             i_xvbup = ' '
           tables
             t_bkpf = t_bkpf
             t_bseg = t_bseg...
       endif.
    Regards,
    Raymond

  • Manual  triggering of notification's mail  in SOST

    Hi ,
      In standard notification type (M1) ACTION BOX " Send confirmation of Receipt", i executed the Email with user's mail id. Mail was generated.But its waiting for long time in SOST(send request) and i need to manually trigger it in SOST to send it users. Usually, mail would be sent to user without the manual triggering in SOST. But its not happening in my case. I think, some settings to be done for it.
    Can you please let me know how to sort out this issue.
    Thanks in Advance.

    Hi
    Check out these notes
    [208271|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=208271]
    [172403|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=172403]
    [189661|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=189661]
    [798476|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=798476]
    i dont think.. its gonna solve the issue... but.. check out , if u find it helpful...
    - Pithan
    Edited by: Pithan Pithan on Apr 28, 2009 3:35 PM

  • Triggering a workflow from a adobe interactive form...

    Hi,
    I am new to SAP.
    I hv to ceate a adobe form for creating CREDIT MEMO REQUEST...
    on filling the data and submitting, it should trigger a workflow, in which, the approver may approve or reject..
    if it is approved it should be updated in the database table
    and if rejected it should go to the another person.
    I know to create adobe forms.. On clicking the SUBMIT button in the form the workflow should be triggerd..
    is there any standard wokflow for my requirement or should i create a new WF.
    What is the code for triggering a workflow.... how to approach my requirement... can any one help on this please...

    *CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
    *  EXPORTING
    *    task                      = 'WSXXXXXXXXX'
    **   LANGUAGE                  = SY-LANGU
    **   DO_COMMIT                 = 'X'
    **   USER                      = SY-UNAME
    **   START_ASYNCHRONOUS        = ' '
    **   DESIRED_START_DATE        =
    **   DESIRED_START_TIME        =
    **   DESIRED_START_ZONLO       = SY-ZONLO
    **   IFS_XML_CONTAINER         =
    * IMPORTING
    *   return_code               = lv_retcode
    **   WORKITEM_ID               =
    **   NEW_STATUS                =
    ** TABLES
    **   INPUT_CONTAINER           =
    **   MESSAGE_LINES             =
    **   MESSAGE_STRUCT            =
    **   AGENTS                    =

  • Triggering the workflow after the Notification is created

    Hi Everyone,
    If the two workflow templates have the same triggering event BO: BUS7051, Event: CREATED). Both the workflows are triggered after the notification is created.
    Scenario:
    After terminating an employee notification number is created and triggers the workflow template 99900033 (Event: CREATED)
    After Promoting an employee notification number is created and triggers the workflow template 99900035 (Event: CREATED)
    My Requirement is: I want to trigger only one workflow template depending on my scenario (Termination or Promotion).
    How can I achieve this? Could you please let me know?

    please include a simple condition in SWB_COND where employment  EQ Termination for  termination event linkage (SWE2) and similary for promotion also create ne more condition and include in promotion event linkage.
    You might be having some doc type, so based on this you can achieve this.

  • Triggering of WorkFlow in Transaction CBIH12(EH&S)

    Good day All.
    We have created a customer object(transaction SWO1) for the Risk Assessment(transaction CBIH12) in EH&S. We have been looking for ways of triggering the WorkFlow for the Risk Assessment. The available user exits didn’t help.
    Is there anyone out there who has done these or advice us how to do it. 
    Regards
    Makoro Manyathela

    Thanks for the speedy response. We've tried that, but the "Change Document Object" for Risk Assessment in not included in the possible list.
    The following change document object for this transaction is CBIH_ERH for the Risk Assessment and CBIH_AC for the Safety Measure. This information can be seen in the change document CDHDR.
    Regards
    Makoro Manyathela

  • Triggering the workflow

    Dear all,
    I have copied the standard business object BUS2089-Employee trip and used in my workflow
    Now i want to trigger the workfllow when the trip is created
    Which triggering method can be used for triggering the workflow.What are the linkages has to be done.
    Thanks and Regards,
    M.Sabarinath

    Hi,
    Check this link for a step by step demo:-
    To trigger events programmatically;-
    http://****************/Tutorials/Workflow/EvtsPrg/EvtsPrg.htm
    To trigger workflow when events are triggered:-
    http://****************/Tutorials/Workflow/MaterialCreate/Page1.htm
    Best of luck,
    Bhumika

  • Multiple Manual Triggers on FAP

    Hi, we are trying to use multiple manual triggers on FAPs like an OR but it is only triggering based off of the last Manual trigger. We are using 12.2. Any help would be great.
    Thanks,

    I do not think I am articulately the issue appropriately. We are transitioning into a new system. So we will be taking XML in two formats for the next few years. The easiest way around this I thought was to just add another Manual trigger since I thought it would just act as an Or. I saw on here that it is functional and possible. I was just wondering what it is I am missing or is it a known bug in 12.2?
    I should also clarify what I mean by call. The system passes us a form name which doesn't neccessarily match the FAP name. For example, ZZ710108999 is the call but the FAP name would be ZZ710108999 or XX030797999 is the call, FAP name would be XX00030797 depending on when the FAP was made.
    DALS are just not possible for us at all in this system.
    I am working with multiple Forms and multiple Sections. This isn't a single case.

  • Binding Structure/Internal Table to Workflow from Webdynpro

    Hi Gurus,
    I have to trigger workflow from WEBDYNPRO application. For now I have two ways they are:
    1. Triggering WFLow using SAP_WAPI_START_WORKFLOW (Successfull):
    How could I bind Structure/Internal Table (DDIC referred structure) to workflow directly. Presently I am mapping indvidual fields which makes my code complex using FM SAP_WAPI_START_WORKFLOW.
    2. Triggering WFLow using SAP_WAPI_CREATE_EVENT (Bindind issues):
    Also When I try to submit using BOR event with SAP_WAPI_CREATE_EVENT workflow triggers successfully But I cannot able to bind the values. So are there any specific configuration need to be made.( like making task as General while triggering workflow using SAP_WAPI_START_WORKFLOW).
    <<text removed>>
    Edited by: Matt on Aug 5, 2011 7:49 PM

    Hi
    Please make use of the below code
    INCLUDE cntn01_swc.
    DATA lt_kna1    TYPE TABLE OF kna1.
    DATA lt_cont    TYPE TABLE OF swcont.
    DATA lv_wiid    TYPE          sww_wiid.
    swc0_create_container  lt_cont.
    SELECT * FROM kna1 INTO TABLE  lt_kna1 UP TO 10 ROWS.
    swc0_set_table lt_cont 'CUST' lt_kna1.
    CALL FUNCTION 'SWW_WI_START'
      EXPORTING
        creator                      = sy-uname
        task                         = 'WSXXXXXXXX'
        do_commit                    = 'X'
      IMPORTING
        wi_id                        = lv_wiid
      TABLES
        wi_container                 = lt_cont
      EXCEPTIONS
        id_not_created               = 1
        read_failed                  = 2
        immediate_start_not_possible = 3
        execution_failed             = 4
        invalid_status               = 5
        OTHERS                       = 6.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    The other way to do is you  can also make use of OO ABAP classes to trigger the workflow. If you want to create a rfc function module then create a wrapper function module .
    SAP_WAPI_START_WORKFLOW cannot transfer structures or tables which are more thatn 255 characters. So the work around is  either make use of  OO  container or SWCONT container.
    The above code snippet should be included in the assistance class of the webdynpro application and you need to include the define the include cntn01_swc in the class local types  under macros.
    and then you create a method ....... and include the above code in that method.   excluding the include statement.
    Regards
    Pavan

  • Multiple Events & Triggering of Workflow

    Dear All,
    I have a requirement in which -
    1) A workflow should trigger on two events i.e. 2 different tcodes, it is possible for a single workflow triggering from 2 events ?? if yes, kindly explain.
    2) The workflow should trigger on a particular date given in the tcode, like order completion date i.e. i should program the workflow for advance. How ??
    3) There is a requirement of sending mails to the respective persons in the organisation, these email-ids are stored in a z-table, how to achieve this ?
    Any assistance provided to clarify the above issues will be really grateful.
    Thanks,
    Saurabh Chauhan.

    Hello,
    1.You can trigger a workflow from two different events. In the triggering events tab of the workflow template, just specify the other triggering event as a new entry in the second line. Take care of the binding. If the events are from two different business objects, then you need to create two different workflow containers and bind them accordingly in the Event - > Workflow binding.
    2.In workflow you have conept called the start condition. If the condition is satisfied, then only the workflow will advance. What you have to do is in the business object that you use in designing the workflow, create an attribute which retrieves the date. In the screen of workflow builder, go to the basic data(ctrl+F8)...instance independent and the tab ....start events....select the event for which the condition is to be designed...click on the box beside the binding. it will show you the condition creator...compare the attribute that you have created with the required value.
    3.You can get the values in two ways...one to create an attribute and get the values from the ZTABLE, then use the same in the SENDMAIL step of the workflow. The second one would be create a mehod in which the coding to get the users from the table is executed and the list of users are exported from the method to the workflow template. You have the facility to create an element fo multiline. Use it.
    Hope this will help.
    Regards,
    Sam

  • Triggering a workflow when the payment proposal F110 is confirmed/finished.

    Hi All,
    Please kindly give me your good advices that how can I start to create a workflow for payment proposal F100. The requirement is that after the payment proposal has been confirmed and completed. It needs to be triggered and automatically send out an email notice for the those vendors, the vendor email address is collected from vendor master record FK03.
    I guess it can use REGUH-XVORL, If "X" means that this is proposal record only. If " " means that it's not a proposal record, which should be a confirmed record yet.
    Please kindly instruct me how to get this task done, since I am a fresher SAP and workflow.
    Thank You Very Much.
    JC

    Hi,
    I have exactly the same requirement.  I need to trigger a workflow when the payment proposal is completed. 
    I've been searching for the answer on the internet.  Several people have asked the same question, but I haven't seen any real answer to the question yet. 
    There is no standard SAP business object for payment proposal, there is one for payment request which uses F111.  There is no standard workflow template, the one for payment release is only for releasing individual invoice.  There are answers about restricting the authorisation, it helps, but it doesn't meet all requirements.  We have people create payment proposals in UK for companies in Europe.  We really need a workflow resolution.  Seperating the authorisation will still require the person who created the proposal sending email to people in different countries to approve the payment.
    Two technical problems that we are facing. 
    1. There is no existing business object. I've been told that we should should ABAP Class.  And include the IF_WORKFLOW in the interface.
    2. There is no event created when the payment proposal is completed.  We are working on creating an event.  I've been told to use SWE_EVENT_CREATE function module. 
    If you have more information about how this can be done, or if there is any easier way, please let me know.  I will be very grateful.
    Thanks,
    Manlee

  • Completion of one workflow is triggering another workflow

    Hi Experts,
    I am facing a wierd issue. I have created a workflow to approve/reject a contract. In the start condition I have maitained a container attribute to check is the agent is not WF-BATCH AND activity type = 00001under conditions  there is only one event that is triggerred in all scenarios.
    Also to remove the workitem for the approvers inbox when the contract is settled/reversed directly from the transaction i have used an event step and a process control step within a loop.
    Everything is working fine in development system, but im facing a weird issue in QA.
    Once the workitem is approved the workflow is completed, but it is starting another workflow for the same contract number and when i check the containers that i hv used under conditions, those do not match.
    i.e the agent is WF-BATCH and activity type = 00000 . Then how come the workflow is started again ?
    Can any1 help.
    BR,
    Aaarvi.

    Hi Swami,
    Thank you for the quick response.
    I just found that, in my development system in event linkages a check fucntion module SWB_2_CHECK_FB_START_COND_EVAL is used, whereas the same is not used in QA.
    Can this be causing the issue by any chance?
    Aarvi.

  • Need to restrict triggering of workflow only once(first time).

    Hi guys,
    I hv a requirement to trigger the workflow only once(first time).
    whatever is the the condition/changes in document, it should not trigger for second time.
    do we hv any options available for this........
    thanks in advance...
    santosh.

    Hi susan,
    Below is the requested information,
    Release : ECC 6.0
    we are working on custom WF for ECO creation(CC01).
    Description,
    ECO is created in SAP by legacy system, thru bapi CCAP_ECN_CREATE, the WF will take the editing of the material in that ECO to different departments like MRP, accounting, sales,quality etc.... & respectively creates the views.
    we cannot use CREATE event, bcos first the ECN(CC01) is created by bapi & further bapi creates the material & inserts it into ECN again, which is CHANGING the document. once this is done, our WF should trigger.
    As we dont have CHANGE event in ECM BO, i am using CREATE event & settting it for ON CHANGE in SWEC t-code.
    Bottomline is , it is triggering as soon as any changes happens.
    But, we want it to restrict for one time triggering.
    Regards.
    santosh.

Maybe you are looking for

  • Metadata issue in PPro - UserClipName populates in Metadata and won't go away

    I have P2 footage that is behaving oddly in PP - PPro CS6.  I am on a PC, using Windows 7 Professional. Footage was shot and archived onto our PC last summer - as is our typical process - and a PP project was started. It was left dormant till now - 6

  • How can I get CS4 tools to work in Open GL?

    Facts--Bought CS4--installed fine--problem noted with pop up that my video card needed upgrading--looked on Adobe site for suitable video cards, talked with Dell--installed nVidia G9500 which I was told should solve all problems--reinstalled PHOTOSHO

  • How to Get Top 10 records using SQL select statement.

    :-) Hiee E'body, I want to generate a sql report in which I only want the top 10 records based on the numeric value of a column. For Example, To generate a Location Wise, Employee Wise Years of Service Report. Here I need the Top 10 Employees accordi

  • Server error when calling the DatabaseController.replaceConnection() method

    <p>I am receiving the error message below when calling the DatabaseController.replaceConnection() method. Can anyone tell me what may be the cause of this? The code being executed is below the error message. </p> <p> Thank you. </p> <pre> A server er

  • Unknown error 0xE8000084 for ipad

    Ipad 2 suddenly stopped working. I forced the Ipad into recovery mode and restored it according to the directions, but instead of restarting at the end of the restore I get this error. I tried SO many suggestions that I found online but nothing seems