Application Development and Automation 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: 
Read only

Sending error messages

Former Member
0 Likes
1,368

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

How can I enable them?

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

12 REPLIES 12
Read only

Former Member
0 Likes
1,331

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?

Read only

0 Likes
1,331

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.

Read only

0 Likes
1,331

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

Read only

0 Likes
1,331

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

Read only

0 Likes
1,331

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

Read only

0 Likes
1,331

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.

Read only

0 Likes
1,331

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..

Read only

0 Likes
1,331

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

Read only

0 Likes
1,331

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

Read only

Former Member
0 Likes
1,331

HI

GOOD

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

THANKS

MRUTYUN

Read only

Former Member
0 Likes
1,331

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.

Read only

0 Likes
1,331

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?