Skip to Content
avatar image
Former Member

Error handling in webydnpro abap.

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 24, 2008 at 11:40 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 24, 2008 at 12:32 PM

    >

    > 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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 24, 2008 at 01:18 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 25, 2008 at 05:51 AM

    Thanks all , my problem is solved.

    Add comment
    10|10000 characters needed characters exceeded