Skip to Content
0
Former Member
Apr 22, 2009 at 07:27 AM

Error check for multiple ranges input

28 Views

Hi,

I have coded a report with the following select options:

SELECT-OPTIONS:

S_PONUM FOR EKKO-EBELN NO INTERVALS,

S_PODAT FOR EKKO-BEDAT NO-EXTENSION,

S_LCNUM FOR EIKP-VORNU NO-EXTENSION NO INTERVALS,

S_VENDR FOR EKKO-LIFNR NO-EXTENSION NO INTERVALS.

I want that a check should be applied at the selection screen level that at least one field should contain a value, i.e. report cannot be run with all blank selection fields.

I am using this code:

AT SELECTION-SCREEN.

IF S_PONUM-LOW IS INITIAL AND

S_PODAT-LOW IS INITIAL AND

S_LCNUM-LOW IS INITIAL AND

S_VENDR-LOW IS INITIAL.

MESSAGE I007(ZSH_MSGC) WITH 'All selection fields cannot be blank'.

ENDIF.

This works fine, but the problem is that when entering multiple ranges for S_PONUM, when the button on the right of the field is clicked to input range values the message pops up. I want that the check should be applied on execute (F8). Any suggestions? Help is appreciated.

Regards,