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

Is there a Function Module or BAPI that will close a Purchase Order?

Former Member
0 Likes
2,451

Hi experts -

I am looking for a function module/BAPI that will close purchase orders.

Many thanks!!!

Mark

6 REPLIES 6
Read only

amit_khare
Active Contributor
0 Likes
1,507

You can use this FM BAPI_PO_CHANGE to close PO.

Please pass 'X' to NO_MORE_GR field of the item to mark the delivery complete indicator.

~ From Forum

Read only

Former Member
0 Likes
1,507

Hello Mark,

Check these FM's:

/SAPPO/MAPI_PO_ORDER_CLOSE,

W_FRM_PO_CLOSE

and

/SAPPO/BAPI_ORDER_CLOSE

Hope this helps.

Thanks,

Greetson

Edited by: Greetson Shunmugasundaram on Jan 8, 2009 7:01 PM

Read only

Former Member
0 Likes
1,507

Hi

Try using these function modules

1.CO_SF_CLOSE_ORDER_TECHNICAL

2.CO_ZF_ORDER_CLOSE

3. W_FRM_PO_CLOSE,

4.Fucntion group WFR12(Close and Adjust Purchase Orders) you may get a FM to Close the PO.

5.BAPI_PO_CHANGE pass 'X' to NO_MORE_GR field of the item to mark the delivery complete indicator.

Or u can also use transaction ME22N and enter PO number (Shift+F5) and hit enter.

Hope the info was helpful..

Regards

Vasavi Kotha

Read only

0 Likes
1,507

Hi all - Thanks for the informative responses. I am not quite coding this yet, but will be soon and I will let you know what works best.

Thanks!

Mark

Read only

Former Member
0 Likes
1,507

hi ,

you can go for the below process .

Close Open Postprocessing Orders

Functionality :

You can use the BAPIs /SAPPO/BAPI_ORDER_OPEN, /SAPPO/BAPI_ORDER_SET, /SAPPO/BAPI_ORDER_SAVE and /SAPPO/BAPI_ORDER_CLOSE to change postprocessing orders.

You must use the following call up sequence:

/SAPPO/BAPI_ORDER_OPEN

DO

/SAPPO/BAPI_ORDER_SET

/SAPPO/BAPI_ORDER_SAVE

BAPI_TRANSACTION_COMMIT

ENDDO

/SAPPO/BAPI_ORDER_CLOSE

After you call up /SAPPO/BAPI_PO_ORDER_OPEN, you can read the global memory of the function group using the BAPIs /SAPPO/BAPI_ORDER_GET_DETAIL and /SAPPO/BAPI_ORDER_GET_DETAILS.

The BAPI /SAPPO/BAPI_PO_ORDER_OPEN locks the postprocessing orders to be opened for postprocessing, reads them from the database, and writes them to the global memory.

The BAPI /SAPPO/BAPI_PO_ORDER_SET updates the global memory. You must specify the postprocessing orders to be changed and the new values for the changeable fields in the parameter ALLOWEDUPDATEFIELDS. Note that you must also enter the old contents for fields that cannot be changed. For more information, see the documentation for the parameter.

The BAPI /SAPPO/BAPI_PO_ORDER_SAVE persists the global memory.

The BAPI /SAPPO/BAPI_PO_ORDER_CLOSE deletes the global memory and removes the locks.

Best of luck

It will work definately .

Regards ,

Nilesh Jain

Read only

Former Member
0 Likes
1,507

Found it. Thanks for the help!