‎2007 Feb 27 10:27 AM
hallow i doing a report program that select some course from table . in the selection screen if u bring invalid course i bring a message like the course is invalid .
the problem is that i do that after select and not in at selection screen, and after the message come i have dump. my question if the user put course invalid i wont after the message he continue to write courses how can i do that?
select .....
if sy-subrc <> 0.
message i(014)
<b>leave to ?</b>
which screen or other option
regards
‎2007 Feb 27 10:34 AM
You can use the option below: (assuming that you are not displaying any list in the event END-OF-SELECTION).
if sy-subrc <> 0.
message i(014)
<b>LEAVE TO LIST-PROCESSING.</b>
endif.
‎2007 Feb 27 10:34 AM
You can use the option below: (assuming that you are not displaying any list in the event END-OF-SELECTION).
if sy-subrc <> 0.
message i(014)
<b>LEAVE TO LIST-PROCESSING.</b>
endif.
‎2007 Feb 27 10:36 AM
Use the STOP. command.
This would skip the rest of the code in the start-of-selection and go to the first line of te end-of-selection.
Use EXIT. if you want to exit the program itself.
Regards,
Ravi
‎2007 Feb 27 10:36 AM
Hi Antonio,
Apparently you don't want to use the AT SELECTION-SCREEN. A trick would be to give a S message (instead of I) and to submit the report again, so:
message S(014).
SUBMIT sy-repid.
Regards,
John.
‎2007 Feb 27 10:37 AM
Hi,
You have to do SCreen Validations in the event AT SELECTION SCREEN only.
Even if you enter wrong values it will stop there itself, without going to select statements, which unnecessarily consumes time of the database.
After select statement you can check SY-SUBRC and give error Message and use STOP.
If sy-subrc <> 0.
Message ....
STOP or EXIT.
Endif.
It won't dump.
Regards,
Anji
‎2007 Feb 27 10:38 AM
hi,
ONE WAY IS TO
CREATE A F4 HELP FOR UR FIELD IN SELECTION SCREEN(COURSE).
WHATS THE DUMP U ARE GETTING?
‎2007 Feb 27 10:40 AM
SELECT-OPTIONS: s_matnr FOR marc-matnr. "Material No
AT SELECTION-SCREEN ON s_matnr.
*Validate material no details
PERFORM validate_matno.
FORM validate_matno.
DATA: v_matnr LIEK mara-matnr.
IF NOT s_matnr[] IS INITIAL.
LOOP AT s_matnr.
SELECT SINGLE matnr INTO v_matnr
FROM mara
WHERE matnr = s_matnr-low.
IF sy-subrc NE 0.<b>MESSAGE i128.
LEAVE LIST-PROCESSING</b>.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM.make sure u r using the message number available in ur message class.
Reward if u find helpful,
‎2007 Feb 27 11:11 AM
hi
I think u might have given an abend msg...there should not b any problem with the ifo msg type...even if given after select...
would u like to send the code that u have written...