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

MESSAGE - sintaxis error

Former Member
0 Likes
903

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
Read only

Former Member
0 Likes
773

Hi cristina,

1. In the main program,

give the ID.

2. eg.

REPORT abc message-id XYZ.

regards,

amit m.

4 REPLIES 4
Read only

Former Member
0 Likes
773

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

GIve the message class name in which 038 message exists.

Regards,

ravi

Read only

Former Member
0 Likes
774

Hi cristina,

1. In the main program,

give the ID.

2. eg.

REPORT abc message-id XYZ.

regards,

amit m.

Read only

Former Member
0 Likes
773

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

Read only

Former Member
0 Likes
773

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