Workflow trigger an idoc

HI
How trigger a idoc from a workflow?????
Hi
idoc trigger from a workflow.please suggest.
example like po change..
Edited by: Abhijit Paul on Jun 26, 2009 8:42 AM

Hi,
You can follow following steps.
1) Create a Z business object inherited from BUS2012.
2) Create a Z-method in will have to create a method in your newly created business object.
    This method will have logic to create and send the idocs for PO. Delegate the business object so that you can call the method from SUPERTYPE in workflow.
3) Create a workflow with triggering Event as Change of PO.
    This workflow will have a single step task which will call the Z method of your business object.If you have done the delegation then you can call the method using BUS2012 object type itself.
4)  You will have to go in Tcode SWEC as mentioned in the post above.
    There you will have to do an Event linkage for change documents.
    Make an entry for EINKBELEG Bor Object ZBUS2012 or BUS2012, Event CHANGED and select on Change option.
5) Change the PO and check if the event is getting triggered or not. Also if the method used to create and send idoc is correctly been called.
Hope it explains the steps you need to follow.
In case of any issues please let me know.
KR Jaideep,

Similar Messages

  • Trigger workflow with inbound IDOC.

    Hi all,
    i have to trigger my workflow with incoming idoc which coming from other server. this IDOC content is  financial document. can any one tell me what is the procedure to make it happen.
    Regards,
    Sri harsha.M

    Hi Harsha,
    You have to call this Event FM in your ABAP program
    for example
    REPORT Z_TIBOR_EVENT_SAP_SW .
    INCLUDE <CNTN01>. " include container macros
    DATA: OBJKEY LIKE SWEINSTCOU-OBJKEY,
    EVENTID LIKE SWEDUMEVID-EVTID.
    DATA: EVENT_CONTAINER LIKE SWCONT OCCURS 0 WITH HEADER LINE.
    PARAMETERS:
    OBJTYPE LIKE SWETYPECOU-OBJTYPE DEFAULT 'BUS1001006',
    MATERIAL LIKE MARA-MATNR,
    EVENT LIKE SWETYPECOU-EVENT DEFAULT 'CREATED',
    END_DATE LIKE SYST-DATUM DEFAULT SPACE.
    OBJKEY = MATERIAL.
    CALL FUNCTION 'SWE_EVENT_CREATE'
    EXPORTING
    OBJTYPE = OBJTYPE
    OBJKEY = OBJKEY
    EVENT = EVENT
    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.
    commit work.
    ENDIF.
    Thanks and Regards
    Prabhakar Dharmala

  • Workflow Termination when IDoc is changed

    Hi all,
    For some inbound IDocs (SRCLST and INFREC), a workflow is triggered in case of an error. This works very well, and the extended notifications are triggered as well (mail included).
    However, in some cases, an IDoc in error is retreated automatically by a certain job and often, succesfully (data is locked or...). Nonetheless, the workflow item remains in the inbox and can only be closed by executing it and clicking on "End Process". Sometimes this leads to a number of notifications (mail) that are being sent even though the IDoc has already been treated successfully.
    Is there any way to trigger the termination of these workflows when the IDoc status is changed? The standard tasks that I am using are TS40007912 (SRCLST) and TS40007911 (INFREC). I am fairly new to workflows, so any assistance would be greatly appreciated.
    Thanks in advance,
    Aerv.

    Hi Aerv,
    (on the requirement in general)
    I think that your requirement (terminate error workitems when Idoc is re-posted successfully) is part of standard:
    Workitem termination is implemented by means of terminating events. If you look at 'terminating events' tab of task TS40007912( or TS40007911), you'll see that INPUTFINISHED event is there.
    Thus, the workitem should terminate whenever INPUTFINISHED event fires.
    The event fires when
    - a user processed the idoc (see 'Error Handling Process' here Error Handling - ALE Programming Guide - SAP Library) ,
    - the system processed the idoc successfully (RBDMANI2) - your case
    (on your setup)
    I suppose, you don't need to add entries in SWE2 to make a terminating event work.
    If you have those extra entries now, try deactivating them - probably it will correct the inconsistent behaviour as we see on the screen shot.

  • Automatic Trigger of Idoc Sending to PI on Material Master Create/Change

    Hi All,
    I would like to ask how to automatically trigger sending of idoc on material master create/change without using a standard transaction like BD10. I already tried using MASTER_IDOC_DISTRIBUTE in the material master change user exit. It does send the idoc but my problem is when an inbound idoc creates a material, it will then pass through the userexit and use MASTER_IDOC_DISTRIBUTE again.
    Any suggestions? Or do you have a better solution for this? My requirement is when uer goes throgh MM01/MM02 an idoc will automatically be sent to PI.
    Thanks.

    First of all a quick comment to your present solution. If it works and your only problem is that you'd like to suppress triggering the IDoc creation when a material is created/updated via inbound IDoc then you might want to just fix that. There's many possible ways to approach this, it all depends how much you want to change and what your processes are (I sorted the listed ones in order of personal preference, though the list is not complete for sure):
    <ul style="list-style:circle;">
    <li>Export some flag to memory when processing an IDoc that you can import in your exit and thus recognize that you don't want to send an IDoc. Depending on how you are processing your inbound IDoc BAdI BADI_MATMAS_ALE_IN might work; you might find others if this is not applicable or sufficient. If you're working on ECC 6.0 you could also consider coding the export of the flag in an implicit enhancement spot in your function modules used for IDoc processing.</li>
    <li>Evaluate in your existing coding the transaction code SY-TCODE; most likely you should see a clear difference between your IDoc processing and the other updates where you want to trigger the IDoc.</li>
    <li>Most likely the IDoc processing triggers function module MATERIAL_MAINTAIN_DARK (e.g. MATERIAL_INPUT_MATMAS01 does); this function module uses a global variable FLAG_BAPI_CALL to indicate the non-dialog processing. So if you feel adventurous you could evaluate this flag in your coding.</li>
    </ul>
    Change pointer won't really do you any good if your functionality is already working without them apart from the trigger. Even if you write change pointers, you still have to implement the trigger functionality, so essentially back to square one...
    In general another good option is often to use workflow events that are already triggered. I.e. in your case business object BUS1001006 almost does the trick. It has events for <em>ViewCreated</em> and <em>Created</em>, but unfortunately lacks events for material updates (and I didn't see any other appropriate object that has it and a quick trace while updating a material didn't fire any appropriate event).
    Cheers, harald

  • Change pointers to trigger the IDOC

    HI
    I am having a selection screen with fields to create a custom info record (transaction VD51/ VD52 )
    Customer
    material
    salesorganisation
    distribution channel
    division
    if we can use change pointers to determine when procedure is triggered.
    Please provide the steps for that (including change document)or we need to check the CDHDR table using the following fields.
    Plz suggest

    Change pointers is the one of the IDOC processing method in ALE.
    In this once we make the config to any of messages type , if any changes are made in sending system then IDOC will be posted directly to destination with user interation.
    Changes pointers are configured using BD50,BD51,BD53,BD61.
    Change pointers are stored in tables BDCP and BDCPS (or BDCP2 in case of high-performance setting) - like CDHDR and CDPOS for change documents (but this is not a controlling table!).
    1. Do you really need change pointers?
    You need change pointers to distribute changes with the ALE SMD tool. If you do not use this tool, you do not need to write change pointers.
    You can deactivate change pointers and activate them again with the transaction BD61.
    2. Do you really need to activate change pointers for this messages type?
    If some messages types are no longer to be distributed by change pointers, you can
    deactivate change pointers for this message type.
    You can deactivate change pointers for the message type
    and reactivate them again in transaction BD50.
    For reduced message types, deactivate the change pointer with the
    Reduction tool (transaction BD53).
    Applications which write change documents will also try to write change pointers for ALE operations. These are log entries to remember all modified data records relevant for ALE.
    Most applications write change documents. These are primarily log entries in the
    tables CDHDR and CDPOS.
    Change documents remember the modified fields made to the database by an
    application. They also remember the user name and the time when the modification
    took place.
    The decision whether a field modification is relevant for a change document is
    triggered by a flag of the modified field’s data element. You can set the flag with
    SE11 by modifying the data element.
    For the purpose of distributing data via ALE to other systems, you may want to
    choose other fields, which shall be regarded relevant for triggering a distribution.
    Therefore R/3 introduced the concept of change pointers, which are nothing else
    than a second log file specially designed for writing the change pointers which are
    meant to trigger IDoc distribution via ALE.
    So the change pointers will remember the key of the document every time when a
    relevant field has changed.
    Change pointers are then evaluated by an ABAP which calls the IDoc creation, for
    every modified document found in the change pointers.
    The Change pointers are written from the routine CHANGEDOCUMENT_CLOSE
    when saving the generated change document. So change pointers are automatically
    written when a relevant document changes.
    The following function is called from within CHANGEDOCUMENT_CLOSE in order to write the change pointers.
    CALL FUNCTION 'CHANGE_POINTERS_CREATE'
    EXPORTING
    change_document_header = cdhdr
    TABLES
    change_document_position = ins_cdpos.
    Activation of change pointer update :
    Change pointers are log entries to table BDCP which are written every time a transaction modifies certain fields. The change pointers are designed for ALE distribution and written by the function CHANGE_DOCUMENT_CLOSE.
    Change pointers are written for use with ALE. There are ABAPs like RBDMIDOC
    which can read the change pointers and trigger an IDoc for ALE distribution.
    The change pointers are mainly the same as change documents. They however can
    be set up differently, so fields which trigger change documents are not necessarily
    the same that cause change pointers to be written.
    In order to work with change pointers there are two steps to be performed
    1) Turn on change pointer update generally
    2) Decide which message types shall be included for change pointer update
    R3 allows to activate or deactivate the change pointer update. For this purpose it
    maintains a table TBDA1. The decision whether the change pointer update is active
    is done with a Function Ale_Component_Check
    This check does nothing else than to check, if this table has an entry or not. If there is an entry in TBDA1, the ALE change pointers are generally active. If this table is empty, change pointers are turned off for everybody and everything, regardless of the other settings.
    The two points read like you had the choice between turning it on generally or
    selectively. This is not the case: you always turn them on selectively. The switch to
    turn on generally is meant to activate or deactivate the whole mechanism.
    The change pointers which have not been processed yet, can be read with a function
    module.
    Call Function 'CHANGE_POINTERS_READ'
    The ABAP RBDMIDOC will process all open change pointers and distribute the
    matching IDocs.
    When you want to send out an IDoc unconditionally every time a transaction
    updates, you better use the workflow from the change documents.
    Reward if useful

  • Which field is the workflow trigger for a Contract Agreement ?

    Greeting everyone,
    I am not sure if this has been answer before or if this is the correct forum. If not, apologies in advance and do direct me to the appropriate topic/forum.
    I have an inquiries with regards to Contract Outline agreement and workflow trigger.
    Based on my company configuration, the trigger is based on the changes in value and release strategy.
    What I am unsure is that which field the workflow-trigger checks?
    Does SAP checks the field "Target Value" in contract header, or  the sum of net value in each of the contract items?
    Thank you

    Hello Sek,
    In contracts, the target value is used for the release strategy determination and not the net contract value. If you maintain a target value in the contract header, this value is set in field CEKKO-GNETW to determine the strategy. If no target value exists on header level, a cumulation of the target values of the items is carried out and used for the release strategy determination.
    Regards,
    Mauro

  • How to Trigger an IDOC from SAP R/3 to two systems at a time

    Hi experts,
    Can any one please tell me How to Trigger an IDOC from SAP R/3 to two XI systems at a time.
    My current production R/3 system sends a DELVRY03 IDOC to Production XI system ( Name : XIP) .
    I would like to route the same IDOC from production R/3 system to my Quality XI System ( Name XIQ) .
    Problem is production R/3 system triggers an IDOC once. We need to write a logic to route the same to two different systems
    Can any one tell me how can we do that ?
    Regards
    Ram.

    Hello Ram,
    Do you have connectivity between your production & XIQ?
    What does "connectivity" mean?
    1. RFC destination is maintained.
    2. Port defined for the RFC destination.
    If no, create these. (Search in SDN for details).
    If yes, proceed:
    1. Define the logical system for XIQ.(BD54)
    2. Define the same as your partner profile. (WE20). Add the message type SYNCH with the port for XIQ.(This is imp)
    3. Create a distribution model view with sender as "your production" & receiver as XIQ.
    3.1. Add the messages which you want to distribute.
    3.2 Generate Partner profiles.
    No coding is reqd. for this.
    BR,
    Suhas

  • How to Trigger an IDOC from SAP R/3 to two XI systems

    Hi experts,
       Can any one please tell me How to Trigger an IDOC from SAP R/3 to two XI systems at a time.
    My current production R/3 system sends a DELCERY01 IDOC to Production XI system ( Name : XIP) .
    I would like to route the same IDOC from production R/3 system to my Quality XI System ( Name XIQ) .
    Problem is production R/3 system triggers an IDOC once.
    Regards
    Ram.

    Hi Ravi,
      Thank you very much for your answer.
    As I am not completely aware of R/3 side,I am getting little problem in understanding your answer.
    Could you please explain the same in some what beter way.. Thank you ..

  • How to trigger payment Idoc from F110

    Hi All,
    I am working with a senario where in I need to trigger an payment proposal from F110 with reference of Document number(BKPF-BELNR ).
    Stettings which I have done
    Posting Date : 24.01.2005
    Docs entered up to : 24.01.2005
    Customer items due by : 24.01.2005
    Company Code : 3000
    Payment Method : C/CIT
    Vendor : 3802/3803
    In Free Selection
    The Document Number : 190000....
    I Have not selected any logtypes in Addtional Log
    Printout/Data Medium
    Programs : RFFOAVIS, RFFOEDI1
    I have not selected any program for List
    I was not able to trigger the Idoc with these setting can any one please send the configuration details in details.
    It's very urgent
    Thanks & Regards,
    Sai Suma

    Hi Suma,
    Please provide the answer if you have found.
    I need very urgent.
    Thanks & Regards,
    Manju

  • How to trigger FIDCCP02 idoc for outbound vendor invoices?

    Hi
    1. How can i trigger the idoc FIDCCP02 for outbound processing? I am trying to use this idoc to send the vendor invoice data to another system.
    2. How do i send existing data from sap to another system thru idocs?
    pls give me the steps.
    Regards
    Sujai

    Hi Sujai,
    First you have to fill the your data into a table which is like the structure of EDIDD.Here you have to fill the all segmetns in the sequence which defined in the idoc type only other wise you will get error 26.
    Then pass the control record data in the structure like EDIDC here you have to fill the sender,receiver,partner profile,idoc type message type like stuff.
    Then pass these table and structure to the function module MASTER_IDOC_DISTRIBUTE.
    Then idoc will created by above funciton module.
    If you want pass data in xml format then you have to create xml port in we21 and pass this port name in the EDIDC structure.
    Thanks,
    radha.

  • How to Trigger PAYEXT IDoc from Payment Run?

    How do I trigger an IDoc of message type PAYEXT / PEXR2002 when I execute a payment run T Code F110?
    What are the config steps required?
    Thanks,
    Bhaskar Gahndikota

    Hi Bhaskar,
    I have same issue,it's not triggerd the IDoc of message type PAYEXT / PEXR2002 when I execute a payment run T Code F110.
    If you don't mine can you share your document to my mail id : [email protected]
    Thanks & Regards
    Prathip

  • Trigger outbound idoc whenever PO is CHANGED and then saved

    hi guru's
    i am trying to trigger outbound idoc whenever PO is CHANGED and then saved .
    i have created partner profile
    PARTNER TYPE : LI
    MESSAGE TYPE : ORDERS
    BASIC TYPE : ORDERS05
    APPLICATION  : EF
    PROCESS CODE : ME11
    BUT, NOT ABLE TO CREATE CONDITION RECORD .
    please guide me for the same considering i am new to ale-idoc

    Hi,
    Try to use the Message type as ORDCHG and processing code ME11.
    In NACE transaction-->application EF --> copy the std output type 0003 to Z output type.
    In this type in the default value tab enter the VN or LS.
    In we20 :
    Create the partner profile in the LI or LS .
    message type as ORDCHG
    process code : ME11
    message type : output type which you created
    Application :EF

  • BOR Attribute empty during workflow trigger

    Hi Gurus,
    I have a problem in workflow where the IMAGE attribute of my zBUS2081 is not being read (or might be empty) during workflow trigger. This is the scenario:
    1. I delegated zbus2081 to BUS2081 and added attribute of type BOR - IMAGE.
    2. My workflow is being triggered when a LIV INvoice is parked.
    3. In my workflow, at the beginning I am transferring ZBUS2081.IMAGE to a wf container IMAGE_CONT (type BOR - IMAGE)
    4. My workflow triggers, then I check the log. It shows that IMAGE_CONT was assigned with ' ' value even it passed through the container operation step.
    5. What's weird, is when I retrigger the workflow, it is now able to assign the value of ZBUS2081.IMAGE to IMAGE_CONT.
    What could be the problem? I don't think there is a problem in my workflow. Seems that ZBUS2081.IMAGE has no value during trigger, but there is a valid data for IMAGE before the wf triggers.
    Thanks,
    Eo

    Hi Eo,
      I guess it may be because of the program logic inside business object Zbus2081 on attritube IMAGE.
      Can you open the program of attribute image and check whether you put the condition that maybe skip command swc_set_element container?
      In background, workflow will re-calculate attribute of the object. If swc_set_element container is missing, value will be blank.
    Regards,
    Chaiphon

  • Trigger IRODER Idoc from IW31 while creating service order

    Hi,
    Iam trying to trigger an IDoc for service Order from IW31 transaction. I found the Idoc IORDER is for service order and one way of doing it is from IORD transaction.(Please correct me IORDER is not the correct Idoc !!) However, we dont have status profiles maintained for our order type, so Iam not able to use this method. Could anyone tell me if there is any other way to trigger the same?
    Thanks & Regards,
    Swarna Munukoti

    Hello Sandeep,
    Sales Representative is a partner funtion. You need to enter this partner function with a BP in the parties involved assignment block.
    As for the pop up, it is controlded bu the partner determination procedure. Based on the partner determniation procedure used, if there are more than one sales representative found, there would be the pop for selection.
    Hope the above information helps.
    Best regards,
    Maggie

  • Trigger an Idoc when a sale order is been opened in VA02 & saved

    Hi Experts
         I have a requirement to trigger an Idoc when a sale order is been opened in VA02 transaction and saved.
    Now that I have attained the same through Message Control Settings and Nace out put type settings with Multiple Issuing.
    Here in the Idoc will be triggered when the user makes any changes in the order based on the NAST table entry.
    Now my requirement is that the Idoc has to be processed even if there is no changes made to the document when the user opens the sale order and clicks save.
    This is the process been carried out to re-process the Idoc.
    Now that the Idoc is triggered using the path ---> menu - extras -output - header- edit & save.
    Now that the user need to process the Idoc by just opening the order  in VA02 and  click save.
    How can this be attained ? is there any configuration for it ?
    Or is it possible to handle the same in any of the user exit ?
    the problem is the user exit save gets triggered only when there is any change in the document else it throws a msg " No changes made"

    Hi Niraj
       Thanks for your Response.
    Now that the output control works fine when there is any change made to the document.
    Now that i need to configure such a way that the output control triggers even if there is no change to the document and save   button is clicked.
    Can U please elaborate how do i make settings in VOFM-> Output Control ?
    Thanks
    Sathish

Maybe you are looking for

  • How can I clean up my mac and fix my internet pop up problem?

    I haven't used my mac book pro in a couple months and I'm afraid its outdated. I have done all the software and app updates that I can. I have changed security settings, but I'm still have a major problem with internet pop ups. I really need my compu

  • IPhone 6 Cable/Plug "Accessory May not Be Supported"

    So, I recently bought the iPhone 6 (brand new at Best Buy) and everything was fine for two weeks. I upgraded to the latest iOS and it was all fine after that, too. But in the last week or so, when I try to charge my phone (using the cable and wall pl

  • Photoshop cs2 crash

    Hi there I know cs2 isnt supported anymore but its been working 100% fine for me since last night when I did some software updates on my macbook. My macbook is old (2007) runs great though. System config is as follows: Model: MacBook2,1, BootROM MB21

  • Embedding fonts in existing PDF

    Is there a way to embed the fonts in a PDF? We often receive PDFs from outside sources that we don't have access to the native file. If the font is not on my system, I occasionally replace with a similar font, but it isn't always feasible. Any help w

  • Yellowish - Grey display on CQ57

    Replaced the screen about a year ago after it was damaged by an over eager flight attendant. About 3 months ago was casually surfing in Chicago Ohare  when I noticed a smell and realized that the bottom bezel was hot. Later at home found that a small