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

How to display error msg without exiting fb60 screen using EXIT_SAPLF048_00

Former Member
0 Likes
1,734

Hi all,

Enhancement : F180A001 - EXIT_SAPLF048_001.

........

SELECT * INTO CORRESPONDING FIELDS OF TABLE IT_BSIK

FROM BSIK AS A INNER JOIN BKPF AS B

ON ABUKRS = BBUKRS

AND ABELNR = BBELNR

AND AGJAHR = BGJAHR

WHERE A~GJAHR = WA_ZDATA-GJAHR AND

A~BUKRS = WA_ZDATA-BUKRS AND

A~XBLNR = WA_ZDATA-XBLNR AND

A~LIFNR = WA_ZDATA-LIFNR AND

A~WRBTR = WA_ZDATA-WRBTR AND

B~STBLG = ' '.

*Display error message when existing invoice occured.

IF SY-SUBRC = 0.

MESSAGE ID 'Z0' TYPE 'E' NUMBER '017'.

ELSE.

..........

I have a requirement to use the following exit to display error control in tcode: FB60.

I code the error message using " MESSAGE ID 'Z0' TYPE 'E' NUMBER '017'. ".

The error message box appear but once i click exit it go to the SAP main screen instead of going to the FB60 screen.

I've tried to code using TYPE: I and S but it is not successful.

My question: How do i display this error message on the task bar? or how do i diplsay the error message and when it exit it will stay back to FB60 screen?

Hope you could help me....Thank you

Hi all,

Enhancement : F180A001 - EXIT_SAPLF048_001.

........

SELECT * INTO CORRESPONDING FIELDS OF TABLE IT_BSIK

FROM BSIK AS A INNER JOIN BKPF AS B

ON ABUKRS = BBUKRS

AND ABELNR = BBELNR

AND AGJAHR = BGJAHR

WHERE A~GJAHR = WA_ZDATA-GJAHR AND

A~BUKRS = WA_ZDATA-BUKRS AND

A~XBLNR = WA_ZDATA-XBLNR AND

A~LIFNR = WA_ZDATA-LIFNR AND

A~WRBTR = WA_ZDATA-WRBTR AND

B~STBLG = ' '.

*Display error message when existing invoice occured.

IF SY-SUBRC = 0.

MESSAGE ID 'Z0' TYPE 'E' NUMBER '017'.

ELSE.

..........

I have a requirement to use the following exit to display error control in tcode: FB60.

I code the error message using " MESSAGE ID 'Z0' TYPE 'E' NUMBER '017'. ".

The error message box appear but once i click exit it go to the SAP main screen instead of going to the FB60 screen.

I've tried to code using TYPE: I and S but it is not successful.

My question: How do i display this error message on the task bar? or how do i diplsay the error message and when it exit it will stay back to FB60 screen?

Hope you could help me....Thank you

3 REPLIES 3
Read only

Former Member
0 Likes
942

Hi,

Use as below, in the place of your message;

MESSAGE ID 'Z0' TYPE 'S' NUMBER '017' DISPLAY LIKE 'E'.
LEAVE TO TRANSACTION 'FB60'.

This will solve your problem.

Regards

Karthik D

Edited by: Karthik D on Jul 9, 2009 9:31 AM

Read only

Former Member
0 Likes
942

i've tried the method mentioned above. it didn't work and it just went through and save the data. apart from that no error messages appear too.

is there any other methods?

Read only

0 Likes
942

Hi,

Have you used LEAVE TO TRANSACTION, i wonder why it doesnt work, put a break-point of that statement and check.

Regards

Karthik D