F4801Z1WriteWOHeaderTransactions

F4801Z1, Write Work Order Header Transactions

Minor Business Rule

Object Name: B3101420

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

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. 


^

Data Structure

D3101420 - F4801Z1, Write Work Order Header Transactions

Parameter NameData ItemData TypeReq/OptI/O/Both
idNewF4801RecordGENLNGIDNONENONE

General purpose ID variable.

idOldF4801RecordGENLN2IDNONENONE

General purpose ID variable.

cActionCodeACTNcharNONENONE

A code that specifies the action that is performed. Valid values are: A Add C Change

szTransactionTypeTYTNcharNONENONE

The qualifier used to identify a specific type of transaction.

szProgramIDPIDcharNONENONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

cErrorCodeERRCcharNONENONE

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

szErrorMessageIDDTAIcharNONENONE

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 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

cCallSubsystemUBEEV01charOPTNONE

An option that specifies the type of processing for an event.

Related Functions

B0000175 Get Next Transaction Number
B0000176 Add Transaction To Subsystem Queue
B9800100 Get Audit Information

Related Tables

F4801 Work Order Master File
F4801Z1 Outbound Work Order Header