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: 

Update deleated item in ME_PROCESS_PO_CUST

Former Member
0 Kudos

Hi experts

Is it possible to update EKPO-ELIKZ(delivery completed) if EKPO-LOEKZ is "L"?

I'm trying to update EKPO-ELIKZ in ME_PROCESS_PO_CUST-PROCESS_ITEM

when EKPO-LOEKZ has been set "L".

But update error occurs ,because EKPO-LOEKZ is ON.

Any help?

Thanks a lot.

TKD

6 REPLIES 6

JL23
Active Contributor
0 Kudos

try the same in ME22N to see if the standard transaction allows this activity or not.

Former Member
0 Kudos

I tried the same in ME22N to see if the standard transaction allows this activity or not.

But standard transaction did not allow this activity.

When EKPO-LOEKZ is ON, all fields of item can not be updated.

JL23
Active Contributor
0 Kudos

so you know it is not caused by an error in your program: if the standard does not allow, then this process is not allowed.

you have to do it in 2 (or 3) steps, first remove the deletion indicator, then do your change (and delete it again).

JL23
Active Contributor
0 Kudos

when I said 2 steps, then I meant, changing deletion indicator, posting the change.

then changing delivery complete indicator, posting the change.

I did not talk about the sequence in which the fields get a new value within one LUW.

0 Kudos

I tried it, but the same result.

Here's the code.

IF l_rec_mepoitem-loekz IS NOT INITAL.

l_rec_mepoitem-loekz = space.

im_item->set_data(l_rec_mepoitem).

l_rec_mepoitem-elikz = ' X '

im_item->set_data(l_rec_mepoitem).

l_rec_mepoitem-loekz = ' L '.

im_item->set_data(l_rec_mepoitem).

ENDIF.

--->message " Data from Business Add-In ME_PROCESS_PO_CUST "

Only 2 steps is not allowed, change deletion indicator, and change delivery

complete indicator.Then message " Change Deliv. Compl. could not be effected " appears.

Former Member
0 Kudos

I tried your suggestion, but not allowed.

I tried in this way.

First, remove the deletion indicator, then set elikz , and re-set the deletion indicator,

finally, use " im_item->set_data(l_rec_mepoitem)" .

Then the message " Change Deliv. Compl. could not be effected " appeared.

I think the reason is, when use " im_item->set_data(l_rec_mepoitem) ",

the deletion indicator is ON, so updating elikz is not allowed.

Then I tried to use " im_item->set_data(l_rec_mepoitem) "before re-set the deletion indicator,

and use " im_item->set_data(l_rec_mepoitem) " again.

But error massage " Data from Business Add-In ME_PROCESS_PO_CUST " not adopted.

It guess, it is not allowed using " im_item->set_data(l_rec_mepoitem) " twice.

Code I used is below.

First, I tried this code.

IF l_rec_mepoitem-loekz IS NOT INITAL.

l_rec_mepoitem-loekz = space.

l_rec_mepoitem-elikz = ' X '

l_rec_mepoitem-loekz = ' L '.

im_item->set_data(l_rec_mepoitem).

ENDIF.

--->message " Change Deliv. Compl. could not be effected "

Second.

IF l_rec_mepoitem-loekz IS NOT INITAL.

l_rec_mepoitem-loekz = space.

l_rec_mepoitem-elikz = ' X '

im_item->set_data(l_rec_mepoitem).

l_rec_mepoitem-loekz = ' L '.

im_item->set_data(l_rec_mepoitem).

ENDIF.

--->message " Data from Business Add-In ME_PROCESS_PO_CUST "