Showing posts with label SAP Workflow faqs. Show all posts
Showing posts with label SAP Workflow faqs. Show all posts

Thursday, April 10, 2008

How do I add an SAP object to an email in order to recover it in the workflow container?

I need to send an email with an attachment (external document: txt, Office, etc). I do not know how to add this kind of document as an SAP object in order to be able to recover it in the workflow container (_Adhoc_Objects). Can you help?

Your best bet to achieve this is to convert the external document (TXT, XLS, DOC, etc) into an object instance of the SOFM type. Then you can bind it in to either _Adhoc_Objects or _Attach_Objects.

You can use method SOFM.ImportFile to create a SOFM based document on your external file.

When performing an automatic workflow, customizing error messages appear. Why?

In SWU3 (Automatic Workflow Customizing) I ran "Perform Automatic Workflow Customizing" but "Configure RFC Destination" and "Maintain Web Server" activity did not activate; there is a red "x" mark beside them. I am also getting the error message: "RFC User could not be created". What do I do?

First of all, do not worry about the Maintain Web Server entry unless you plan on using some of the Webflow functionality available to workflow. In most of the systems that I have been dealing with, this is also a red "x".

I would be more concerned about the "RFC User could not be created" step. Have you checked SU53 (after you execute the SWU3 transaction) to see if there are indeed any authorization issues. Otherwise, you may want to consider OSS.

How to trigger a TCODE from SAP R/3 mail

How do I trigger a TCODE in R/3 or APO from SAP R/3 mail? Do I need to use workflow for this?

You do not need to use workflow as long as you just want to display something. A mail item can have attachments which can take the user to display a particular object. However, if you wish the user to update an object then a work item (workflow) will be required.

How to generate a new transport request from an already working workflow

How do I generate a new transport request from a workflow that is already working in the development environment?

Find which package the workflow is located in. Navigate to the package and find the workflow in question. Then right click on it and select "Write Transport Entry". You should then be prompted for a transport request.

Lost workflow due to unassigned position

A user has entered a service entry sheet which has to be approved by their manager. However, the workflow couldn't find an agent to forward the request to because the manager position was not assigned to a user name. HR has rectified the problem and now I need to restart or rerun the "get next agent" task to pickup the manager and forward the request for his approval. I'm not sure how to restart a task (I only know how to restart the workflow after an error using SWPR transaction). What should I do?

Unfortunately, if the "get next agent" step has executed then it can not be re-executed (unless it is in a loop). As a workflow admin, why don't you just forward the work item manually to the correct person? They will then process the work item and the workflow will continue.

Problem when GR is created

We have a workflow which is triggered when an invoice is parked. It sends a work item to the contact center project manager to create a GRN.

Our problem is that when the GR is created through the transaction and not through the work item, the work item remains in the user's inbox. Is there a way to change the status of the work item to 'complete' and remove it from the user's inbox?

What I would do in this case is put in a parallel step with the work item that listens for the creation of the GR. When this event is received, the parallel step will terminate the work item in the user's inbox.

There is another approach which is to use terminating events on the work item but this requires you to specify the GR creation method as asynchronous.

How to read the attachments of a workflow

How can I externally read the attachment to any workflow? I have the names of the files that are attached to a particular workflow but still can't open the fields from the link.

I am not sure I have understood exactly what you are trying to do but you can use WAPI SAP_WAPI_GET_ATTACHMENTS to read all the attachments of a workflow.

Clearing pending workflow items

Is there a way to clear/complete pending workflow items? We just went live and we have discovered some bugs. As a result of the bugs we have some processes which show as a pending workflow. We have processed the changes using the GUI and now we would like to get rid of these workflow items. Is there a way to achieve this?

The best way is to set the Workflow status to "logically deleted". This ensures that the workflow does not do any more processing but it is still kept in the system for audit trail purposes.

Refreshing dynamic columns

In the business workplace the refresh button in the workflow inbox is not refreshing the dynamic columns. How can we set it to refresh the dynamic columns?

Dynamic columns are fairly inefficient and hence the fact that BOR attributes are buffered is probably a good thing. This inefficiency is rarely a problem as most people don't have a large number of work items in their inbox. However, for those that do, dynamic columns can bring their business workplace to a pretty slow pace.

Most likely the reason that the data is not being refreshed is because of run time buffering in the Business Objects. I suggest you put a breakpoint in the relevant attributes and see whether the data is being reselected from the database when the user refreshes.

Updating the absence infotype

I need to update the absence infotype record with the attachment after the employee's leave request is approved by the manager.

I have the attachment in my workflow work item. I can extract the attachment from workflow using Function Module (FM) "SAP_WAPI_GET_ATTACHMENTS". However, this is returning the attachment as "SOFM Object".

I am using the following FMs to create the archive and add a link to PREL Object with proper key:

  1. ARCHIVE_CREATE_FILE
  2. ARCHIVE_CREATE_TABLE

How can I convert the SOFM Object either into a file or to a binary object format so that we can use the above FMs?

Use Function Module "SO_DOCUMENT_READ_API2" to read the contents of the SOFM and then pass it on to the appropriate archiving Function Module.

Blog Archive