Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Sending error messages

Former Member
0 Kudos

When I send error messages it disables the back, exit and cancel button.

How can I enable them?

12 REPLIES 12

Former Member
0 Kudos

If the buttons are on standard tool bar, that's not possible.

Have u custom made your back/exit/cancel buttons?

Can send the code you are writing?

0 Kudos

I did not do any customization. My code for sending the message if this:


Message eXXXX with 'Error message'

And then it disables the button. I just want to display the error to prevent the user from entering a value that is already existing in the table.

0 Kudos

Hi,

When you specify an error message the program terminates at that point.

Hence you may not be able to set the GUI status for that.

Regards,

ramana

0 Kudos

What is the best way to send error message and inform the user?

0 Kudos

Use popup window to notify errors...

CALL SCREEN '1100' AS WINDOW STARTING AT 10 10.

<i>OR</i>

CALL FUNCTION 'POPUP_TO_CONFIRM'
  EXPORTING
   TITLEBAR                    = 'Test '
    text_question               = 'Error message'
   DISPLAY_CANCEL_BUTTON       = ' '
          .

Regards

ramana

0 Kudos

u can use status or information message instaed.

if u want to exit at that point, use status and info message

and write

leave to screen 0.

0 Kudos

Best way in dialog programming is :

FIELD f1 module m_f1 on request.

module m_f1.

if...

message e....

endif. .

endmodule.

or, if you want a group of fields to be open for input, use chain-endchain.

Please reward points if you feel the answers helped..

0 Kudos

This is what I did but I want to display error status.

0 Kudos

can u send ur relevant flow logic and the module codes?

Former Member
0 Kudos

HI

GOOD

CAN YOU GIVE ME SOME MORE DETAILS ABOUT YOUR REQUIREMENT AND THE ERROR THAT YOUR ARE FACING WITH.

THANKS

MRUTYUN

Former Member
0 Kudos

Hi Adrian,

If u are using a module pool screen, u can use the CHAIN

FIELD <FIELD NAME> MODULE <MODULE NAME>

ENDCHAIN

construct to get rid of ur problem, please read the related documentation.

0 Kudos

Vijay's answer is definitely the answer as that's the way you should give errors in Dialog.

But I am still surprised how standard toolbar's buttons get de-activated on error message.

Normally, all fields on screen are deactivated if you do not use FIELD ... MODULE construct for giving errors.

Can you tell is this standard SAP transaction, or your own?