‎2008 Jan 18 12:46 AM
Hi Friends,
How error message occured in ABAP Reports & solution for that ?
‎2008 Jan 18 2:58 AM
Hi Dhananjaya, check this.
For Error messages you need to call the messenger class.
For example if you want to display a message if sy-subrc = 0 .Follow the bellow steps.
1.)Place the cursor after the condition.and click to the wizard button.You will get a pop up with several radio buttons.
2.) select the radio button with 'Generate messages'.Enter
Message manager as = IF_WD_MESSAGE_MANAGER
method = (from f4 as per the message).
3.)and say ok.You will get the following piece of code.
DATA lo_api_controller TYPE REF TO if_wd_controller.
DATA lo_message_manager TYPE REF TO if_wd_message_manager.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager
.
report message
CALL METHOD lo_message_manager->report_success
EXPORTING
message_text =
params =
msg_user_data =
view =
show_as_popup =
is_permanent = ABAP_FALSE
scope_permanent_msg =
controller_permanent_msg =
msg_index =
cancel_navigation =
.
implicitly available data objects
wd_Context type ref to if_wd_context_node.
wd_This type ref to if_FileDownload.
4.)Pass the message text.For example 'Successful'.
This is the way you can display the static message.however for the dymnamic message you need to use assistance class.
kindly reward if found helpful.
cheers,
Hema.
‎2008 Jan 18 1:34 AM
Hello,
The error message is the result of error conditions in the program flow. The error condition is the result of data integrity violations.
Thanks,
Venu
‎2008 Jan 18 2:56 AM
Hi,
You can do the error analysis and possible solution through the transaction ST22. Whenever a runtime error comes you can go to this transaction and analyse it.
Regards,
Renjith Michael.
‎2008 Jan 18 2:58 AM
Hi Dhananjaya, check this.
For Error messages you need to call the messenger class.
For example if you want to display a message if sy-subrc = 0 .Follow the bellow steps.
1.)Place the cursor after the condition.and click to the wizard button.You will get a pop up with several radio buttons.
2.) select the radio button with 'Generate messages'.Enter
Message manager as = IF_WD_MESSAGE_MANAGER
method = (from f4 as per the message).
3.)and say ok.You will get the following piece of code.
DATA lo_api_controller TYPE REF TO if_wd_controller.
DATA lo_message_manager TYPE REF TO if_wd_message_manager.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager
.
report message
CALL METHOD lo_message_manager->report_success
EXPORTING
message_text =
params =
msg_user_data =
view =
show_as_popup =
is_permanent = ABAP_FALSE
scope_permanent_msg =
controller_permanent_msg =
msg_index =
cancel_navigation =
.
implicitly available data objects
wd_Context type ref to if_wd_context_node.
wd_This type ref to if_FileDownload.
4.)Pass the message text.For example 'Successful'.
This is the way you can display the static message.however for the dymnamic message you need to use assistance class.
kindly reward if found helpful.
cheers,
Hema.
‎2008 Jan 18 3:00 AM
Hi Dhananjaya,
also check this.
Messages allow you to communicate with users from your programs. They are mainly used when the user has made an invalid entry on a screen.
To send messages from a program, you must link it to a message class. Each message class has an ID, and usually contains a whole set of message. Each message has a single line of text, and may contain placeholders for variables.
All messages are stored in table T100. You create and edit them using Transaction SE91. Once you have created a message, you can use it in the MESSAGE statement in a program.
Also,
In SE91, you can see all the error message details.
For information, if the error message shows "V10222", you have enter the first three digits in "Message Class" and last three in "Number". This means, whatever the message number is, the last three digits has to be entered in "Number" and the value precedes this last three numeric value has to be entered in Message Class.
And finally,
Let me put it this way..
Every Error Message belongs to a Message Class.
So, a particular Message Class will have a number of Messages under it.
You need to know the Message class first. For Sales we have the following message classes V1, V10, V2, V4, V5, VD, VU, VV, VX, WVA
*If you want to know all the message classes available for a transaction:-*
For knowing all the Message Classes for a particular transaction, you goto-->SE93, put the transaction code and choose display. After this, there is a button on the top (Display Object List), press that button. On the left hand side you will get the Object Name-(example: VA in case of sales). Drop down there and choose Message Classes. You will get all the message classes there.
If you know the Message Class and want to see the Messages under it:
So, goto-->SE91, put the message class and choose Display
cheers,
Hema.