Skip to Content
-3

BAL_LOG_MSG_ADD not displaying complete message

Oct 25, 2016 at 07:02 AM

1.3k

avatar image
Former Member

Hi
I am using BAL_LOG_MSG_ADD to add message to the log but the ALV in the log is not displaying the complete message. How can i display the complete message in the logs?

10 |10000 characters needed characters left characters exceeded

What do you mean? Are you using the grid or list output? For the grid, it displays up to 255 characters. Can you show a screenshot?

0

Q: What do you mean exactly?

A: ?

.

Q: Are you using the grid or list output?

A: It is a grid display.

.

Q: For the grid, it displays up to 255 characters. Can you show a screenshot?

A: ?

1

Sorry, I was wrong: a grid displays up to 128 characters and cannot be changed. Cf note 857823 (ALV Grid: Strings with maximum of 128 characters) -> https://service.sap.com/sap/support/notes/857823

0
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Raymond Giuseppi Nov 04, 2016 at 07:04 AM
1

BAL_LOG_MSG_ADD doesn't display anything, SLG1 and some of the BAL* FM can display data.

If you correctly fill the parameters, the message should be correctly displayed, did you map fields' value in your code or did you use a tool like cl_ops_ehp_mapping_helper=>map_bapiret2_to_bal_s_msg, also the four parameter of a message are limited in size to 50 characters.

NB: The displayed tree has limitations too, but there is easily found options to display a message in a pop-up.

There is a trick to add information, you can add one "context" structure (not too wide) to the message that can be displayed in SLG1, map a structure to context-value (max length 256, if possible use char type, Unicode use method cl_abap_container_utilities=>fill_container_c) and the ddic reference name to context-tabname.

Regards,
Raymond

Show 2 Share
10 |10000 characters needed characters left characters exceeded

The grid can display values up to 128 characters and cannot be changed. Cf note 857823 (ALV Grid: Strings with maximum of 128 characters) -> https://service.sap.com/sap/support/notes/857823

You have to double-click the message to display the whole text. Or create a program to display the log via BAL_DSP_LOG_DISPLAY, and add an additional column in the ALV grid to display the second part of the message, and use a callback routine to fill it (see for example demo program SBAL_DEMO_04_SELF).

0

Double-click or click on display icon trigger two pop-up (if that was not as easy as I supposed)

  • Double-click : display message as for any transaction when you double-click on the lower displayed message
  • Click on display icon: display technical data of cursor selected item, those related to message itself and the fields values of the context structure

Regards,
Raymond

0
avatar image
Former Member Oct 25, 2016 at 09:36 AM
-2

It is a grid display.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Oct 25, 2016 at 11:10 AM
-2

Dear Pratishtha Bhatnagar,

Please Let us know clearly about your Query.

Why you are using this FM?

What you are displaying in Report Output?

Here from this FM, you are importing parameters are,

E_S_MSG_HANDLE - Message handle

E_MSG_WAS_LOGGED - Message collected

E_MSG_WAS_DISPLAYED - Message output

Here Logged and Displayed parameter is boolean. Msg_Handle is type of structure BALMSGHNDL.

In that structure two fields Log_Handle and Msgnumber.

Those fields length is only 22 characters.

So you should receive that export parameters with same character length variable.

data: Msg_handle LIKE BALMSGHNDL OCCURS 0 WITH HEADER LINE,

I_LOG_HANDLE type BALLOGHNDL,

I_S_MSG type BAL_S_MSG.

CALL FUNCTION 'BAL_LOG_MSG_ADD'
EXPORTING
I_LOG_HANDLE = I_LOG_HANDLE

i_s_msg = i_s_msg

IMPORTING
E_S_MSG_HANDLE = MSG_HANDLE

* E_MSG_WAS_LOGGED =
* E_MSG_WAS_DISPLAYED =
* EXCEPTIONS
* LOG_NOT_FOUND = 1
* MSG_INCONSISTENT = 2
* LOG_IS_FULL = 3
* OTHERS = 4
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.

Thanks,

Sivaraj Sadasivam.


capture.jpg (46.6 kB)
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Oct 25, 2016 at 01:33 PM
0

We are using this FM to log error messages in SLG1. so when i am looking for the error message in SLG1 the message is not displayed completely. Some part of it is truncated because of which we are not able to know about the reason of error.

Share
10 |10000 characters needed characters left characters exceeded