‎2009 Sep 03 5:45 AM
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
‎2009 Sep 03 7:25 AM
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
‎2009 Sep 03 5:48 AM
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
‎2009 Sep 03 6:04 AM
‎2009 Sep 03 6:11 AM
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?
‎2009 Sep 03 6:37 AM
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
‎2009 Sep 03 7:25 AM
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