Before I begin this blog I want to thank SDN for all the new looks and features, which has inspired folks like me to contribute more on the community. Great job by the SCN team. Being a SAP Portal expert it amazes and delights me how SAP has used the SAP Netweaver Portal and built this world class Community Site. (Hope my knowledge that SCN runs on SAP Portal is correct).
Now coming back to the main business. In this blog I would write about some frequently used operations when working with POWL, and also talk about Feeder Class and how we can enhance them to achieve more complex custom requirements.
Personal Object Work-list or POWL is used in Travel Management Traveler Work Center. The Traveler Work Center has five tabs by default as shown in the screenshot.
We did some custom changes in the POWL to adapt it to our requirement. I will enlist the learning’s I got while working with POWL in Travel Management.
1) Where do I find POWL related objects for Travel Management?
All the POWL objects for Travel Management can be found in the package “PTRM_WEB_POWL”. The Traveler Work Center is based on the component FITV_POWL_TRIPS.
2) What is a Feeder Class and how is it related to POWL?
Definition of Feeder Class as per SAP Documentation:
“All properties of a POWER List can be specified via one central, standardized class called Feeder Class.
The feeder class communicates with the database selecting specific data, forwards the data to a POWER List’s internal cache and refreshes the POWER List on the user’s client on demand. Moreover the feeder class includes the handling of actions initiated by the user while pressing a button.”
In simple words for each Standard POWL Type a Feeder Class needs to be assigned which will take care of rendering the POWL and determines the content of the personal work-list.
3) How do I know the Feeder Class of a POWL?
For each standard POWL its corresponding Feeder class can be found using transaction POWL_TYPE.
e.g. For Traveler Work Center POWL “FITV_POWL_TRIPS” the Feeder Class is “CL_FITV_POWL_FEEDER_TRIPS” as shown in the screenshot of the transaction.
4) Tell me more about Feeder Class?
Feeder Class for a standard POWL has to implement the interface “IF_POWL_FEEDER “. The interface contains methods which should be implemented by the Feeder Class to define the field catalog to be displayed in the POWL, and determine data for the displayed object type.
Details of the methods in the interface can be found in transaction SE24. In the case of Traveler Work Center these methods are implemented by the Feeder Class “CL_FITV_POWL_FEEDER_TRIPS”.
5) How can I hide tabs in Traveler Work Center?
This is a very common requirement. This can be achieved by following SAP Note 1124779 – ESS EHP Deactivate unused POWL queries in Travel Management.
This Note provides a solution to control the visibility of tabs through Authorization by creating custom roles.
6) Can I hide the links “Filter” and “Settings” which appear on the top right corner within the tabs?
In order to hide these links launch the Application Configuration “FITV_POWL_TRIPS” and go to the Component Configuration “FITV_POWL_TRAVELLER“. Select “confData” and scroll down to the attribute “hideSettingsLink”. Check the tick box next to this property. This will hide the links from your traveler work center. One should make these changes in a copy of the Application and Component Configuration’s to avoid changing the standard configurations.
7)Are there any other useful transactions related to POWL I should be aware of?
Other useful transactions to be aware of when working and customizing POWL are”
POWL_COCKPIT: This is the POWL Administrator Cockpit. It can be used to configure parameters for Standard POWL, Reporting POWL and Easy POWL
POWL_TYPER: This transaction is useful for role assignment of POWL. This is useful when trying to hide tabs. Covered in SAP Note 1124779.
POWL_TYPEU: Define Visibility of Work-list Type (or tabs) at User Level
POWL_CAT: Assign Queries to Categories. Queries that are assigned to a category appear together in the same block in portal.
POWL_QUERY: Used to maintain POWL queries and define POWL types and their description.
POWL_QUERYR: Define Query Visibility at Role Level.
POWL_QUERYU: Define Query Visibility at User Level
8) This is all standard, what about the custom development I was promised at the start of the blog? 🙂
My requirement was to change the text of the links that appear in “Recommended Actions” column of the “All My Trip”s tab in the Traveler Work Center.
In order to implement this we need to do an Enhancement to the Feeder Class. Following are the steps:
– Identify the Feeder Class which is populating data in the POWL. Here we know the Feeder Class is “CL_FITV_POWL_FEEDER_TRIPS”.
– The method “IF_POWL_FEEDER~GET_OBJECTS” in the class fetches the data and populates it in the ALV tables within the tabs.
– Create an Enhancement to this Class and create a Post Exit to the GET_OBJECTS method.
– One very important tip is that all the data shown in the Traveler Work Center is fetched by the Function Module “PTRM_WEB_TRIPS_GET_LIST”. This FM contains output table “ET_TRIPS ” which holds the data.
– The link value is contained in the field “SUPPOSABLY_STATUS_NAME” of the structure “PTRV_WEB_TRIPS_EXT” which is in the output of this FM.
– In the Post Exit Method based on your condition you can change the link text or disable the link. For Disabling the link set the field “SUPPOSABLY_STATUS_ENABLE”.
Code in the POST EXIT of GET_OBJECTS method.
DATA lt_object TYPE PTRM_POWL_WEB_TRIPS_EXT_T. DATA ls_ref_object TYPE REF TO PTRM_POWL_WEB_TRIPS_EXT. DATA ls_trip_data TYPE PTRM_POWL_WEB_TRIPS_EXT. loop at e_results REFERENCE INTO ls_ref_object. CLEAR ls_trip_data. MOVE-CORRESPONDING ls_ref_object->* TO ls_trip_data. **Put your IF block here to check condition and set the link text (SUPPOSABLY_STATUS_NAME) or disable link (SUPPOSABLY_STATUS_ENABLE) etc. append ls_trip_data to lt_object. ENDLOOP. CLEAR E_RESULTS. E_RESULTS = lt_object.
In a similar way we can achieve a lot of custom requirements by enhancing the methods of the Feeder Class.
Hope this blog helps many working on Traveler Work Center in Travel Management. 🙂 🙂