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: 

Enhancements for me21n and me22n

Former Member
0 Kudos

Hello there,

I hope someone can give a hint on implementing an enhancement for transactions me221 and/or me22n.

The requirement is that while creating a PO, when the user presses ENTER after entering a specific material code on a line, another line should automatically be created with another material code.

Hope I have been clear.

Thanks in advace,

BR,

Tabrez

6 REPLIES 6

Former Member
0 Kudos

Hi,

I think you can do this by using teh BADI> ME_PROCESS_PO_CUST if you go to se18 and open this one up and go to sample code so you have some code there which will demostrate how you can get the existing records for the PO now inorder to update with one more line you can add to the line to the data that you get and then use the below code to set it back

CALL METHOD im_item->set_data( ls_mepoitem ).

Regards,

Himanshu

0 Kudos

But will this method create a new item line or will it only change it ?

Thanks,

BR

0 Kudos

When you get the data there would be what has been entered and then in the BADI you can replicate the line in that table or add the line and then set it back to screen.

Regards,

Himanshu

0 Kudos

Hi Himanshu,

I was able to add the line using the PROCESS_ITEM method.

Now, I have another problem: it is creating 9 items automatically.

Do you have any clue why this is happening?

Thanks,

Tabrez

0 Kudos

Hi,

Well why dont you put a debug point and see for your self probably you need to limit the addition when the save button is clicked or on some toehr condition right now every time the control is going into te method one line is getting added as per your code.

Regards,

Himanshu

0 Kudos

OK...

Thanks a lot for the tips Himanshu. It really helpded.

BR,

Tabrez