Skip to Content
  1. 1.0 Introduction:

This knowledge document explains how workflow technology can be utilized in ALE/EDI technology. In this document, I have tried to explain the link between 2 advance technologies in SAP ABAP.I am writing this document assuming that reader has basic knowledge of workflows and ALE/EDI. I am giving brief introduction about workflows for users who are new to this technology.

Workflow technology is a cross-application component used in various areas, including the ALE/EDI interface. The workflow management system provides procedural automation of steps in a business process. In general following are the benefits out of SAP workflow technology.

·         Business process integration

·         Intelligent routing

·         Flexible task assignment

·         Proactive approach

·         Substitution and backup facility

·         Process monitoring capability

·         Deadline monitoring

·         Statistical analysis

2.0 Use of workflow in ALE/EDI:

·         Error Notification

·         Successful Posting Notification

·         Rule based Inbound Flow

·         Active Monitoring

2.1 Error Notification: We are going to talk about the error and success case .There are many standard tasks for error notification already available in SAP e.g. for message type DEBMAS there is a standard task TS00008039 available to send work item to notify about any error. Following configurations are required to be done in order to notify failed idoc status 51 to a group of users. I am using idoc message type DEBMAS as an example to describe the configuration details below.

2.1a. BD67 Configuration: This is an idoc related transaction code used to maintain inbound process code. Usually this configuration already exists for standard message types for error notification. In this configuration, inbound process code is linked to business object and event started in case of error, success etc. As we can see in the screen shot below, process code DEBM corresponding to customer mater idoc DEBMAS is linked to business objects IDOCDEBMAS. In case of failed idocs, an event INPUTERROROCCURED is raised.

/wp-content/uploads/2014/08/bd67_515630.png

                      

Object IDOCDEBMAS is being used in this case, where event INPUTERROROCCURRED is raised when an idoc of message type DEBMAS gets failed i.e. status 51.

2.1b. SWETYPV Configuration: This is a workflow related transaction is used to link the standard task to error event triggered with above configuration. As we can see in the screen shot below, object type IDOCDEBMAS and its corresponding events.  /wp-content/uploads/2014/08/swetypv_515631.png

2.1c. User maintenance in Partner profile: Whenever event INPUTERROROCCURRED is raised on idoc failure, standard task TS00008039 is executed and a work item is sent to user defined in partner profile as shown in screen shot below:          

  partner profile.png

2.2 Success Notification: The success notifications are also sent to required recipients in the same way as error notifications.  As there is no standard task available for the same, we need to first create our custom workflow as below:  I am showing a custom workflow which I created to send a success notification in case of successful idoc posting. The workflow can be created in workflow builder SWDD.  Whenever an idoc  with message type DEBMAS is posted successfully,

2.2a Workflow creation:  

    Workflow Creation.png

The object and event of objects can be linked by clicking on the header (cap marked in the screen shot above).  The object type and event of objects are linked as shown below:

object type.png

The data can be transferred by doing a binding between workflow container and event container. To do this binding, the button marked with circle can be clicked and following screen appears.

/wp-content/uploads/2014/08/binding_515635.png

Click on the mail activity in the workflow and following screen shot appears showing the mailing activity details:

mail activity.png

2.2b BD67 Configuration:  As already explained, Inbound process code can be maintained using this transaction code. In case of successful idoc posting, we need to use an event as INPUTSUCCESS and populate start event and success event with this event as shown below.

This configuration triggers the INPUTSUCCESS event whenever an idoc is successfully posted in ECC.

BD67.png

2.2c SWETYPV Configuration: On the similar lines of failed idocs, business object, its event and custom workflow is linked in this transaction as shown below.

  SWETYPV_transaction.png

This configuration triggers custom workflow whenever event INPUTSUCCESS is triggered on successful idoc posting based on above configuration.

2.2d. Testing Error/Success notifications for standard idocs:

Success Notification:        For testing success notification, I used WE19 as follows.

/wp-content/uploads/2014/08/testing_515642.png

When I executed the transaction, an idoc#2715969 posted successfully with status 53.

/wp-content/uploads/2014/08/status_53_515643.png

Using the transaction SWEL you can check if event INPUTSUCCESS got triggered or not. Event got triggered due to the idoc processing in WE19.You can see the work item as well from swell transaction as shown in screen shots below. As you can see in the screen shots, work item number345134 has been triggered and got completed as per the screen shot below.

/wp-content/uploads/2014/08/work_item_515644.png

