Application Development and Automation 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: 
Read only

BAPI or FM

Former Member
0 Likes
440

Hi All,

Is there any BAPI or FM to update the partners of PM Order and then update order header status for that.

We tried using “Ibapi_alm_orderpartner_maint” and “BAPI_ALM_ORDER_MAINTAIN “ for updating partners, but they are not working.

Please provide me some inputs.

2 REPLIES 2
Read only

Former Member
0 Likes
399

Hi,

See some Function modules changes will be commited in the database after the commit command. This bapi needs a second bapi called BAPI_TRANSACTION_COMMIT after that, then it will work fine. This transaction_commit bapi should come immediately after the order maintain bapi.

See some sample code below...

CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'

TABLES

it_methods = methods

it_header = header

it_header_up = header_up

return = return.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = 'X'

Read only

Former Member
0 Likes
399

You could also use this right after you call BAPI_ALM_ORDER_MAINTAIN:

CALL FUNCTION 'ALM_ME_COMMIT_OR_ROLLBACK'

TABLES

return = lt_RETURN.

It performs the same function as BAPI_TRANSACTION_COMMIT. I hope this helps.

- April King