‎2008 Nov 26 4:32 PM
Hi All,
I made one of selection-screen field as obligatory ...But, my requirement is like I want to display my own custom error message when it doesn't have any value other than giving default error message "fill in all the require fields"...
Also, this fileds need to be obligatory where it needs that obligatory symbol for that sel.screen field.
Please help me in this regard..
Regards,
Sundeep.
‎2008 Nov 26 4:39 PM
Hi Sundeep
In that case remove obligatory from the selection field and
check the screen field in At Selection-Screen on <Field>.
If <Field> is intial.
*give your error message
Endif.
Regards
Neha
‎2008 Nov 26 5:21 PM
But, I need the symbol which appears on sel screen, only with the case of obligatory field
‎2008 Nov 26 8:11 PM
Hi there check this..
MESSAGE i009 DISPLAY LIKE 'E' WITH 'Customer Hierarchy & Sold to Customer' ' cannot be entered together'.information message
MESSAGE E009 DISPLAY LIKE 'E' WITH 'Customer Hierarchy & Sold to Customer' ' cannot be entered together'.error message ( red line on SS)
MESSAGE S009 DISPLAY LIKE 'E' WITH 'Customer Hierarchy & Sold to Customer' ' cannot be entered together'.success message ( green line on SS)
‎2008 Nov 27 6:17 AM
‎2008 Nov 27 6:24 AM
Hi sandeep,
if it obligatory and you dont enter before you press ENTER the system message has the TOP priority THIS IS sap standard NO ONE CAN CHANGE THIS.
once entered you can implement your own messages.
Regards
Ramchander Rao.K
‎2008 Nov 27 6:26 AM
Hi,
But i don't think there is a way to show the Obligatory sign without makin it Obligatory but you can suppress the system message by using
CALL FUNCTION 'MESSAGE_TEXT_BUILD'
EXPORTING
msgid = p_g_msgid
msgnr = p_g_msgno
msgv1 = p_g_msgv1
IMPORTING
message_text_output = p_g_message.
using this you can generate your own message saying to "fill in all the require fields"... and user will be able to edit it but if you simply raise message by MESSAGE E.... you will not be able to enter values.
‎2008 Nov 27 6:26 AM
Hello Sundeep,
If you have made that field as objigatory it will always display the standard message 'Please fill in all fields". Remove the obligatory addition the selection screen and try to validate the same and if it is initial throw your custom message.
if p_selectionscreen is initial.
message 'You forgot to fill the selection screen field Selections" type 'E'.
endif.
Hope it helps.
Thanks,
Jayant
‎2008 Nov 27 1:10 PM
Hi Neha,
Could you please elaborate the solution suggested by you..The FM given by you
will create a message string..But Iam not getting how it will suppress the System message.
Thanking in advance..
Regards,
Sundeep.
‎2008 Nov 27 1:15 PM
Hi
I suppose you've inserted the option OBLIGATORY, u need to delete it and manage your message in the event AT SELECTION-SCREEN just as the guys have said you:
SELECT-OPTIONS: S_BUKRS FOR T001-BUKRS OBLIGATORY.You need to suppress the OBLIGATORY
SELECT-OPTIONS: S_BUKRS FOR T001-BUKRS.
AT SELECTION-SCREEN.
IF S_BUKRS[] IS INITIAL.
MESSAGE .............................
ENDIF.Max