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

Error message in customer exit

Former Member
0 Likes
1,980

HI ABAPer's,

I am facing the one problem while giving the error message in customer exit ZXM06U43(POCustomer exit). The scenario is i am looping the tekpo(PO line item) internal tables and doing some validations if any lineitem fail in the validation i need give the error message .I dd the but all ways it showing the error in last line item in the PO.

Thanks,

Harinath

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,275

Hi Vipin,

Did you try giving messages using macros like below:



INCLUDE mm_messages_mac.
    mmpur_message_forced 'E' '000' '398' 'error during PO check' '' '' ''.

Regards,

Himanshu

5 REPLIES 5
Read only

Former Member
0 Likes
1,275

Hi,

After displaying the error are you using the EXIT or LEAVE PROGRAM statement? Only then will the program execution stop after displaying the message. Else it will continue processing the code even after the error message.

Regards,

Vikranth

Read only

Former Member
0 Likes
1,275

This message was moderated.

Read only

Former Member
0 Likes
1,275

hi check where are you looping. put a break point and see where the loop starts triggering.

this has to be PBO exit and the loop must come for each line item. have you kept error message inside the loop?

Read only

Former Member
0 Likes
1,275

Hi,

You have to either leave the screen. Also you can try EXIT in place of LEAVE SCREEN as per suitable to your transaction.

SAMPLE CODE:

IF SY-SUBRC <> 0.

MESSAGE E059(ZGO) WITH I_MSEG-MATNR I_MSEG-AUFNR.

LEAVE SCREEN.

ENDIF.

Regds,

Anil

Edited by: Anil Katoch on Sep 3, 2009 7:37 AM

Read only

Former Member
0 Likes
1,276

Hi Vipin,

Did you try giving messages using macros like below:



INCLUDE mm_messages_mac.
    mmpur_message_forced 'E' '000' '398' 'error during PO check' '' '' ''.

Regards,

Himanshu