‎2008 Jun 20 10:26 AM
‎2008 Jun 20 10:29 AM
Hi,
What kind of validation do you need?
If you need to find out if material exists in database, then you can use MARA_SINGLE_READ function.
Regards,
Himanshu
‎2008 Jun 20 10:28 AM
hiiii
use following code that will solve your problem.It will give you error message also.
CALL FUNCTION 'BAPI_MATERIAL_EXISTENCECHECK'
EXPORTING
material = w_matnr
* MATERIAL_EVG = MATERIAL_EVG
IMPORTING
* DELETION_FLAG = DELETION_FLAG
return = w_return.
IF w_return-type CA 'EA'.
ROLLBACK WORK.
MESSAGE ID '26' TYPE 'E' NUMBER '000'
WITH w_return-message.
WRITE:
/ 'Invalid Material' COLOR 5.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT = w_WAIT
* IMPORTING
* RETURN = RETURN.
.
SKIP.
WRITE:
/ 'Valid Material' COLOR 4,
/ 'Material Number:', w_matnr.<removed_by_moderator>
thx
twinkal
Edited by: Julius Bussche on Jun 24, 2008 7:00 PM
‎2008 Jun 20 10:29 AM
Hi,
What kind of validation do you need?
If you need to find out if material exists in database, then you can use MARA_SINGLE_READ function.
Regards,
Himanshu
‎2008 Jun 20 10:29 AM
Hi ,
Check out the Function module
PRICAT_MATERIAL_NUMBER_CHECK
&************<removed_by_moderator>*****************&
Edited by: Julius Bussche on Jun 24, 2008 6:58 PM
‎2008 Jun 24 8:08 PM
Hi.
Please use a proper subject for your postings. According to our rules of engagement I will lock this thread.
Best regards,
Jan Stallkamp