‎2008 Feb 14 6:58 AM
HI Gurus,
I have filled my data from an excel sheet from either presentation or application server into an internal table.i want to loop at each record for a particular field( say amount) and check for errors occuring in it.If any errors i want to create an error log in application server. can u tell me the procedure to do so? is it using an FM or using open dataset statement.please explain properly.
<REMOVED BY MODERATOR>
thanks in advance
Anand.
Edited by: Alvaro Tejada Galindo on Feb 14, 2008 3:47 PM
‎2008 Feb 14 7:04 AM
‎2008 Feb 14 7:04 AM
‎2008 Feb 14 7:14 AM
Can you suggest something for an error log at apllication server?
‎2008 Feb 14 7:50 AM
Hi,
Check transaction SM21 . Usually it contains the error log. Only thing is that the BASIS should have switched it on for all activities....
Regards...
‎2008 Feb 14 7:21 AM
Hi,
I would like to know Do you want to create a error file in Application server?
If yes, then it is quite easy. Just declare one internal table IT_LOG & store all the error records in this table.
Then loop over the internal table IT_LOG & using open data set concept transfer all the records.
Sample Code:
INITIALIZATION.
CONCATENATE '/INTERFACE/' SY-SYSID '/MM' into GV_DIR.
START-OF-SELECTION.
CONCATENATE GV_DIR '/' P_FILE INTO GV_FILE.
OPEN DATASET GV_FILE FOR OUTPUT IN TEXT MODE.
LOOP AT IT_LOG.
CLEAR LV_STRING.
CONCATENATE IT_LOG-F1 IT_LOG-F2 INTO LV_STRING SEPERATED BY ','.
TRANSFER LV_STRING TO GV_FILE.
ENDLOOP.
CLOSE DATASET GV_FILE.
Note: Here F1 & F2 are respective fields.