Skip to Content
0
Former Member
Jun 18, 2009 at 07:16 AM

Issue in writing error in application log

984 Views

Hi Guys,

iam using below FM to write error in application log . But the log iam not able to see in SLG1 tcode .Cany any one let me how can i fix this , is there any step by stp procedure ?

CALL FUNCTION 'BAL_LOG_MSG_ADD'

EXPORTING

I_S_MSG = L_S_MSG

  • I_LOG_HANDLE =

EXCEPTIONS

LOG_NOT_FOUND = 0

OTHERS = 1.

RAISE NO_MORE_DATA.

ENDIF.

IF L_CONREC[] IS NOT INITIAL.

CHECK L_APPL[] IS INITIAL AND L_CONTYP[] IS INITIAL.

RAISE NO_MORE_DATA.

  • define some header data of this log

G_S_LOG-EXTNUMBER = 'Input fields are Null'.

G_S_LOG-ALUSER = SY-UNAME.

G_S_LOG-ALPROG = SY-REPID.

*create a log

CALL FUNCTION 'BAL_LOG_CREATE'

EXPORTING

I_S_LOG = G_S_LOG

EXCEPTIONS

OTHERS = 1.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDIF.

Regards,

Sr