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: 

Error Message with multiple line

Former Member
0 Kudos
2,379

Hi

How to display a error message with multiple line?

Example

Goods movement not possible for material 101

Goods movement not possible for material 102

Goods movement not possible for material 103

is it possible is ABAP? If so please advice me.

Best Regards

Asheek

8 REPLIES 8

former_member221770
Contributor
0 Kudos
495

Hi Asheek,

Don't think this is possible in ABAP. What I would do is collect these error messages into an internal table and pass them out in a pop up dialog screen. I would put them into a little table control.

Cheers,

Pat.

Former Member
0 Kudos
495

Hi,

Try with long text.

Svetlin

Former Member
0 Kudos
495

Hi Asheek,

I suggest you to display these error messages using the application log popup.

You can create the application log by making use of the following function modules.

BAL_LOG_CREATE

BAL_LOG_MSG_ADD_FREE_TEXT

BAL_DSP_LOG_DISPLAY

Let me know, if need any sample code.

Best Regards,

vijay

0 Kudos
495

Hi Vijay,

1. I create a log instance using BAL_LOG_CREATE.

2. If I have an internal table it_messages which will have my error messages, should I loop through this and call BAL_LOG_MSG_ADD for each message?

3. Then I call BAL_DSP_LOG_DISPLAY.

My doubt is if my message which is in line is_message be added to the log, which of the fields should it be supplied to, to be added in the log? I mean.. BAL_LOG_MSG_ADD takes a parameter i_s_msg. Which field of i_s_msg needs to be supplied with the error message which needs to be added to the appl log?

Thanks & Regards,

Anoop

0 Kudos
495

Hi Anoop,

You can use same thing like this

I suggest write ur message through this.

First set the obecj.

CALL FUNCTION 'APPL_LOG_SET_OBJECT'

for local memory

FUNCTION 'APPL_LOG_WRITE_MESSAGES'

EXPORTING

OBJECT = OBJECT

SUBOBJECT = SUBOBJECT

UPDATE_OR_INSERT = UPDATE_INSERT_FLAG

TABLES

MESSAGES = MESSAGE_TABLE

EXCEPTIONS

OBJECT_NOT_FOUND = 1

SUBOBJECT_NOT_FOUND = 2

OTHERS = 3.

the call for physical memory

CALL FUNCTION 'APPL_LOG_WRITE_DB'

In this process you only need to provide the Itab with error messages.

Reg,

Arpit

aaruljothi
Participant
0 Kudos
495

hi,

try this

message 1039(zaba) with

'Goods movement not possible for material 101'

'Goods movement not possible for material 102'

'Goods movement not possible for material 103'.

aaruljothi
Participant
0 Kudos
495

hi,

try this

(instead of 1 give e)

message i039(zaba) with

'Goods movement not possible for material 101'

'Goods movement not possible for material 102'

'Goods movement not possible for material 103'.

0 Kudos
495

zaba is your own message class. Not working for us.