Workflow Configuration of Inbound IDOC processing:

Standard SAP IDoc interface uses ALE as the transfer mechanism and workflow functionality is used to route a failed IDOC to a specific individual or workgroup.

Application Link Enabling (ALE) is a component-based architecture enabling software component from SAP and from other software vendors to communicate and be integrated with each other. ALE can integrate business processes between R/3 Systems and non-R/3 systems as well as between R/3 Systems.

Business data is exchanged with an external system using the IDoc Interface. The IDoc Interface consists of the definition of a data structure and a processing logic for this. The data structure is the IDoc. It is the exchange format that unites the communicating systems. Using IDocs you can define an exception handling within the SAP System using SAP Business Workflow, without the need for the data to already be an SAP application document.

To implement the distribution of business application processes and functions using ALE you need to construct a logical Distribution Model of the whole system. Within the framework of this configuration, customers can specify which applications are to run on which systems and which messages are to be exchanged between the applications.   


Main Path: Tools->Business Communication


First step in the workflow configuration is to identify the IDOC type to be used for the inbound processing
The main menu path to configure the IDOC can be found under Tools in SAP Easy Access Screen:

            ALE > Inbound data processing
            Business Communication > IDOC setup
            Business Workflow > Org setup

WE30 - Identify the IDOC type


Identify the IDOC types for the inbound transaction, e.g.: ORDERS05 for orders, DELVRY03 for shipments, etc
Make sure to use the latest available version, e.g.: for shipment, the latest would be DELVRY03
Make sure the IDOC has been released

WE81 - Identify the Message type


Identify the message type for the transaction, e.g.: ORDERS for orders, SHPCON for shipments, etc

WE82 - Link IDOC to Message type


In this screen, link the Message type with the Basic type

WE57 – Link IDOC to Function Module


For a custom function module that will be used to process the inbound IDOC:
            Use SE37 to create the FM
            Find one that is related and copy
            Create a new entry with the new custom FM

BD51 – Define FM attribute


If your custom FM would be using a 'Call Transaction', enter '2' in 'Input'
Check the 'Dialog allow', this will allow to run foreground and background if checked

WE42 – Define Process Code


For custom FM, create a new process code
Click on Logical message
            Enter the Message Code if your setup required it, eg, you can setup different message code that will be use in the FM to identify logic specific for Beaconlite vs MBP
            Message Code can also be used to assign different org. unit for fallout notifications

            Double click on the process code to get to this screen
            Click on the  ==> to go to next screen
            This setup will be use to configure the fallout event triggering

SWE2 – Event linkage

            Take note of the Receiver type, this will be use in subsequent fallout configuration


Workflow Configuration ALE / Organization Unit:


ALE configuration


Transaction Code: SALE
Steps:
            Maintain Logical system
            Maintain Partner profiles
            Maintain inbox workflow recipient
            Maintain recipient by responsibility (as needed)

Maintain Logical System


The logical system is used to uniquely identify a system in the network
            Use this if the partner is neither a customer or a vendor

Organization Management

Organizational structure is created by assigning objects of the following types to each other:
            Organizational Unit
            Position
            Job
            Person
            User
            Task
  
PPOCW - Maintain inbox workflow recipient:

Create New Org unit

This step is to setup the business user getting the error notification for any failed IDoc

Create New Position

            Put the cursor on the org unit and click on 'Create'
            Click on 'Position', and press the enter button
            Create the new Position

Assign Position to User

            Right click on the position, click on 'Assign'
            Place the cursor on the 'User'
            and press the enter button
            Find the user to be assign
            Press Enter
            Click on 'Yes'

Assign Task to Position

            Place the cursor on Position again (Delivery fallout)
            Right click, and select 'Assign'
            Place the cursor on Standard task, and press the enter button
            Click on the 'Column Configuration'button
            Put a check on all
            Take the ID (XXXXXXXX) for the Org. Unit
            Make sure to save the setup (will create a transport)

WE20 – Partner Profile  

 3 types of Partner type
            KU – customer
            LI – vendor
            LS – logical system
Create a new partner profile under Partner type LS
            For AP, I think we would need to create the partner under LS
Enter the Partner number, Type and Agent.
            You should not use a user for this, user can come in and out, not stable
            This is the default Agent that will get notified if the agent in the inbound Post processing agent does not get resolved

Click on the "+" create the inbound parameter
Enter the Message type and Process code
                        - Select Processing to be 'Trigger by background program'
Click on the 'Post processing permitted agent'
                        Enter Type, Agent and Lang
                        This is the setup for the error notification

Workflow Processing Inbox fallout:

SBWP – SAP Business Work Place


            Any outstanding fallout items would be available here
            A user can be assigned to multiple tasks

Reserving a work item


            You can execute workflow items by either "double clicking the item" or selecting the item and clicking "Execute" button on the menu bar
                        This prohibits anyone else from taking the same work item
            There are 2 kind of status buttons, one is white (square shape) and the other is blue (square shape). Items in white has not been reserved by anyone.

Releasing a work item


If you determine that the item does not belongs to your business unit or for any other reason you are not going to trouble shoot this item you MUST release the item
            This will allow the work item to be place back in the queue
Place the cursor on the item, right click and select 'Replace' or use the  (dotted square shape)button on top of the menu bar.

Forwarding a work item


To forward a workflow items beyond your team, place the cursor on the item, right click and select 'Forward'.  A new popup screen will come up, you can enter the User in this box.

Fallout processing - Process


Double click on the work item to get more info for the fallout.
Use the 'Process' button to fix the fallout.

Fallout processing - Deletion


If there is a need to resend the IDOC, you must delete the existing fallout work item to delete it from the queue
Click on the 'Delete flag' and the 'Yes' button to confirm the deletion.

Fallout processing  - IDOC Status


Expand the 'Status records' to view error messages

Workflow Processing IDOC programming / Testing :

SE37 – Function Module builder


FM usually starts with IDOC_INPUT_XXXXXX
            XXXXXX usually is the message type, eg DESADV for delivery, ORDERS for order, etc
The FILL_DATA_XXXXXX is where you do data validation and build internal tables and variables needed for subsequent process
The MAINTAIN_DATA_XXXXXX is usually where you see the main logic of the program, eg: to update orders, delivery, purchase order, etc 

FILL_DATA_XXXXXX


This section contains editing logic and data validation

IDOC_STATUS_FILL


This is where you fill up the error messages you want display in the IDOC. You will need the status, document number,  message ID, message number, and detail messages (msgv1-4).

Status value:

50 - erster_statuswert_eingang
51 - fehler_bei_uebergabe
52 - beleg_unvollstaendig
53 - alles_ok
54 - fehler_in_der_bearbeitung

WE19 – IDOC test tool


Find an IDOC to be copied and change the data
Use the Inbound function module to test the IDOC

3 comments:

  1. Thank you for sharing the work flow of inbound configuration.

    ReplyDelete
  2. hi
    thank you for the useful posting.
    But I am still do not know how to post an inbound idoc (eg. INVOIC) to R3.
    Appreciate if can advice.
    Thanks you.

    ReplyDelete
  3. Nice ,.Thanks for sharing,Very useful

    ReplyDelete