Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Error Message Display

ADALA
Discoverer
0 Kudos

Hi Buddies,

Can anyone guide me to display the error message in the status bar along with its input value stating that its not valid using message class method. Ex: 'Purchase Order 12344 is not valid', Here 12344 is a wrong input given in the selection screen where all select options are used.

Edited by: Dinesh Adala on Jun 11, 2008 12:31 PM

1 ACCEPTED SOLUTION

vinod_vemuru2
Active Contributor
0 Kudos

Hi Dinesh,

Where r u displaying ur message? If it is in a report/Module pool then do like this.

Create new message in custom message class with text like below.

Purchase Order & is not valid

Here & symbol is the place holder i.e u can dynamically pass some thing to this message.

In ur validation do like this.

IF ur validation fails.

MESSAGE e001 WITH po_ebeln.

ENDIF.

Here po_ebeln is the input field value.

Display this message under appropriate events.

eg: AT SELECTION-SCREEN ON po_ebeln in case of reports.

Thanks,

Vinod.

6 REPLIES 6

Former Member
0 Kudos

hai dinesh,

here tou need to change the message class for PO type. this need to be check by fucntional guys.Kook for sap notes. if you need any help reply in this thread .

regards

jase

Former Member
0 Kudos

You have to use place holders for giving input to the messages.

In the message class define your message as,

Message class for example ZA. Message number 001.

Purchase order & is not valid --- & is the place holder which can be replaced by a value in the program.

In the program, display error message as,

Message e001(za) with w_vbeln.

w_vbeln is the variable holding the PO number.

Regards,

Lakshmi.

Former Member
0 Kudos

For displaying this type message

initially you have to create message class which contains first message number with only '&&&&&&'

and then for later number you can like this

Purchase order & is wrong entry.

At the place of '&' number can be printed

In the program you have to code like this

MESSAGE ID mid TYPE mtype NUMBER num.

Former Member
0 Kudos
Report ztest Message-id me.
data: v_tabix type sy-tabix.

MESSAGE e303 WITH 'HI' v_tabix.

Regards

Kannaiah

vinod_vemuru2
Active Contributor
0 Kudos

Hi Dinesh,

Where r u displaying ur message? If it is in a report/Module pool then do like this.

Create new message in custom message class with text like below.

Purchase Order & is not valid

Here & symbol is the place holder i.e u can dynamically pass some thing to this message.

In ur validation do like this.

IF ur validation fails.

MESSAGE e001 WITH po_ebeln.

ENDIF.

Here po_ebeln is the input field value.

Display this message under appropriate events.

eg: AT SELECTION-SCREEN ON po_ebeln in case of reports.

Thanks,

Vinod.

0 Kudos

Hi Vinod,

Thanks for the effort.

It was very clear and comprehensive and i think your message is going to resolve this issue.

Bye,

Dinesh