on 10-10-2008 1:43 PM
Hi Everybody.,
I am new to Webdynpro Abap . I had a requirement to create a purchase order Webdynpro . I used the BAPI 'BAPI_PO_CREATE1' . How can i display the error messages from Return tab of the BAPI and display as a dialog box to the user .
hi sivakumar
u have to creat a massage class and
declair it like
REPORT ZDTK_FI_CRDB NO STANDARD PAGE HEADING
LINE-COUNT 65(5)
LINE-SIZE 80
MESSAGE-ID ZTAR_FI
.
and u can display the error massages where u need like
*IF SY-SUBRC 0.
*MESSAGE E002.
*LEAVE LIST-PROCESSING.
*ENDIF.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sivakumar,
you can write a method like this
method display_message .
data l_message type string.
if message is initial.
move returnmessage-message to l_message.
else.
move message to l_message.
endif.
case messagetype.
when 'E'.
report message
call method wd_this->lo_message_manager->report_error_message
exporting
message_text = l_message.
when 'S'.
report message
call method wd_this->lo_message_manager->report_success
exporting
message_text = l_message.
when 'W'.
report warning
call method wd_this->lo_message_manager->report_warning
exporting
message_text = l_message.
when others.
endcase.
endmethod.
that has message of type string and messagetype of type char1 ,returnmessage of type bapiret2
call this method like
display_message( exporting
message = l_message
messagetype = 'S' ).
data l_message type string value 'error'.
Thanks
Bala Duvvuri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi bala.,
thank u for ur information . i have one more query on this.. i have an internal table which contains a lot of error, warning and status messages, how can i display all of then at a time in a diolog box similar to me21n transaction error display. kindly guide me on this..
Regards.,
S.sivakumar
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.