Skip to Content
avatar image
Former Member

Validation of ME21N

if multiple entries exists with same plant for a same material number then system should show a error message.

I found the BADI to be ME_PROCESS_PO_CUST..Method PROCESS_ITEM. facing some coding issues, need some help in code regarding the same.

Please tell me how do i do this?



Add comment
10|10000 characters needed characters exceeded

  • Former Member Simone Milesi

    Hi simone,

    Step for validation for material and plant of duplicate multiple line item entries in coding in PROCESS_ITEM.

  • So are you asking for the code? It's not fair and correct: it should be YOUR job find it out.

    And there are tons of threads for this.

  • Former Member Simone Milesi

    no i was asking whether the step of method PROCESS_ITEM is the place where we write the code for validation of item level ? or any other methods to change and also is it necessary to maintain the configuration table?

  • Get RSS Feed

1 Answer

  • Nov 29, 2016 at 03:23 PM

    You can start from PROCESS_ITEM, but you need to read every item, so can be easier from CHECK method (executed before save) and better for performance, but error is triggered later, so your choice.

    In CHECK get the list of item from IM_HEADER, lt_items = im_header->get_items( ), then for each item read current values : LOOP AT lt_item ASSIGNING <item>, <item>-item->get_data( ) and look for duplicate.

    From PROCESS_ITEM get header with lo_header = im_item->get_header( ) and perform like in CHECK method.


    Add comment
    10|10000 characters needed characters exceeded