cancel
Showing results for 
Search instead for 
Did you mean: 

Error Message

Former Member
0 Kudos

Hello

I have little problem with Error Messages (Message pool)

public void checkMandatory( java.lang.String FieldName,java.lang.String Node )

{

//@@begin checkMandatory()

IWDMessageManager messageMgr =wdThis.wdGetAPI().getComponent().getMessageManager();

IWDAttributeInfo attributeInfo = this.wdContext.getNodeInfo().getChild (Node).getAttribute(FieldName);

messageMgr.reportContextAttributeMessage(this.wdContext.nodeUnit().currentUnitElement()

,attributeInfo,IMessageAccident.DATE_NOT_FOUND,null,true);

//@@end

}

But I have problem because my context

+Unit

-UnitID

-office

-Base

and I need to conect Error message to to UnitID

please tell mehow can I solve this problem

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

guru_subramanianb
Active Contributor
0 Kudos

Hi,

Refer the below link and sublink thereafter which addresses your problem ,

http://help.sap.com/saphelp_erp2004/helpdata/en/a7/68a0cb87e4c447922a46cfa2655fb4/frameset.htm

Rdgs,

G

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Evgeny,

If you are following the message pool tutorial do the following changes. First make the cardinality of your Unit node 1..n. and in the code for check.. methods


Object attributevalue =	this.wdContext.nodeUnit().currentUnitElement().getAttributeValue(fieldName);

IWDAttributeInfo attributeinfo = this.wdContext.getNodeInfo().getChild("Unit").getAttribute(	fieldName); 

Keep other code as in your post.

Regards,

Jaydeep

Former Member
0 Kudos

Hi,

I used the code what mentioned, but i am getting the following error:

java.lang.IllegalArgumentException: No such attribute "zperfname"

where "zperfname" is actually there under <node>.zperfname if i see in context tab.

Do you know why i am getting the above error.

Thanks

Vijay

Former Member
0 Kudos

Hi,

Try

IWDAttributeInfo att = wdContext.getChildNode("Unit").getNodeInfo().getAttribute("UnitID");

Regards,

Vijith