Skip to Content

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

Validation Problem in WDJ

Hi Friends,

I have one doubt in Validation. When Click on u201CActionSearchViewDemandForeCastu201D

This Button I want some error Message in FV.

So I have to develop Some code but it is not working. Pls give any help.

This is Validation Method

public void Validation( )


//@@begin Validation()

IWDMessageManager manager = wdComponentAPI.getMessageManager();

String Bucket = wdContext.currentYmm_Sc_Bapi_Dmndstk_Getlist_InputElement().getP_Bucket();

manager.reportSuccess(" Bucket = " +Bucket);

if( Bucket == null && Bucket.equals(""))


// manager.reportSuccess(" Please Enter id ");

//manager.reportException(" Please enter id ",true);



This Validation Method I was called to Search Method


public void onActionSearchViewDemandForeCast( wdEvent )


//@@begin onActionSearchViewDemandForeCast(ServerEvent)

//$$begin ActionButton(-1313177891)






But I m not getting error message when click on Search Button

Req: I want to display error message when click on Search button


Vijay Kalluri


Hi Vijay,

Check this line in your code:

if( Bucket == null && Bucket.equals(""))

The Bucket string can never be null and equal to an empty string. I think you want an OR here instead of the AND.


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