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: 

Validation of ME21N

Former Member
0 Kudos

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?

Thanks

Teja

6 REPLIES 6

SimoneMilesi
Active Contributor
0 Kudos

Hi Teja,

Which issues are you finding?

raymond_giuseppi
Active Contributor

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.

Regards,
Raymond

0 Kudos

Thanks Raymond.

Former Member
0 Kudos

Hi simone,

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

SimoneMilesi
Active Contributor
0 Kudos

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
0 Kudos

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?