Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

insert table data

Hai to every one,

there is table contain 3 fileds name , city, contact.

and provided save button.

while inserting provided validation on contact, name should be must .

i looking like when the condition is satisfied , it should save and deleted from frontside.and incase which are the records are not satisfied, i need rise the exception and stop to insert.

i written code as below under save button.

for(int index=0;index<nodeSize;index++)
    if(wdContext.currentCreateClientElement().getName()!= null && 
    wdContext.currentCreateClientElement().getName()!= "" )
		IPrivateAddClientView.ICreateClientElement createClientElement = createClientNode.getCreateClientElementAt(index);
		clientName = createClientElement.getName();
		region = createClientElement.getcity();
		contact = createClientElement.getcontact();
//		wdContext.nodeCreateClient().invalidate();


Former Member
Former Member replied

Hi Eswar,

what i understood is you have a table with three input fields which has to be entered by client and you need validation on two fileds, then you can achieve this through MessagePool

Under message pool you create Message key u2013 validate

Message type u2013 error

Message text as u2013 Enter valid input

Create a method called validate with two parameters contact and name of String type

In Button action u have created write the following code




In Validate method u write the following code

IWDMessageManager ID = wdComponentAPI.getMessageManager();

//write code to get parameter values name and contact



ID.reportContextAttributeMessage(wdContext.nodeMSGNODE().currentMSGNODEElement(),info,IMessageMSG.VALIDATE,new Object[] {name},true);




ID.reportContextAttributeMessage(wdContext.nodeMSGNODE().currentMSGNODEElement(),info,IMessageMSG.VALIDATE,new Object[] {contact},true);



WdComponentAPI.getMessageManager().reportSuccess(u201Cready to save inputu201D);



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question