cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to populate error message in android emulator

Former Member
0 Kudos

Hi,

We are using sybase unwired platform 2.1 version.Unable to populate error message in android emulator , error was handled in RFC using tables parameter(bapireturn) and assigned T_MESSAGE MBO to  error screen and DATA MBO to  default success screen in the button action for online request ?

Hoping needful reply!!

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If we give wrong data, result screen is leading  to success screen(data) only instead of error screen.

When we debug it ,error is populating properly to return parameter but it is displaying success screen (data) itself.

we did the same thing for standard bapi (bapi_flight_getlist) here it's working fine whenever there is no data or wrong data, it is triggering error screen but message is not populated.

midhun_vp
Active Contributor
0 Kudos

If the method ( RFC call ) is not successful only the navigation directs to the default error screen. You can follow any of these 3 ways.

     1.If the list is empty you can handle it using the box provided in the HWC designer itself.

     2.Else if you want to push the error message from RFC you need to return error "E" in the response of the error instead of filling the error table.      Hence the HWC app itself take care of showing the error message you are mentioning in the other code.

     3.Another way is using a conditional success screen navigation available i the HWC.

          There is a sample of Conditional Navigation in the following sample.

          https://cw.sdn.sap.com/cw/docs/DOC-151007

- Midhun VP

Former Member
0 Kudos

Hi Midhun,

First condition worked out for us , Thank you so much , and one more thing for condition success screen you have mentioned a sample , which  i cant access it's just showing  me term and condition when i accept it also it is not displaying anything.if possible send me the sample again.

https://cw.sdn.sap.com/cw/docs/DOC-151007

Thank you.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Preethi,

login to the mentioned link.. once logged in..again open the same link... you ll see the attached doc.

Regards,

Jitendra

midhun_vp
Active Contributor
0 Kudos

Follow what Jithendra mentioned to download the project. Also there are bunch of sample projects here,https://cw.sdn.sap.com/cw/groups/sup-apps.  Download and dig into it to understand nice capabilities of HWC app.

- Midhun VP

Former Member
0 Kudos

Hi,

We have done changes in RFC after calling the RFC in sup ,but those changes are not reflecting or else its througing any error while testing in emulator (we have added few fields  in structure which is taken in tables parameter of RFC) . Even after disconnecting SAP server in sup and we are connecting it again then also those changes or not reflecting?Is it necessary to call again and again or else anything need to be done to reflect the changes?Please help me out !!

midhun_vp
Active Contributor
0 Kudos

It is a known issue facing by SUP developers. If you are adding new fields in the same RFC with which you created the MBOs, to reflect it in the SUP you need delete the MBO package, application template from SCC and re deploy it to the server OR restart the SUP server it will work.

I believe that SUP is caching the first table structure of the RFC in the SUP server hence even you added more fields in the RFC export parameter it will not reflect.

- Midhun VP

Answers (2)

Answers (2)

midhun_vp
Active Contributor
0 Kudos

What type of application you are developing ? Is it HWC or Native ?

Former Member
0 Kudos

Presently working on HWC.

Former Member
0 Kudos

This message was moderated.

midhun_vp
Active Contributor
0 Kudos

Once the error occurs, is result screen goes to error screen or is it going to success screen (DATA) itself?

The standard error screens in HWC works whenever the RFC throws an error. If the RFC call is a success means the result screen will be always be your Data screen.

-Midhun VP

former_member186566
Active Participant
0 Kudos

Hi,

To populate the error screen you should write "ResultChecker" and bind with the operation. So, select menu item->properties, create "Error Screen" and bind the Result Checker.

When the operation triggers ResultChecker will be called. You can customize the below example.

http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01333.0210/doc/html/eka1309286690779...

find the message you are receiving from SAP, if its valid one return success as true, else retrun success as false along with message in "return new CheckReturnMapEntry<Boolean, String>(success, msg);"

Regards

Yokesvaran.K