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

Similar Messages

  • Triggering workflow upon idoc fail

    Hi Gurus,
    I have to trigger emails to users thru workflow whenver an idoc fails. Please teach me how can I achieve this.
    Your help is highly appreciated.

    Hi
    Here is the link for idoc error handling workflow.
    [idoc error handaling|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/609e6465-15de-2a10-859d-da7bcbca54a3]
    [idoc description|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8088e6fc-5637-2b10-c189-9733fa621cf1]
    Regards
    vijay

  • 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 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.

  • 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

  • Trigger workflow when IDOC Status 51  & with Basic Type "ORDERS003"

    Hi Experts,
    Can any one explaine how to create worlflow for "When Idoc status is 51 with the combination of Basic Type "ORDERS003" . If this condition will satisfy i need to send a mail using worklflow. For this one Bussiness type is BUS2102".
    Can you explaine any one please i am new to Workflow.
    Regards,
    Sri

    Hi,
    Please refer to the below thread. Hope it helps.
    Triggering workflow upon idoc fail
    Regards,
    Sridhar

  • 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?

  • Workflow to be triggered if Inbound Idoc is successful

    Hi,
    Kindly help me out with the following senario:
    After the vendors are created in MDM, they are distributed to an R/3 (ECC 5.0) system via XI. XI uses  the message type CREMAS to distribute the vendors. When the inbound Idoc is successsful, a workflow should be triggered to the concerned user about the vendors created in the R/3 system.
    How can we find out which event gets triggered when the Idocs were successful such that we can trigger a custom/standard workflow??
    Thanks in advance
    Regards
    Kishan

    This report might help you
    RSEIDOCM
    Otherwise maybe in ALE customising you could create an event in a user program and use FM SAP_WAPI_START_WORKFLOW to launch your workflow.
    You will have the IDOC message types coming in and the process codes which are executed so you should be able to monitor the process and take whatever action you need during the process..
    (Customising -- use transaction SALE) 
    cheers
    jimbo

  • What triggers workflows execution from IDocs

    I have set up a process that triggrs workflows from IDocs by setting the Process code to 'Process by task'.
    In some cases, when the workflow falls over, it would be easier to create a new workflow rather than fix the old (the workflow has checks in so that it will not create duplicate documents at any point).
    I would like to write a restart report that allows an IDoc to be reprocessed using a new workflow, but I don't see how it is triggered; it is not via an event because the workflow does not have a triggereing event.
    Can somebody tell me what the function module is that triggers the workflow, or if it is a report program?
    Kind regards,
    Tony.

    Found it: it is IDOC_START_INBOUND.
    Bit of a giveaway really.
    - Tony.

  • 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

  • Open Sales orders through IDOC

    Hi
    We are trying to send the list of open sales orders of a customer in an IDOC to the customer. For example, if the customer has got 15 sales order to be delivered to him , he needs the details of all these 15 orders in an single IDOC
    Is there any IDOC message type available for this in SAP R/3 4.7 version  or is there a standard solution of sending these details through IDOC
    Regards
    Anandh

    Hi
    We are trying to send the list of open sales orders of a customer in an IDOC to the customer. For example, if the customer has got 15 sales order to be delivered to him , he needs the details of all these 15 orders in an single IDOC
    Is there any IDOC message type available for this in SAP R/3 4.7 version  or is there a standard solution of sending these details through IDOC
    Regards
    Anandh

  • Creation of Business Partner through IDOC

    Dear All,
    I have to create a business partner which happens through Idoc of message type DEBCOR. My problem is that though I am getting the IDOC message as incoming type which is also getting processed however the creation of BP is not happening. Since IDOC is also showing in green as successfully processed, I dont have any clue where to check it. Any idea as to what could be the possible problem ?
    best regds
    Subha

    IDocs and BAPIs sometimes behave differently than transactions. You might need to add a user exit specifically for IDoc processing. Otherwise send a message to SAP and have them look at it.

  • Creation of SO from PO through Idocs in Same client

    Hi frnds,
         Can we create SO from PO through IDOC's in the same client with different company codes.
    Ex: PO created in 100 client in company code AB00. i have to create SO in 100 client in company code AB01.
    Any suggestion on this is highly appreciated. Please provide the steps and idocs or let me know the other approach.

    for posting the IDOC to same system
    use this logic
    The steps to send and receive an IDoc in the same system are as follows:
    u2022     Create a Dummy Logical System.
         Goto T-Code SALE-> sending and Receiving Systems -> Logical Systems -> New entries. Enter SYSID_CLNT, but this one is Dummy so use the first two characters of the SYSID and prefix 'D' then underscore and then the Client number.
    E.g., If ERP_100 is the logical system of the R/3, then create ERD_100 as the dummy system.
    u2022     Create Port for the Original System, (ERP_100)
         Goto WE21 and select Transactional Port and press the Create button. Name the Port as "SAP" concatenated with the SYSID in our example it would be SAPERP Select the appropriate version and enter the RFC destination of the system that you are working on in this case it will be 'ERP'.
    u2022     Create Partner Profile in partner type LS:
         Receiver Side (Outbound to): In Partner type LS name ERD_100create the Outbound Parameters, give the Message type, Receiver Port same as the port we created in step 2. Enter the Basic type.
         Sender Side (Inbound from): In partner type LS name ERP_100 create the Inbound Parameters, give the appropriate message type and the process code.
    u2022     Now create the stand alone program to send the IDoc:
         The program will at some point calls the MASTER_IDOC_DISTRIBUTE function module. When you pass the EDIDC structure it will be populated as follows:
    i_edidc-mestyp = message type.
    i_edidc-idoctp = basic type.
    i_edidc-rcvprt = 'LS'.
    CONCATENATE 'SAP' sy-sysid INTO l_port.
    i_edidc-RCVPOR = l_port.
    i_edidc-rcvprn = 'ERD_000'.
    CONCATENATE sy-sysid '_' sy-mandt INTO l_sndprn.
    i_edidc-SNDPRN = l_sndprn.
    i_edidc-sndprt = 'LS'.
    i_edidc-sndpor = l_port.
    u2022     Observe that the Sender port and the receiver port is the same, this does the trick. The outbound Idoc is sent on the port SAPERP with the Sender as ERP_100 and receiver as ERD_100 and then the Inbound IDoc is also sent to the same port SAPERP with the Sender as ERP_100 and receiver as ERD_10.
    this is the method for creating logical system and setting
    and use the respective function module and mesg type for posting it.
    cheers
    s.janagar
    Edited by: Janagar Sundaramoorthy Nadar on Apr 29, 2009 6:32 AM

  • Item text is not appearing in the print output through IDOC?

    Hello ,
    I am changing the PO through IDOC. When ever there is change in the quantity ,net price and delivery date  the print out put is generated autoamtically and changes are appearing the print output.
    when ever there is change in the item text of PO print output is not generatiing but item text is updated in the PO.
    If i change manually print out is generating for item text also but through IDOC print output is not generated . please help to slove this isuue.
    i am passing the value as :
        idoc_data-segnam = 'E1BPMEPOTEXT'.
        e1bpmepotext-po_item = Po line item number .
        e1bpmepotext-text_id = txtid.
        e1bpmepotext-text_form = textform.
        e1bpmepotext-text_line = line item text .
        idoc_data-sdata = e1bpmepotext.
        APPEND idoc_data.
        CLEAR idoc_data.
        CLEAR e1bpmepotext.
    please help me it is urgent
    Thanks
    Venkatesh

    Hi Venkatesh,
    Check the condition record in transaction NACE. Whether the print output field is present in the condition record.
    Regards,
    Gajendra.

Maybe you are looking for

  • How to display subtotals in separate column in alv report?

    hi, I am displayed the subtotals  for QUantity field BDMNG in Reuse_alv_grid_display  in the same column. but I want to display subtotal in separate column. How to display subtotals in separate column in alv report? thanks&regards. samba.k

  • Blank Space problem in Adobe Form

    Hello Gurus, In my Adobe form, One field has to be displayed based on a condition. So, for that field, in Context tab, condition is specified and its working also i.e. It condition is true then data is not displayed in the layout but I find the blank

  • [SOLVED]Network/Wireless, after 15mins, locks sudo [..]

    Hello, I have been using Ubuntu for a while and wanted to move to Arch Linux. I did. Got everything set up but have one major problem. Wireless. I have my wireless driver installed through Ndiswrapper and works. Connecting to the router is fine. No p

  • Dunning for vendor

    Hi experts, could you please in details explain me how to create a dunning (output type MAHN) for purchase order? Thank you. Regards, J.

  • Animated Button Oddity...

    Hi, Using Encore 2. On my chapter selection page, I have animated buttons, they look great as a still...when rendered there is a one pixel line that shows up right above the bottom where the stroke meets the animated image. Since it's one pixel...it