Workflow  function modules

I have a problem in my workflow email
creator submitted a request to approver through workflow.
work flow needs to send an email to approver that part is working fine for me.if request approved or rejected workflow needs to send an email to creator that part is not working for me.
is there any function module or class to send email to creator if something is there please let me know.
Thanks,
Message was edited by: priya katragadda

Hi Priya,
You can create a worflow container element which will have ID of request creator.
Pass this element with value of request creator as input to your task which will  send mail. Your task have to used requestor ID to determine whom to send the mail.
Since you have already done half part ie. to send mail to Approver it will not be uch difficult ot send mail to Request Creator.
Regards,
Pl. reward useful replies.

Similar Messages

  • Send ABAP Report as an Attachment with Workflow Function Module

    Hi all.
    Hopefully someone ever experienced with this requirements.
    My requirements to send ABAP Report result to user as an attachment. Together with this attachment user need to receive work item/notification. Single workflow task has been defined based on SELFITEM object type to send workflow notification and its attachment.
    Function module for this requirement is SWU_START_WORKFLOW. And this function module provide table parameter ATTACHMENT_LIST.
    My question how to pass this ABAP report result/ ABAP internal table into this ATTACHMENT_LIST?
    Thanks in advance

    check the help on the SUBMIT statement ther are options to write the report to memory or spool.
    Kind regards, Rob Dielemans

  • Function module for getting information about position workflow

    Hi,
    Version SRM 4.
    Only approval WF (workflow for position WS145000015), my customer needs a report with fields about approvers and times.
    We have implemented it mainly using the FM BBP_PDH_WFL_WI_FROM_OBJECT_GET and considering the task (WI_RH_TASK=TS14508044) there we get the agent.
    But when the approver approve or reject we have not seen how we can get the information specific for each position
    We need to know programatically how to get who is the approver for each position when he approve and we reject.
    Does anybody know what funcion modules, methods we can use
    Thanks
    Best regards
    Jorge

    Before creating any customer reports, first check standard transaction SWI5, this workload analysis tool is very powerful and gives an immediate insight in the business processes.
    for custom reports you have to use a couple of the SAP_WAPI_* function modules to safely retrieve all the data you need.
    Kind regards, Rob Dielemans

  • Better way of Sending E-Mail Notifications -- Workflow or Function Module ?

    Hi All,
    I have an implicit enhancement written in a t-code and based on some conditions I am creating event which inturn will trigger the workflow which inturn send e-mail notification via send mail step.
    My question is:
    Which one of the ways is better in terms of performance or overhead to send an e-mail notification. (There are no Approval processes in the workflow.. Just One Step E-mail Notification).
    1) In the Implicit Enhancement, Trigger an event which inturn will trigger the workflow and e-mail is sent via send mail step.
    2) In the Implicit Enhancement, Send the e-mail notification via standard function modules available... such as
       "SO_OBJECT_SEND", "SO_DOCUMENT_SEND_API1".........
    Would be grateful if someone can post the Advantages and Disadvantages in the above 2 ways of sending e-mail notifications..
    Regards,
    PR.

    Just to throw in some additional factors, consider exception handling:
    An event-based send mail step is decoupled and thus independent of your application. This means your exception handling is separate. It means you do not need to hold up the transaction if there is a failure. All this depends on how important the mail is. You could of course add validation code to ensure the mail address is valid and send it elsewhere if not.
    Regarding performance, consider how often this happens. If it's an infrequent occurrence then I wouldn't worry about performance. Hundreds or thousands a day is a different story.
    So the answer is:
    Workflow for low-volume scenarios (low performance impact) that are important (better error handling in WF),
    Direct mail for high volume and noncritical
    In between these, use whatever you like
    One more thing to perhaps consider the future. What are the chances of the mail being replaced by a work item in furture? Sometimes it's only by observing a process after go live that you can identify the best solution. e.g. you may decide to replace the mail with a "Please go fix this" work item because you need deadline monitoring

  • Type RAW not accepted in function module for workflow

    Hi,
    this is a crazy thing for me:
    I like to start a workflow from a report.
    Usually will use the function module SWU_START_WORKFLOW".
    Usually this is no problem.
    Here is my current problem:
    One of the elements I have to transfer to workflow is defined with
    ZELEMENT like SXMSMGUID.
    SXMSMGUID is from type RAW.
    This type is not supported in the container element transfer.
    Tried to transfer it as CHAR.
    ZELEMENT type c,
    ZELEMENT = SXMSPEMAS-MSGGUID.
    So put the RAW element into a char element.
    Error in function module:
    Program error: ASSIGN with length 0 in program "SAPLSWA8".
    Error analysis
        An ASSIGN statement in the program "SAPLSWA8" contained a field symbol with
        length 0. This is not possible.
        length 0.
        This is not possible.
    I need that element to be transferred to the workflow.
    But how to solve that problem?
    How to move the RAW element readable into a char element (This type usually is no problem in the FM)
    Any ideas are welcome!
    Best regards
    Dirk

    ya i know that ..But I wanted to create a simple one..moreover the problem is not with bdc....It is with the function module interface..
    Also I want to ask a question that I had to define all the parameters (in the function module ) by data declaration statements in the function group top include..
    If i dont do that say the first error is when i write loop at idoc_contrl ..idoc_contrl is not declared by a data statement..So IO had to write a data statement:
    Idoc_contrl type table of edidc..I have seen that in other function modules (idoc inbound processing)  no such data declaration is done..

  • Function module to find list of workflows for a document

    Hi
    Is there any standard function module where I can get list of active workflows for a document ?
    example : for business object FIPP I have a document number, fiscal yr and co code. I need to get like of workflow instances for it.
    what we do in SWI6 or in display transaction - services for objects - workflow overview.
    I need find function module as I need to call it in a user exit.
    thanks
    bhakti.

    Hi,
    Concatenate the fields in the following order:
    1. SourceCompanyCode
    2. DocumentNo
    3. FiscalYear
    Use
    CATID = 'BO'
    TYPEID = 'FIPP'
    INSTID = Concatenated value
    in SWW_WI2OBJ to find TOP_WI_ID. Use this TOP_WI_ID  as an input Parameter TOP_WI_ID of table SWWWIHEAD.
    This will give you all workitems for your Document.
    Regards
    Gautam
    Edited by: gautam maini on Jul 7, 2011 2:23 PM

  • Workflow Agent Function Module

    I am trying to develop a workflow for the approval of CATS time entries. Users will enter their time data and specify a receiving maintenance work order (CATSD-RAUFNR). The approver of the CATS time entry should be the user ID identified in the Partner tab of the maintenance work order identified in the CATS record.
    I am trying to determine the agent in a workflow task based on a default rule for agent assignment. My idea was to capture the work order number (stored in table AUFK) from the CATS entry, then reference plant maintenance partners table (IHPA) to get the user id to use as the agent in the workflow.
    I have developed a function module that works when testing it in the function builder, but when I try to test it in the "Maintain Rule" transaction (PFAC_CHG), it does not work. Can anyone let me know how to make this code work in the Maintain Rule simulation?
    Here is my code for the function module:
    FUNCTION Z_GET_WO_PARTNER.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(ORDER_NUMBER) TYPE  AUFNR OPTIONAL
    *"  TABLES
    *"      ACTOR_TAB STRUCTURE  SWHACTOR
    *"      AC_CONTAINER STRUCTURE  SWCONT
    *"  EXCEPTIONS
    *"      NOBODY_FOUND
    *INCLUDE .
    TYPES:  BEGIN OF PLANT_MAINT,
              OBJECT     TYPE  IHPA-OBJNR,
              PARTFUNC   TYPE  IHPA-PARVW,
              PARTNER    TYPE  IHPA-PARNR,
            END OF PLANT_MAINT.
    TYPES:  BEGIN OF ORDER_MASTER,
              ORDER      TYPE  AUFK-AUFNR,
              OBJECTN    TYPE  AUFK-OBJNR,
            END OF ORDER_MASTER.
    DATA: WA_MAINT  TYPE  PLANT_MAINT.
    DATA: WA_ORDER  TYPE  ORDER_MASTER.
    DATA: ITABIHPA TYPE STANDARD TABLE OF PLANT_MAINT.
    DATA: ITABAUFK TYPE STANDARD TABLE OF ORDER_MASTER.
    DATA: PARTNERVAR  TYPE  STRING.
    DATA: OBJN TYPE STRING.
    Get object number from order master
    SWC_GET_ELEMENT AC_CONTAINER 'OrderNumber' ORDER_NUMBER.
    CLEAR: ACTOR_TAB.
    REFRESH: ACTOR_TAB.
    SELECT SINGLE AUFNR OBJNR FROM AUFK INTO WA_ORDER
         WHERE AUFNR = ORDER_NUMBER.
    IF SY-SUBRC NE 0.
        RAISE nobody_found.
    ENDIF.
    OBJN = WA_ORDER-OBJECTN.
    *get Partner field (system user id) from Plant Maintenance: Partners table
    SELECT SINGLE OBJNR PARVW PARNR FROM IHPA INTO WA_MAINT
              WHERE OBJNR = OBJN AND PARVW = '§G'.
    IF SY-SUBRC NE 0.
        RAISE nobody_found.
        ELSE.
            ACTOR_TAB-OTYPE  =  'US'.
            ACTOR_TAB-OBJID  =  WA_MAINT-PARTNER.
            APPEND ACTOR_TAB.
    ENDIF.
    ENDFUNCTION.
    (sorry about the poor ABAP code...)

    To my guess, the function module interface is incorrect. The function module should contain only the following interface:
    ""Local Interface:
    *"  TABLES
    *"      ACTOR_TAB STRUCTURE  SWHACTOR
    *"      AC_CONTAINER STRUCTURE  SWCONT
    *"  EXCEPTIONS
    *"      NOAGENT_FOUND
    You seem to be passing an order number. you need pass container elements using the table AC_Container and cannot send it directly. For further information, look at the following tutorial:
    http://www.****************/Tutorials/Workflow/Rules/Create.htm
    Hope this helps
    SS

  • How to call a function module from a workflow ? ?

    hi all,
    i have to call a function module from an workflow, i got a hint from someone that i have to enhance an object and then write and methode, in this methode i can call that function module. I dont know even how to go for it.
    Can anyone suggest that how to go for it ?
    thanks.
    raman khurana.

    Hi Raman Khurana,
    Please  go through the links it might be helpful , notsure
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/e4af8b453d11d189430000e829fbbd/content.htm
    http://www.abapcode.info/2007/07/standard-function-module-text.html
    http://it.toolbox.com/wiki/index.php/SAP_Workflow
    Regards,
    Sreekar.Kadiri.

  • Requirement to call Function Module in Workflow

    Hi,
    I have been assigned to task wherein i have a requierement like this . I have created a workflow with step user decision with 2 options. Now the thing is that when user select one of option i need to call function module and based on result from
    workflow i need to done further processing. Since there is no event to trigger workflow i am using function module
    SAP_WAPI_START_WORKFLOW to trigger workflow .
    Kindly suggest me how would i call Function module in workflow. i.e. What are the ways( or by which step type facilitate
    me to call FM ) by which i should call FM and do further processing based on result.
    Thanks
    Parag

    Follow the below steps inorder to call a fucntion module from the workflow
    1. First you have to create either a business class or a Business object.... from SWO1 txn..
    2. Create a method in the BOR and while created the system will prompt a message that would you like to create by using any FM here you need to specify the name of the FM that you want to use in the workflow...
    3. ONce the method is created and the code will be generated automaticlaly by the system.. and then you have to create a standard task from PFTC txn..
    4. Once the task is created then you have to use the same task in the workflow.. by creating a activity step ...
    That's all..

  • Is there any function module to trigger workflow template

    Hi,
    I have created a workflow template in tcode PFTC, which i am using to send email, this workflow needs to be triggered once the document is posted, there are no events being triggered at that stage, My query is 'Is there any function module to trigger this workflow template from the user exit'?.
    Thanks in Advance
    Santosh

    Use FM
    SAP_WAPI_START_WORKFLOW.
    or if you have triggering event for the wflow use
    SWE_EVENT_CREATE
    SAP_WAPI_CREATE_EVENT
    Thanks
    Arghadip

  • Error when workflow created from Function Module

    Hi All,
    I am trying to implement leave module workflow for one of my requirement.
    when i create a leave from PTARQ transaction workflow it is being triggered, but when i tried to do the same from a custom function Module using the same FMs used in PTARQ, workflow initiated but stopped at initial stage( at switch branch )
    i went to SWI1 transaction and executed it manually, it end up with error saying ' Error when starting a SWITCH branch'
    what should i do to move it forward.
    Thanks,
    Krish.

    Hi Kishore,
    For leave workflow, SAP has the separate frame work. They called the FM SAP_WAPI_START_WORKFLOW and pass all necessary data's to Process the leave workflow.
    Its not advisable to overwrite the standard behavior. Please check your 'REQ' workflow container in the log. There will be a no data or Some data's might be Missed.
    Before Call the FM, make sure that all data's are passed to the Table parameter, SImple_Container.
    The reason for the Error in your workflow is, there is no data stored in REQ.STATUS container.
    please check the Workflow log.
    Thanks.

  • Identifying function modules in standard workflow

    Dear Experts,
    I have a standard workflow WS17900427. I want to know the list of function modules that are used in this workflow. Where can i see this in swdd.
    Regards,
    Bharath
    Edited by: bharath padmanabhan on Jan 12, 2009 11:04 AM

    Dear Jagdish,
    Thanks for your reply.
    "Also you can check the function module used in the rule to determine the agent".
    Can you kindly please clarify me how should i check the function modules used.I am not able to find out where i should check it.
    Regards,
    Bharath
    Edited by: bharath padmanabhan on Jan 12, 2009 1:42 PM
    Edited by: bharath padmanabhan on Jan 12, 2009 1:42 PM

  • Function module for Appraiser Raiting in HR Workflow

    We are running workflow with template 10004361. We need a report showing emlpoyee id  and the appraisal rating. Which function module (or database table )
    contains these two fields?

    Hi,
    Check database table PA0025.
    Regards,
    Ramu N.

  • Unable to create rule Error:Function Module does not meet the workflow conv

    Hi Workflow experts,
    Could any one help me with rule creation. Below is my Function Module Interface.
    ""Local Interface:
    *"  TABLES
    *"      AC_CONTAINER STRUCTURE  SWCONT OPTIONAL
    *"      ACTOR_TAB STRUCTURE  SWHACTOR OPTIONAL
    *"  EXCEPTIONS
    *"      NOBODY_FOUND
    The function module test is successful with all required conventions for workflow but while i try to create a rule with the funtion module i get the error "Function Module does not meet the workflow conventions"
    I Also have included the following in FM
    INCLUDE <cntn01>.
    Any suggestions would be helpful. Thanks in Advance,
    Imran

    Hi,
    I am not sure whether the rule accepts the optional flag. Remove the optional flag for the tables parameters and try again. According to the documentation you have implemented the right interface. It might be the issue with the tables parameter being optional.
    Hope this helps,
    Sudhi

  • Function module - object - workflow(complicated to explain:))

    Hello,
    I have a problem.
    I created in se37 the function ZRR_ACTORS. I have as the import parameter PRNUMBER with type BAPIEBANC-PREQ_NO. As an export parameter i have RECIPIENT with type BAPIEBANC-REASON_BLOCKING( i have not found an appropriate type for the recipient that works in a function module for the object, so i used this..i do not think that is the problem).
    The code is:
    data:begin of gs_eban,
      menge type eban-menge,
      preis type eban-preis,
      end of gs_eban,
      gt_eban like table of gs_eban,
      gv_sum type i,
      gv_aux  type SWD_MRCPNT.
    select menge preis from eban into TABLE gt_eban where banfn = prnumber.
    loop at gt_eban into gs_eban.
      gv_sum = gv_sum + gs_eban-menge * gs_eban-preis.
      endloop.
    if gv_sum > 20.
        select single recipient from zteam_approvers into gv_aux where zuser = 'xxxx.
        else.
        select single recipient from zteam_approvers into gv_aux where zuser = 'yyyy'.
          endif.
    recipient = gv_aux.
    As you probably see, i am sending this function the purchase requisition number. In the function I am calculating the value of the purchase requisition. If the value is bigger then 20 i want the recipient to be the email adress of the user xxxx. Else the other email. zteam_approvers is a table with users and their emails.
    When i test this function everything is ok.
    I created subtype for object BUS2015(purchase requisition), called ZBUS2015. Here i created a method which uses the function ZRR_ACTORS. I released it and after that i selected in swo1 BUS2015 and delegated ZBUS2015. So now when i test object BUS2015, i can use method ZRR_ACTORS which contains the function module ZRR_ACTORS.
    If i test this object, the method ZRR_ACTORS works fine. I give the method the number of the purchase requisition and it returns me the user xxxx or yyyy.
    Now, i created a workflow. In this workflow i want to send an email to the user xxxx or yyyy. So i have to execute the function ZRR_ACTORS. I create an activity(zrr_activity) in the new workflow. In it, i create a new task(zrr_task) in the activity with object category BUS2105 and method ZRR_ACTORS. I am setting this method as a background method, because after the execution of the function i want to create a Send email step, with the recipient being the one of the emails.
    My problem is the binding. In the workflow container i set the PRNUMBER as an import parameter and the Recipient as an export parameter.
    In the binding of the step(zrr_activity) i set the following bindings:
    Workflow                           STEP
    &PRNUMBER&  ->  &PRNUMBER&
    &BUS2105&  ->  &_WI_OBJECT_ID&
    &RECIPIENT&  <-  &RECIPIENT
    If i click in the activity, in the task i created(zrr_task), in the object method i set the bindings:
    Task                                 Method
    &PRNUMBER&  ->  &PRNUMBER
    &RECIPIENT&  <-  &RECIPIENT&
    I run the workflow. Now i enter the PRNUMBER 0010000420, but it remains 10000420 (maybe this i because of the type PREQ_NO.) and execute.The task has the status In Process. I click on Workflow log, then on list with technical details, and then in the container, i see the Recipient is empty.
    So, i think the function did not work properly. What do you think?
    Thank you very much,
    Efren
    Edited by: Efren23 on May 30, 2011 7:31 PM

    Hi Efren,
    Go to transaction ST22 and check for any dump.
    The work item is in process, so there will be a dump in the system.
    The Function module parameters could be a problem.
    ST22 transaction will give you details about the dump.
    Thanks,
    Viji.

Maybe you are looking for

  • After changing my battery, everything disappeared?!

    My battery on my macbook completely died so I bought a new one and replaced it. For the first hour everything was fine and I let the computer die. I charged all night, woke up this morning and turned the computer on. Everything was gone and it reset

  • Split up dashed line in segments

    Hi, I have a dashed line and I want to split this up into its single segments. I tried to create the outlines of the path and released this group - but this was not the result I wanted: I still want single line segments that I can handle as a single

  • Programmatically creating VM from already created image using Java

    Hello. I am writing a Java program to create VMs from already created VM images. I was able to create through the web portal. I am using the API given here http://msdn.microsoft.com/en-us/library/jj157194.aspx The request sent is <?xml version="1.0"

  • Derby and case (in)sensitivity

    Hello, from my present understanding it looks to me that all queries in Derby are case sensitive. Is there a way (I did not discover yet) to make case insensitive queries such as SELECT * FROM table WHERE name="washington" although the actual db-entr

  • Object FollowerI

    I am making a flash game using actionscript 2 and need a symbol to 'follow' another on the y axis. I have used this code onClipEvent (load) {   _y = 0;   speed = 5; onClipEvent (enterFrame) {   endY = _root._ymouse;   _y += (endY-_y)/speed; But am un