Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

parameter validation

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

5 REPLIES 5

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

Check relational operator BETWEEN(BT) and IN.

Regards,

Subramanian V.

0 Kudos

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.

0 Kudos

thankyou guys

ambichan