on 07-17-2013 11:21 AM
Hi,
We are working on sybase 2.1 version everything is well and fine with creation of MBO,
Here are the few queries
1) how to populate error screens when there is no data after calling bapi / RFC ?
2)How to design customized UI Elements like button optimization(e.g size of button or color) we are geting default buttons and all other UI elements how can we customize those elements?
Hoping an earlier Response.
Thanks in advance.
Siva Reddy D.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Actually Our Scenario is after calling any RFC/BAPI if there is any data it should be display
else an error message should be populated 'No Data Found' . After clicking button bapi is triggering in the same button properties default error screen is assigned with it_return screen , screen is calling well and fine but no message is populating in return screen.Did i miss any thing ???i mean personalisation key is done for all input keys what to do now...is there any other way to populate error screen other than result checker in java.
Thanks in advance
Siva Reddy Dadi Reddy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am assuming that your requirement is on HWC based application.
HWC apps are based on Javascript, HTML and CSS. For customization you can write your own code inside the file custom.js.
Best examples are given below:
http://scn.sap.com/community/mobile/blog/2013/02/20/develop-hwc-app-with-customized-list
How to populate error screens when there is no data after calling bapi / RFC ?
That you can handle it in the RFC itself. If the RFC returns empty value in the case of a wrong input ( example ) keep a return message in the RFC ( with 'E' in the message )instead of doing nothing. Hence the app will through it as an error message in the device else the app will consider the RFC call as a success.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Midhun,
To populate error screen we handled error message in RFC through bapireturn but still we are facing same problem unable to display error message in the output screen, while debugging messages are populating to table return but unable to display message in error screen.
Thanks in advance.
Got it, from the RFC what you need to do is if the output list is empty you keep it as an error with 'E' in the ABAP code. Hence the call from the app will not get a success response and it will through the error message coming from the RFC. Now what is happening is that the RFC call is considered as a success in the device, if it was an error the error message will be handled by HWC app.
I hope the above solution will solve your problem.
In the worst case what you ca do it you can completely customize the listview screen. Hence you will get more control over UI. Please refer this, http://scn.sap.com/community/mobile/blog/2013/02/20/develop-hwc-app-with-customized-list
In the given example I am getting the count of count of items ( var numOfItems = items.length; ). You can put an if condition below this line of code to check whether the numOfItems.
If it is 0 you can show an alert.
Found something interesting for error handling, you can use it for future use :
The generated JavaScript allows you to override the behavior of the showErrorFromNative function using the customBeforeReportErrorFromNative(errorString)and customAfterReportErrorFromNative(errorString) methods.
This shows an example of how to override or customize the error message based on the returned numeric error codes through customBeforeReportErrorFromNative.
function customBeforeReportErrorFromNative(errorString) { var errorCode = getURLParamFromNativeError("errCode", errorString); // 500 and above are network errors if ( errorCode >= 500 ) { // Could check lang global variable if so desired //if ( lang == ... ) { // Show your own custom error message based on errorCode showAlertDialog("Do you have a network connection?", "My custom error"); // return false to by pass default behavior return false; } } return true; }
Identified error scenarios include:
Hi David,
Actually Our Scenario is after calling any RFC/BAPI if there is any data it should be display
else an error message should be populated 'No Data Found' . After clicking button bapi is triggering in the same button properties default error screen is assigned with it_return screen , screen is calling well and fine but no message is populating in return screen.Did i miss any thing ???i mean personalisation key is done for all input keys what to do now...
Thanks in advance
Siva Reddy Dadi Reddy.
hi,
To Return Error message:
You should write ResultChecker and bind it with MBO. SUP provide a class "SAPResultChecker" implement it, and we can extract the real data, if its valid one return it, if its invalid or empty return "CheckReturnMapEntry" with error message.
Note: You should have core java knowledge to write Result checker.
To customize UI
To customize the error screen you can follow the Midhun VP's post. or just you want to change the color, size and other properties, goto the jquery.mobile-xxx.css files edit with your customzied properties.
If you are using theme "A" edit only theme "A", leave the other theming properties.
Regards
Yokesvaran.K
I'm unclear from your wording exactly what is happening.
- Is an error occuring on the backend, or is it succeeding but returning no rows?
- Is it displaying the error screen or the success screen?
- If you want it to display 'No Data Found' in the error screen, have you configured the error screen to do that (by, for example, adding a Label control to that screen)?
- If you want it to display 'No Data Found' in the success screen when there are no rows, have you configured the 'On Empty List' property of the listview on the success screen?
- If you examine the message returned by the online request, does it contain the information/data/keys that you need in order to display the appropriate message to the user?
Native app or hybrid app? If native, which platform? If hybrid, are you using the designer or writing the app by hand?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.