Skip to Content
avatar image
Former Member

How to handle the exception raised by function module in sapui5 controller

Hi All,

Please help me in this below issue.

I have one function module in the ECC system which for inserting records into database.

I created a sapui5 application which having new entry view.

After click on submit button records are stored in database. But every time it shows the message like "Employee created Successfully" even if we get the exception also.

So could you please help me how to display the exception of that function module on my sapui5 screen.

Thanks in advance

Regards

Surya

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • May 19, 2015 at 10:59 AM

    Hi Surya,

    You need to handle exception using this standard method : /IWBEP/CX_MGW_BUSI_EXCEPTION

    /IWBEP/CX_MGW_BUSI_EXCEPTION - SAP NetWeaver Gateway Foundation (SAP_GWFND) - SAP Library

    Once you handle it in the gateway, the odata service would automatically return exception.

    Other option is to pass the error messages in BAPIRET2. These return messages are handled automatically.


    Regards

    Tejas

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Tejas Chouhan

      Hi Tejas,

      We got output in local system. but we are not getting output after uploading in gateway and using sap/bc/ui5_ui5/sap/zXXXX. We got the designed screen with 'NO DATA' quoted initially.

      Then we created External Alias - now the link in external alias shows screen with 'no data' and sap/bc/ui5_ui5/sap/zXXXX this link shows msg:


      'File sap/zemployee/zemployee NOT found!'

      Capture.PNG (9.9 kB)