1.Functional Description
1.1Purpose
To read the F3403 table and retrieve the next available supply branch(MPMMCU) given a demand
branch(MPCMCU), the item number(MPITM), transfer date (DRQJ) and the category code(MPPRPX). This function will
return a pointer to the Request handle so that the next supply branch logic can be implemented. In
addition, all field values for the record will be returned in the business function data structure.
1.2Setup Notes and Prerequisites
Pointers are being used to implement the 'get next' logic. The user is responsible for freeing (i.e.
closing)the request handle to F3403 when no longer needed.
1.3Special Logic
2.Technical Specifications
1.Set Output Error Message to '3143' if open tables fail, or failure in pointer operations.
2.Initialize Wk Perform Select = '0'
3.If Input Hrequest F3403 = 0 then
4. Open F3403.
5. Store the Hrequest using StoreDataPointer and return the value into Input Hrequest F3403.
6. Input Fetch Based Upon = '1'
7. Wk Perform Select = '1'
8. Init both caches
9.Else
10. Call RetrieveDataPointer to retrieve the Hrequest for F3403.
11.End If
12.If Close Mode = '1' then
13. Close F3403 using the hRequest retrieved.
14. Free Data Pointer to idhRequestF3403.
15. Terminate both caches
16. Exit Function.
17.End if
18.Initialize Error Code = '0'
19.Initialize Wk Exit Flag = '0'
20.While Wk Exit Flag = '0'
21. Wk Exit Flag = '1'
22. Switch( Input Fetch Based Upon )
23. Case '1'
24. If Wk Perform Select = '1'
25. Select Keyed Position on F3403 Using MPITM(=Input Item Number),
MPCMCU(=Input Demand Branch),
MPPRPX(=" "), MPBRSQ(=0) And MPEFFT(>=Intended Tansfer Date).
26. Wk Perform Select = '0'
27. End If
28. Fetch Matching Key using MPCMCU(=Input Demand Branch), MPITM(=Input Item
Number),and MPPRPX(=" ") only.
29. If the Fetch Failed
30. Input Fetch Based Upon = '2'
31. Wk Perform Select = '1'
32. Else
33. Call Internal Function to Validate F3403 Record (F3403 Record, lpDS, Wk
Valid).
34. If Wk Valid = TRUE
35. Return the F3403 field values into output fields.
36. Add MPMMCU to Done Cache
37. Set Input Error Code = '0'
38. Else
39. Wk Exit Flag = '0'
40. End If
41. Break from Switch structure
42. End If
43. Case '2'
44. If Wk Perform Select = '1'
45. Select Keyed Position on F3403 Using MPITM(=0), MPCMCU(=Input Demand
Branch), MPPRPX(=Input Category Code), MPBRSQ(=0) And MPEFFT(>=Intended Tansfer
Date).
46. Wk Perform Select = '0'
47. End If
48. Fetch Matching Key using MPCMCU(=Input Demand Branch), MPITM(=0), and
MPPRPX(=Input Category Code)
only.
49. If the Fetch Failed
50. Input Fetch Based Upon = '3'
51. Wk Perform Select = '1'
52. Else
53. Call Internal Function to Validate F3403 Record (F3403 Record, lpDS, Wk
Valid).
54. If Wk Valid = TRUE
55. Return the F3403 field values into output fields.
56. Add MPMMCU to Done Cache
57. Set Input Error Code = '0'
58. Else
59. Wk Exit Flag = '0'
60. End If
61. Break from Switch structure
62. End If
63. Case '3'
64. If Wk Perform Select = '1'
65. Select Keyed Position on F3403 Using MPITM(=0), MPCMCU(=Input Demand
Branch), MPPRPX(=" "), MPBRSQ(=0) And MPEFFT(>=Intended Tansfer Date).
66. Wk Perform Select = '0'
67. End If
68. Fetch Matching Key using MPCMCU(=Input Demand Branch), MPITM(=0), and
MPPRPX(=" ") only.
69. If the Fetch Failed
70. Set Input Error Code = '1'
71. Break from Switch structure.
72. Else
73. Call Internal Function to Validate F3403 Record (F3403 Record, lpDS, Wk
Valid).
74. If Wk Valid = TRUE
75. Return the F3403 field values into output fields.
76. Add MPMMCU to Done Cache
77. Set Input Error Code = '0'
78. Else
79. Wk Exit Flag = '0'
80. End If
81. Break from Switch structure
82. End If
83. End Switch
84.End While
Validate F3403 Record(*F3403 Record, lpDS, *Valid)
1.If MPEFFF > Input Intended Transfer Date Or MPEFFT < Input Intended Transfer Date
2. Valid = FALSE
3.Else
4. Valid = TRUE
5. If MPEXIN = 'E'
6. Get from Exclude Cache using MPMMCU
7. If Not Found
8. Insert new record into Exclude cache with MPMMCU
9. End If
10. Valid = FALSE
11. Else
12. Get from Exclude Cache using MPMMCU
13. If Found then
14. Valid = FALSE
15. Else
16. Get from Done Cache using MPMMCU
17. If Found then
18. Valid = FALSE
19. End If
20. End If
21. End If
22.End if
^
D3500030 - MRP, Get Supply Branch
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnItemNumberShort | ITM | MATH_NUMERIC | NONE | NONE |
An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item
| ||||
szDemandBranch | CMCU | char | NONE | NONE |
A secondary or lower-level business unit. The system uses the value that you enter to indicate that a branch or plant contains several
| ||||
szCategoryCode | PRPX | char | NONE | NONE |
A user defined code (system 41, type P4) under which you can organize logically related items.
You can simplify the master planning
| ||||
jdIntendedTransferDate | DRQJ | JDEDATE | NONE | NONE |
The date that an item is scheduled to arrive or that an action is scheduled for completion. | ||||
cFetchBasedUpon | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
szSupplyBranch | MMCU | char | NONE | NONE |
A code that represents a high-level business unit. Use this code to refer to a branch or plant that might have departments or jobs, which
| ||||
mnBranchLevel | BRLV | MATH_NUMERIC | NONE | NONE |
Determines the level at which a component branch should be processed in multi-plant processing. The lowest level branches (which are
| ||||
mnBranchPriority | BRSQ | MATH_NUMERIC | NONE | NONE |
Determines the sequence within a level that the branches are processed in multi-plant DRP/MPS/MRP. Use this field along with the Branch
| ||||
cExcludeIncludeFlag | EXIN | char | NONE | NONE |
A code that indicates whether the system includes or excludes the item/category code in the Branch Relationships Master table (F3403)
| ||||
cAvailabilityCheck | AVLC | char | NONE | NONE |
Indicates if the planning system will check availability of the item or family at the supply branch/plant. If you enable availability checking on
| ||||
jdEffectiveFromDate | EFFF | JDEDATE | NONE | NONE |
A date that indicates one of the following:
o When a component part goes into effect on a bill of material
o When a routing step goes into
| ||||
jdEffectiveThruDate | EFFT | JDEDATE | NONE | NONE |
A date that indicates one of the following:
o When a component part is no longer in effect on a bill of material
o When a routing step is no
| ||||
mnTransitLeadtime | TRLT | MATH_NUMERIC | NONE | NONE |
The number of days to ship items from the supply branch to the demand branch.
This leadtime is set up in the Branch Relationships Master
| ||||
mnSourcePercent | SRCP | MATH_NUMERIC | NONE | NONE |
The system uses source percentage to determine what percentage of the planned order should be supplied by the source branch.
For
| ||||
mnPercentToFill | PCTF | MATH_NUMERIC | NONE | NONE |
A field used during multi-plant processing to determine what percent of an order should be filled to place a transfer order message. For
| ||||
mnPercentMarkup | PCMU | MATH_NUMERIC | NONE | NONE |
The percent markup is the percent the cost is to be marked up when the item is transfered from one branch to another. | ||||
mnFixedMarkupAmount | FXMU | MATH_NUMERIC | NONE | NONE |
The amount the cost is to be marked up when being transfered from one branch to another. | ||||
cMarkupExtendedOrUnit | FXUE | char | NONE | NONE |
This code determines if the fixed cost markup is to be added to the unit cost or the extended cost. Valid values are:
U Add markup to the
| ||||
idhRequestF3403 | GENLNG | ID | NONE | NONE |
General purpose ID variable. | ||||
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
| ||||
cSuppressErrorMessage | SUPPS | char | NONE | NONE |
A flag indicating whether or not runtime error messaging will occur when an error message is issued from a business function.
0 = allow
| ||||
cCloseMode | EV02 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
szJobNumber | JOB | char | NONE | NONE |
Job Number | ||||
idhrequestF4102 | GENLNG | ID | OPT | NONE |
General purpose ID variable. |
None |
F3403 Branch Relationships Master File |