cancel
Showing results for 
Search instead for 
Did you mean: 

Enhancement in ESS Leave Request

Former Member
0 Kudos

Hi Gurus,

I am new to webdynpro Java. I have a requirement to add a custom button in a Standard ESS leave request (Webdynpro Java) view. When i click the the button it has to call popview(not sure is it possible to call a webdynpro abap view). If possible explain me with step by step preocedures(with screen shots).

Thanks,

Mohammed

Accepted Solutions (1)

Accepted Solutions (1)

TusharShinde
Active Participant
0 Kudos

Hi,

Setting up of NWDI is mandatory to customize ESS applications. You have to import all ESS SCA files delivered by SAP in to the NWDI track to be able to get them into NWDS for custom developments.

Without NWDI Screen Customization is not possible.

Check SAP Note :- 872892

also check

http://wiki.sdn.sap.com/wiki/display/JDI/NWDIRelatedNotesandLinks for track creation & NWDI ground work.

Check this link for

[ESS/MSS Customization u2013 Make it Simple|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/7177] [original link is broken] [original link is broken] [original link is broken];

Regards,

Tushar Shinde

Former Member
0 Kudos

Hi Tushar Shinde,

Thanks for the link, with that help i import the required ESS Leave development componet. But not able to find the corresponding view for the ESS Leave request. There are more then 15 Webdynpro Component and 5 Application. I found the application. It is Leave Request and it properties shows that CCAPPL is the componenet. But when i look into the component i seen one empty view. Please help me the find the correct component and the respective view for the leave request.

Thanks & Regards,

Thoufick.

TusharShinde
Active Participant
0 Kudos

Hi,

Thanks for the link, with that help i import the required ESS Leave development componet. But not able to find the corresponding view for the ESS Leave request. There are more then 15 Webdynpro Component and 5 Application. I found the application. It is Leave Request and it properties shows that CCAPPL is the componenet. But when i look into the component i seen one empty view. Please help me the find the correct component and the respective view for the leave request.

Good your are now able to configure NWDI and also started working on it.

I agree the ess/lea DC is quite complicated to understand but If you start exploring it, it is easy and it follows SAP's Best Practices for Componentization. Check this WIKI, to understand what it is.

http://wiki.sdn.sap.com/wiki/display/WDJava/UsecomponentsinbiggerWebDynproprojects+%28componentization%29

also read some text on Floor-Plan Manager (FPM) which will give idea of How ESS applications are built

/people/harald.reiter2/blog/2006/09/06/sdn-day-session-in-las-vegas-custom-development-of-web-dynpro-ess-applications-using-floor-plan-manager

http://help.sap.com/saphelp_erp2005/helpdata/en/b4/139525380149a49c8402e22700e4ba/frameset.htm

Coming to point, you can see below components, to list a few:-

name VcFormEdit - It contains Form which you can see in bottom are of Leave Request Applications and also on Approver Screen for Approve or reject.

name VcReqList - it shows the list of request made

name VcTeamView - it helps to generate Team Calendar at runtime on Leave Request as well as on Approver Screen..

name VcWorkList - it shows list of Request Pending on Approver screen.

and many more

All this components are interlinked via there respective interfaces.

In ESS all DC's are tightly integrated.

Regards

Tushar Shinde.

Former Member
0 Kudos

Hi Tushar Shinde,

Thanks, I found the view and added the button, But from a web dynrpo Java view is it possible to call a webdynpro ABAP view as popup. If possible please share with me if any sample codes.

Regards,

Thoufick.

TusharShinde
Active Participant
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi,

You can create a Webdynpro Abap iview in portal. You can call that iview by using the following code:

WDPortalNavigation.navigateAbsolute("ROLES://portal_content/..<Your iview location>",

WDPortalNavigationMode.SHOW_EXTERNAL,(String)null,(String)null,WDPortalNavigationHistoryMode.NO_HISTORY,(String)null,(String)null,(String)null, (String)null,true,true);

The last (String) actually sends any dynamic parameter you want to pass to the iview.

Thanks

TusharShinde
Active Participant
0 Kudos

Hi,

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Good, you are now able to do modification in Standard ESS package. If you want to navigate to another WDABAP iView from your WDJAVA application, you can use the below code on some button or link action to navigate to another iView.

Check this link:-

http://help.sap.com/javadocs/NW04/current/wd/com/sap/tc/webdynpro/clientserver/navigation/api/WDPort...




