Master Business Function (MBF) is a Business Function written to process a record into the JDE system which is made up of many sub-routines. JD Edwards provides MBFs to allow calling programs to process certain predefined transactions. An MBF encapsulates the required logic, enforces data integrity, and insulates the calling programs from the database structures.This document details general topics on Master Business Function (MBF) in EnterpriseOne including the types of Master Business Functions, purpose of MBFs, their components, how these business functions are called and how to troubleshoot them.
B4200310/B4200311/B4200312 - Sales Order Entry Master Business Function N4200790 - Shipment Confirmation along with B4200810 - LoadOrUnloadShipConfirmCache N4200860 - Backorder Release MBF B4501000 - Live Promotions Processing Master Business Function
XT4311Z1/XT4311Z2 - Purchase Order Entry XT4312Z1/XT4314Z2 - Purchase Order Receipts XT4314ZN/XT4314Z2 - Voucher Match
X4801/B4800210 - X4801 Work Order Entry Master Business Function along with B4800210 - X4801 Manufacturing Editing Module
B03B0011 - Invoice Entry Master Business Function B03B0138/B03B0149 - F03B13 Maintain Receipt Header/F03B14 Maintain Receipt Detail N03B0176 - Account Netting Master Business Function
B0400047 - Voucher Entry Master Business Function B0400016 - A/P Payments Master Business Function
B0900049 - Journal Entry
N3002040 - F3002 Bill of Material Master Bsfn N3001780 - F3003 Master Business Function B3100770 - Work Order Completion MBF B3101260 - F3111 Parts List Master Business Function B3101250 - F3112 Work Order Routings Master Business Function B3101040 - F31122 WO Hours & Quantities Master Business Function B3102270 - Work Order Issues Master Business Function B3401200 - F3460, Edit Line And Update Master Business Function N3700070 - F3701 Test Definitions Master Business Function N3700100 - F3702 Specifications Master Business Function B3100770 - Work Order Completions MBF B3102080 - Co_By Completions MBF B3401360 - Process Messages MBF N3401430 - F3460 Forecast MBF
Master File Master Business Function
N0100041 - Address Book MBF
N0100042 - Customer Master -MBF
N0100043 - Supplier Master-MBF
N4101060 - F4101 Process Master Data
N4101070 - Update Item Process Data
N000700 - Shop Floor Calender - Master Business Function
B0100052 - Address Book - PO Template for MBF
B0500575 - Employee MBF
B0100087 - Who's Who MBF
B1200260 - Cache Process Asset Master MBF
B1200280 - Cache Process Equipment Tag MBF
B4600660 - Warehouse Reservations MBF
N3700150 - F3711 Test Results MBF
(The above is a non-exhaustive list of Master Business Functions.)
Note:
Transactional File Master Business Function
Provide a common set of functions (BeginDoc, EditLine, EditDoc, EndDoc, ClearCache)
This common set of functions contain all of the necessary defaulting and editing for a transaction file.
Records are dependent on each other
Logic is broken up by event flow of an application
The common set of functions (BeginDoc, EditLine, etc) are called in different events in an application.
Generally, you can make one call to an MBF to edit, add, update or delete a master file record.
One Single data structure
The fields required to make the request and provide all the necessary values are in one data structure. The data fields should correspond directly with columns in the associated master file.
No cache is needed.
Because each master file record is independent of the others, caching is unnecessary.
These business functions can also be called in Interoperability or EDI Batch Applications.
XT4111Z1 is unique
It follows Edit Line, Edit Doc, End Doc and Clear Cache routine
But this MBF is not called directly from application rather same MBF defined above is calling this routine
Transaction is explained at <Document 1208208.1> E1: DB: Transaction, Transaction Processing, Commit and Rollback
If needed check calling applications through Cross Reference Facilities
Description of objects are coming from F9860.MD (MembersDescription) column (e.g., Shop Floor Calender which has to be Calendar)
What is the purpose of using Master Business Function?
Through master business function,
To create reusable, application specific code
To reduce duplicated code
To ensure that hookup is consistent
To enforce data integrity
To support interoperability models
To allow processing to be distributed through OCM
To design event-driven architecture
Note:
MBFs are similar to the functional servers in WorldSoftware.
By setting up and maintaining the structure of an MBF, these “hook ups” that call the functions are in a consistent order.
Usually, in the EndDoc routine, interoperability sub-routine can be called. Example: B4200310 - F4211FSEndDoc is calling B4201540 - ProcessInteropOutboundRecs (Process Interop Outbound Records).
If there is any equivalent Batch Application(either Inbound Interoperability or EDI), MBF can be called based on event flow in the Batch Application/UBE.
Transactional File Master Business Function
What are components of Transaction MBF? A Transaction MBF is made up of below components:
Begin Doc
Edit Line
Edit Doc
End Doc
Clear Cache
Hook-up
What does it do?
Remarks
Begin Doc
- At the end of header processing or before detail data are processed. - OK button clicked when header and detail is separated. - Set focus event in header/detail or headerless/detail form.
Initialize Cache/work file.
Validate if the control value is populated.
Initialize/default values.
Create Cache/work file for Header.
- Generally used when transaction contains header and detail information. - Example: Header Information from F4201/F4301 and detail information from F4211/F4311. BeginDoc used for header information that contains customer/supplier information. - This component is optional when target transaction only have a single row of data (header only for example).
Edit Line
In exiting from row (Row Is Exited/Changed - Asynch) or OK button clicked with or without WHILE loop
Initialize Cache/Workfile if BeginDoc was not called.
Validate detail information
Initialize/default values for detail transaction.
Create cache/workfile for Detail.
- In distribution module this function validate item/item-related information. - Most of validation will take place through this routine.
Edit Doc
OK button click
Validate before commit. If header and detail information need to have tight integrity then it may compare detail cache to header cache
- This function is optional. If it hits error (or validate failed), form may be closed neither issuing error nor committing cache to transaction files
End Doc
Post OK button clicked - Asynch
Commit cache/work file to transaction table(s)
- Mostly this function gets called with Transaction Processing ON asynchronously. - If it does not hit error (successfully retrieved/committed cache) then ClearCache will be called.
Clear Cache
Inside End Doc routine or Close/Cancel button clicked
Clear cache/workfile for header and detail
- This is to clear any cache created through Begin Doc and Edit Line process. - User abandon transaction(by clicking Cancel Button) then calling this is important to free memory. - Some MBF is calling this routine in End Doc.
Note:
"Initialize" is to flush/allocate memory and set proper cache name through JDE_InitCache()
Usually the cache name is made up of object ID (e.g., B4200310) and concatenate Job Number(e.g., 1002) to make it unique. For this example, cache name will be B42003101002
This is important when two or more MBF components communicate with others components (refer below How components communicate in a single MBF
Each components can be called as below in batch application (actual implementation can vary as it can be handled at different section when it needs strict validation to stop transaction from being committed when encountering error data),
Initialize Section: Begin Doc
Do Section: Edit Line
End Section: End Doc
How transaction MBF is built to run?
Below is an example of Sales Order creation through P4210 - Sales Order Entry,
B4200310 - F4211FSBeginDoc (F4211 Begin Document)
B4200310 - F4211FSEditLinePreProcess (F4211 Pre Process Value)
B4200310 - F4211FSEditLine (F4211 Edit Line)
B4200311 - F4211SOEInternalFunctions (F4211 Sales Order Entry Internal Functions)
B4200312 - F4211EditDoc (F4211 Edit Doc)
B4200310 - F4211EndDoc (F4211 End Document)
B4200310 - F4211ClearWorkFile (F4211 Delete Work File)
are to be build into B4200310.c, B4200311.c and B4200312.c which belongs to Parent DLL CSALES
Note:
Unlike other BSFN, before it calls F4211FSEditLine, it calls additional business function F4211FSEditLinePreProcess (F4211 Pre Process Value) to assign valid value in calling F4211FSEditLine
F4211FSEditLine (B4200310) is calling internal business function I4200310_F4211FSEditLine(). The actual routine does not exist in B4200310 but exist in B4200311 instead. Both B4200310 and B4200311 belongs to library CSALES.
So it is important to check internal BSFN B4200311 when it issues error in validating detail information through F4211FSEditLine
Since B4200311 is an internal Business Function, jdedebug.log will not contain statement like "Calling Business Function F4211SOEInternalFunctions from Application [P4210], Version [ZJDE0001]
How it calls internal BSFN for Edit Line in complex routine?
Below is example from B420030 in Sales Order Entry,
: As we can see above B4200310 has definition on F4211FSEditLine which is calling internal BSFN I4200310_F4211FSEditLine () but you may not be able to find the detail routine of I4200310_F4211FSEditLine in B4200310. In case you want to know what is actual parameter, refer LPDSD4200310F which is data structure to hold order detail
Below MBFs are configured same manner so it is important to check internal business function for below listed transactions,
B4200310/B4200311 - Sales Order Entry
N4200790/B4200810 - Shipment Confirmation
XT4311Z1/XT4311Z2 - Purchase Order Entry
XT4312Z1/XT4314Z2 - Purchase Order Receipts
XT4314ZN/XT4314Z2 - Voucher Match
X4801/B4800210 - Work Order Header
How internal components/routine communicate with another routine in a MBF?
For example in handling Inventory Issue through P4112 which utilizes MBF XT4112Z1 as below,
Get Local Computer ID VA rpt_WorkStationId_JOBN <> BF szMachineKey
It is important to understand how cache is created and it gets utilized through End Doc routine
Verify what are return values through Edit Line routine
Assign Job number for individual internal routine as cache were created based on this job number
For this example,
Create inventory transaction through XT4111Z1 with job number named ' VA rpt_JobnumberA_Inventory'
Create Journal transaction through B0900049 with job number named 'VA rpt_JobnumberA_F0911'
Through Edit Line routine, cache is created based on specified job number
This routine is important when you need to interface with 3rd party software(e.g., IBM WebSphere Adapter) or business service
Job Number has to be unique per unit of transaction otherwise, cache itself won't be handled properly
How to debug issue on Master Business Function?
Analyze jasdebug.log (at presentation layer) and jdedebug.log (in logic server) which contains runtime flow and business flow respectively
jasdebug.log: describes how it gets called
jdedebug.log (CallObject kernel log): how MBF validates data, create cache and commit it
Considerations
In thin client configuration, interactive application is more suitable for smaller size of transactions otherwise you may hit 'ASYNCHRONOUS BUSINESS FUNCTION Error', 'Commit Failed', 'Transaction Failed' or Web Client Exception in committing cache to DB.
In general, interactive application may make use of Cache (based on data structure of work file) whereas batch application will write work file. The main consideration is not to utilize too much cache though it may return better performance in small transactions.
Since most of JDE applications may have equivalent batch processes, you can utilize these batch applications when trying to process large number of records.
R4311Z1I - PO Unedited Transaction Inbound Processor
XT4312Z1/XT4314Z2
P4312 - PO Receipt
R47071 - EDI Receiving Advice Edit/Create - Purchasing
XT4314ZN/XT4314Z2
P4314 - Voucher Match
R470412 - EDI Inbound Invoice/Match to P.O. Edit/Create
X4801
P48013 - Work Order
R4701ZI - SCP Inbound Work Orders
B03B0011
P03B11 - Invoice Entry
B03B0138/B03B0149
P03B102 - Receipt Entry
B0400047
P0411 - Voucher
R470412 - EDI Inbound Invoice/Match to P.O. Edit/Create R04110Z* - Voucher Batch Processor
B0400016
P0413M - A/P Manual Payment
B0900049
P0911 - Journal Entry
R0911Z1 - Store and Forward Journal Entry Upload
N3002040
P3002 - Bill of Material
R3002Z1I - Process Inbound Bill of Masterial
N3001780
P3003 - Routing
R3003Z1I - Process Inbound Processing
B3101260
P31113 - Work Order Inventory Issues
R31113Z1I - Inbound Inventory Issue Transaction
B3401360
P3411 - MRP/MPS Detail Message Revisions
R3411 - MRP/MPS Detail Message Processing
Note:
Only major transaction information has been described here.
For detail, refer
<Document 659847.1> - E1: 47: EDI Quick Reference Guide, which are related with Transactional Master Business Function
<Document 1275030.1> - E1: INTEROP: Interoperability Quick Reference Guide (Interoperability Interface Tables) in EnterpriseOne, which are related with Master Data Master Business Function