2009 Jun 02 8:28 AM
Hi.
i have to do the validation for the incoming data from the structure based on a key field.
say from example,if no material found for that key field,give the error.
in this case,what could be the select and sy-subrc statement.
thanks in adv.
2009 Jun 02 8:46 AM
Hi,
If you want stop the execution then go for the error i.e E.
Or if you want to proceed with the execution without stopping then go for the warning message.
If sy-subrc not equal to 0.
<your option>
Endif.
Aswarth
Edited by: Aswarthanarayana Mylavaram on Jun 2, 2009 9:47 AM
Edited by: Aswarthanarayana Mylavaram on Jun 2, 2009 9:48 AM
Edited by: Aswarthanarayana Mylavaram on Jun 2, 2009 9:48 AM
Hi.
i have to do the validation for the incoming data from the structure based on a key field.
say from example,if no material found for that key field,give the error.
in this case,what could be the select and sy-subrc statement.
thanks in adv.
2009 Jun 02 8:32 AM
Hi,
At run time, let's say MARA structure MATNR field got populated with the material number and you want to validate it.
Then write a select command like,
SELECT SINGLE MATNR
FROM MARA
INTO V_MATNR
WHERE MATNR = MARA-MATNR.
IF SY-SUBRC not equal to 0.
MESSAGE E000 WITH 'No suitable material found for the selection'.
ENDIF.
But do remember that, validation for the particular field will be done on it's check table only if it is available.
Regards,
Santhosh
2009 Jun 02 8:35 AM
write select single command and then
if sy-subrc = 0.
then pass e000 message (error messgae)
2009 Jun 02 8:46 AM
Hi,
If you want stop the execution then go for the error i.e E.
Or if you want to proceed with the execution without stopping then go for the warning message.
If sy-subrc not equal to 0.
<your option>
Endif.
Aswarth
Edited by: Aswarthanarayana Mylavaram on Jun 2, 2009 9:47 AM
Edited by: Aswarthanarayana Mylavaram on Jun 2, 2009 9:48 AM
Edited by: Aswarthanarayana Mylavaram on Jun 2, 2009 9:48 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |