cancel
Showing results for 
Search instead for 
Did you mean: 

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

0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182874
Active Contributor
0 Kudos

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

0 Kudos

Hi Teja,

I have an issue while accessing my app from netweaver gateway server.

In my local system its working fine but from gateway server, iam getting the error like entity set not found.Could you please tell me the solution for this.

Thanks in advance

Regards

Surya

former_member182874
Active Contributor
0 Kudos

Hi Surya,

Probably the issue might be with your system alias. Kindly check if your service has correct alias assigned to it pointing to your backend server.

Regards,
Tejas

0 Kudos

Hi Teja,


Now iam getting below error while execute the app from netweaver gateway.

Actually here zemployee is my bsp application name. But here it appears twice in the link. Could you please help me



File sap/zemployee/zemployee/index.html NOT found!




Regards

Surya

former_member182874
Active Contributor
0 Kudos

Hi Surya,

Your issue is with exception call or bsp application not found in Gateway system. Please let us know if the exception issue was solved and mark the correct/helpful answers.

Regarding your new error, check your path in SICF node.

/sap/bc/ui5_ui5/sap/zemployee/index.html

Regards,
Tejas

0 Kudos

Hi Teja,

Thanks for ur reply.

Iam not able to find index.html in this sicf tcode. Upto  "/sap/bc/ui5_ui5/sap/zemployee/" here only i  can view. where can i find out this exact path.

Regards

Surya.

former_member182874
Active Contributor
0 Kudos

index.html is a file and will be present inside your bsp app. You can right click on zemployee and "test service"

Regards,

Tejas

0 Kudos

Hi Tejas,

I am getting the below error while testing the service.

"File sap/zemployee/zemployee NOT found!"


Regards

Surya


0 Kudos

Hi Tejas,

iam also getting error like " File sap/zemployee/zemployee NOT found!" while testing the app from se80 tcode as BSP application.

Here we getting zemployee twice. I dont know why its getting like this. Could you please help me  in this issue.

Regards

Surya.

former_member182874
Active Contributor
0 Kudos

Check your bsp path in sicf node, if it is active or inactive. Please activate it.

Regards,
Tejas

0 Kudos

Hi Tejas,

Its activated. still iam getting the same problem like file not found. And may i know why the folder name appears twice in link.

File sap/zemployee/zemployee NOT found!


Regards

Surya

0 Kudos

Hi Tejas,

What is the purpose of external alias. when should i create external alias for  a service

Regards

Surya

former_member182874
Active Contributor
0 Kudos

You have to check where is your gateway service built.

You need to register your service in gateway system. While registering you need to search the service with your system alias. If your service is in same system then you need to give LOCAL alias, if it is in your backend system then you need to give alias of your backend system, so that it will pull the service from backend system.

Regards,

Tejas

0 Kudos

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!'