cancel
Showing results for 
Search instead for 
Did you mean: 

Error handling in webydnpro abap.

Former Member
0 Kudos

Hi All,

Here we are developing a simple webdyn pro abap application, and are using bapi and the bapi is returning bapiret2 errors, kindly help.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

what help do u want. do you want code to show the errors on the screen ?.

Regards,

Muneesh Gitta.

Edited by: Muneesh Gitta on Jul 24, 2008 1:40 PM

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks all , my problem is solved.

Former Member
0 Kudos

Hi ,

I am using this code for my error handling .

Copy this code in wddoinit of component controller.

  • get message manager

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 = wd_this->gv_msg_manger.

In view after calling bapi

data : lv_err_text type string,

lv_sc_text type string,

ls_error type bapiret2,

lt_return type table of bapiret2.

call bapi .

loop at lt_return into ls_error.

  • report message

call method wd_comp_controller->gv_msg_manger->report_t100_message

exporting

msgid = ls_error-id

msgno = ls_error-number

msgty = ls_error-type

p1 = ls_error-message_v1.

endloop.

IF you have any doubts please let me know.

Reward Points if helpful

Regards,

Muneesh Gitta.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Hi All,

>

> Here we are developing a simple webdyn pro abap application, and are using bapi and the bapi is returning bapiret2 errors, kindly help.

>

> Thanks.

Please try to actually ask a question. I'm going to take a guess that you want to know how to output messages. I suggest you read the help link on the message manager:

http://help.sap.com/saphelp_nw70/helpdata/EN/6c/7aae42cd7fb611e10000000a155106/frameset.htm

Specifically you probably want to look at the T100 methods - as they are well suited to the way the BAPIRET2 messages are returned.