cancel
Showing results for 
Search instead for 
Did you mean: 

Using PO status checks in own program of CO11.

Former Member
0 Kudos

Hi everybody,

I'm currently working on program and I'd like to use the standard status checks sap uses to check the status of a Purchase Order. If you look at the CO11 (confirmations of PO) and you enter a PO which is not released yet, you get an error message. This is one of the checks i'd like to use.

If I look at program SAPLCORU and specific to screen 100 and it's PAI, I see alot of modules that are used to check the status.

Question: is there an easy way to check the status of a PO like in CO11 or do you have to copy all the code that is executed in the mentioned screen/pai?

In case the answer is yes to the easy way, uhm, what IS the easy way then?

Cheers and thanks

Laurens

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Oeps, sorry, it had to be PRODUCTION ORDER instead of Purch. Ord. Switching from one project to the next

Sorry.

Cheers

LS

Former Member
0 Kudos

Hi Laurens,

in this particular example, there's an even simpler way to check whether a PO is or not released.

Access table EKKO and retrieve field FRGKE. This will give you the release status. If you want to check if this status means "released", access table T16FB with field FRGKE = EKKO-FRGKE. Now, if field T16FB-KZFRE is checked (with an 'X'), then your purchase order is released, and it's unreleased otherwise.

I hope it helps. BR,

Alvaro

PS: Oops, I think I'm mistaken. I thought PO meant "purchase order". Sorry guys!!

Message was edited by: Alvaro Vidal-Abarca

former_member534411
Participant
0 Kudos

try this FM <b>STATUS_TEXT_EDIT</b> by input the object number from AUFK.

Peter_Inotai
Active Contributor
0 Kudos

Did you mean Purchase order or Production order as CO11 (and CO11N)is for Production Order?

For Production Order you can use AUFK for object number, then check table JEST for statuses. For "decoding" statuses you can use transaction BS23.

JEST contains both system and user statuses.

Regards,

Peter

Peter_Inotai
Active Contributor
0 Kudos

Another easy way: Check the BAPIs which belongs to Business object ProdOrdConfirmation.

It depends which way you do the confirmations, but most of the BAPIs has TESTRUN import parameter, so you can call them in testmode and check the result.

Peter