HI!!!!!! I don’t know if I have to say “Hi” on my first blog or not. I believe any representation in very simple and casual forms can stay in our brain for longer period. Anyway, I don’t want to bore you with my philosophy.
Working on the SAP WD ABAP side, I have realized that we have some restriction when we talk about WD JAVA integration with WD ABAP.
There are few WD JAVA iViews where SAP has given “a hook” to add any non-WD JAVA iView, which can be WD ABAP, or just a simple BSP application. But a lot of business users have the requirement to enhance their current Portal business functionality to some extent (e.g. adding a custom report for planning overview, Benefits enrollment confirmation, PDF pop up on completion of enrollment).
Let’s discuss the several ways of doing this.
By definition, a guided procedure says that it provides a simple structure for defining business processes centered on an intuitive user interface that enables even technically inexperienced users to create or change scenarios. It has designed to enable fast and easy implementation of business processes across multiple applications. It allows users to set up and execute collaborative business processes easily by seamlessly integrating backend system transactions and services into the business process context.
But what if I want to add an action in the dynamic work and life event based iView or trigger PDF confirmations during the save in the Benefit Enrollment Page? We can’t do this using GPs, since these are standalone WD JAVA iViews. Now we have 2 options left.
- Option A: Install NWDS and enhance the whole JAVA page.
- Option B: Create a WD ABAP iView and trigger it from JAVA.
These are natural responses from anyone that uses WD Java and enhances that iView. But SAP’s latest Enhancement Package 5 for ERP 6.0 has modules (like ESS/MSS, Talent, E-Recruiting, Travel and Expenses, etc.) that have been rewritten in WebDynpro for ABAP. Functionality is almost the same. But this does speak to the direction in which SAP may possibly be going – which is to use WebDynpro for ABAP for functions that are only dependent on backend SAP. Smart customers don’t want to deal with JAVA N ABAP hassles in future upgrades.
So what should we do now? Plan B! Trigger WD ABAP iView from WD JAVA.
In fact, let’s check out this example. A few months back, I got this as a road block and I have started looking for options. So what I did was to create a simple WD ABAP application that has “CONF_FORM as interactive Form.
This WD ABAP has a set of logic to call corresponding the Employee’s (SY-NAME) benefit confirmation form and convert into PDF strings.
After finishing above logic I have activated whole service. Just for testing purpose, I have double click on application and copy URL into browse.
I was able to see pre designed Benefit Confirmation PDF since I have attached my user id to valid employee who has done his open enrollment.
Create an iView in the Portal for this page.
Easy huh… Now I had only one question: how do I invoke this iView from the WD Java page “Save” button?
With a lack of Java skill, I was going to each direction (non-JAVA) to find out a way to provoke this iView and, after long hours of debugging, I found that enrollment iView was calling the RFC (HR_BEN_ESS_RFC_ENROLL) function module. Bingo!! I decided to enhance this RFC function and call the new ABAP iView and done with it.
But it wasn’t that simple. I had forgotten the basic concept of RFC and WD Framework. WD JAVA framework calls the RFC function module in the same LUW instead of changing it.
Anyway before jumping to the final solution, I would like to share some of brilliant ways to call WD ABAP applications.
- Get Portal Repository – use CALL FUNCTION ‘WDR_GET_REPOSITORY’ function and call WD application using navigate_absolute method under class CL_WDR_PORTAL_INTEGRATION ( Don’t forget to perform class instantiation ) .
- 2. Constructing ABAP URL – use CALL FUNCTION ‘WDY_CONSTRUCT_URL’ to create the URL and use FM ‘WDY_EXECUTE_IN_PLACE’ to execute it.
- 3. Creating an Event – use SM64 transaction to create an event and Class “cl_batch_event” to raise that event.
Unfortunately, these coolest ways couldn’t help me.
Finally, I decided to install NWDS and I wanted to see the whole architecture of the Benefit Enrollment application under WD JAVA. I think this time I pointed my gun in right direction or you can say that really I have found actual aim. I opened up the Benefits Enrollment Application and I found it was using exactly the same framework as ABAP. In fact, the whole application was designed in very non-complex JAVA coding. No wonder why SAP, told below, has WD JAVA downsides.
- Framework proprietary to SAP – as opposed to any standard J2EE framework (like Java Server Faces).
- No complete freedom to design user interface elements, as only specific objects and their properties can be manipulated.
- Not possible to include application data ‘scriplets’ into HTML markup.
- Custom Style-sheet integration.
Also, the client and I have valid reasons to create this enhancement using WD ABAP, not in purely in JAVA. I mean, the SAP JRE requires huge maintenance efforts, is hard to configure and tune, and the performance is ridiculously slow as compared to an ABAP stack. The Java Development Framework is a study in complexity.
I think, SAP has failed to deliver a fast, scalable and cheap JAVA platform.
Anyway back to solution, after seeing WD Java page in NWDS, I decided to enhance the “Save” button with the addition of WDPortalNavigation.navigateAbsolute Method. I know that I have baked a real cake already, but I am not able to pull it from the oven. I found WD JAVA Events the same as WD ABAP with JAVA syntax, but getting syntax wasn’t tough for me.
I have copied the PCD Location for “z_ee_conf_statement” and put it as import parameter for the “navigateAbsolute” method. I have activated the code and sync back to main Benefits application.
Finally, I got success but it wasn’t as hard as I was thinking at one point of time. I think it was my fear for not knowing JAVA, which I don’t have any more.
But the hurdles weren’t done yet. I got another issue about how the WD JAVA event was going to communicate to the ABAP iview for Benefits adjustment reason and event and how can ABAP PDF application control multiple user inputs.
Due to the shifting of LUW, we can’t capture this information over memory, so I have decided to use an old trick. I created a buffer table and enhanced HR_BEN_ESS_RFC_ENROLL function module.
When the user hits “Save” on the open enrollment iView, WD Java calls RFC HR_BEN_ESS_RFC_ENROLL with Implicit Enhancement. This will create an event entry in the table. Once the RFC call has completed, WD JAVA triggers the WD ABAP PDF page using an enhanced event. The WD ABAP has been coded to read the buffer table and trigger the corresponding confirmation page.
Mission accomplished! The Benefits Confirmation PDF form popup is ready for the User. Now they can’t ignore it …..