Skip to Content
0
Former Member
Sep 09, 2009 at 04:59 AM

check select-options in selection-screen

2648 Views

I have two select-options in a selection-screen s_vbeln and p_ebeln with intervals & with extensions. Now i have to check whether values in high or in low are valid or not? I have written the following code to check the validity of the values.

AT SELECTION-SCREEN ON s_vbeln.

IF SY-UCOMM EQ 'ONLI' .

IF NOT s_vbeln[] IS INITIAL.

LOOP AT s_vbeln.

SELECT SINGLE VBELN

FROM VBAK

INTO gs_vbeln

WHERE VBELN EQ s_vbeln-LOW.

IF SY-SUBRC <> 0.

MESSAGE E398(00) WITH 'Invalid Sales Order Number!!'.

ENDIF.

SELECT SINGLE VBELN

FROM VBAK

INTO gs_vbeln

WHERE VBELN EQ s_vbeln-HIGH.

IF SY-SUBRC <> 0.

MESSAGE E398(00) WITH 'Invalid Sales Order Number!!'.

ENDIF.

ENDLOOP.

ENDIF.

ENDIF.

The similar is with p_ebeln which is a field of ekko table.And vbeln is a field of vbak table. if gurus can post the code

for the same.

Regards,

Priya