2007 Apr 02 8:21 AM
Dear Abapers,
i want to check value at selection screen , how to do this.
e.g. My selection screen contain matnr(select-option) and i want to check values of matnr from check table mara. also if the value is not in mara then i want to show error message .
pl suggest how to do this
Regards,
Kapil Soni
2007 Apr 02 8:22 AM
Hi..,
use the event AT SELECTION-SCREEN.
<b>report zprogram .
tables mara.
select-options s_matnr for mara-matnr.
AT SELECTION-SCREEN.
select single matnr from mara into mara-matnr where matnr in s_matnr.
if sy-subrc ne 0.
message 'Material doesnot exist' type 'E'.
endif.
START-OF-SELECTION.
........</b>
reward if it helps u..
sai ramesh
Message was edited by:
Sai ramesh
Dear Abapers,
i want to check value at selection screen , how to do this.
e.g. My selection screen contain matnr(select-option) and i want to check values of matnr from check table mara. also if the value is not in mara then i want to show error message .
pl suggest how to do this
Regards,
Kapil Soni
2007 Apr 02 8:22 AM
Hi..,
use the event AT SELECTION-SCREEN.
<b>report zprogram .
tables mara.
select-options s_matnr for mara-matnr.
AT SELECTION-SCREEN.
select single matnr from mara into mara-matnr where matnr in s_matnr.
if sy-subrc ne 0.
message 'Material doesnot exist' type 'E'.
endif.
START-OF-SELECTION.
........</b>
reward if it helps u..
sai ramesh
Message was edited by:
Sai ramesh
2007 Apr 02 8:23 AM
Hi Kapil,
You can use the AT SELECTION-SCREEN event.
The code will be as follows :
AT SELECTION-SCREEN ON <Material Field say P_MATNR>.
SELECT SINGLE * FROM MARA where MATNR = P_MATNR.
IF SY-SUBRC <> 0.
Error message.
ENDIF.
Regards,
Himanshu
2007 Apr 02 8:23 AM
Hi,
Validation of material clear t001w.
if not s_matnr is initial.
select matnr from mara up to 1 rows
into mara-matnr
where matnr in s_matnr.
endselect.
if sy-subrc ne 0.
message e004. " Invalid Material Number
endif.
endif.
regards,
Anji
2007 Apr 02 8:26 AM
hi,
do this way ..
at selection-screen.
if not s_matnr is initial.
select single * from mara where matnr = s_matnr.
if sy-subrc <> 0.
message e000 with ' No material found for the selection criteria'.
endif.
endif.Regards,
Santosh
2007 Apr 02 8:27 AM
at selection-screen on s_matnr.
select single matnr from mara where matnr = p_matnr.
if sy-subrc <> 0.
message e000(zz) with 'Enter another material number'.
endif.
regards,
keerthi
2007 Apr 02 8:30 AM
Thanks ,
I know At selection-screen event where we can check validation. but in select-option there is one option like we can check value at select-option.
e.g. s_matnr for mara-matnr value-check.
like this there is one option, i am not too much sure in this . can any one explain me what is this.
Regards,
Kapil Soni
2007 Apr 02 8:38 AM
Hi ..
The value entered in the field is checked against the check table or fixed values defined in the ABAP Dictionary. There must be a LIKE reference to an ABAP Dictionary field.
For further Reference see The Help By preesing F1 key in the VALUE CHECK .
Regards
Bala..
Message was edited by:
S Balasubramanian
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |