cancel
Showing results for 
Search instead for 
Did you mean: 

Closing of Purchase Orders

Former Member
0 Kudos
2,068

Dear  Experts,

I have a client who runs two systems.Sap and Pastel

The procurement   process is done in pastel and the supplier billing is done in SAP.

So they raise a purchase order in SAP and manually close it before going to pastel and receiving a bill from the vendor.At time users forget  to manually close the purchase order.This has resulted into alot of purchase orders remaining  open.

Could anyone know of a script i can run to change the status of all the purchase orders to closed?

Assistance will be appreciated .Thank you.!

Accepted Solutions (0)

Answers (6)

Answers (6)

0 Kudos

This is quite an old thread but i came to do this just now.

The status of a Purchase Order document completely depends on the status of all of its lines (POR1), so in order to close the PO you need to set closed all its POR1 lines.

You can create a simple POR1.csv template with this structure, setting LineStatus=C

To get all these lines you need to close you can use this query:

select opor.docnum, por1.LineNum, por1.LineStatus
from opor join por1 on (opor.docentry=por1.DocEntry)
where por1.LineStatus='O'

-- OPTIONAL: if you want to limit on certain PO document numbers add this to the where claus
and opor.docnum in (docnum1, docnum2, docnum3...)

then you feed this CSV file to DTW and you're all done.

Regards

NOTE: @eslam soliman: this is SAP Business One, nor SAP R3/HANA, so there are no transaction codes.

KennedyT21
Active Contributor
0 Kudos

Hi Joyce...

You can close bulk purchase order very easy follow the steps

Try This way which is simple way ..

Use the Open List item Under the purchasing Reports ...

Select The purchase order on the top legend and select the required po and right and select close by using ctrl key you can select multiple purchase order...

Hope helpful

Regards

Kennedy

islamsol4241_5
Explorer
0 Kudos

u can add tcode please

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Please check these threads:

Thanks & Regards,

Nagarajan

Former Member
0 Kudos

Hey,I need a field on the OPOR template that can update the status of my purchase order.Any clues?

kothandaraman_nagarajan
Active Contributor
0 Kudos

You may need SDK help to close PO. There is doc status field in OPOR template.

former_member205766
Active Contributor
0 Kudos

Hi

You can able to short Close the remaining PO in following methods.

Open the Specific PO => Right Click => Then click Close.

However You can use copy to option in PO and generate the AP invoice in future to avoiding this.

Thanks

With Regards

Balaji Sampath

Former Member
0 Kudos

Hey Balaji,

That i can do however the transaction number is so huge.Totals to around 20,000 documents.I would like to just update the document status using DTW however ,the field for document status is not available in the purchase order DTW template.

Can you locate that on the Purchase order template?

Former Member
0 Kudos

Hi Joyce

Try this script

SELECT T0.[DocNum], T0.[DocType], T0.[DocDate], T0.[CardName], T0.[DocTotal], T0.[DocStatus] FROM OPOR T0 WHERE T0.[DocStatus] =[%0]

Through this u will get the report for the PO with status Open and then manually u need to change the status

Regards,

Bhushan Verma

former_member184146
Active Contributor
0 Kudos

Hi Joyce

You can try with DTW with PO template under DTW folder with template OPOR.

C:\Program Files (x86)\SAP\Data Transfer Workbench\Templates\Templates\Purchasing\Purchase Order

trying to update with a SQL query is not recommended , as you can loose the SAP Support.

--Manish

Former Member
0 Kudos

Hello Manish,Which field on the Purchase order template caters for the document status.I have tried checking it out but i cannot find it.

Former Member
0 Kudos

Hi Joyce,

I had seen template there is no such field available in template, but you can once try by copying the field from SQL query to th excel template and then try it by updating through DTW,


Otherwise you need to do it manually

Regards,

Bhushan Verma