10-09-2007 10:00 AM
HI All,
can any one of you please suggest me how to return back to selection screen after an information message is triggered.
actually my code is:
start-of-selection.
select stmt.
if sy-subrc ne 0.
message i000 with 'enter valid entries'.
endif.
end-of-selection.
write:/ 'no of records selected', records.
my requirement is like as soon as select stmt get fails ian information message should get popup and when i press enter i should return back to selection screen.
but here i'm getting end-of-selection get executed.
thanks
10-09-2007 10:05 AM
After your message statement message i000 with 'enter valid entries', put the below line.
leave list-processing.
10-09-2007 10:05 AM
Suresh,
Add the validation code in AT-SELECTION SCREEN event and not at STARTOFSELECTION... As the event flow is automatic... U can perform field validations in the AT-SELECTION SCREEN ON scrfield event
Reward if helpful,
Karthik
10-09-2007 10:07 AM
hi karthik,
as per my requirement this select stmt should be in start-of-selection.
10-09-2007 10:05 AM
After your message statement message i000 with 'enter valid entries', put the below line.
leave list-processing.
10-09-2007 10:09 AM
10-09-2007 10:06 AM
Hi,
Do the validation in the AT SELECTION-SCREEN event. Then it will work fine.
Thanks,
Muthu.
10-09-2007 10:23 AM
after u r sy-subrc check use this function module it will directly let u in to selection screen
data : v1 type string.
v1 = 'select published'.
call function 'POPUP_TO_CONFIRM'
exporting
TITLEBAR = ' '
DIAGNOSE_OBJECT = '
text_question = 'TEXT_QUESTION'
TEXT_BUTTON_1 = zapple
ICON_BUTTON_1 = ' '
text_button_2 = 'cancel flight'
ICON_BUTTON_2 = ' '
DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = 'X'
USERDEFINED_F1_HELP = ' '
start_column = 1
start_row = 10
POPUP_TYPE = POPUP_TYPE
iv_quickinfo_button_1 = 'Select Published'
iv_quickinfo_button_2 = ' Flight Search'
IMPORTING
ANSWER = ANSWER
TABLES
PARAMETER = PARAMETER
EXCEPTIONS
TEXT_NOT_FOUND = 1
OTHERS = 2
.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
reward points if helpful..........