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: 

MESSAGE - sintaxis error

Former Member
0 Kudos

I'm new in ABAP and I'm trying to display a error message in the screen with the follow statement:

MODULE read_sflight INPUT.

SELECT SINGLE * INTO CORRESPONDING FIELDS OF sdyn_conn FROM sflight

WHERE carrid = sdyn_conn-carrid

AND connid = sdyn_conn-connid

AND fldate = sdyn_conn-fldate.

IF sy-subrc NE 0.

MESSAGE e038.

ENDIF.

ENDMODULE. " check_sflight

But it is not working. I got the error sintaxis below:

"MESSAGE-ID xx" is missign the "REPORT" statement.

I have checked already the transaction SE91 and the message exist.

Many thanks.

Cristina

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi cristina,

1. In the main program,

give the ID.

2. eg.

REPORT abc message-id XYZ.

regards,

amit m.

4 REPLIES 4

former_member181962
Active Contributor
0 Kudos

MESSAGE e038<b>(<Message class name>)</b>.

GIve the message class name in which 038 message exists.

Regards,

ravi

Former Member
0 Kudos

Hi cristina,

1. In the main program,

give the ID.

2. eg.

REPORT abc message-id XYZ.

regards,

amit m.

Former Member
0 Kudos

HELLO;

GIve the message Id

F sy-subrc NE 0.

MESSAGE e038(MEssagfe-ID).

ENDIF.#

Else give it in the report stmt

Report xxxx message-id xxx.

Please reward the points.

Vsanth

Former Member
0 Kudos

Hi

or u indicate the messages class while calling the message:

MESSAGE e038(XX).

or u indicate it in the TOP-INCLUDE:

program <program> message-id xx.

Max