Functional Description
Purpose
The purpose of this business function is to duplicate a PO Detail Line (F4311) with minimal editing.
Technical Specification
1.If the szVersionName passed in is blank then default in ZJDE0001 as the version name.
2.If the OrderNumber, OrderType, OrderCompany, Order Suffix and OrderLineNumber are all zero or
blank the stop processing and exit the function.
3.If the ComputerID is not blank and the JobNumber is not zero retrieve a F4301Z record using
CTID and JOBS as key.
If a record is found
cUpdateFlag = '1'
if NewLineNumber passed in is not zero then delete F4311Z record using CTID. JOBS and
LNID as key.
else cUpdateFlag = '0'.
4If cUpdateFlag is not '1' then fetch a F4301 record using DOCO, DCTO, KCOOand SFXO as key
values.
if a record is found
DSF4301Z= DSF4301
DSF4301Z.PAACTN= '2'
DSF4301Z.PAEDFL='1'
if the ComputerID passed is blank retrieve it using the system function
GetLocalComputerName and assign it to DSF4301Z.PACTID else assign ComputerID
to DSF4301Z.PACTID
If the JobNumber passed in is zero assign a Job Number using the function
X0010GetNextNumber and copy it to DSF4301Z.PAJOBS otherwise assign the JobNumber passed in
to DSF4301Z.PAJOBS.
Insert DSF4301Zrecord into F4301Z file.
else issue an error message.
5.Fetch from the F4311 file using DOCO, DCTO, KCOO, SFXO and LNID as key values.
If a record is found
DSF4311Z= DSF4311
DSF4311Z.PWACTN='1'
DSF4311Z.PWEDFL='1'
DSF4311Z.PWCTID=DSF4301Z.PACTID
DSF4311Z.PWJOBS=DSF4301Z.PAJOBS
Retrieve the processing option values for the szVersionName of the P4310 template.
Work With the new line number.
If NewLineNumber is zero
if cUpdateFlag is set to '1' (i.e. a record was found in the F4301Z file) then
DSF4311Z.PWLNID=DSF4301Z.PALNID
else
Select all records in the F4311 file of the same OrderNumber, OrderType,
OrderCompany and OrderSuffix.
Then Sort the selected records with respect to the PDLNID in descending order.
Retrieve the first record after the sort using DOCO, DCTO, KCOO and SFXO as key
If a record was found
assign the PDLNID retrieved to the DSF4311Z.PDLNID
Increment the DSF4311Z.PWLNID by theLineNumberIncrement value specified in the
processing options and assign it to DSF4311Z.PWLNID.
NewLineNumber = DSF4311Z.PWLNID.
else if NewLineNumber <> zero assign it to DSF4311Z.PWLNID.
DSF4301Z.PALNID =DSF4311Z.PWLNID.
Work with Next and Last Status
if cVerifyStatusCodes is equal to '1'
if LastStatus is blank AND PO_szLastStausCode is not blank
LastStatus = PO_szLastStatusCode
if NextStatus is blank and PO_szOverrideNextStatus is not blank
NextStatus = PO_szOverrideNextStatus
VerifyActivityRuleStatusCode
OrderType->szOrderType
DSF4311Z.PWLNTY->szLineType
LastStatus ->szLineStatusCode
DSF4311Z.PWWRTH<-cLedgerRecordYN
<-cErrorCode
if cErrorCode is equal to '1' return ER_ERROR
else
DSF4311Z.PWLTTR = LastStaus
If NextStatus is blank
DSF4311Z.PWNXTR = VerifyActivityRuleStatusCode. szNextStatus
If NextStatus not blank validate the next status code using the function
VerifyOverrideNextStatusCode
NextStatus ->szOverrideNextStatus
VerifyActivityRuleStatusCode.szNextStatus->szNextStatus
VerifyActivityRuleStatusCode.szStatusAllowed1->szAllowedStatus1
VerifyActivityRuleStatusCode.szStatusAllowed2->szAllowedStatus2
VerifyActivityRuleStatusCode.szStatusAllowed3->szAllowedStatus3
VerifyActivityRuleStatusCode.szStatusAllowed4->szAllowedStatus4
VerifyActivityRuleStatusCode.szStatusAllowed5->szAllowedStatus5
<-cErrorCode
if cErrorCode is equal to ''1' the set ER_ERROR
else DSF4311Z.PWNXTR = NextStatus
else if cVerifyStatusCodes not '1'
DSF4311Z.PWNXTR = NextStatus
DSF4311Z.PWNXTR = LastStatus
Work with quantities and Units Of Measure
DSF4311Z.PWUORG = TransactionQuantity.
DSF4311Z.PWAEXP = ExtendedAmount.
DSF4311Z.PWUOPN = OpenQuantity.
DSF4311Z.PWAOPN = OpenAmount.
DSF4311Z.PWUREC = QuantityReceived.
DSF4311Z.PWAREC = AmountReceived.
DSF4311Z.PWFEA = ForeignExtendedAmount.
DSF4311Z.PWFREC = ForeignAmountReceived.
DSF4311Z.PWUORG = ForeignOpenAmount.
DSF4311Z.PWUOM = UnitOfMeasure
Free Pointer to the processing option version values.
6.If there have been no errors insert the DSF4311Z structure into the F4311Z file
RecordWrittenToWorkFile = '1'
ComputerID = DSF4311Z.PWCTID
JobNumber = DSF4311Z.PWJOBS
NewLineNumber = DSF4311Z.PWLNID
LastStatus = DSF4311Z.PWLTTR
NextStatus = DSF4311Z.PDNXTR
7.Write or Update the DSF4301Z structure to the F4301Z file.
if cUpdateFlag is equal to '1' UPDATE the F4301Z file using CTID and JOBS as key.
otherwise INSERT the DSF4301Z structure into the F4301Z file.
^
D4301080A - Duplicate PO Detail Line
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnOrderNumber | DOCO | MATH_NUMERIC | NONE | NONE |
A number that identifies an original document. This document can be a voucher, a sales order, an invoice, unapplied cash, a journal entry,
| ||||
szOrderType | DCTO | char | NONE | NONE |
A user defined code (00/DT) that identifies the type of document. This code also indicates the origin of the transaction. J.D. Edwards has
| ||||
szOrderCompany | KCOO | char | NONE | NONE |
A number that, along with order number and order type, uniquely identifies an order document (such as a purchase order, a contract, a
| ||||
szOrderSuffix | SFXO | char | NONE | NONE |
In the A/R and A/P systems, a code that corresponds to the pay item. In the Sales Order and Procurement systems, this code identifies
| ||||
mnOrderLineNumber | LNID | MATH_NUMERIC | NONE | NONE |
A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns
| ||||
szVersionName | VERS | char | NONE | NONE |
A user-defined set of specifications that control how applications and reports run. You use versions to group and save a set of user-defined
| ||||
szLastStatus | LTTR | char | NONE | NONE |
A code (system 40/type AT) specifying the last step in the processing cycle that this order line has successfully completed. | ||||
szNextStatus | NXTR | char | NONE | NONE |
A user defined code (system 40/type AT) indicating the next step in the order flow of the line type. | ||||
mnNewLineNumber | LNID | MATH_NUMERIC | NONE | NONE |
A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns
| ||||
mnTransactionQuantity | UORG | MATH_NUMERIC | NONE | NONE |
The quantity of units affected by this transaction. | ||||
mnExtendedAmount | AEXP | MATH_NUMERIC | NONE | NONE |
The number of units multiplied by the unit price. | ||||
mnOpenQuantity | UOPN | MATH_NUMERIC | NONE | NONE |
The original quantity for the order detail line, plus or minus any changes to that quantity, minus all quantities shipped, received, and
| ||||
mnOpenAmount | AOPN | MATH_NUMERIC | NONE | NONE |
The amount of the order, invoice, or voucher that is still unpaid or open.
When you enter a document (for example, an order, invoice, or
| ||||
mnQuantityReceived | UREC | MATH_NUMERIC | NONE | NONE |
The original quantity of the order line, plus or minus any changes to that quantity, less all quantities shipped, received and/or vouchered to
| ||||
mnAmountReceived | AREC | MATH_NUMERIC | NONE | NONE |
The value of the goods received to date against the original order line. | ||||
szUnitOfMeasure | UOM | char | NONE | NONE |
A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box). | ||||
cRecordWrittenToWorkFile | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cVerifyStatusCodes | EV02 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
mnForeignAmountReceived | FREC | MATH_NUMERIC | NONE | NONE |
Amount - Received Foreign | ||||
mnForeignAmountOpen | FAP | MATH_NUMERIC | NONE | NONE |
The unpaid foreign amount of a transaction. | ||||
mnForeignExtendedAmount | FEA | MATH_NUMERIC | NONE | NONE |
The product of the foreign price times the number of units. | ||||
szComputerID | CTID | char | NONE | NONE |
mnJobNumber | JOBS | MATH_NUMERIC | NONE | NONE |
The job number (work station ID) which executed the particular job. | ||||
szBaseCurrencyCode | CRDC | char | NONE | NONE |
A code that identifies the domestic (base) currency of the company on a transaction. | ||||
mnUnitsPrimaryQtyOrder | PQOR | MATH_NUMERIC | OPT | NONE |
The quantity ordered by the customer expressed in the primary stocking unit of measure. | ||||
mnUnitsSecondaryQtyOr | SQOR | MATH_NUMERIC | OPT | NONE |
If the secondary unit of measure option in Inventory Constants is selected,this field will display on data entry screens. | ||||
mnAmountUnitWeight | ITWT | MATH_NUMERIC | OPT | NONE |
The weight of one unit of an item, expressed in the primary unit of measure. | ||||
mnAmountUnitVolume | ITVL | MATH_NUMERIC | OPT | NONE |
The cubic units occupied by one inventory item. The definition of the unit itself (cubic feet, yards, meters, and so on) is defined in the volume
| ||||
mnPOProcessID | PEID | MATH_NUMERIC | OPT | NONE |
A code that identifies the Inter-Process Communication ID. | ||||
mnPOTransactionID | TCID | MATH_NUMERIC | OPT | NONE |
mnProjectNumber | PRJM | MATH_NUMERIC | OPT | NONE |
A number that identifies an EPM project in the system. The project must be set up in the Add/Revise Project program (P31P011). | ||||
szSecUnitOfMeasure | UOM2 | char | OPT | NONE |
A user defined code (00/UM) that indicates an alternate unit of measure for the item. | ||||
mnMatrixControlLine | MCLN | MATH_NUMERIC | OPT | NONE |
A number that the system uses to group line numbers on a purchase order or sales order for use in a matrix. Although the number is
| ||||
cMultipleAccounts | MACT | char | OPT | NONE |
This code indicates whether the expense on the detail line has been distributed to multiple accounts. | ||||
szProgramID | PID | char | OPT | NONE |
The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry
| ||||
szUserID | USER | char | OPT | NONE |
The code that identifies a user profile. | ||||
cCurrencyMode | CRRM | char | OPT | NONE |
An option that specifies whether the system displays amounts in the domestic or foreign currency.
On
The system displays amounts in the
|
B4000260 Line Type - Activity Rules | ||||
B4000960 Verify Override Next Status Code | ||||
B4002000 Compute Unit Or Extended Amount | ||||
B9800181 Environment List Business Functions |
F4301 Purchase Order Header | ||||
F4301Z PO Header Work File | ||||
F4311 Purchase Order Detail File | ||||
F4311Z Purchase Order Generator File |