Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to create error log in application server?

Former Member
0 Likes
1,123

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

1 ACCEPTED SOLUTION
Read only

Sathish
Product and Topic Expert
Product and Topic Expert
0 Likes
690

you can call this FM TR_WRITE_LOG

4 REPLIES 4
Read only

Sathish
Product and Topic Expert
Product and Topic Expert
0 Likes
691

you can call this FM TR_WRITE_LOG

Read only

Former Member
0 Likes
690

Can you suggest something for an error log at apllication server?

Read only

Former Member
0 Likes
690

Hi,

Check transaction SM21 . Usually it contains the error log. Only thing is that the BASIS should have switched it on for all activities....

http://www.sourceveda.com/

Regards...

Read only

Former Member
0 Likes
690

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.