Hello All,
I have 3 fields in my selection screen.
I have a requirement to focus the cursor on the field when a wrong entry is done and error message is displayed.
I am right now trying the below source but in here the focus still remains on the first field even if there is error in second.
I am doing it in Start-of-selection. I tried using At Selection-screen on fieldname but doesnt seem to work.
Any ideas on how to solve this?
START-OF-SELECTION.
SELECT SINGLE * FROM ewoss WHERE dummykey = space.
IF sy-subrc = 0.
IF ( p_ipaddr <> space ) OR ( p_instno <> space ).
IF p_dest = space.
SET CURSOR FIELD 'P_DEST'.
MESSAGE 'サーバ名を指定してください' TYPE 'S' DISPLAY LIKE 'E'.
LEAVE LIST-PROCESSING.
ELSE.
EWOSS-SR1NAME = p_dest.
ENDIF.
ENDIF.
IF ( p_dest <> space ) OR ( p_instno <> space ).
IF ( p_ipaddr CN '0123456789. ' ) OR ( p_ipaddr = space ).
SET CURSOR FIELD 'P_IPADDR'.
MESSAGE 'IPアドレスを指定してください' TYPE 'S' DISPLAY LIKE 'E'.
LEAVE LIST-PROCESSING.
ELSE.
EWOSS-SR1IP = p_ipaddr.
ENDIF.
ENDIF.
IF ( p_dest <> space ) OR ( p_ipaddr <> space ).
IF ( p_instno CN '0123456789' ).
SET CURSOR FIELD 'P_INSTNO'.
MESSAGE 'インスタンス番号を指定してください' TYPE 'S' DISPLAY LIKE 'E'.
LEAVE LIST-PROCESSING.
ELSE.
EWOSS-SR1INST = p_instno.
ENDIF.
ENDIF.
ENDIF.
Thanks.