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: 

Change plan order components

former_member582701
Contributor
0 Kudos

Hi,

We need to change (add and modify) the component list of a plan order. I see/tested that BAPI_PLANNEDORDER_CHANGE does not work for that (you can read in documentation that the component table is only to export the components) so do you know any way to do that?

It is mandatoy to do that by BDC? I prefer other ways.

Thx,

Manel

1 ACCEPTED SOLUTION

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

If I'm not mistaken, the components are actually stored as reservations. So you will have to change the related reservation. The reservation change BAPI has some restrictions however (for instance, it won't allow changing automatic reservations and the like, but this is off the top of my head so you'll need to check the specifics).

You will probably have to use a combination of function modules such as MB_READ_RESERVATION_HEADER, MB_CHANGE_RESERVATION and BAPI_TRANSACTION_COMMIT to do such a change if BAPI_RESERVATION_CHANGE doesn't work out.

3 REPLIES 3

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

If I'm not mistaken, the components are actually stored as reservations. So you will have to change the related reservation. The reservation change BAPI has some restrictions however (for instance, it won't allow changing automatic reservations and the like, but this is off the top of my head so you'll need to check the specifics).

You will probably have to use a combination of function modules such as MB_READ_RESERVATION_HEADER, MB_CHANGE_RESERVATION and BAPI_TRANSACTION_COMMIT to do such a change if BAPI_RESERVATION_CHANGE doesn't work out.

0 Kudos

Hi Tamas,

Many thx for your answer.

Yes, I was already investigating in this direction but it is a joke that you have BAPI_RESERVATION_CREATE and BAPI_RESERVATION_DELETE but you we don't have one to change

I will check the other fm you have told me.

thx

0 Kudos

MB_CHANGE_RESERVATION works

change_resb = 'X' to change any item

new_resb = 'X' to add new items

xresb with modified items

xresbn with new items