02-07-2005 6:21 AM
i have parameter namely A to select multiple enteries.
(created thru Select-options command)
and i have one single input parameter namely B.
After entry of A parameter and B parameter values,
i want to check whether B value exists within Parameter A
if not exists i have to display error.
could you pls give idea how to do this.
ambichan.
02-07-2005 7:24 AM
sorry again.
AT SELECTION-SCREEN ON S_BUKRS(multiple parameter).
loop at s_bukrs.
IF S_BUKRS-LOW NE V_BUKRS(single parameter) AND
S_BUKRS-HIGH NE V_BUKRS.
MESSAGE E010(HB).
ENDIF.
endloop.
whether this will work...? i guess this will only check for low and high values..but if i select multiple selection apart from range..how to check with that.
Real requirement is to check V_Bukrs value exists in S_BUKRS parameter or not.
could you give me sample code.? if possible.
ALso one more thing is, As soon as user entered V_Bukrs it should fire this checking thats the problem here.
ambichan.
02-07-2005 6:39 AM
Hi,
There are more than one ways. Try <b>AT SELECTION SECREEN ON END OF <selfield</b>>, A in your case. Take a look at http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/at_selec.htm or http://help.sap.com/saphelp_nw04/helpdata/en/79/34a240d9b511d1950e0000e8353423/content.htm for further details.
Alternatively, on the event, AT SELECTION SCREEN, you can simply loop at your selection table and check whether B exists in A.
Hope this help.
Regards
Message was edited by: Shehryar Khan
Message was edited by: Shehryar Khan
02-07-2005 7:24 AM
sorry again.
AT SELECTION-SCREEN ON S_BUKRS(multiple parameter).
loop at s_bukrs.
IF S_BUKRS-LOW NE V_BUKRS(single parameter) AND
S_BUKRS-HIGH NE V_BUKRS.
MESSAGE E010(HB).
ENDIF.
endloop.
whether this will work...? i guess this will only check for low and high values..but if i select multiple selection apart from range..how to check with that.
Real requirement is to check V_Bukrs value exists in S_BUKRS parameter or not.
could you give me sample code.? if possible.
ALso one more thing is, As soon as user entered V_Bukrs it should fire this checking thats the problem here.
ambichan.
02-07-2005 7:34 AM
Check relational operator BETWEEN(BT) and IN.
Regards,
Subramanian V.
02-07-2005 7:48 AM
Hello Ambi,
It is not as complicated as you think. Just try this one out.
IF V_BUKRS IN S_BUKRS.
issue the error message.
ENDIF.
Regards,
Anand Mandalika.
P.S. : Reward the points if this helps.
02-07-2005 7:54 AM