Application Development and Automation 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: 
Read only

wrong messagetype while processing in an alv grid event

Former Member
0 Likes
1,058

Hello,

a brief discription of my problem:

I am processing a standard SAP form "PERIODE_PRUEFEN" which calls the function "READ_CUSTOMIZED_MESSAGE". The routine is called inside an event-handler of the ALV Grid event 'user_command'. The messagetype is selected from a customising table 'T100C'. Despite the messagetype 'W' the program is always aborted with an 'E' message.

What I have tried so far:

1. I debugged the SAP standard transaction 'fb08' which runs exactly the same functions with the same values and it works.

2. I changed the messagetype in the debugger - no success

3. I searched the SAP notes, but theres nothing about my problem

I guess the problem is somewhere in the ALV Grid event, because this is the only difference between the SAP standard an my program. Maybe the message is processed wrong while beeing called within an event.

It would be great to get some useful hints to solve this problem

Hello,

a brief discription of my problem:

I am processing a standard SAP form "PERIODE_PRUEFEN" which calls the function "READ_CUSTOMIZED_MESSAGE". The routine is called inside an event-handler of the ALV Grid event 'user_command'. The messagetype is selected from a customising table 'T100C'. Despite the messagetype 'W' the program is always aborted with an 'E' message.

What I have tried so far:

1. I debugged the SAP standard transaction 'fb08' which runs exactly the same functions with the same values and it works.

2. I changed the messagetype in the debugger - no success

3. I searched the SAP notes, but theres nothing about my problem

I guess the problem is somewhere in the ALV Grid event, because this is the only difference between the SAP standard an my program. Maybe the message is processed wrong while beeing called within an event.

It would be great to get some useful hints to solve this problem

7 REPLIES 7
Read only

Former Member
0 Likes
984

Hi,

what is the message you are getting

and what is the message number and message class.

that will tell you some more hints..

check them..

give us also...

regards

vijay

Read only

Former Member
0 Likes
984

sorry double post

Message was edited by: Tobias Gegner

Read only

Former Member
0 Likes
984

So here is the function call:

CALL FUNCTION 'CUSTOMIZED_MESSAGE'

EXPORTING

I_ARBGB = 'F5'

I_DTYPE = 'W'

I_MSGNR = '202'

And the messagetext:

"Posting takes place in previous fiscal year"

Read only

Former Member
0 Likes
984

Hi,

The ABAP runtime environment handles messages according to the type declared in the MESSAGE statement and the context in which the message was sent.

The behaviour of message type 'W' in a dialog is different from a report program.

Run demo program DEMO_MESSAGES, select Main Program, Type 'W' and execute. You will get an error message instead of warning message.

This behaviour is well documeneted in the on-line help for MESSAGE statement.

Regards,

Rao A

Read only

0 Likes
984

Thanks for the hint. But I'm not sure if the AVL-Grid Event 'on_user_command', in which I call the message, is one of the events mentioned in the message description in the documentation. Is the listevent 'AT USER-COMMAND' equivalent to the ALV event? And is there any way to get the current event of the runtime environment while debugging the program?

Message was edited by: Tobias Gegner

Read only

Former Member
0 Likes
984

Hi,

Run a test program with these 2 lines of code.

REPORT ZTEST.

MESSAGE W202(F5).

You will get an error message instead of a warning message. I do not think that this has anything to do with ALV grid events.

Regards,

Rao A

Read only

0 Likes
984

Great thanks a lot!

Your hint led me finally to the solution. I expected the message to behave like in a PAI, but the user_command in the ALV doesn't trigger an runtime-event. Therefore the message came up in an undefined state and behaved just like in "START-OF-SELECTION". So I just had to call the message in a pop-up dynpro.