cancel
Showing results for 
Search instead for 
Did you mean: 

Question about displaying handler errors in the webdynpro

Former Member
0 Kudos

Hello all, Please forgive any EM terminology mixups as I am new to this unique module!

Here is my scenario, I am in EM WebDynpro and updating the actual dates on a purchase req. The event handler accepts the date I entered and in the background makes a synchronous rfc call to ECC to update the related project with the new date. This rfc call fails because I have the project open and it is locked. This call is synchronous so I get the error right away and I set the return code to 4 and populate an error message that I want passed back to the user in WebDynpro. For some reason the EM system is ignoring this error and returning to the user a successful 'sent' message.

EM WebDynpro --> Purchase Req --> PO Approved Actual Date entered --> synchronous RFC to ECC to update Project --> project locked error returned by ECC --> error message populated in EM --> EM WebDynpro returns as if it was successful

I have put in breakpoints to ensure I was populating error messages back to EM and I see the details flowing back that are correct, but no details are returned to the actual user. If I go to the Event Handler Overview in the GUI I can find my error message recorded there. Problem is our users will be working from the Web primarily and would not see this message in a normal course of work.

Is there a config piece that I should be setting to return this error to the users in WebDynpro? This seems like a trivial/standard piece of functionality so I am confused as to why it is not showing up in the dynpro.

Thank you for any help or ideas and points awarded of course!

John

Accepted Solutions (1)

Accepted Solutions (1)

Berthold_vH
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello John,

as I understand your right you have an activity which calls ECC. If it is not succesful (e.g. your purchase order is locked) you want that an Error message is also given back on the Web Dynpro.

You can see the error in the log as a log is written for processing an event message. If you also want to see that error message on Web Dynpro you need to consider the following points:

- Make a Multitask Activities with your new activity and as second activity use the method RETRIEVE_MSG. Just call this if your return code is 4.

- Do the settings as descibed in the help text. You can also have a look on multitask activity PTA10_ID_KNOWN.

Don't forget to enter a message class under the Event Message Profile.

Hope this helps.

Regards

Berthold

former_member583013
Active Contributor
0 Kudos

Berthold,

Sorry but I don't have a SAP EM system available to me right now to check but would the RETRIEVE_MESSAGE activity produce the popup notification in the web dynpro with the relevant message? If so then that is a neat solution.

You would just have to ensure that the activity that calls SAP ECC returns an error SUBRC if it fails on there.

Former Member
0 Kudos

Hello Berthold,

I believe we understand what you are saying we should do and we have mimicked the activity you described. Now we are running into a short dump when the system tries to process the RETRIEVE MSG method. The code is looking for the class /AIN/CLPUB_ID_CONVERT for some reason. This class does not exist in this release. There is a /SAPTRX/ class that matches.

So in /SAPTRX/CL_PUB_ID_CONVERT method CALL_AII_FOR_SINGLE_ID at line 45 there is this statement: CALL METHOD (co_ain_class_name)=>(co_ain_method_id_mapping). Since this is a dynamic class/method call we think we must have something still incorrect in the IMG so we are going through troubleshooting and looking at OSS Notes. No luck so far.

Any additional input or ideas as to possible missed steps would be greatly appreciated.

John

PS Release 7 (SAPK-70004INSCEMSRV pack level)

Edited by: John D Norman on May 6, 2010 2:00 AM

former_member186607
Active Contributor
0 Kudos

Hi John,

did you include the whole multitask activity PTA10_ID_KNOWN in your activity or only the activity RETRIEVE_MSG? You only need the activity method RETRIEVE_MSG, which should be processed in case an error message should be displayed in the Web Dynpro screen.

Maybe you could provide the short dump here, it would be interesting to see when exactly the call for the class /AIN/CL_PUB_ID_CONVERT is made. Then I can hopefully say for sure what is going on.

Best regards, Daniel

Former Member
0 Kudos

Ok, problem solved.

Thank you Berthold for the direction to the Retrieve_Msg method.

Thank You Daniel for the clarification on using just the Retrieve_Msg method and not the other parts from the example.

The short dump was being caused by the Id_Mapping method. Which looks like something we were supposed to use but it is actually related to Object Event Repository (OER) which we do not have installed at this client. Removing this solved our short dump.

So now we are just working through defining the error messages and retrieving them properly. We are now able to invoke errors into the Dynpro as desired.

Thanks again for your help and points awarded all around!

John

Answers (1)

Answers (1)

former_member583013
Active Contributor
0 Kudos

John,

What is the web dynpro transaction you are using to make the change? /SAPTRX/EM_START?

Former Member
0 Kudos

Yes, I use EM_START to launch the webdynpro and log in. I enter in the Req I want to work on and pull it up to modify the dates of the associated activities. As I noted the strange part is that the error messages show up in the EH_LIST sapgui transaction when I go back and look at it there. It just does not flow back into the web browser.

Thank you for your help!