Views
SAP ABAP on HANA sample practice Questions
How to debug Outbound IDOC/ How to get FM name attached to an Outbound IDOC
How to debug Outbound IDOC/ How to get FM name attached to an Outbound IDOC
First we need to know the partner type , partner number and message type.
To get the above mentioned idoc details.
1. Go to Tcode WE02 and pass the idoc number in the selections screen and execute. ( you can also pull data with the information which u have in your hand)
2. Now take the partner type, partner number and message type
To get the FM name attached to that idoc:
3. Go to Tcode WE20
4. In the left hand side, all the partner profiles (under the tab 'Partner profile') will be display, expand our partner type node.
5. Find our partner number from the list and double click on it, All the information related to the selected partner type will be displayed on the right hand side.
6. You can see a table control with heading 'Outbound', scroll that table double click our message type. It will take us to an another screen.

7. From there select the tab 'Message control' , you can see the process code, double click on that.
8. It will navigate to FM details.
9. For debugging, put a break point inside the FM and explore!!
Just put the break point in the FM will not stop the debugger, follow the below steps
- Go to the transaction from which the IDOC is getting triggered/ generated (E.g. ME22 or VL02). Here this is billing doc, so going to tcode vf02
- Go to the messages/output types for the document you select
- ( In ME22 use menu Header->Messages,
- in VL02N go to Extras-> delivery output ->Header/Item ). in VF02, Goto -> header-> output
- There you will be able to see the list of output types. Double click on the output type which is triggering our idoc.
- In the Output window choose an existing message and press Repeat output (Or create a new message)

- It will create another row with traffic light yellow color
- Select the row and click on Further data and change the dispatch time to : 1 Send with periodically scheduled job
- Then save and come out of the document else idoc will not get process since document is locked.
- Then Go to SE38, run the program RSNAT00.
- In the selection screen choose transmission medium 6 EDI and enter any further selection criteria.
- Then execute it..!
Workflow : Introduction
Workflow - Agents
- Possible Agents
- Responsible Agents
- Excluded Agents
- Recipients
- Actual Agents
- These are people who can execute a task.
- Defined in the “Task” level
- Best practice to assign possible agents, is to sync with Security Roles
- A task can be marked as “General Task” to allow anyone to execute the work item.
- There are different ways to assign possible agents.
- For SAP provided workflows, we can assign possible agents using IMG.
- When we are displaying a task, we can use the following menu path
- Additional data –> Agent assignment –> Maintain
- The transaction is PFTC_DIS.
- From task profile section of organization plan
- From profile generator (Roll Maintenance); Transaction PFCG
- From workflow builder during step definition.
- Responsible agents are people who you want to execute a particular work item.
- Responsible agents are usually assigned in workflow step level, but can also be assigned at the task level via default agent determination rules
- Usually responsible agents are determined during runtime using two main ways
- Expressions
- In expressions, the data needed for agent determination is stored in workflow containers, which later is used in computations and agent is determined based on container values.
- Rules
- In rules, agents are determined dynamically when work items are created.
- We can bind data from workflow to the rules to provide data for agent determination computations.
- Expressions
- For a work item to be forwarded to a responsible agent, the agent should also be a possible agent.
- Excluded agents are people who should not receive the work item for execution
- Excluded agents are always assigned by an expression to the workflow step
- Typically we put all excluded agents in a multi-line container in the workflow container, and use an expression to assign the list of excluded agents to a particular step.
- Recipients are agents who receive a work item.
- Recipients are
- Possible Agents
- Responsible Agents
- Are Not Part of Excluded Agents
- If there are no possible agents, then nobody will receive the work item.
- If no responsible agents are determined, the system checks to see if any default agents are defined in the task level.
- Recipients can forward work items to another agent. Whether or not the recipient can forward the work item is determined by the attribute of task.
- General Task
- Work item can be forwarded to anyone and executed by anybody
- General Forwarding
- Work item can be forwarded to any user.
- No General Forwarding
- Work item can only be forwarded to possible agents.
- No Forwarding
- Work item cannot be forwarded.
- General Task
- Actual agent is the agent that is currently processing a work item or the user who has last processed a work item.
- Many agents can be assigned to a single work item.
- The work item shows up in all agents inbox, and disappears from everyone else when one agent reserves or executes a work item.
- Sometimes we need every agent to make an active decision from particular process. To do this, we can create one work item per agent.
- Deadline agents are people who receive work item when a deadline has exceeded for a work item
- These agents are entered in the deadline Of workflow step.
- Notification agents are people who are notified when a work item is completed.
- Usually entered in notification tab of workflow step.
- Every workflow agent must have a userid.
- Assigning userid directly for task may be very high maintenance.
- Organizational plan helps in simplifying this issue.
- Every SAP application server comes with basic organizational plan
- Represents a group of people such as 18, section, Department, work area, lab, help desk, or shared service Centre.
- A job described functional role within the organization.
- Position represents a headcount placement.
- Users is the actual userid of a person.
- Workflow task can be linked to one or more Organization units, positions, jobs, or users.
- SAP my HR comes with extended organization plan
- Extended organizational plan includes personal numbers
- A person represents a PERNR
- a person may be assigned to one or more positions.
- A user is assigned to a person by setting up info type 105 (Communication)
- From workflow perspective, extended organizational plan has following benefits
- Much more data in organizational plan to help make decisions.
- “Evaluation paths” can be custom built and used as rules to find organization objects.
- If a user changes job or position, existing work item may need reassignment.
- Typically, only served work item needs reassignment.
- We can find outstanding work items for the user using transaction : SWI5. This transaction should be run before removing the user
- We can find orphaned work items using transaction : SWI2_ADM1
- The HR substitute relationship A210
- User Substitution (Table: HRUS_D2)
- We create substitute for a position using A210 relation between position and substitute.
- All work items for that position are made available to the substitute.
- This is usually maintained from user’s inbox using menu path
- We can also create entries directly using ABAP
- In active substitution, work items are automatically forwarded or appear in the substitutes inbox.
- Require the substitutes to explicitly choose to see original agents work item
- The organisation plan is buffered for efficiency.
- Changing an organisation plan will not immediately be updated in the buffer, and hence can create confusion especially for workflows using the plan for agent determination.
- Typically buffer is refreshed at midnight.
- Alternatively, in development systems, we can trigger refreshing of buffer using transaction: SWU_OBUF
- It should be noted that the buffer afresh is a resource intensive process
- When writing your own programs for buffer afresh, following function modules can be handy:
- RH_WF_OM_INDICES_TIMESTAMP_RFS
- RH_TASK_INBOX_VIEW_REFRESH
- RH_TASK_AGENTS_INDEX_REFRESH
Triggering workflow when a PM notification is created ( through IW21 transaction)
--------------------------------------------------------------------------------------------------------------
1. Then click on Hat icon (Basic data/ start condition).
The tab with basic data opens up. Enter the Workflow name and Workflow description and change the release status to Released. And save it.
1. Now double click (Or right clickà create) on the un-defined step, Click on step type ‘condition’. Here we have to put a condition of checking where creator and the one who closes the notification are not-equal/equal.

































