1.Functional Description
1.1Purpose
The business function will be called by the Work Order Header Master Business Function (X4801) to
write add, update and delete transactions to the Outbound Work Order Header table F4801Z1. If the
transaction was written successfully to the Outbound Work Order Header Table, the Outbound Processor UBE in
the Subsystem which processed work order exports will be invoked by this function to process the
transaction written.
.
1.2Setup Notes and Prerequisites
This function will only be used by X4801 to write transactions for Interoperability.
1.3Special Logic
None.
2.Technical Specifications
2.4Processing
1. Open F4801Z1.
2. Wk DB IO Failure = '0'
3. Output Error Code = '0'
4. Output Error Message ID = " "
5.
6. // Process only when valid action codes are passed in.
7. If Input Action Code = '1' Or = '2' Or = '3'
8. // Process only when at least the new F4801 record's pointer is passed in.
9. If Input IdNewF4801Record <> 0 then
10. // Process only when Action Code <> '2' Or Action Code = '2' And Ptr to
Old F4801 Rec is passed in.
11. If (Input Action Code = '2' And Input IdOldF4801Record <> 0) Or Input Action
Code <> '2' then
12. Call B0000175 to retrieve next Wk Transaction Number.
13. Call B9800100 to retrieve Audit Information, Wk UserID, Wk
WorkstationID, Wk TimeUpdated, Wk DateUpdated.
14. Assign common fields to F4801Z1 DS:
EDI User IDEDUSWk UserID
EDI Batch NumberEDBT0
EDI Transaction NumberEDTNWk Transaction Number
TypeTransactionTYTNInput Transaction Type
EDI_Translation FormatEDFT" "
EDI Transmission DateEDDTWk Date Updated
Direction IndicatorDRIN2
Number of Detail LinesEDDL0
Process Result FlagEDSP" "
Trading Partner IDPNID" "
Transaction OriginatorTORGWk UserID
User IDUSERWk User ID
Program IDPIDInput Program ID
Work Station IDJOBNWk WorkstationID
Date UpdatedUPMJWk DateUpdated
Time Of DayTDAYWk TimeUpdated
15.
16. Case Action Code = '1'
17. // Add
18. Wk Action Code = "02"
19. Case Action Code = '2'
20. // Update
21. Retrieve DS for F4801 from Input IdOldF4801Record.
22. Copy Work Order Header-related data to appropriate columns in
F4801Z1.
23. Copy the following also to the F4801Z1 columns.
24.
Document TypeEDCTWADCTO
User Reserved CodeURCDWAURCD
User Reserved DateURDTWAURDT
User Reserved AmountURATWAURAT
User Reserved NumberURABWAURAB
User Reserved ReferenceURRFWAURRF
Line NumberEDLN1
Action CodeTNAC"UB"
25. //
26. Perform Insert to F4801Z1.
27. If Failed then
28. Wk DB IO Failure = '1'
29. End If
30. If Wk DB IO Failure = '0'
31. Wk Action Code = "UA"
32. End If
33. Case Action Code = '3'
34. // Delete
35. Wk Action Code = "03"
36. End Case
37. If Wk DB IO Failure = '0'
38. Retrieve DS for F4801 from Input IdNewF4801Record.
39. Copy Work Order Header-related data to appropriate
columns in F4801Z1.
40. Copy the following also to the F4801Z1 columns.
41.
Document TypeEDCTWADCTO
User Reserved CodeURCDWAURCD
User Reserved DateURDTWAURDT
User Reserved AmountURATWAURAT
User Reserved NumberURABWAURAB
User Reserved ReferenceURRFWAURRF
Line NumberEDLN2
Action CodeTNACWk Action Code
42. //
43. Perform Insert to F4801Z1.
44. If Failed then
45. Wk DB IO Failure = '1'
46. End If
47. End If
48. End If
49. Else
50. Wk DB IO Failure = '1'
51. End If
52. Else
53. Wk DB IO Failure = '1'
54. End If
55. If Wk DB IO Failure <> '1'
56. Call B0000176 to invoke subsystem UBE to process this transaction.
57. "R4801Z1O"'e0 OBNM
58. "ZJDE0002" 'e0 VERS
59. Wk UserID 'e0 EDUS
60. 0 'e0 EDBT
61. Wk Transaction Number'e0 EDTN
62. '1' 'e0 SUPPS
63. Else
64. Output Error Code = '1'
65. Output Error Message ID = "0002"
66. End If
67. Close all opened tables.
68.
^
D3101420 - F4801Z1, Write Work Order Header Transactions
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
idNewF4801Record | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
idOldF4801Record | GENLN2 | ID | NONE | NONE |
General purpose ID variable. | ||||
cActionCode | ACTN | char | NONE | NONE |
A code that specifies the action that is performed. Valid values are: A Add C Change | ||||
szTransactionType | TYTN | char | NONE | NONE |
The qualifier used to identify a specific type of transaction. | ||||
szProgramID | PID | char | NONE | NONE |
The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry
| ||||
cErrorCode | ERRC | char | NONE | NONE |
This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document
| ||||
szErrorMessageID | DTAI | char | NONE | NONE |
A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or
| ||||
cCallSubsystemUBE | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. |
B0000175 Get Next Transaction Number | ||||
B0000176 Add Transaction To Subsystem Queue | ||||
B9800100 Get Audit Information |
F4801 Work Order Master File | ||||
F4801Z1 Outbound Work Order Header |