Application Development 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: 

How to capture error logs of VF01 in a background job log

Former Member
0 Kudos

Hi All,

I need your suggestions and help.

We running a batch job that calls VF01 transaction and creates billing documents.

In some cases billing document does not get created hence job gets cancelled.

in such cases users are unable to understand the reason for failure from job log.

So we need to enhance the job log. Generally this errors are viewed manually by going to edit >logs

So is it technically possible to capture this error information in a batch job .

Please suggest if technically it is possible to display the error log(edit>logs) in a job log

Thanks

Manoj

Edited by: Manoj J on Oct 4, 2011 8:27 AM

5 REPLIES 5

Former Member
0 Kudos

Hi Manoj,

If you use VF04 instead of VF01, you can use transaction V.21 to see log.

In output grid, select the line of the elaboratione, then push shift+f8 and see the log.

Regards.

Andrea

0 Kudos

Hi Andrea,

Thanks but we need to use only VF01 tcode in our case.

FM vbfs_tree_list_display contains the list of errors displayed in log.

However there is no user exit available to capture this information related to error log.

currently sap version is 4.6c does not have option for enhancement-spots also...

So need suggestions and any other possible ways.

Thanks

Manoj

0 Kudos

Hi Andrea ,

In response to your reply

=============================

Hi Manoj,

I had a similar problem.

I solved it selecting from VBSK the last record of the user regarding elaboration of invoices, and then calling f.m. 'VBSK_ALV_DISPLAY'.

Otherwise you could call directly transaction "V.21"

Hope this could help you

Andrea

=====================================================

As suggested i checked tables VBSK but could not found any records from this.

Actually there is no billing document created. even V.21 transaction did not help either.

Do you have ny idea how to proceed further..

Thanks

Manoj

0 Kudos

Hi Manoj,

If you want to read error messages of the log, after reading of VBSK you should read table VBFS with the same field SAMMG.

If this solution doesn't solve your problem, i have no more ideas that could help you.

Regards

Andrea

Former Member
0 Kudos

Hi All ,

I found a user exit that can help in capturing error LOGS from internal table XVBFS .

User exit was found in FM RV_XVBUK_MAINTAIN.

The code sample is given below.

FORM userexit_set_status_vbuk.

DATA: ls_vbfs TYPE vbfs VALUE '(SAPLV60A)XVBFS'.

FIELD-SYMBOLS: <fs_vbfs> LIKE vbfs.

ASSIGN (ls_vbfs) TO <fs_vbfs>.

IF SY-SUBRC EQ 0.

    • Write error log to job log

MESSAGE i001(z9) WITH 'Message id'

<FS_VBFS>-MSGID

'Message no'

<FS_VBFS>-MSGNO.

ENDIF.