cancel
Showing results for 
Search instead for 
Did you mean: 

Error messages in BSP application

Former Member
0 Kudos

Hi All,

in our SAP GUI days we used BAdI ORDER_SAVE to check

some conditions with Opportunity fields and if the conditions were not met we used the MESSAGE statement

to alert the user.

Now when using our PC-UI based implementation we are

getting the error described in the web log:

/people/mark.finnern/blog/2003/09/16/bsp-in-depth-message-statement-handling

from the weblog we could not find a workaround.

can anyone help ?

10x, Eyal.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Eyal

You can't (or shouldn't) use the MESSAGE statement in CRM transactions as the statement assumes the SAPGUI is present, which of course it isn't when using Internet Sales or PC-UI (or 'dark' interfaces).

You have to use MESSAGE...RAISING or MESSAGE...INTO variations.

Both of these will fill all the relevant SY-MSGxx fields but will not try to issue a message to the SAPGUI.

Normally you use the CRM_MESSAGE_COLLECT statement to collect messages to the transaction's message log. The particular UI looks after displaying the most severe one to the user.

Try using MESSAGE...INTO instead, and raising the ERROR_OCCURED exception or CV_OWN_MESSAGE flag (depending on which method you are using).

The calling program then looks after taking your message and storing it via CRM_MESSAGE_COLLECT.

This should then work in any UI.

If you want the message to popup, you can control that in other ways.

Cheers

Dom

Former Member
0 Kudos

Hi,

Now we have commented the MESSAGE statement.

our problem is the transaction log was not enough for us,

we even used in the ORDER_SAVE badi a check with

FM CRM_MESSAGES_CHECK_FOR_ERRORS and alert the users

there are errors in the transaction.

any suggestion on how to check with the save event

several conditions and use the same E/W method of operation (some cases just warn and some cases don't allow the save) in both PC-UI and WinGUI.

a pop-up is a very good solution if you can explain how

it can work in both environments.

10x, Eyal.

Former Member
0 Kudos

Hi Eyal

The PCUI method of popups is quite well documented in the PCUI Book and the IMG.

The SAPGUI way involves settings in CRMC_MSGS.

Either way, the message code should be UI independent.

I'm offline at the moment and can't check it. Have a read of the docu (including the docu of FM CRM_MESSAGE_COLLECT) or someone else will post.

I know what you mean about usability, some user groups need to be explicitly warned. Problem is they get so used to the popups they dismiss them without reading them.

Cheers

Dom

Former Member
0 Kudos

Eyal, I was thinking here, why can't you leverage the completeness rules functionality delivered through both customizing and modifyable with a BADI. This functionality allows you to define custom messages that will show up in the massage collector as with regular messages in CRM transactions. This is available in both CRM Online as well as PC-UI. Have a look at the following IMG Path: CRM -> Basic Functions -> Incompleteness. This is another way of delivering the functionality you are looking for I believe. Tiest.

Answers (0)