SAP Workflow-Determination of Release Code of Purchase Order

16
SAP Workflow-Determination of Release Code of Purchase Order Applies to: SAP 4.7 ECC 6.0. For more information, visit the Business Process Modeling homepage . Summary Determination of Release Code of Purchase Order by logic and not using Event to pass Release Code. Author: Arghadip Kar Company: IBM India Created on: 19 February 2009 Author Bio Arghadip is working as a SAP Workflow Expert in IBM India for the last 3 years. He was the Top Contributor in SAP Netweaver Platform in the Year 2007-2008. . SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 1

Transcript of SAP Workflow-Determination of Release Code of Purchase Order

Page 1: SAP Workflow-Determination of Release Code of Purchase Order

SAP Workflow-Determination of Release Code of Purchase Order

Applies to: SAP 4.7 ECC 6.0. For more information, visit the Business Process Modeling homepage.

Summary Determination of Release Code of Purchase Order by logic and not using Event to pass Release Code.

Author: Arghadip Kar

Company: IBM India

Created on: 19 February 2009

Author Bio

Arghadip is working as a SAP Workflow Expert in IBM India for the last 3 years. He was the Top Contributor in SAP Netweaver Platform in the Year 2007-2008.

.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 1

Page 2: SAP Workflow-Determination of Release Code of Purchase Order

SAP Workflow-Determination of Release Code of Purchase Order

Table of Contents Workflow related to Change Purchase order......................................................................................................3 How to Get It?.....................................................................................................................................................3 Determination of Release Code based on Release Group and Release Strategy ............................................5 Related Content................................................................................................................................................15 Disclaimer and Liability Notice..........................................................................................................................16

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 2

Page 3: SAP Workflow-Determination of Release Code of Purchase Order

SAP Workflow-Determination of Release Code of Purchase Order

Workflow related to Change Purchase order.

The Workflow is triggered by the ‘Change’ Event of Business Object BUS2012. The Change Event does not pass the ‘Release Code’ with it. We have to determine the Release Code Virtually by adding an Attribute or putting the Code in the Method.

There is no Standard Workflow for Changing of Purchase Order. This is very useful when there is a requirement that approval is required for non significant changes in Purchase Order.

How to Get It? Each Purchase Order can have at the most 8 Release codes. The Release Code is stored in table T16FS and is determined using the field FRGGR (Release group) and FRGSX(Release Strategy). These two fields are obtained from table EKKO (Purchase Order Header table). In this table we have to provide the Purchase order number and we will get the field FRGGR (Release group) and FRGSX(Release Strategy).

Now how to determine which Release Code needs to be released. The Release Code will be released sequentially in table T16FS. In table T16FS 8 Release Code can be stored for a particular combination of Release group and Release Strategy. The field FRGZU(Release status) determines which Release Codes needs to be released. If the Release Status field value is ’X’ and there are 3 Release Codes in Table T16FS corresponding to the Release group and Release Strategy then the Release Code that needs to be released is the value that is assigned to field FRGC2 in table T16FS. After the Release has been done for Release code assigned to field FRGC2, we have to again pick the value of field FRGC3 and Release it.

Let us take an example of Purchase Order 4500017173. The Release group for this Purchase Order is ‘ZR’ and Release Strategy is ‘GM’. Initially the Release status is blank as none of the Release Code has been Released.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 3

Page 4: SAP Workflow-Determination of Release Code of Purchase Order

SAP Workflow-Determination of Release Code of Purchase Order

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 4

SAP Workflow-Determination of Release Code of Purchase Order

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 4

Page 5: SAP Workflow-Determination of Release Code of Purchase Order

SAP Workflow-Determination of Release Code of Purchase Order

Determination of Release Code based on Release Group and Release Strategy Let us find out how many Release codes are there for the combination of Release group ‘ZR’ and Release Strategy ‘GM’. There are three Release Codes for this combination. They are ‘PA’,’PM’ and ‘GM’ respectively.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 5

Page 6: SAP Workflow-Determination of Release Code of Purchase Order

SAP Workflow-Determination of Release Code of Purchase Order

Let us now try to release for Release Code ‘PA’.

Release Purchase Order After we have released the Purchase Order for Release Code ‘PA’ the Release Status should be ‘X’ in table EKKO for this Purchase Order number. Let us check.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 6

Page 7: SAP Workflow-Determination of Release Code of Purchase Order

SAP Workflow-Determination of Release Code of Purchase Order

We should now try to Release the purchase order for Release Code ‘PM’ by going to Transaction Code ME29N.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 7

Page 8: SAP Workflow-Determination of Release Code of Purchase Order

SAP Workflow-Determination of Release Code of Purchase Order

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 8

SAP Workflow-Determination of Release Code of Purchase Order

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 8

Page 9: SAP Workflow-Determination of Release Code of Purchase Order

SAP Workflow-Determination of Release Code of Purchase Order

After we have released the Purchase Order for Release Code ‘PM’ the Release Status should be ‘XX’ in table EKKO for this Purchase Order number. Let us check.

We should now try to Release the purchase order for Release Code ‘GM’ by going to Transaction Code ME29N.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 9

Page 10: SAP Workflow-Determination of Release Code of Purchase Order

SAP Workflow-Determination of Release Code of Purchase Order

After we have released the Purchase Order for Release Code ‘GM’ the Release Status should be ‘XXX’ in table EKKO for this Purchase Order number. Let us check.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 10

Page 11: SAP Workflow-Determination of Release Code of Purchase Order

SAP Workflow-Determination of Release Code of Purchase Order

Now if we want to reset the Release of this Purchase Order then we can reset the Release for any Release Code and that would be reflected in the field Release Status of table EKKO for that Purchase Order number we are dealing with.

Let us reset the Release for Release Code ‘PM’ of purchase Order

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 11

Page 12: SAP Workflow-Determination of Release Code of Purchase Order

SAP Workflow-Determination of Release Code of Purchase Order

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 12

Page 13: SAP Workflow-Determination of Release Code of Purchase Order

SAP Workflow-Determination of Release Code of Purchase Order

After we have reset the Release for Purchase Order for Release Code ‘PM’ the Release Status should be ‘X’ in table EKKO for this Purchase Order number. Let us check.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 13

Page 14: SAP Workflow-Determination of Release Code of Purchase Order

SAP Workflow-Determination of Release Code of Purchase Order

Now in Order to release the Purchase Order we have again follow the above method to find out the Release Code in Table T16FS using the Release group and Release Strategy of that Purchase Order.

This method is very useful when a Purchase Order requires approval when it is released for the changes in following field of a Purchase order:

Material code

Short Text Description

Delivery Address

Account Assignment (Cost Centre/ WBS Element/ Internal Order)

Delivery Date

Tax Code

For changes in the above field the SignificantlyChanged Event of Business Object ‘Bus2012’ does not gets triggered. So in order to filter the Changes we have to have Change Event of Business Object ‘BUS2012’ as the Triggering event of the Workflow and we have to determine the Release code by using the method mentioned above as Change event does not pass the Release Code of the purchase Order.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 14

Page 15: SAP Workflow-Determination of Release Code of Purchase Order

SAP Workflow-Determination of Release Code of Purchase Order

Related Content For more information, visit the Business Process Modeling homepage.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 15

Page 16: SAP Workflow-Determination of Release Code of Purchase Order

SAP Workflow-Determination of Release Code of Purchase Order

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 16

Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.

SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk.

SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.