06-11-2008 11:29 AM
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
06-11-2008 11:43 AM
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.
06-11-2008 11:31 AM
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
06-11-2008 11:33 AM
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.
06-11-2008 11:33 AM
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.
06-11-2008 11:37 AM
Report ztest Message-id me.
data: v_tabix type sy-tabix.
MESSAGE e303 WITH 'HI' v_tabix.
Regards
Kannaiah
06-11-2008 11:43 AM
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.
06-11-2008 1:33 PM
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