As you can see in the above screen shot, receiver type is WS90000067 i.e. workflow has been triggered. By clicking on work item button marked above, you can get the details of work item as below.

  /wp-content/uploads/2014/08/work_item2_515645.png

    

Now you can go to SAP inbox to check the received work item. The transaction code to access SAP Inbox is SBWP.

/wp-content/uploads/2014/08/sbwp_515646.png

When I double click on this work item to see the details of this mail, I find below details.

/wp-content/uploads/2014/08/result_wi_515647.png

Error Notification: So far we have covered the success notification steps, likewise the below details cover error notification steps.  I posted an error idoc in ECC, with idoc number 2715990 and received following work item in my inbox. As you can see in swell, an event got triggered.

/wp-content/uploads/2014/08/error_515648.png

When I saw the sap inbox using SBWP, I found following work item received there.

SBWP2.png

RES_WI.png

Please note that We can create custom business object as well in case of custom message types and custom events can also be created and can be triggered with standard Function Modules in case of idoc postings and then we can do the configurations same as above, trigger the events and start a workflow to send work items to respective agents.

2.3. Custom message type success/Error Notification (IDOC Configurations required for custom message type and linking to custom workflow):

Custom message types and posting function modules are created in the scenarios where standard message type/Posting function modules are unable to suffice the requirement. Custom business object is to be created in order to create/raise custom events as per the requirement and then custom workflow is created and linked to custom event of custom business object.

2.3a. WE81: Create the message type in we81 as following.

WE81.png

   2.3b. WE82: Assigning message type to basic type DEBMAS06 as following.

WE82.png

    2.3c. Creating a custom function module ZIDOC_INPUT_DEBITOR: This is a function module similar to standard function module. This is created just to show the custom idoc scenario. Custom function module should be created only in case requirement is not met with standard function module and also by extending the standard function module.

   2.3d. BD51: Inbound Function Module is defined here as below:

/wp-content/uploads/2014/08/bd51_515653.png

2.4a. Custom business object is created as below in SWO/wp-content/uploads/2014/08/swo1_515659.png

Super type is given as IDOCDEBMAS and all the other details are filled and ok is clicked. Following screen appears.

2 events are created, one for success i.e. YDEBMAS_SUCCESS and another for error i.e. YDEBMAS_ERROR as below:

  SUPER.png

   A success recall event is also created similar to the success/error events.

  Now once event is created, it’s to be implemented and released as below:    /wp-content/uploads/2014/08/screen_516680.png

All the events are implemented as above and finally are generated by clicking on generate button as below:    /wp-content/uploads/2014/08/image_516682.png

       2.4b. WE57: Assignment of basic type message type, posting function module and object type created above:

          

        /wp-content/uploads/2014/08/image2_516695.png

            If you double click to see the details:

       /wp-content/uploads/2014/08/image3_516696.png

   2.4c. BD67 Configuration:  In this transaction, process code is linked to custom object type and success/error events as below:

     

    /wp-content/uploads/2014/08/image4_516697.png

          

As can be seen in the above screen shot, object type, start event, End event and success events are assigned to process code. Start event is raised when there is an error in the idoc posting and success event is raised in case idoc is successfully posted. As per above configuration, YDEBMAS_ERROR event is raised when there is an error in the idoc posting and success event YDEBMAS_SUCCESS is posted once idocs are successfully posted.

2.5 Testing Error/Success notifications for custom idocs (Test idoc is posted using WE19 as below):

  

      /wp-content/uploads/2014/08/we19_516726.png

When standard inbound is pressed, following pop up appears which gives the partner profile details:

   /wp-content/uploads/2014/08/pp_516727.png

     When OK is pressed, an idoc is posted successfully.You can see the idoc details in WE02 . 

      You can go to SBWP to see the work item.

     Similarly we can see work item for error notifications in SBWP.

Note: I am publishing another document SAP Workflows in ALE/EDI part2 covering remaining related topics like Rule based Inbound flow and Active monitoring.

   

References: ALE, EDI AND IDOC by Aravind Nagpal and www.help.sap.com

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. vivek gupta Post author

    Hi Gaurang,

    Thanks for reading my document, I hope it’ll be helpful to you.

    I have updated the missing screen shots in the document. Icouldnt save all the topics in single document so I am publishing
    another doc with remaining topics like Active monitoring and Rule based Inbound processing..

    Thanks,

    Vivek

    (0) 

Leave a Reply