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: 

Invalidate Item when error message - BADI ME_PROCESS_REQ_CUST

Former Member
0 Kudos

Hello,

I'm trying to raise message when a validation fails at item level on a Purchase Requisition.

Using badi ME_PROCESS_REQ_CUST with method PROCESS_ITEM.

After validation how can i invalidate the item and raise messages on container log???

I'm trying like this:

DATA: ls_data_item TYPE mereq_item.

ls_data_item = im_item->get_data( ).

IF ( ls_data_item-ekgrp EQ '012' ) AND ( ls_data_item-werks EQ '0008' ).

IF ls_data_item-bsart <> 'ZDNB'.

mmpur_message_forced 'E' '00' '208'

ERROR :)'

''

''

''.

ENDIF.

ENDIF.

Problem is i don't get the message anywhere

And yes, it is getting to the mmpur_message_forced definition.

Any help would be great.

Thanks

Mário

1 REPLY 1

Former Member
0 Kudos

Hi,

Have you tried to call the message directly like below?


IF sy-subrc NE 0.
  MESSAGE e208(00).
ENDIF.

Because in ME_PROCESS_PO_CUST, it works.

Regards,

Teddy Kurniawan