Select 'current version archived'
from po_headers_Archive_all
where po_header_id='XXXXX'.
from po_headers_Archive_all
where po_header_id='XXXXX'.
Check for the revision number in
po_headers_all,
po_headers_all,
po_headers_archive_all,
po_lines_archive_all,
po_line_locations_archive_all
and po_distributions_archive_all.
and po_distributions_archive_all.
I have two instances to compare this issue- From 11.5.9, PO Revision Number Is Incremented if we update PO transaction without change shipment number.
- From 11.5.10, PO Revision Number Is Incremented if we update PO transaction and change shipment number.
How setup on 11.5.10 for PO Revision Number Is Incremented without change shipment number ?
- From 11.5.10, PO Revision Number Is Incremented if we update PO transaction and change shipment number.
How setup on 11.5.10 for PO Revision Number Is Incremented without change shipment number ?
Description
Listed below are examples on how the Purchasing Archive tables are updated when using Archive on Approve method for archiving (To setup Archive on Approve go to Setup -> Purchasing -> Document Types)
EXAMPLES
Assume a PO has just been created.
PO: 125
LINE 1: JDR-Inventory
SHIPMENT1:M1 organization
DISTRIBUTION1:010-210-45-80
LINE 1: JDR-Inventory
SHIPMENT1:M1 organization
DISTRIBUTION1:010-210-45-80
Then the PO is submitted for approval and the status goes to Approved.
PO_HEADERS_ALL should show the following:
PO_HEADER_ID SEGMENT1 REVISION_NUM
————– ———- —————
888 125 0
PO_HEADER_ID SEGMENT1 REVISION_NUM
————– ———- —————
888 125 0
PO_HEADERS_ARCHIVE_ALL should show the following:
PO_HEADER_ID REVISION_NUM LATEST_EXTERNAL_FLAG
————– ————— ———————–
888 0 Y
PO_HEADER_ID REVISION_NUM LATEST_EXTERNAL_FLAG
————– ————— ———————–
888 0 Y
PO_LINES_ARCHIVE_ALL should show the following:
PO_HEADER_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
———— ———- ——– ————- ——————–
888 777 1 0 Y
PO_HEADER_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
———— ———- ——– ————- ——————–
888 777 1 0 Y
PO_LINE_LOCATIONS_ARCHIVE_ALL should show the following:
PO_LINE_LOCATION_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
——————- ———- ——– ———— ———————
555 777 1 0 Y
PO_LINE_LOCATION_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
——————- ———- ——– ———— ———————
555 777 1 0 Y
PO_DISTRIBUTIONS_ARCHIVE_ALL should show the following:
PO_DIST.ID PO_HEADER_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
———- ———— ———- ——– ———— ——————–
222 888 777 1 0 Y
PO_DIST.ID PO_HEADER_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
———- ———— ———- ——– ———— ——————–
222 888 777 1 0 Y
Now another line is added to the PO and approve the PO.
Here’s what the related tables will look like:
PO_HEADERS_ALL should show the following:
PO_HEADER_ID SEGMENT1 REVISION_NUM
————– ———- —————
888 125 1
PO_HEADER_ID SEGMENT1 REVISION_NUM
————– ———- —————
888 125 1
PO_HEADERS_ARCHIVE_ALL should show the following:
PO_HEADER_ID REVISION_NUM LATEST_EXTERNAL_FLAG
————– ————— ———————–
888 0 N
888 1 Y
PO_HEADER_ID REVISION_NUM LATEST_EXTERNAL_FLAG
————– ————— ———————–
888 0 N
888 1 Y
PO_LINES_ARCHIVE_ALL should show the following:
PO_HEADER_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
———— ———- ——– ————- ——————–
888 777 1 0 Y <-line 1 didn’t change
888 778 2 1 Y <-line 2 was inserted
PO_HEADER_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
———— ———- ——– ————- ——————–
888 777 1 0 Y <-line 1 didn’t change
888 778 2 1 Y <-line 2 was inserted
PO_LINE_LOCATIONS_ARCHIVE_ALL should show the following:
PO_LINE_LOCATION_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
——————- ———- ——– ———— ———————–
555 777 1 0 Y
556 778 2 1 Y <-line 2 was inserted
PO_LINE_LOCATION_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
——————- ———- ——– ———— ———————–
555 777 1 0 Y
556 778 2 1 Y <-line 2 was inserted
PO_DISTRIBUTIONS_ARCHIVE_ALL should show the following:
PO_DIST.ID PO_HEADER_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
———- ———— ———- ——– ———— ——————–
222 888 777 1 0 Y
223 888 778 2 1 Y <-line 2 was inserted
PO_DIST.ID PO_HEADER_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
———- ———— ———- ——– ———— ——————–
222 888 777 1 0 Y
223 888 778 2 1 Y <-line 2 was inserted
Now assume a change is made to the header only and approve the PO.
The only tables affected will be PO_HEADERS_ALL and PO_HEADERS_ARCHIVE_ALL.
The only tables affected will be PO_HEADERS_ALL and PO_HEADERS_ARCHIVE_ALL.
PO_HEADERS_ALL should show the following:
PO_HEADER_ID SEGMENT1 REVISION_NUM
————– ———- —————
888 125 2
PO_HEADER_ID SEGMENT1 REVISION_NUM
————– ———- —————
888 125 2
PO_HEADERS_ARCHIVE_ALL should show the following:
PO_HEADER_ID REVISION_NUM LATEST_EXTERNAL_FLAG
————– ————— ———————–
888 0 N
888 1 N
888 2 Y
PO_HEADER_ID REVISION_NUM LATEST_EXTERNAL_FLAG
————– ————— ———————–
888 0 N
888 1 N
888 2 Y
All other tables do not change.
Now the quantity for line 1 is changed. Here’s how the related tables will look.
PO_HEADERS_ALL should show the following:
PO_HEADER_ID SEGMENT1 REVISION_NUM
————– ———- —————
888 125 3
PO_HEADER_ID SEGMENT1 REVISION_NUM
————– ———- —————
888 125 3
PO_HEADERS_ARCHIVE_ALL should show the following:
PO_HEADER_ID REVISION_NUM LATEST_EXTERNAL_FLAG
————– ————— ———————–
888 0 N
888 1 N
888 2 N
888 3 Y
PO_HEADER_ID REVISION_NUM LATEST_EXTERNAL_FLAG
————– ————— ———————–
888 0 N
888 1 N
888 2 N
888 3 Y
PO_LINES_ARCHIVE_ALL should show the following:
PO_HEADER_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
———— ———- ——– ———— ——————–
888 777 1 0 N <-latest ext flag change to N
888 777 1 3 Y <-this row inserted rev num matches header revision in which
change was made. Lower rev for this line had
latest external flag changed to N.
888 778 2 1 Y <–no changes
PO_HEADER_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
———— ———- ——– ———— ——————–
888 777 1 0 N <-latest ext flag change to N
888 777 1 3 Y <-this row inserted rev num matches header revision in which
change was made. Lower rev for this line had
latest external flag changed to N.
888 778 2 1 Y <–no changes
All other tables do not change.
Now line 3 is added to the PO and the PO is approved.
PO_HEADERS_ALL should show the following:
PO_HEADER_ID SEGMENT1 REVISION_NUM
————– ———- —————
888 125 4
PO_HEADER_ID SEGMENT1 REVISION_NUM
————– ———- —————
888 125 4
PO_HEADERS_ARCHIVE_ALL should show the following:
PO_HEADER_ID REVISION_NUM LATEST_EXTERNAL_FLAG
————– ————— ———————–
888 0 N
888 1 N
888 2 N
888 3 N
888 4 Y
PO_HEADER_ID REVISION_NUM LATEST_EXTERNAL_FLAG
————– ————— ———————–
888 0 N
888 1 N
888 2 N
888 3 N
888 4 Y
PO_LINES_ARCHIVE_ALL should show the following:
PO_HEADER_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
———— ———- ——– ———— ———————-
888 777 1 0 N <—didn’t change
888 777 1 3 Y <—didn’t change
888 778 2 1 Y <—didn’t change
888 779 3 4 Y <–line 3 added to lines archive.
PO_HEADER_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
———— ———- ——– ———— ———————-
888 777 1 0 N <—didn’t change
888 777 1 3 Y <—didn’t change
888 778 2 1 Y <—didn’t change
888 779 3 4 Y <–line 3 added to lines archive.
PO_LINE_LOCATIONS_ARCHIVE_ALL:
PO_LINE_LOCATION_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
—————— ———- ——– ———— ———————–
555 777 1 0 Y
556 778 2 1 Y
557 779 3 4 Y<–line 3 added to archive.
PO_LINE_LOCATION_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
—————— ———- ——– ———— ———————–
555 777 1 0 Y
556 778 2 1 Y
557 779 3 4 Y<–line 3 added to archive.
PO_DISTRIBUTIONS_ARCHIVE_ALL
PO_DIST.ID PO_HEADER_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
———- ———— ———- ——– ———— ——————–
222 888 777 1 0 Y
223 888 778 2 1 Y
224 888 779 3 4 Y<–line 3 added to archive.
PO_DIST.ID PO_HEADER_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
———- ———— ———- ——– ———— ——————–
222 888 777 1 0 Y
223 888 778 2 1 Y
224 888 779 3 4 Y<–line 3 added to archive.
Now for the last example, make a change to line 2′s distribution information and approve the PO.
PO_HEADERS_ALL should show the following:
PO_HEADER_ID SEGMENT1 REVISION_NUM
————– ———- —————
888 125 5
PO_HEADER_ID SEGMENT1 REVISION_NUM
————– ———- —————
888 125 5
PO_HEADERS_ARCHIVE_ALL should show the following:
PO_HEADER_ID REVISION_NUM LATEST_EXTERNAL_FLAG
———— ————— ———————–
888 0 N
888 1 N
888 2 N
888 3 N
888 4 N
888 5 Y
PO_HEADER_ID REVISION_NUM LATEST_EXTERNAL_FLAG
———— ————— ———————–
888 0 N
888 1 N
888 2 N
888 3 N
888 4 N
888 5 Y
PO_LINES_ARCHIVE_ALL should show the following:
PO_HEADER_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
———— ———- ——– ———— ——————–
888 777 1 0 N <—didn’t change
888 777 1 3 Y <—didn’t change
888 778 2 1 N <–latest ext flag when to N
888 778 2 5 Y <–row inserted and latest ext flag set to Y
888 779 3 4 Y <—didn’t change
PO_HEADER_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
———— ———- ——– ———— ——————–
888 777 1 0 N <—didn’t change
888 777 1 3 Y <—didn’t change
888 778 2 1 N <–latest ext flag when to N
888 778 2 5 Y <–row inserted and latest ext flag set to Y
888 779 3 4 Y <—didn’t change
PO_DISTRIBUTIONS_ARCHIVE_ALL should show the following:
PO_DIST.ID PO_HEADER_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
———- ———— ———- ——– ———— ——————–
222 888 777 1 0 Y
223 888 778 2 1 N <–latest ext flag set to N
223 888 778 2 5 Y
224 888 779 3 4 Y
PO_DIST.ID PO_HEADER_ID PO_LINE_ID LINE_NUM REVISION_NUM LATEST_EXTERNAL_FLAG
———- ———— ———- ——– ———— ——————–
222 888 777 1 0 Y
223 888 778 2 1 N <–latest ext flag set to N
223 888 778 2 5 Y
224 888 779 3 4 Y
This information displays the logic used for archiving. If the logic is not followed then the process of approval will fail since the expected data being validated will not exist.
No comments:
Post a Comment