public void onActionnavigateToToAbapiView(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
  {
    //@@begin onActionnavigateToAbapiView(ServerEvent)
	try 
		{
						
				WDPortalNavigation.navigateAbsolute(

				 "ROLES://portal_content/com.demo.DEMO_PCD/com.demo.ESS_SAP/com.demo.iview_ESS/demo.com.java_demo_com_demodc_demo_com_DemoApp",

				 WDPortalNavigationMode.SHOW_INPLACE,

				 "",

				 "Window Title", WDPortalNavigationHistoryMode.NO_DUPLICATIONS,

				 "Title",

				 "",//ContextURL

				 "param1=10&param2=portalID");		
	} 
	catch (Exception e) 
	{		
		e.printStackTrace();
	}


You will find your WDAbap PCD location in Content Admin, copy it and repace PCD: with ROLES at start.

also you can pass parameters between 2-iViews, in the above code snippet you can find that.

the above code needs to be written in your source iView so as to navigate to destination iView which is mentioned using its PCD location.

to retrieve the parameters you need to check ABAP syntax to retrieve URL parameters.

In java we retreive using below syntax:-




String param1 = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("param1");
String loginID = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("param2");


to show it as a Pop-Up you need to find some work-around to achieve it, If i get time will do it and let you know, but if you find something for that do share.

Regards

Tushar Shinde.

Former Member
0 Kudos

Hi Tushar Shinde,

I tried the same but not able to navigate from the current page. I even tried to give PCD path for Google URL, It trigger the button action then process it but not navigate to the target folder. does it needs any specific settings or any preliminary checks. Please help me to correct the error if any.

Bellow is the code

try

{

WDPortalNavigation.navigateAbsolute(

"ROLES://portal_content/nhg.local.NHGHRIS/ziviews/com.sap.pct.erp.ess.zquotaoverview",

WDPortalNavigationMode.SHOW_INPLACE,

(String)null,

(String)null,

WDPortalNavigationHistoryMode.NO_DUPLICATIONS,

"Called iView Name",

(String)null,

(String)null );

}

catch (Exception e)

{

e.printStackTrace();

}

But still it is not navigating to the target view.

Regards,

Thoufick.

Former Member
0 Kudos

Hi,

The navigateabsolute function has different signatures. Try the one i mentioned in my post.

Thanks

Former Member
0 Kudos

Hi Tusher,

I tried the same code that you posted but still the error remins, not able to navigate the target view,

try

{

WDPortalNavigation.navigateAbsolute(

"ROLES://portal_content/nhg.local.NHGHRIS/ziviews/com.sap.pct.erp.ess.zquotaoverview",

WDPortalNavigationMode.SHOW_INPLACE,

"",

"Window Title", WDPortalNavigationHistoryMode.NO_DUPLICATIONS,

"Title",

"",//ContextURL

"param1=10&param2=portalID");

}

catch (Exception e)

{

e.printStackTrace();

}

//@@end

}

Correct me if am doing anything wrong.

Regards,

Thoufick.

TusharShinde
Active Participant
0 Kudos

hi,

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Check the desired results only when you login into the portal, while Deploy&Run dont test the same.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Make sure you login into Portal goto Source iView and from there on some button action call the Target iView using your above code.

Let me know what error your are getting.

Mentioniing error will help us to solve it.

Regards

Tushar S.

Former Member
0 Kudos

Hi Thoufick,

Your signature is still not correct. Please try the one as I have already mentioned. It has 11 parameters including two boolean parameters which is clearly missing in your code.

I have tried this myself and it always works.

Thanks

TusharShinde
Active Participant
0 Kudos

Hi Swaralipi,

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Agreed, that you are syntax is correct, and I would be happy if Thoufick use the same code, but what I have suggested is what I am using currently in my application for Navigation between two iViews, so I am very much sure that my code is working, rather in OOPS there is something called Function Overloading, which helps to create function with same name but different args and parameters, so same is the case with navigationAbsolute, the syntax what you mention and what I had given are correct.

check this link for more details

http://help.sap.com/javadocs/NW04S/SPS09/wd/com/sap/tc/webdynpro/clientserver/navigation/api/WDPorta...

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Its a matter of choice which you want to follow.

Regards

Tushar.S

Hi Thoufickm

Check this link for syntax

http://help.sap.com/saphelp_sm32/helpdata/en/b5/424f9c88970f48ba918ad68af9a656/content.htm

Edited by: TusharShinde on Jul 12, 2011 11:20 AM

Former Member
0 Kudos

Hi,

I tried same like you code

public void onActionOnAction(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionOnAction(ServerEvent)

WDPortalNavigation.navigateAbsolute(

"ROLES://pcd:portal_content/nhg.local.NHGHRIS/ziviews/Mass_approve_leave_0",

WDPortalNavigationMode.SHOW_INPLACE,

"",

"Window Title", WDPortalNavigationHistoryMode.NO_DUPLICATIONS,

"Title",

"",

"param1=10&param2=portalID");

//@@end

}

But it shows some error message. Like WDPortalNavigation canot be resolved and the corresponding method show in the view ouline with red mark (rest of the standard method are in green.)

Where i can check syntax error and in the above piece of code what is wrong. I created 6 activities. Now when ever i check in a activity it ask for activate with predecessor activity. So it means some error in my code. Please explain me to rective this and deploy it successfully.

Thanks & regards,

Thoufick.

Former Member
0 Kudos

Hi,

Finally am able to navigate the screen. Issue is some missing jar files. But my requirement is like a popup screen without standard internet explorer header and URL part. if you have any idea how please share with me.

Regards,

Thoufick.

Former Member
0 Kudos

Hi ,

Some how i managed to navigate as per your code. I created IAC Iview for R/3 report. From Ess Leave request am navigating to IAC iview . While navigating using navigate absolute method am passing some of the screen fields as parameter and am able to see the parameter value in the IAC i view URL. But how to read the URL and its parameter in the R/3 report.

Regards,

Thoufick.

TusharShinde
Active Participant
0 Kudos

This message was moderated.

TusharShinde
Active Participant
0 Kudos

Hi,

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sorry for late reply. According to your requirement i think you can use the below code to pass parameters to ABAP Report via IAC iView.


try 
		{
						
				WDPortalNavigation.navigateAbsolute(
 
				 "ROLES://portal_content/com.demo.DEMO_PCD/com.demo.ESS_SAP/com.demo.iview_ESS/com.demo.iaciview.iaciview",
 
				 WDPortalNavigationMode.SHOW_INPLACE,
 
				 "",
 
				 "Window Title", WDPortalNavigationHistoryMode.NO_DUPLICATIONS,
 
				 "Title",
 
				 "",//ContextURL
 
				 "pnppernr-low=00010760&COMP_CD=1000&~Okcode=PC00_M40_F16"");		
	} 
	catch (Exception e) 
	{		
		e.printStackTrace();
	}

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The above code is similar to what i had given earlier only think here is the way I am passing the parameters to IAC iView, on Navigating to IAC iView, in my example I am passing parameters to standard Form 16 Transaction PC00_M40_F16. In this ABAP report the selection screen ask for 2- params i.e Employee ID and Company Code. to pass the values you need to have the exact names of selection screen elements.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pnppernr-low=00010760&COMP_CD=1000 , here pnppernr-low and COMP_CD is the field name of selection screen fields. thats why I used this parameter names. and Okcode=transaction name ie. Okcode=PC00_M40_F16 helps to set the values or parameters to the ABAP report.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If you mention the screen fields names wrongly you will not be able to set the values.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;To find the Field name go to transaction and select the Field and Press F1 and goto Technical Information to get Screen Field name, which you will find at bottom in Technical Information.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Do let me know if it works.

&nbsp;&nbsp;&nbsp;Have a nice day.

&nbsp;&nbsp;&nbsp;Regards

&nbsp;&nbsp;&nbsp;Tushar Shinde

Former Member
0 Kudos

Hi Tushar,

Tried passing parameters but how to skip the selection screen if i use the parameter as no display then the URL parameter not passed to my screen values. My requirement is as i told you am navigating to IAC iview(t-code without selection screen) from java dynpro(Ess Leave Request). but how to pass the screen value from java dynpro to r/3 report. in my IAC iview URL am able to see the values of that i passed it from java. But how to get the URL from R/3 report.

Regards,

Thoufick.

TusharShinde
Active Participant
0 Kudos

Hi,

&nbsp;&nbsp;&nbsp;&nbsp;Please read the explanation I had given carefully, the code I had given to you is used in WD Java app to navigate to IAC iView and it also passes the parameters to Selection Screen variables because of mention of OK Code.

If I had got you wrong help me to understand it, You cannot skip selection screen you have to pass it to screen fields then only you will be able to run the report and pass parameters.

Regards

Tushar Shinde

Former Member
0 Kudos

Hi tusher,

I used ITS_IMPORT_CONTEXT FM to read the parameter values and able to make it. Just a final one when i use navigateAbsolute and with WDPortalNavigationMode.SHOW_EXTERNAL this parameter am calling a IAC iview and it is displaying as popup by setting windows feature parameter. But i want to hide minimize and maximize button in that iview. Is there any posibility to do it.

Regards,

Thoufick.

TusharShinde
Active Participant
0 Kudos

Hi,

&nbsp;&nbsp;&nbsp;&nbsp;I am not sure whether it is possible but you can see in iView Window Features properties here Javascript properties you can mention like for e.g:- toolbar=no,menubar=no but I am not sure there is any property available in Javascript to hide or disable the Min & Max buttons.

&nbsp;&nbsp;&nbsp;&nbsp; Check if in Javascript some property is available for your requirement.

Regards

Tushar Shinde

Answers (0)