cancel
Showing results for 
Search instead for 
Did you mean: 

How to get/cut small message from error list

Former Member
0 Kudos

Hi experts,

I have made an application in SMP 2.3, which display Order detail.For this, i have used standard BAPI  for displaying the order list.it is working fine.When i am entering wrong data, it is also giving me error.

Now, my requirement is to get the proper message from this error list.

Please have a look on the below screen:

This error comes, when i click on the Header details button, without entering any order.Although, error is quite right, but as mobile screen is no so much large.So,my requirement is to display, exact error info. i.e.(Enter Order Number(as indicated in above screen)).


Please suggest.

Thanks,

Rohit

Accepted Solutions (0)

Answers (3)

Answers (3)

midhun_vp
Active Contributor
0 Kudos

Is this issue resolved ?

Former Member
0 Kudos

Thanks Midhun, It is working.

can we display message in a Pop Up?

Thanks

Rohit

midhun_vp
Active Contributor
0 Kudos

In a SUP version when we are not creating an error screen by default it was bringing the error in an alert, but it's not happening now (SUP 2.2). But you can try whether it is working in that way for you. And, I haven't dig into the request/response code of online request to get the error in an alert.

Midhun VP

midhun_vp
Active Contributor
0 Kudos

I can give you an alternative solution for this,

You will have 2 error screens, ErrorList and ErrorDetail.

Create a new screen called Error.

Go to ErrorDetail in the designer.

Click on the ListView in the ErrorDetail screen> Go to properties.

Assign Listview Detail Screen property with newly created Error Screen.

Hence you will get two keys in Error screen: Name and Value.

Create 2 editboxes in the Error screen and map the edit boxes with these keys, when the user reaches the screen ErrorDetail and click on message he will be able to see the error message properly.

Again, you can change the message description on the Error screen by writing custom code in custom.js.

Midhun VP

Former Member
0 Kudos

Hello, Rohit--

This is the whole layer that you need to consider of mapping the low level errors from the back end to the end user screen.

My recommendation is to handle this at the back end.

Cheers,

Fouad

Former Member
0 Kudos

Hi Fouad,

As i have choose Standard BAPI in Back-end,So,i dont think,i can handle it from there.

Please suggest

Thanks:

Rohit

agentry_src
Active Contributor
0 Kudos

Hi Rohit,

Error messages typically come as an aggregation of different parts of the Return Message from a BAPI (ERROR_TYPE, ERROR_NUM, ERROR_MSG_1, ...).  I may have the field names wrong, but you can investigate in SE37 or BAPI t-codes to see which errors generate what content in each field.  I suggest using the test functionality there and review the field results to see which returns what sort of data.  You should then be able to select the appropriate field to report rather than the aggregated result of several fields.

A note of warning.  Any single BAPI has been created for different purposes, by different developers, over many years (decades in some cases), and with different data organization (and varying amounts of documentation with not much and not well written as the general rule).  Don't assume that the same field of the Return Message contains the information of interest when you go from one BAPI to another.  I have found that testing each BAPI is the safest way to proceed.

Regards, Mike

SAP Customer Experience Group - CEG

Former Member
0 Kudos

Hello, Rohit--

Indeed, even you are using a standard BAPI, this is still required steps.

Basically, they are some BAPIs that the error message structure can be formatted easily but in this case I don't see another way to how parse and generate a user friendly error message.

Cheers,

Fouad