‎2007 Feb 21 2:28 AM
Hi all,
I am Anil.can any body explains me how to validate a selection-screen field for the following scenario?
I have customer nos ranging from 100-1000.among them i dont have any sales orders for the customers who are in between 150-250.I have sales order(VBELN) as select-options and Plant(WERKS) as Parameter on the selection-screen.I want to validate these fields without hardcaode.How can i do that?Please send me the complete code.
I am not getting how to validate a field which is declared as parameter?
regards and thanks in advance.
Anil.
‎2007 Feb 21 2:34 AM
Hi Anil
Your requirement seems to be confusing...
Do you need to validate Sales Order Number and Plant for the range of customers or Sales Order Number and Plant individually???
Kind Regards
Eswar
‎2007 Feb 21 2:43 AM
I want to validate sales order no and plant individually.Plant nos are from 1-10.
Customer numbers are from 100-1000.
How can i do this?
regards and Thanks in advance,
Anil
‎2007 Feb 21 3:38 AM
Hi,
IS it select-options?
data: c_min like kna1-kunnr default '00000100',
c_max like kna1-kunnr default '00001000'.
SELECT-OPTIONS SO_kunnr FOR kna1-kunnr
DEFAULT c_min TO c_max
OPTION BT SIGN I.
Does this help??
Regards
Subramanian
‎2007 Feb 21 5:15 AM
We should not hard code that.If the customers who are in between 150-200 are not having any orders ,will the code work properly?
regards and thanks in advance,
Yours,
Anil.
‎2007 Feb 21 4:04 AM
Make sure that u are validating against the header table.
say eg if u wnat t validate matnr in marc, then do as below.
SELECT-OPTIONS: s_matnr FOR marc-matnr. "Material No
AT SELECTION-SCREEN.
*Validate material no details
PERFORM validate_matno.
FORM validate_matno.
DATA: v_matnr LIEK mara-matnr.
SELECT SINGLE matnr INTO v_matnr
FROM <b>mara</b>
WHERE matnr IN s_matnr.
IF sy-subrc NE 0.
MESSAGE i128.
LEAVE LIST-PROCESSING.
ENDIF.
ENDFORM.Dont select from marc.
Hope this is clear.
‎2007 Feb 21 9:35 AM
Anil,
If your selection-screen has a parameter of Plant and Select option of VBELN. You can validate these fields only as shown above, why do you bother about Customer Nos.