cancel
Showing results for 
Search instead for 
Did you mean: 

Can any one help me with coding(UME).

Former Member
0 Kudos

Hi All,

I have a backend table contains user and category. once user is loggied in we will see who is logged in(In my application we see category here whether it is manager, developer, or client). Here it is my code. i'm getting null pointer exception. I do not know much about webdynpro API. Can any one help me.

try{

IWDClientUser user = WDClientUser.getCurrentUser();

//here we get user name.

if(user.getClientUserID().matches(wdContext.current__Arch__Arm_Get_User_Cat_InputElement().getIm_User()))

{

wdContext.currentOutputElement().getEx_User_Cat();

}

} catch(WDUMException e) {

e.printStackTrace();

}

finally

{

}

Any suggitions.

Thank you

Regards

Ravi

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member189631
Active Contributor
0 Kudos

Ravi,

catch(WDUMException e) {

wdComponentAPI.getMessageManager().reportException(e.toSting(),false);

}

*Use this message manager code inside your Catch block.and Run your application to find the type of exception.

*I suggest you to null check this code

wdContext.currentOutputElement().getEx_User_Cat();

Regards,

Ramganesan K.

Former Member
0 Kudos

Hi,

U can put some print statements and trace the place where u get null. Also look at the log for details, if any.

Regards,

Harini S

Former Member
0 Kudos

Ravi,

Just search WD forum for <b>IUser AND WDClientUser</b> and you find plenty of answers yourself -- like this () or that ().

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Hi Ravi ,

in your match function get user from output node

if(user.getClientUserID().matches(<b>wdContext.currentOutputElement().getEx_User_Cat()</b>)

{

}

I think you are getting null pointer exception because of wdContext.current__Arch__Arm_Get_User_Cat_InputElement().getIm_User() stmt.

Regards,

Sunitha

null