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: 

Where to pull the error message of a incorrect processed invoice?

former_member230666
Participant
0 Kudos

Hi all,

Need your advice as I am still new to ABAP. I was assigned a task to add a new column in a report program to display the incorrect processed billing (E.g: Invoice) error message. As mention below are the steps that i tried to investigate the error table but it is a structure. Which table to pull the error message from? Thanks in advance.

Steps that i have tried to get the table:

1) Go to VL02.

2) Enter a billing number.

3) Check for message status and it must be red.

4) Click on "Processing Log"

5) Click on "Technical Description"

1 ACCEPTED SOLUTION

Clemenss
Active Contributor
0 Kudos

Hi shawntan,

VL02 uses SAP application log. Messages are stored in cluster tables and can not be accessed directly. If you display an application log via VL02, you can Display Header Details. This will give you a clue on how to find the message header - compare DDIC table BALHDR entries. From here you will get application log header data for a certain LOG object, sub-object, data/time, user.

The try to load an application protocol using function BAL_DB_LOAD, put the header information into a record of table I_T_LOG_HEADER. The function will return a handle in table E_T_LOG_HANDLE. You can use the handle to use functions in function group SBAL: Search for messges required, then use the returned message handle to retrieve the message details using function BAL_LOG_MSG_READ.

More information is displayed as help when running report SBAL_DOCUMENTATION.

Admitted: At first glance it looks rather complex. Check Report SBAL_DEMO_03 or any other SBAL_DEMO_* report.

After you got your first success you will like the application log concept. Warning: Do not try to debug any of the BAL functions - it is wasted time. SAP makes extensive use of complex macros that make it impossible. But application log works stable and efficient already long time.

We created a global class to simplify the use - thats what you may do later.

Regards,

Clemens

2 REPLIES 2

Clemenss
Active Contributor
0 Kudos

Hi shawntan,

VL02 uses SAP application log. Messages are stored in cluster tables and can not be accessed directly. If you display an application log via VL02, you can Display Header Details. This will give you a clue on how to find the message header - compare DDIC table BALHDR entries. From here you will get application log header data for a certain LOG object, sub-object, data/time, user.

The try to load an application protocol using function BAL_DB_LOAD, put the header information into a record of table I_T_LOG_HEADER. The function will return a handle in table E_T_LOG_HANDLE. You can use the handle to use functions in function group SBAL: Search for messges required, then use the returned message handle to retrieve the message details using function BAL_LOG_MSG_READ.

More information is displayed as help when running report SBAL_DOCUMENTATION.

Admitted: At first glance it looks rather complex. Check Report SBAL_DEMO_03 or any other SBAL_DEMO_* report.

After you got your first success you will like the application log concept. Warning: Do not try to debug any of the BAL functions - it is wasted time. SAP makes extensive use of complex macros that make it impossible. But application log works stable and efficient already long time.

We created a global class to simplify the use - thats what you may do later.

Regards,

Clemens

former_member230666
Participant
0 Kudos

Hi Clemen,

Thanks for the advice. I will work it out according to your advice and tips. Have a great day ahead..:)

Regards

Shawn