cancel
Showing results for 
Search instead for 
Did you mean: 

ESS customization- security API issue

Former Member
0 Kudos

Hi,

We have added a custom link in the leave request edit screen which is global to all the countries.

This has been done in code level. Now our client want us to hide this for certain countries and make it visible for certain countries.

so i have added a custom BAPI for that which will get current logged portal user input and retrieves country of that user.

I have added the WDJ code for current logged portal user. Now the problem is with the security API. since we cant directly use this through java build path. I have created a library file for that and added that security JAR in that. and i have added that lib as used DC. while try to build the leave request DC, it built with warnings. but while activating the NWDI activity it got failed.

The CBS error log stating that the security API file is depreciated.

Kindly help on this or provide any alternative ways to get current logged portal user which is already used in standard dc.

Thanks,

Nandha

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Thank you all.

My issue has been fixed.

I got the perner from the used dc (interface controller FcEmployeeServices). by using the perner i got the country values.

Thanks,

Nandha

Former Member
0 Kudos

No need of custom RFC to get current logged in user. ESS WD uses its own rfc's to fetch all employee related data. Employee is fetched from DC xssutils. I dont have access to nwdi rite now to tell exact Fc component..but you can read http://wiki.sdn.sap.com/wiki/display/profile/HowtoreadinformationfromtheteamviewerinWeb+Dynpro article to get a clue..

cheers~

avadh

siddharthrajora
Product and Topic Expert
Product and Topic Expert
0 Kudos

1 solution ))

PtARQ> Homepage customisation

You can create a link under define services

in V_T7XSSSERSRV and you have proxy class CL_PT_ARQ_AREAPAGES_SAMPLES or

CL_XSS_CAT_1_AREA_PAGE

2) solution

instead of this EMPLOYEE_WORKTIME_LEAVEREQUEST05 use directly

EMPLOYEE_WORKTIME_PROXYLEAVEREQUEST and proxy class to enable the service to show to the employees

Former Member
0 Kudos

Hi,

I just want to make clear my requirement. The custom link which i have mentioned about is not a service link issue.

It is a URL (just like wiki link) which we have added in the Standard Leave request edit screen step through nwdi change.

Thanks,

Nandha

jigarlotia
Participant
0 Kudos

Hi Nandha,

Just a quick point..if the link was a normal static URL you could have added the URL using Personalisation and there would not have been any need to modify the standard leave code.

Coming back to the current issue, do you have different ESS roles for different countries? If yes, you can use the personalisation and add the link for the relevant countries.

Hope this helps.

Jigar

Former Member
0 Kudos

Hi,

I agree with you. But unfortunately The client dont have diffrent ESS role for country zones. they are using the same role for all the countries.

That is why i choose this code change option.

Thanks,

Nandha

Former Member
0 Kudos

Sorry for the ID confusion. I was replied from my collegue's ID.

Kindly help.

I have no other option except the code change. Here the problem is with the security API. we are using jdk1.5.0_06.

can you please tell will this API work for this java version?

Thanks,

Nandha

Edited by: Nandhadevi Thangaraj on Sep 8, 2010 8:54 AM

jigarlotia
Participant
0 Kudos

Hi Nandha,

Instead of creating your library for security_api.jar, try adding it through "Used DCs". You can add it as used DC..it is located somewhere under SAP_JEE and you can find security_api DC that can be added which effectively will have the required jar files in your class path. See this forum also /message/9299694#9299694 [original link is broken]

Hope this helps.

Jigar

Former Member
0 Kudos

Hi,

Thanks.

I will make a try on this and let you know.

Thanks,

Nandha

Former Member
0 Kudos

Hi,

Tried the option. it still shows the same error.

Can u please tell whether we can use this com.sap.security API with JDK version jdk1.5.0_06.

because whenever i incude this API and calls the API using IUser it gets buld failed and getting the below error.

com.sap.security.api does not exist

[javac] ERROR: import com.sap.security.api.IUser;

[javac] ERROR: ^

[javac] ERROR: C:\Documents and Settings\18927\.dtc\0\t\900C3AEEF6AB56D0763FE4FF793F5B24\gen_wdp\packages\com\sap\xss\hr\lea\form\edit\EditView.java:116: cannot find symbol

[javac] ERROR: symbol : class IUser

[javac] ERROR: location: class com.sap.xss.hr.lea.form.edit.EditView

[javac] ERROR: IUser user=wduser.getSAPUser();

[javac] ERROR: ^

[javac] WARNING: Note: Some input files use or override a deprecated API.

[javac] WARNING: Note: Recompile with -Xlint:deprecation for details.

or is there anyother option to get current portal user, without using this API?

Thanks,

Nandha

Edited by: Nandhadevi Thangaraj on Sep 8, 2010 12:16 PM

Former Member
0 Kudos

did you tried earlier comment on using DC Xssutils for getting pernr. I'm sure that DC has a node which contains all Employee info including pernr. As this dc is already used in ess~lea, you just need to link context nodes.

Otherwise if com.sap.security.api has to be used then create a new dictionary project and include security api jar in that. Checkout and import this DC so that its visible in CBS. then add this DC as a used dc in ess~lea prj. You are getting this error because security api is not available to CBS runtime environment.

cheers~

avadh

Former Member
0 Kudos

Hi,

Thank you all.

My issue has been fixed.

I got the perner from the used dc (interface controller FcEmployeeServices). by using the perner i got the country values.

Thanks,

Nandha

siddharthrajora
Product and Topic Expert
Product and Topic Expert
0 Kudos

Can you use homepage customisation to add this link to leave request page, with this you can use proxy class

and enable the link to the category of employees you wanna enable too?

Former Member
0 Kudos

Hi,

Thanks for your response.

Can you please explain this in detail?

Thanks,

Nandha