cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying Travel Expense form as attachment to UWL workitem

Former Member
0 Kudos

Hi experts,

We have customized the travel expense workflow that is WS20000040.

When the requestor raises a travel expense request it goes to the manager for approval in his UWL.

There by default, according to the standard functionality, when approver clicks the particular work item, he can see an attachment attached to the work item, which on clicking, leads to transaction PR05.

Within that transaction when he clicks 'Travel Details' only then he can see the PDF for travel expense form.

Our requirement is, instead of opening the transaction, the PDF should open directly as soon as the approver clicks the link.

Please help.

Regards,

Pranita

Accepted Solutions (0)

Answers (2)

Answers (2)

Lukas_Weigelt
Active Contributor
0 Kudos

Hi Pranita,

The Process Object of BUS2089 linking to an implicit PR05 transaction view can be hidden via TA SWFVISU:

Since you say, you don't have a button/link leading directly to the Travel Form WDA Launcher, I think you have an obsolete UWL XML-File. Check Note 1076144 and upgrade your uwl_com_sap_pct_erp_mss_tra-File accordingly (for example in my system I implemented Version 14 for EHP4+onwards).

Cheers, Lukas

Former Member
0 Kudos

Hi guys,

Thank you for your replies.

I am pleased to inform that I was able to achieve this functionality, but with a li'l bit of customization.

I created a Program Exit that I attached to the user decision step of approval.


My ultimate aim was to call the RFC PTRM_WEB_FORM_GET which based on Employee pernr and trip number returns the XSTRING format of the Travel expense form.

Since this is an RFC it cannot be called in the program exit of workflow.

So I created a custom Business Object and an event with it.

I attached this event to a standard task that I created. Within that task I am calling a method of custom class, which in turn calls another custom Function module that calls this std RFC.

Now that I get the xtring format of pdf form in here, I am then simply attaching the same to the work item using the FM   SAP_WAPI_ATTACHMENT_ADD.

Now I can see the attachment, attached to the work item as soon as I create a travel expense request

in the same format, which is displayed through the transaction PR05.

Regards & Cheers!!!

Pranita

Lukas_Weigelt
Active Contributor
0 Kudos

Hi Pranita,

interesting solution. In my opinion this wasn't necessary though and you'll have to update your custom BUS in case there are any patches of BUS2089. Additionally, this WF-attachment of the form will not automatically adapt itself when the data foundation is changed. But if you can live with those disadvantages, I guess it'll be fine.

Cheers, Lukas

troy_cronin2
Active Contributor
0 Kudos

Dear Pranita

I hope you are well and many thanks for using the SAP Discussion Forums .

In relation to the scenario that you have described you mentioned the following:

  • You have customized the travel expense workflow that is WS20000040.
  • When the requestor raises a travel expense request it goes to the manager for approval in his UWL.
  • Your requirement is, instead of opening the transaction, the PDF should open directly as soon as the approver clicks the link.

Ok firstly a point to highlight here is have you attempted to reproduce this issue in more than one browser type? Also is compability mode currently enabled on the web browser platform that you are utlizing.

Ok in terms of background functionality and the underlying operations of this scenario the predefined actions which occurs once a workitem is clicked in the UWL depends on XML configuration or via the SWFVISU transaction.  By default, the item type configuration for the corresponding work items is set to launch the expense report form.

If you analyze the UWL configuration file and the travel expense XML e.g. com.sap.pct.erp.ESS/MSS - from UWL administration page, you should be presented with the following:

** SAMPLE **

  • WS20000040

<ItemType name="uwl.task.webflow.decision.TS20000131.ECCCLNT100" connector="WebFlowConnector" defaultView="com.sap.pct.erp.mss.tra.view.TripApprovalView" defaultAction="com.sap.pct.erp.mss.tra.action.DisplayExpenseForm" executionMode="default">

<ItemTypeCriteria systemId="ECTCLNT140" externalType="TS20000131" connector="WebFlowConnector"/> <CustomAttributes>

You should be able to set the predefined open action here.

Also there are two key points to remember when you are working with XML files.

  1. XML files and the UWL follow the notion of precedence. Therefore once you make a change in the UWL XML the file needs to be reuploaded with a new priority of high in order for changes to come into effect and the UWL Cache needs to be cleared.
  2. XML files should be backed up and copied so changes can be reverted easily if required.

Kindly update me as per your findings.

Kind Regards & All The Best

Troy Cronin - Enteprise Portal Support Engineer