2006 Nov 14 6:12 PM
HI ,
iam having 2 parameters on a selection screen.
parameters : plant like mara-plant ,
matnr like mara-matnr..
now i will enter some material no in matnr parameter , then i next step it has to check automatically that material exist in that palnt or not . if exits means the process will be continued , if not it has to show an error that material does not exist in that plant ..
Thans & Regards
Latha murthy
HI ,
iam having 2 parameters on a selection screen.
parameters : plant like mara-plant ,
matnr like mara-matnr..
now i will enter some material no in matnr parameter , then i next step it has to check automatically that material exist in that palnt or not . if exits means the process will be continued , if not it has to show an error that material does not exist in that plant ..
Thans & Regards
Latha murthy
2006 Nov 14 6:15 PM
You may do your validations in the AT SELECTION-SCREEN event.
report zrich_0001 .
data: xmarc type marc.
parameters: p_matnr type mara-matnr,
p_werks type marc-werks.
at selection-screen.
clear xmarc.
select single * into xmarc from marc
where matnr = p_matnr
and werks = p_werks.
if sy-subrc <> 0.
message e001(00) with 'Material is not extended to plant'.
endif.
Regards,
Rich Heilman
2006 Nov 14 6:17 PM
Hi
TABLES: MARA, MARC, T001W.
PARAMETERS: P_MATNR LIKE MCHA-MATNR,
P_PLANT LIKE MCHA-WERKS.
AT SELECTION-SCREEN ON P_MATNR.
SELECT SINGLE * FROM MARA WHERE MATNR = P_MATNR.
IF SY-SUBRC <> 0.
MESSAGE E208(00) WITH 'No material'.
ENDIF.
AT SELECTION-SCREEN ON P_PLANT.
SELECT SINGLE * FROM T001W WHERE WERKS = P_PLANT.
IF SY-SUBRC <> 0.
MESSAGE E208(00) WITH 'No plant'.
ENDIF.
AT SELECTION-SCREEN.
SELECT SINGLE * FROM MARC WHERE MATNR = P_MATNR
AND WERKS = P_PLANT.
IF SY-SUBRC <> 0.
MESSAGE E208(00) WITH 'No plant'.
ENDIF.If you use MCHA table the system'll show all plant of the material chosen automatically.
Max
2006 Nov 14 7:07 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |