About ale error handling in workflow?

Hi,
can any one explian in detail ale error handling through workflow,its urgent for me.
Regards,
phani

Hi Srikanth,
follw the steps it will helpful u,
Pre-requisites. 
It is assumed that the reader of this article has some knowledge in SAP workflow BOR objects and ALE Idoc process like process code, Partner Profile etc. 
Description 
Here, we will be discussing in details the Error handling of an Inbound Idoc through triggering an event, which in turn will be triggering a workflow attached to the workflow. 
Steps:-
1.     Create custom BOR object with the events, Start and Stop event
2.     Create a workflow for the error handling, like generating a notification whenever an error occurred in the Inbound Idoc.
3.     Creation of Function Module and attachment with the Process Code
4.     Create the settings for the Inbound Process of the Idoc through the Process Code.
Creation of BOR objects. Go to the[http://www.****************/Tutorials/ALE/ErrorHandling/page3.htm] transaction SWO1. 
Enter a name for the Object type and click ‘CREATE’ button for creating the custom BOR object. 
Enter the details required for creating the BOR objects... 
Create the Key fields and events of the BOR object.
For creating the Key fields place the cursor on the Key fields and Click on the Create Button
Create events for triggering the workflow and stopping the workflow.
For creating the event place the cursor on the EVENTS and Click the create button like Key fields.
Create two events.
Enter the event name description etc and proceed further to create it. 
Similarly create another event for ending the Workflow in the similar manner like that created earlier. 
Now, Generate the BOR object through the generate button
Release the EVENTS and subsequently release the BOR object. 
After the creation of BOR object
Create a workflow for the generation of notification whenever an error is reached in the Inbound Idoc.
Execute the transaction SWDD. 
Click on the CREATE button for creating the workflow for error handling. 
Choose the Step type to be inserted for the notification like here we are using Send Mail option for sending a mail to the user whenever any error occurred.
Activate the Workflow and test it whether it is working as per the requirement.
After the successful completion it is required to attach the workflow with the event.
Go to the Header section (Denoted by CAP).
Go to the Start Events TAB.        
Enter the details of the event with which the workflow should be linked like the category, BOR object type and the event with which that should be linked.
Enter here the BOR object that has been created and give the name of event created for starting the workflow.
Click on the Binding Button for generating the binding between the event and the workflow.
Click on the Binding Button for generating the binding between the event and the workflow.
Generate the binding and click OK button to save the binding.
Click on Activate / deactivate button for activating the linkage.
After the successful linkage the following sign will appear on the workflow..... 
This shows that the workflow has been linked to the event and it will be triggered whenever that particular event will be triggered. 
After the creation and successful linkage of workflow with the event it is required it is required to generate a function module and attached it to the process code. 
Go to SE37 transaction and copy a standard process code function module to a custom one. Do no delete any parameters from the function module as the SAP standard program itself is calling this. 
In that function module do the required validation and whenever the validation fails set a standard parameter ‘WORKFLOW_RESULT’ to 9999 from within the function module, otherwise normally proceed to set the status to 53.
After the creation of function module it is required to attach it to the process code and corresponding attached to the message type at the Partner Profile stage.
The process code is being created through the transaction WE42
Go to the change mode and click the New Entries button for creating new process code. 
Enter the Process Code Name, description and choose the processing type as Processing by function module. Click on the extension button of Identification.
The details for the of the Process Code after clicking the identification button will be  
Whenever idoc arrives into the Destination system then the standard SAP triggers the Process code attached to the Message type in the partner profile. The partner profile is being maintained in the transaction WE20. 
Since, it is and inbound scenario so the message type and the corresponding process code will be maintained for the Inbound Parameters. 
Click on Create Inbound Parameters button for creating new Inbound Message type and the corresponding message type. 
Enter the process code for the corresponding message type. 
Click SAVE button for saving the changes. 
Whenever the IDOC arrives into the target system, it checks the partner profile and finds the corresponding process code. The process code is being linked with the function module through which the IDOC is required to be processed.
Regards,
Phani.

Similar Messages

  • ALE Error Handling with Workflow

    Hi All,
    I have some issues with using workflows with idocs:
    In our process codes , the business object , start event for error handling and success event has been configured.
    Now if the workflow_result is 0 then success event is triggered and if workflow_result = 99999 then start event is triggered.
    I have two qquestons:
    1. How are these events triggered as I did not find any code in the F.M> to triggerethem.
    2. What is the purpose of End event.
    Apart from this , is there any area where workflows can be used with IDOCS.
    Thanks and Regards
    Aman

    Hi,
    In case I am creating a custom F.M. to process idoc data then I can use the F>M> to create the event.
    However In case the standard F.M. is being used and workflow_result is set to 9999 in it and I have consigured the start event to it,in that case I will not be able to use thie F.M> to trigger the workflow.
    Thanks and Regards
    Aman

  • ALE: Error handling through workflow

    Hi All,
    My requirement is to trigger a workflow to send a mail when ever there is an error in posting an IDOC.
    I have created a FM, Business object, Process code and assigned FM & BO to it. created a workflow object and assigned BO object to it. I am getting mails too.
    But the problem here is I am getting mails to SAP inbox even the IDOC is posted successfully.
    I am setting the value WORKFLOW_RESULT = 99999 when IDOC posting fails.
    My requirement is to trigger workflow only when there is an error in posting IDOC.
    Please suggest.
    Thanks in advance,
    Prathap

    I think there are standard workflow for your requirement. Please check WE46 transaction code for the task.
    Thanks
    Arghadip

  • OUTBOUND- ERROR HANDLING USING WORKFLOW

    Hi Gurus,
                   Can any one tell me about workflow & how to do error handling using WORKFLOW in OUTBOUND IDOC.Below are the points , Please check it & send me reply.
    1.Value not found for Custom IDoc fields.
    2. Partner Profile not maintained correctly.
    3. Syntax error in IDoc.
    4. IDoc ready for dispatch (ALE Service).
    Regards,
    Chiranjeevi.

    Hi,
    FOr most of your requirements, there is already std. SAP IDOC error Single-step tasks.
    Have a look at WE46 transaction.
    Also, if you go to SWO1 and search with "IDOC*", you will get all the BO's even.
    It's pretty straightfwd. Also, in Partner Profiles, WE20, for each of the IDOC type, there is one "Post.Processing AGent", whom if you set up correctly, will be the person receiving this Errored IDOC mails.
    Hope this helps
    venu

  • Outbound Idoc error handling through workflow

    Hi,
    I am trying to set up the workflow for outbound error handling. I found that there is a task TS00007989 which need to set up.
    How this task can be triggered when outbound idoc error occurs in the system?
    Kr,
    Vithalprasad
    Edited by: Vittalprasad on Jun 9, 2010 11:52 AM

    Hi,
          Have a look
    Outbound IDoc Error Handling via Workflow
    Outbound idoc error handling through workflow

  • IDoc error handling using workflows

    Hi,
    I have a requirement to generate IDocs in the Source system and process them in the target system. The IDoc message type is HRMD_ABA. And I am using standard processes to generate them and post them using PFAL and RBDAPP01 program respectively.
    All this is working fine. But now I need to include error handling in the source and the target systems which would send mails to a User's Outlook mailbox whenever there is an error. I mean to say, we need more functionality than just monitor them through WE05 transaction.
    Can any one tell me how this can be achieved. I have been looking into the program RSEIDOCA which would send workflows to SAP Inbox, but I need to send it to Outlook Inbox.
    And I have heard that there is a workflow process which would help me to do this.
    All your answers would be highly appreciated.
    Thank you in advance,
    Sid.

    Hi,
    First Step:
    You have to maintain the e-mail-address in SU01 for required users.
    Second Step:
    SCOT Configuration
    Third Step:
    Depends on your SAP Version do configuration SWNADMIN
    Or  excuting the report RSWUWFML2 as the background job.
    Thanks and Regards,
    Prabhakar Dharmala

  • Idoc/ALE error handling, send to external email

    Hi all,
    I'm developing an IDoc inbound interface for purchase order create using PORDCR1. For the error handling functionality, I need to send an external email describing all of the validation error happened in user-exit EXIT_SAPFKCIM_002. Please kindly tell me how to cater the functionality. I won't use workflow because the error handling can't describe all the error, it just displaying the first error encountered. I also don't want to create any custom object since message type PORDCR1 is available. I think creating a custom FM is a possible way, but if there is another way, please tell me how.
    Thanks,
    Teddy

    Hi Teddy,
    A custom FM is the easiest and simple way.There may be other ways.
    Regards,
    Atish

  • Steps for ALE/EDI error handling using workflow

    Hi
    I need to handle errors in outbound IDoc generation using workflow. Can you please let me know the steps to be used for this. Step-by-step answer would be appreciated.
    Thanks

    Seetha,
    I have this already..
    IDOCPACKET                                                           
    Object type                         IDPKWMMBXY             
    End event                           MASSINPUTFINISHED      
    IDOC                                                          
    Object type                         IDOCWMMBXY             
    Start event                         INPUTERROROCCURRED     
    End event                           INPUTFINISHED          
    Application object                                                                      
    Object type                         BUS2017                           
    Start event

  • IDoc error handling via WorkFlow. What is missing?

    Hi All,
    My problem is when an error occured I don't receive anything in the Workplace.
    I did the following:
    When I created the process code I gave an object type(based on IDOCAPPL) for the function module's IDoc part. For the start event I gave the INPUTERROROCCURED event and for the end event the INPUTFINISHED.
    I created a standard task where the triggering event is the object type->inputerroroccured and the terminating event is object type->inputfinished and the object method is the object type->inputforeground. I use a standard role with a "Z" function module to determine the agent.
    I tested the role with an IDoc number and it worked. It gave me back a position where is my userid is the only id. The concistency check shows me 2 red line: the missing IDoc Packet section (I think it's not needed) and at the Role assignment (I think it's good so I don't understand this). 
    So, Do you have any idea what is wrong?
    Thanks for your help in advance.
    Regards,
    Gyula

    Hi Gyula
    Can you tell how you are actually raising that event .?
    I assume that you have created a process code and attached it to some function module and therein wherever you are getting error(when you want to trigger workflow) you are raising an event for your object type and its event .
    Since i cant check out your code , it guess you can try setting your task as General Task first to just get sure whether the event linkage is active for event or not and your workflow if at all is really getting triggered or not . If these things work fine with out then certainly your role determination function module needs to be checked.
    Kind Regards
    Shovit

  • ALE Error Handling Issues

    Hi Experts:
    For instance,
    A company distribute PO to B company SO by ALE Order (ORDERS).When sales order creating,
    IDOC will diaplay error message if some missing in material master ,but it shows 1 issue once only.
    Suppose that there are 4 missing in material master causes sales order can not be created successfully, 
    is it possible IDOC shows all of error messages at the same time that make easy to trouble shooting?

    Hi Jeff,
    Your concern is right..we must get all the errors at once..
    But this is not the right approach..SAP ALe programs written in procedural way..i.e. step by step..
    its obivious that if some error in step 1 is coming then step 2 is not possible...so system also stop processing when an error occur..
    In many Process codes this has done but they are very few...
    so we have to go one by one error..
    cheers

  • IDOC Error handling using workflow for Inbound process.

    I have a custom idoc which I am processing using a custom inbound function module with the help of a custom process code. I have made the config in BD51/bd67/We42/We57and doing the coding in the inbound function module to handle workflow. But i am still unable to get the workflow item in my inbox. I have set my userid in the partner profile as the agent to receieve the workflow.
    Is there any other config that needs to be done vis-a-vis workflow ? like..assignement of some standard task,etc etc ? The message type I am using for the IDoc is zWMMBXY .
    Pls advice..thanks

    Seetha,
    I have this already..
    IDOCPACKET                                                           
    Object type                         IDPKWMMBXY             
    End event                           MASSINPUTFINISHED      
    IDOC                                                          
    Object type                         IDOCWMMBXY             
    Start event                         INPUTERROROCCURRED     
    End event                           INPUTFINISHED          
    Application object                                                                      
    Object type                         BUS2017                           
    Start event

  • Error handling in Workflow rules to determine agents.

    Hi there,
    I have a rule, if it fails. I need to send a SAP mail. Or skip that particular user decision step... Please.let me know what ahould be done for this.
    Thanks,
    Sukumar.

    Basically you need to execute the rule already before the actual decision step. What kind of rule do you have? If it is based on a function module, you can copy the code from the function inside your own method, and then use this method in a separate background step before your decision step. And if the agent cannot be determined you can skip the step, or whatever you want. And if you are familiar with ABAP OO and how to use it in workflow, you can include the above-mentioned logic inside a functional method of a class, and then use a condition step (with the functional method) instead of  the separate background step.
    Also, if you are not using a rule that is based on a function module, you can always find a way how to programatically call the rule in your code. There are lots of examples in SDN (or WUG).
    Regards,
    Karri

  • Idoc Error Handling through workflow

    Hi all,
      I want to send the Error Notification for a particular person for whom the task orders is assigned in the organization chart.
    What all the things I need to do.
      I have created the org chart and I have assigned the task to a user under a position.
      I have linked the Idoc error event in Tcode SWETYPV .
      What  all the things I am supposed to do.
    Regards
    Kumar

    Please go to transction WE20, pick the Partner / Idoc that you would like to assign the Org. chart to.
    Then you should configure "post processing :permitted agent" Tab with the Organizational unit.
    Then double click the process code associated with the Idoc Type and click the button next to the Function Module associated with this process code.
    Check  IDoc Tab and see if Stanard Event INPUTERROROCCURRED is present in the field called start event.

  • ALE Inbound Error Handling

    Hi
    Here I have problem in setting up Error handling in outbound/inbound processing of Idocs in ALE....
    Can any one please explain how to do it....
    My requirement is, if ever idoc goes in to error then the user has to be intimated by mail in SAP Inbox.As per my knowledge it can be done through partner profile...if specify user name in partner profiles/post processing agent place.
    My doubt is will it be same in outbound/Inbound?
    Do i need to do anything other than specifying usernames in partner profiles?
    What is the use of Idoc Administrator?
    Please explain how to do that....
    Awaiting your valuable answers...
    Thanks
    Suresh
    Message was edited by: Suresh Babu  Mannem

    I think you also need to specify the "post processing agent" in your Partner profile - Message Type.
    Check WE20.
    In case you don't want to use organizational assignment then leave the task as it is as general task.
    So only the user specified in "post processing agent" will be taken into consideration.
    Here are the steps that you need to do for a complete error handling procedure ( but you can avoid organizational assignment if you just need to use User Name as receipient ):
    I've taken it from F1 help on error handling:
    Error Handling
    In this section, you can make the settings for error handling:
    Create organizational units and assign standard tasks
    Maintain EDI administration ( Idoc administrator section on Xn OYEA or We40 )
    Maintain error process code ( Xn OYEA or We40 )
    Further you can check it using Verification Processing on OYEA / WE40 .
    Errors are processed in the system in which the error occurred.
    You can repost IDocs that were not posted (with status 51) using program RBDMANIN.
    Requirements
    ALE error handling uses workflow. A standard task is provided for each message type. Task TS20000051 is used for all BAPIs.
    Workflow functions as follows:
    A task (work item) is generated for the error handling and stored as a message in the inboxes of the employees responsible.
    If one of these employees processes the work item, the standard task method for error handling is started. The user can, for example, restart IDoc processing.
    If the IDoc is processed successfully, the work item is deleted from the inboxes of all the employees involved.
    For this procedure to function, the employees responsible for a particular message type and partner (sender or receiver) must be defined as follows:
    1. A hierarchy of organizational units (for example, "sales office") and positions (for example, "customer officer for customer X") is created and employees are assigned to it.
    2. The standard tasks for error handling (for example, an error related to an inbound sales order) are assigned to the relevant organizational units or positions (for example, "sales office").
    3. The organizational unit, position or employee responsible for dealing with the error are specified for each partner and message type in the partner profiles.
    If an error occurs, the system determines:
    1. The employees responsible using the staffing schedule of the organizational unit or position linked to the standard task.
    2. The employees defined in the partner profiles (using position, user ID, or organizational unit).
    3. The employees appearing in both groups represent those who will receive a work item in their inboxes.
    Activities
    Create organizational units and assign standard tasks
    Maintain EDI administration
    Maintain error process code
    If you used EDI communication in an earlier version, you can check the assignment of error process codes to the standard tasks.
    Check names of the employees responsible in the partner profiles.

  • Error handling of Assignments in Workflow...

    Hi All,
    How we do we automate assignment's error handling in Workflow.
    For example: I have an assignment and that is part of my workflow.
                        If the assignment fails the workflow job status gets "Error" status --> How do we handle this by sending some notification or branch into success or failure?
    Please feel free to revert to me.
    thanks
    Alexander.

    Hi Alexander,
    MDM Assignment is not like Validation based on which you can branch out your process based on the validation result.
    Assignment will assign a value to the desired field based on the expression you write.
    So you need to take care that your expression handles all the incoming records fully and does not fail.
    Hope It Helped
    Thanks & Regards
    Simona Pinto

Maybe you are looking for

  • /etc/prtconf command in Linux?

    Hi; I have the command /etc/prtconf(/usr/sbin/prtconf) in Solaris 10.5 , which gives all information about my OS and machine. i am trying to find the equivalent command (/etc/prtconf) of in Linux OS. thanks for your collaboration Regards; Fafa

  • Can i turn an imovie project into an Mpeg file to work on a Windows System?

    Hi is there a way of turning an iMovie production into a standard MPeg format to play on windows operating system???

  • Exporting from FCP in QT Problem

    Hey, folks--would appreciate some help w/this. When I "export using quicktime" out of FCP-the newest version on my quad core--QT only exports about 15 seconds of whatever program it is. I've looked through the preferences in both QT Pro and FCP and f

  • Command Line Build Option

    Hello All-- Is there any way I can invoke jdev.exe from the command line with an option to specify that it build my .jpr project file, and without invoking the IDE or requiring any other interaction? I'm new to JDeveloper, and I got used to this nice

  • Problem in J1IFQ -Reconciling the Qty -Received in Multiple Batches- reg

    Dear Sir/ Madam, We are encountering the Problem During Reconcilation of Quantity in Subcontracting cycle Received in Multiple Batches. The Following steps are followed, 1. We have created a Subcontract PO with BOM Explosion. 2. The Required Componen