cancel
Showing results for 
Search instead for 
Did you mean: 

ME21N Deleting PO lines thru ZXM06U36

DarcyMorse
Participant
0 Kudos

Our SI wrote code in ZXM06U36 to delete line items with a 0 quantity after our custom load building takes place. They are using a delete statement to delete entries from tables C_KOMP, C_KOMV, and C_POT (using assign statements). This code is only ran in ME21N (not ME22N).

Issue: If we run this code and don't hit the enter key after, we will get a short dump when using our scroll button on our mouse.

Is there a statement needed to be added at the end to force some kind of a refresh, or is there a different method that should be used to delete these lines?

I tried using remove_item from cl_po_item_handle_mm, but I can't figure out how to get the object loaded before the call.

View Entire Topic
DarcyMorse
Participant
0 Kudos

It definitely would, but we are using the Additional Planning and bringing in the items. From there, we are doing a custom load building process that allows us to determine what will be ordered based on a variety of different criteria. that process adds in quantities to the line items that should be ordered. Then the Category Manager can tweak it to the final order. When the refresh button is hit, the items that have a 0 quantity are deleted.

DarcyMorse
Participant
0 Kudos

I missed answering the second part. They want to be able to do other changes before the save, and want to see the items gone before that part.

DarcyMorse
Participant
0 Kudos

Thanks Raymond! I'll give this a try and let you know how it turns out