‎2007 Feb 01 5:45 PM
Hi
I am using Standard Batch input program (RMDATIND) for MM upload i need to validate the old material number if it is already existed in MARA it should throw an error at the end of the processing saying that "Old material number" already existing in MARA . Flat file will have thousands of records.
One solution like, we can move all the error records in one internal table in code of Filed mapping conversion rule step , but the problem is where we can write the error records?
Another question when we use Standard program for conversion is it possible to show error log at the end of the processing?
Its very urgent Kindly help me ........
Rgds,
bhanu.......
‎2007 Feb 01 5:50 PM
hi,
is better if yu showa error log at the end of processing
thanks & regards
warun
‎2007 Feb 01 6:05 PM
Hi,
In the Begin of the Processing you can creata a Internal table, and in the 5th step last, write if the OLD material is exited then move that to Internal table.
coming to second Question, the error log will be come after the processing all the records. so there will be no extra work, automatically that will come
Regards
Sudheer
‎2007 Feb 01 6:17 PM
Hi,
YOu can populate error messages in LSMW. To achieve this you add code in LSMW. Follow the below procedure to add code in LSMW.
In Display FieldMapping and Conversion rule Step of LSMW click the button Display Variant. A screen will pop up. Check the boxes - Global Definitions and ABAP Sub Programs. This will allow you to add code in LSMW.
At check the error records follow the below mentioned procedure...
<b>Error messages in the conversion log</b>
How can user-defined error messages be added to the conversion log?
1. Use of WRITE command in the Coding
a. Example: WRITE: Error during conversion of field xxx
2. In the editor use Insert -> Message to use a message already existing in the SAP system.
a. Example (Coding after using the menu function and filling the fields):
WA_ERRORTAB-ID = '/SAPDMC/LSMW'.
WA_ERRORTAB-MSGNO = 012.
WA_ERRORTAB-PAR1 = 'A'.
WA_ERRORTAB-PAR2 = 'B'.
WA_ERRORTAB-PAR3 = 'C'.
WA_ERRORTAB-PAR4 = 'D'.
INSERT WA_ERRORTAB INTO TABLE G_ERROR_TAB.
The message will be added to the log.
For further reference click the link below
http://www.erpgenie.com/sapgenie/docs/Lsmw.zip.
Regards,
Vara