Triggering workflow through Z transaction

Hello All,
My requirement is to trigger the JE workflow with Z tcode and after the document is approved & posted I have to put check that if the workflow has started with that z tcode then I have to create billing document, clearing document etc.
My Questions is: Can we trigger the workflow with Z tcode and after the approval and posting - can we find out that with which z transaction the workflow has been triggered?
Kindly suggest.
Regards,
Sangeeta

I want to know- how do I find that after the document posting whether
the workflow has started with ZGUPPARK or not.
1. Create a container element in the workflow as a flag ( REP_FLAG ) populate this as 'X'from the report.
2. Assuming that you are trying to trigger the workfloe by using the FM 8SAP_WAPI_START_WORKFLOW* in this fm if you look at the table parameters you have SIMPLE_CONTAINER of type SWR_CONT by this you can populate the field which is created in the WF.
try like this
DATA:
          lt_cont       type table of  SWR_CONT,
         ls_cont       type               SWR_CONT.
ls_cont-element  = 'REP_FLAG'.
ls_cont-value    =  'X'.
APPEND ls_Cont t to lt_cont.
now pass this lt_cont to the FM tables parmater this will fxi your issue and you can identify it.

Similar Messages

  • Triggering workflow through an upload file

    Hello All,
    My requirement is:
    If transaction ZGUPACCR is started, it is based on an upload text file. The transaction should start a WF for approval before it posts the document. The text file that was approved would have to be stored as an attachment to the SAP document. In case of a rejection, the posting should be aborted and a message should go to the initiator to change the accrual upload file and restart the whole process for approval. The approver identification will  be rule based.
    Which BO & event should I use to trigger the workflow?
    Can I send the text file as an attachment to the approval workitem? How can this be accomplished?
    Thanks alot in advance!!
    Regards,
    Sangeeta

    Hi,
    I'm not sure whether ther is any  BO & event. If not start with custom BO & Event.
    1- Create a prgam and  assign the same to tcode.
    2- Create custom BO& Event.
    3- Create the WF temeplate
    4- Create Rule for Approver Identification
    5- Step to send mail to the Approver using the Program exit (Where the step will waiting for the Approver's decision)
    6- If yes, post the file else send the rejection reason.
    Please close the thread, if solved
    Regards,
    Aditya

  • Triggering workflow through MIGO in output type

    Hi Friends,
                  After the GR Documents are posted, I need to Trigger GR  Workflow......
    Please guide me any Function modules or BAIDs
    to keep our code once the MKPF and MSEG DB Tables are updated with recently Created new Documents....
    Can we Assign our Workflow Template in the OUTPUT Type in NACE.
    If so, Please Guide me with the OUTPUT Type configuration Steps
    Thanks in Advance,
    Ganesh

    I think you can use standard Buiness object BUS2017. While creating the document please check which events gets trggered in SWEL. I am sure the Created event of this Business object gets triggered.
    Thnaks
    Arghadip

  • Triggering workflow through IDOC

    Hi Guys,
    Please help me with this issue,
    I have got a requirement where i need to trigger the worklfow through the PDM (Product data management) its a different system in all, this creates material master with views that basic data 1 and 2. Through an idoc this information is passed to the ECC. Now i want to trigger the workflow if the material is created by PDM. I want to know is there any way where i can trigger the workflow by the help of idoc that is passed between PDM and ECC
    Thanks and Regards,
    Rajlaxmi singh
    Edited by: Mrunal Patil on Jun 11, 2009 3:05 PM

    Hi,
    I think you can go for enhancement.
    You can try enhancing the BADi BADI_MATERIAL_ALE_CR. Call Function module SAP_WAPI_CREATE_EVENT in this BADi and pass your BO name, Event name & IDoc No.
    Hope it helps.
    Regards,
    Raj

  • Triggering workflow template through any transaction

    Hi,
    what is he procedure to be followed so that I can trigger workflow template through any transaction code, the requirement is to create a module pool program and that program should trigger a workflow template, so my question is what all classes have to be called that will trigger the workflow template.
    Thanks and Regards,Neerup.

    Check the following links:
    http://www.sapbrainsonline.com/TUTORIALS/TECHNICAL/WORKFLOW_tutorial.html
    http://www.sap-img.com/workflow/sap-workflow.htm
    http://sapmaterial.com/workflow.html
    http://****************/Tutorials/Workflow/Workflow.htm

  • Triggering a workflow through a dialog program

    I tried to trigger a workflow through a dialog program using FM. I also created BOR and workflow(SWDD). The dialog program basically deletes a sales order and then a workflow should trigger.  I am not able to see the email. Am I missing anything here?
    Pls find below the coding..'ZCSS_SO1' is the BO.
    Data : g_objtype LIKE SWR_STRUCT-OBJECT_TYP,
    G_OBJKEY LIKE SWR_STRUCT-OBJECT_KEY,
    G_EVENT LIKE SWR_STRUCT-EVENT.
    data begin of l_input_container occurs 0.
    include structure swcont.
    data end of l_input_container.
    data: v_vbeln like vbak-vbeln.
    g_objtype = 'ZCSS_SO1'.
    g_event = 'DELETE'.
    G_OBJKEY = 'SALESDOCUMENT'.
    CALL FUNCTION 'SWC_ELEMENT_SET'
    EXPORTING
    element = 'ELEMENT'
    field = 'VALUE'
    tables
    container = l_input_container.
    CALL FUNCTION 'SWE_EVENT_CREATE_IN_UPD_TASK'
    EXPORTING
    objtype = g_objtype
    objkey = G_OBJKEY
    event = g_event
    tables
    event_container = l_input_container.
    commit work.

    Hi Chandri,
    You can firstly check whether the code you have written below is triggering the BO event or not by switching on the trace using transaction SWELS , then running the transaction (dialog program mentioned below). After, switch off the trace and then view the trace from transaction SWEL.
    Your BO and event should show up in the trace.
    Regards,
    Aditya
    p.s. also for the mail, check what method u are using?

  • Mail triggering through NACE transaction.

    Hi all,
    I  have a requirement of triggering mail when BOM(CS01) is created on SAVE save event.
    Can any body tell me if it is possible through NACE transaction.(I need to add some more conditions also) and if yes how to do it.
    Thank you.

    Hi,
       Check the below link which is of similar kind of requirement.
    RFQ mail sending
    Thanks,
    Asit Purbey.

  • Triggering of workflow by start transaction

    hi all,
    how can i trigger my workflow by start transaction method??
    advance thanks
           regards
           SANA

    <u><b>Transactions for Workflow Start</b></u> :
    Use
    The workflow system can generate a form transaction for workflows that have a structure as an import parameter. Data can be entered in the fields of the structure with the form transaction and the workflow is then started.
    You can edit this transaction at a later date using the ABAP Workbench, for example to change the names of input fields or adapt the layout.
    If you select a workflow in manual workflow start for which a form transaction is defined, this form transaction is executed. The workflow system responds in the same way if a start transaction had been created for the workflow in an earlier release. For more information, see Starting Workflows Manually.
    Features
    The workflow system generates a form transaction for a workflow with a structure as an import parameter to start this workflow. The input fields are derived from the fields of the import structure of the workflow container.
    The workflow system generates the name of the transaction automatically from the ID of the workflow. The workflow system also generates the name of the function group automatically if you do not specify anything on the Function group tab page.
    Activities
    You generate a form transaction in the basic data of the workflow in the Workflow Builder. To do this, select  on the Start forms tab page in the version-dependent basic data. You can also process existing start forms from here. For more information, see Version-Dependent Basic Data of a Workflow.
    If a start transaction was created for the workflow in an earlier release, you can also edit this in the version dependent basic data on the Start form tab page.
    You can use the Screen Painter functions to revise the transaction generated. For more information, see  Screen Painter.
    If you want to change the user interface status of the transaction generated, you must define a separate user interface status. You can use the user interface status DYNPRO as a model.
    If useful.......reward points...
    Regards,
    Bhaskar

  • BAPI for Vendor Non-PO Invoice processed through MIR7 Transaction

    Hi All,
    I have a requirement where i will get data from flat file. Using this data Vendor Non-PO Invoice
    will be processed through MIR7 transaction with Multiple line items - Invoice Upload Parking the document for vendor non-po invoices.
    The data is in below format in flat file:
    Header fields in 1st line
    Dr. Key related fields in 2nd line
    Cr. Key related fields in 3rd line
    Header fields in 4th line
    Dr. Key related fields in 5th line
    Cr. Key related fields in 6th line
    etc .... in flat file
    In these main fields coming in from flat file are: comp.code, doc.type, vendor no,
    Debit/Credit indicatorSHKZG, G/L a/c no, inv/post dates etc..
    My issues:
    1. I am planning to use F.M BAPI_INCOMINGINVOICE_PARK is it the correct F.M!
    But Here PO number seems to be mandatory for this F.M but it is not available as per our flat file,
    if so can anybody suggest a BAPI for Vendor Non-PO Invoice parking for MIR7 transaction!
    2. What are the parameters need to be used for from above flat file data especially for 2 line itemshttp://Dr./Cr. data other than header data. So as per Header & 2 Line items http://Dr. & Cr. Data which parameters will be updated with which data in above flat file! can anybody clarify!
    3. Also in flat file WorkflowNo is available in which parameter this fields will need to be filled & also by doing this will it trigger workflow automatically!
    Can anybody clarify about above points!
    Thanks in advance.
    Thanks,
    Deep.

    Hello Deep,
    I know it might be quite late for you for this answer, nevertheless I will write that, because there are lots of question like yours. bapi_incominginvoice_park is also a suitable bapi for you. All you need to do is call it this way:
    data: headerdata like bapi_incinv_create_header value is initial,
            table_item type table of bapi_incinv_create_item,
            gl_account like bapi_incinv_create_gl_account,
            table_gl type table of bapi_incinv_create_gl_account.
    * fill headerdata and table_gl, leaving table_item empty
    CALL FUNCTION 'BAPI_INCOMINGINVOICE_PARK'
        EXPORTING
          HEADERDATA                = HEADERDATA
    *   ADDRESSDATA               =
        IMPORTING
          INVOICEDOCNUMBER          = lv_docnr
          FISCALYEAR                = lv_year
        TABLES
          ITEMDATA                  = table_item
    *      ACCOUNTINGDATA            = table_acc
          GLACCOUNTDATA             = table_gl
    *   MATERIALDATA              =
    *      TAXDATA                   = table_tax
    *   WITHTAXDATA               =
    *   VENDORITEMSPLITDATA       =
          RETURN                    = lt_return.
    This works perfectly for me, creating a mir7 document without refering to a PO. The trick here is to fulfill the glaccountingdata importing table while leaving itemdata empty.

  • Details for triggering workflow on changing material

    Hi Experts ,
    I am triggering workflow BUS1001006 for creating/changing material .
    Is it possible to get the details that has been changed in the material using this ?
    Is there any other way to get the fields changed in MM02 for a material through
    workflow ?

    Hi
    Check the business object all the attributes in the log. If you get its fine if not create an attribute write your logic in that for changed material.
    Regards
    vijay

  • Send pdf file to workflow through web dynpro.

    Hi All,
    I have a web dynpro component, with this component i am raising a request, which will go to multiple level of approvals(for this triggering workflow from web dynpro).
    Now i want to send a pdf file as an attachment to approvers work items.
    For this i have used File Upload UI element, and i have binded data property of this upload UI element with an attribute of type Xstring.
    Now can you please help me to send this file to workflow.
    I am able to send a pdf file as an attachment through executable report (SE38), but same functionality is not working from web dynpro.
    Code used in executable report is as below:
    DATA: t_data_tab TYPE TABLE OF x255,
    bin_size TYPE i,
    buffer_x TYPE xstring,
    buffer_zip TYPE xstring,
    filename TYPE string VALUE 'C:\Documents and Settings\My Documents\Downloads\IT.pdf'.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename                      = filename
    filetype                      = 'BIN'
    IMPORTING
    filelength                    = bin_size
      HEADER                        =
    TABLES
    data_tab                      = t_data_tab.
    **get xstring
    CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
      EXPORTING
        input_length = bin_size
      IMPORTING
        buffer       = buffer_x
      TABLES
        binary_tab   = t_data_tab.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ZSWR_ATT_HEADER-FILE_TYPE = 'B'.
    ZSWR_ATT_HEADER-FILE_NAME = 'FORM-407'.
    ZSWR_ATT_HEADER-FILE_EXTENSION = 'PDF'.
    ZSWR_ATT_HEADER-LANGUAGE = 'EN'.
    WORKITEMID = '000000401208'.
    CALL FUNCTION 'SAP_WAPI_ATTACHMENT_ADD'
      EXPORTING
        WORKITEM_ID          = WORKITEMID
        ATT_HEADER           = ZSWR_ATT_HEADER
      ATT_TXT              =
        ATT_BIN              = buffer_x
       DOCUMENT_OWNER       = SY-UNAME
       LANGUAGE             = SY-LANGU
       DO_COMMIT            = 'X'
    IMPORTING
      RETURN_CODE          =
       ATT_ID               = ZSWR_ATT_ID
    TABLES
      MESSAGE_LINES        = SWR_MESSAG
    *MESSAGE_STRUCT       =
    if sy-subrc = 0.
    else.
    endif.
    But function "GUI_UPLOAD" is not working in web dynpro.
    Regards,
    Amar

    HI,
    Try out this code :
    FileInputStream is = new FileInputStream(file);
          long length = file.length();
          byte[] bytes = new byte[(int)length];
          long bytesRead = is.read(bytes);
          if (bytesRead < length)
           throw new IOException("Could not completely read file "+file.getName());
          is.close();
    element.setDocumentContent(bytes);
    Create a context attribute of binary type and assign the read data to it and bind the dataSource property of your File Upload and Download properties to this context Attribute.
    Regards
    Sid

  • Excise invoice through J1IS transaction

    Dear Friends,
    At Manufacturing location, 1 unit of material for each Batch is issued for lab sampling. This is done through QA11 transaction with movement type 331.
    In Excise configuration, rounding off is activated and for all outgoing invoices, BED/ E CESS/ SE CESS values get rounded off to nearest value.
    While creating excise invoice through J1IS, since the quantity of material for lab Sample is very less and the excise duty values being calculated are negligible...Ex - 0.48/ 0.32.- for these values system is converting then as Zero. This scenario is applicable for various materials and for each unit for lab sample there is a material document generated.
    Excise invoice is created with reference to each of the material document and the values are being nullified due to rounding off.
    If we change the config settings and deactivate rounding off, then this will also have impact on outgoing excise invoices created through J1IIN transaction.
    Is there any possobility that I can consolidate all the material documents and then rounding off logic is applied on final value?
    Regards,
    Praveen.

    Hi,
    Deactivate the rounding in config and create the routine for rounding the values and assign it against the excise conditions in the pricing procedure as a alt calc type.
    Regards
    Sunil

  • FM or include that triggers Workflow in sap SRM 5.0.

    Hi All,
    Can anyone tell me the FM, for triggering a workflow in SAP SRM 5.0. I mean the name of the program or Include or an FM which finally triggers workflow while saving?
    Thanks,
    Edited by: Manoj Singh on Oct 6, 2011 6:51 PM

    Hi Gaurav,
    Thanks for responding. Yes, all the backend config are in place since I am able to successfully run an equivalent RFC (BBP_PD_SC_GETLIST) and another RFC named BBP_PD_SC_GETDETAIL from SE37. The problem seems to be something very specific to the ES. May I request you to run this ES at your end (if possible) and let me know the result possibly with the input and output message similar to the one I pasted in the origincal question.
    Thanks in advance,
    Nilay

  • How to update agent list after triggering workflow?

    Hi Guys,
               Is there any function module to update the agent list after triggering the workflow? i mean after triggering workflow, the user is maintaining some approving officers in their table and they are expecting the workflow should route the workitem to  those newly maintained approving officers. So can any one help me to solve this issue.
    Regards,
    Safiq

    if any agent maintained in the customized table, how can I update
    those agent with existing available agent list.
    It sounds like updating the existing workitem container with the new updated values. right? You mean to say initially workflow is triggered and the agent list is populated in the workflow container. But after the workflow is triggered if the table is updated with some new entries, then these new entries must alos be included in the agent list container element in the workflow container.
    If this is the case the you have to modify the multiline container element of the workitem container. You can make use of the standard function module SAP_WAPI_WRITE_CONTAINER but this function module needs to be called each time when evenr a new entry is created and you have to check what are all the workitems that you want to update ,
    I think its a bit difficult to update all the workitems which are with reagrd to this scenario.. so you have to check out some other simple way. But on a whole what I can say is you can update an existing workitem container by using the FM mentioned above...

  • Calling FI Validation Rules in BPM server through call transaction

    I m trying to call FI validation rules through call transaction (for FBV0) in BPM server but in the messages table of call transaction it does not gives us the validation rules error messages while when i run manually the transaction in R/3 system i get the validation error messages. So please tell how i can get these validation error messages when called through BPM server.

    Hi madhvi,
                       You are using jtab within the form.. i dont think you can use it directly inside ur FORM sub1 without declaring it or without passing it. and it will give you the syntax error.
    and please send me the step by step code you have written in editor so that i can check it and can reply you with proper solution'
    Thanks ,
    Prasanna

Maybe you are looking for

  • Can't access iTunes

    Everytime I try to open iTunes on my computer, I receive an error message stating, "The application could not be completed. An unexpected error occured (error code -600)". How can I fix the problem and access my music files?

  • Document Search in BoB shop fails

    Dear ISA Guru's,    The document search in Business-On-Behalf Webshop does not give me any results. It works fine for the direct webshop. I am using ISA 5.0 SP 11 with Ecommerce 6.0 as back end. Appreciate your hlep here. Thanks! Surya.

  • Error while using Mail Package for dynamic email address - XMLScanException

    Hi All,     i am trying to implement File_to_Mail Scanrio. Here i am using mail package stuff to make use the dynamic mail Id's. i am following the blog /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address.

  • How do I find the date and time stamp on pictures?

    How do I find the date and time stamp for my pictures?

  • What are the step to Cancel the iStore order hold

    Hi All, What are the steps to cancel the Order hold option in iStore, and OM all the orders for all user getting hold, Please tell me what are the steps to Cancel this hold option. Thanks Vivek