‎2011 Mar 21 10:16 AM
Hi,
I am calling a Function module in the Start-of selection, If the FM is giving the subrc value other that 0 (Zero) I need to throw the Error message and need to be back to selection screen.
this I can do it by Sucess messame with LEAVE LIST-PROCESSING. But my requirement is to show the same with error message.
‎2011 Mar 21 12:02 PM
Hi
Please try the below piece of code, it should work the way you want.
message s000 with 'test' DISPLAY LIKE 'E'.
leave LIST-PROCESSING
Regards
Ranganath
‎2011 Mar 21 11:52 AM
after FM, if sy-subrc <> 0.
leave list processing.
message S001 with 'some message' display like 'E'.
Ashok
Edited by: Ashoky on Mar 21, 2011 12:54 PM
‎2011 Mar 21 12:02 PM
Hi
Please try the below piece of code, it should work the way you want.
message s000 with 'test' DISPLAY LIKE 'E'.
leave LIST-PROCESSING
Regards
Ranganath
‎2011 Mar 22 6:53 AM
Hi Ranganath,
I tries with the below statement
MESSAGE S398 WITH 'Table' TABNAME 'does not exists' 'please check' DISPLAY LIKE 'E'.
leave LIST-PROCESSING'.
I am seeing syntax error saying the field DISPLAY is unknown.
‎2011 Mar 22 7:02 AM
You've probably exceeded the number of placeholders in the message.
Concatenate 'Table' TABNAME 'does not exists' 'please check' into a string variable e.g. LV_MESSAGE and then retype your syntax as:
MESSAGE S398 WITH LV_MESSAGE DISPLAY LIKE 'E'.
‎2011 Mar 22 7:05 AM
Hi Dude.
Try like this,
PARAMETERS : p_test TYPE char10.
START-OF-SELECTION.
WRITE : / p_test.
IF p_test = 'AA'.
MESSAGE s001(ziam) DISPLAY LIKE 'E'.
LEAVE LIST-PROCESSING.
ENDIF.
END-OF-SELECTION.
Enjoy!!
Aahbha
‎2011 Mar 22 7:15 AM
How u r able to activate the code.
I wrote the same MESSAGE S398 WITH L_MESSAGE DISPLAY LIKE 'E'.
but I still see the same syntax error message the field
‎2011 Mar 22 7:18 AM
‎2011 Mar 22 8:02 AM
‎2011 Mar 22 8:03 AM
‎2011 Mar 22 8:15 AM
Hi,
Check whether the message has a place holder in it. I
Regards,
Rahul Muraleedharan.
‎2011 Mar 22 8:55 AM
>
> it's 4.6c
That's the problem. DISPLAY LIKE addition is available from Release 610 onwards.
Alternatively you can try something like this:
PARAMETERS: p_tab TYPE tabname OBLIGATORY.
AT SELECTION-SCREEN.
IF sy-ucomm = 'ONLI' OR sy-ucomm = 'PRIN'.
* Check if the table exists in DDIC
CALL FUNCTION 'DDIF_NAMETAB_GET'
EXPORTING
tabname = p_tab
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e007(e2) WITH p_tab.
ENDIF.
ENDIF.@Other posters: Please read the responses carefully before posting. The OP has already mentioned he is in 46C, so no point in proposing the DISPLAY LIKE addition.
Cheers,
Suhas
‎2011 Mar 22 10:15 AM
MESSAGE S398 WITH L_MESSAGE DISPLAY LIKE 'E'.HI,
Does your message 398 have a placeholder (&) ..
If not just use
MESSAGE S398 DISPLAY LIKE 'E'.
And is you want to add custom text to teh message use a message no with placeholders.
Suzie
‎2011 Mar 22 11:38 AM
Hi,
Thanks, it was helpfull.
actually our requirement is to create Custom SE16 by skipping all the chnage options of standard SE16.
if the user enters the table I can manage it with the FM u provided in the even At Selection screen.
No issues I got the complete logic that to be added in the At Selection screen.
I will be adding the logic of FM RS_TABLE_LIST_CREATE of Perform DATABASE_EXIST_CHECK.
Ok thx to all the Supporters.
I am closing the issue...
‎2019 Dec 03 8:49 AM
‎2011 Mar 21 1:19 PM
Hi
I think this is not possibe, because even when you call screen, leave screen or List procesing. i will not display the message in Selection screen.
Try to do it, below the end of the selection.
All the Best.
With regards,
Aahbha
‎2011 Mar 22 8:07 AM
Hi,
you can try the following :
IF p_test = 'AA'.
MESSAGE i007 (Error) with ': message required'
stop.
ENDIF.
thanks,
reagrds,
akshay ruia.
‎2011 Mar 22 8:30 AM
Hi there,
PARAMETERS : p_test TYPE char10.
DATA : LV_MESSAGE TYPE STRING.
START-OF-SELECTION.
WRITE : / p_test.
lv_message = 'HAI'.
IF p_test = 'AA'.
MESSAGE s001(zhcm) WITH LV_MESSAGE DISPLAY LIKE 'E'.
LEAVE LIST-PROCESSING.
ENDIF.
END-OF-SELECTION.
it is working fine.
‎2011 Mar 22 9:43 AM
Hi friend,
Please try the same with Leave to Screen 0.
Thanks and Regards,
Sri Hari Anand Kumar