Thursday, 15 January 2015

Print Functionality in HCM FPM Forms


In this blog we will come to know the simple steps to be followed in order to
·         Create a Form Scenario using FPM forms
·         Creating a HCM Process
·         Enabling the print functionality for FPM forms
·         Testing the Process

Creating a form scenario using FPM forms:

1. Run the transaction HRASR_DT, select form scenario and give a name to it. In the Form Type choose FPM Form.


 







2. Come to the Back-End Services, select the default SAP_PA and choose few fields. I am not explaining here the custom generic service class (BAdi).












3. In the Form section, choose type as Form and give a name to the form then click on create icon.








4. As soon as you click on create button a form configuration will open in the internet explorer there you can design the form. In the repositories section you will find all the fields which you have selected in the Back-End Services (step 2). We have to drag and drop the fields from repositories to layout.












Creating a HCM Process:

5. After saving the form scenario, in the same transaction (HRASR_DT) switch from form scenario to Process and create a new process.








6. Since we are looking only for print functionality there is no need of developing a workflow, instead in the workflow section for the workflow template choose NO_WORKFLOW.








7. In the Process Start assign the HR administrator role (HRASRA) for the process initiator.










8. Assign the form scenario to the process.








Enabling the print functionality for FPM forms:

9. To achieve the print functionality first we have to set the parameter ‘GEN_PDF’ in IMG configuration. Go to SPRO TransactionàPersonnel ManagementàHR Administrative ServicesàSettingsàSettings for HCM Process and Forms.






















10.  In the form scenario to the Print Form node we have to assign an adobe form (static print form) and an interface.











11. Change the Layout of adobe form to ZCI (Zero Client Installation) type.









12. In the context of the adobe form, you will find all the fields of the FPM form automatically transferred to adobe interface. Drag and drop the required fields to the adobe form context.











13. Design the Adobe form and bind the relevant FPM form fields to the corresponding Adobe fields and if you want to write any custom logic then write that in the interface.













Testing the Process:

14. Run the transaction code ‘HRASR_TEST_PROCESS’, choose the process and input the process initiator PERNR who is assigned with administrator role (HRASRA) and select application start type as Web Dynpro Screen.











15. Click on the button Form UtilitiesàGenerate PDF















16. A PDF form will be generated which you can either save or take a print out of it J



Tuesday, 30 September 2014

POWL Query Refresh

SAP has provided few standard POWL applications such as MANAGER_MSS_INBOX or IBO_INBOX in which the refresh functionality is achieved through the refresh handler's and to achieve the same in custom POWL applications, SAP has given us few options.

All the standard POWL applications use 'POWL_UI_COMP' standard POWL Webdynpro Component and 'POWL' Webdynpro Applictaion. The 'POWL' Webdynpro Application has 'REFRESHA' and 'REFRESHQ' parameters which controls the way in which the queries get refreshed.

 
Let’s have a look at the possible ways of enabling the auto refresh functionality in the custom POWL applications.

1. While assigning the POWL_TYPE to a Query in the transaction 'POWL_QUERY', set the parameter refresh type to 'On Every List Visit'. This will refresh the query every time user access the application irrespective of the user session.

 
2. In the application configuration of custom POWL application, we can set the parameter (REFRESHQ-Refresh the current Query).












3. While assigning the application to a role (PFCG) add a parameter REFRESHQ and set this to 'X'.









4. In the handle action of feeder interface IF_POWL_FEEDER, set the parameter E_DO_REFERSH to 'X'. This will trigger the query refresh after the user has performed some action on POWL list (Approve/Reject/Opening the form etc.).





5. By scheduling a batch job for the custom queries using the report 'POWL_WLOAD' to Refresh POWL Queries.
Note: Suppose we have made some changes to the existing query logic in the feeder class and the query is still displaying the old results then run the report 'POWL_D04' to delete the cached selection criteria for queries.

Monday, 31 March 2014

Configuring a New POWL Inbox for Workflow Tasks

SAP has provided the following feeder classes using which we can develop the new POWL inbox as per the Requirements.
  • CL_IBO_INBOX_FEEDER_ALERT    :          Inbox Feeder for Alert
  • CL_IBO_INBOX_FEEDER_BASE      :          Base Feeder Class for Inbox
  • CL_IBO_INBOX_FEEDER_NOTIF    :          Inbox Feeder for notification
  • CL_IBO_INBOX_FEEDER_UTILS     :          Inbox Feeder Utility Class
  • CL_IBO_INBOX_FEEDER_WI          :          Inbox Work Item Feeder
We can find the inbox list provided by SAP in the T-code: POWL_COCKPIT. Some of the standard POWL Inbox's are:
  • IBO_INBOX
  • MANAGER_MSS_INBOX 
Now, consider a requirement wherein the POWL inbox should have only Work items and the Notifications.

We can achieve this either by changing the configurations of Standard POWL Inboxes or by creating a new inbox.

To change the configurations of Standard POWL Inbox follow the below steps.

a. Run POWL_TYPER transaction and delete the POWL types assigned to the Application (Inbox)

b. Run the transaction POWL_QUERYR and delete the Query ID’s assigned to the Application(Inbox)

Suppose we have to develop a New Inbox then follow the below steps. 

1. Execute the T-Code: FPB_MAINTAIN_HIER and add a New Entry.
  
2. Execute the T-Code: POWL_TYPE and add the new entries. Since the requirement is to include only Workitems and Notifications in the POWL Inbox we can make use of the feeder classes CL_IBO_INBOX_FEEDER_WI and CL_IBO_INBOX_FEEDER_NOTIF.

 3. Execute the T-Code: POWL_ TYPER and assign the POWL ID’s added in the 2nd step to the Application created in the 1st step.

4. Execute the T-Code: POWL_QUERY and assign the POWL ID’s added in the 2nd step to the Queries.
 
5. Execute the T-Code: POWL_QUERYR and assign the Query ID’s added in the 4th step to the Application created in the 1st step.

6. Execute the T-Code SE80 and select the Web Dynpro Component ‘POWL_UI_COMP’  and create a component configuration and add the POWL Application.

7. Execute the T-Code SE80 and select the Web Dynpro Component ‘IBO_WDC_INBOX’  and create a component configuration and add the POWL Application.

8. Create an application configuration for the same application ‘IBO_WDC_INBOX’ and assign the component configurations created for ‘POWL_UI_COMP’  and ‘IBO_WDC_INBOX’.

9. To test the New Inbox, Run the T-Code POWL_COCKPIT, Select the Inbox Application and Click on Launch POWL. 



10. Assign this application to the PFCG role and in NWBC desktop Client/ NWBC HTML versions the New Inbox is displayed as shown below.


For Configuring Launchpad and Workflow tasks please refer the below documents from SCN:
For developing custom POWL applications please refer the below documents.