Application
to create OMW Project ID based on Naming Convention Standards
Author: Zaki Ahmed
Here is the application we developed and
use frequently to create OMW Project ID based on Naming Convention Rules that
we have defined for our company.
Project ID:
AAA_BB_NNNNNNNN
Project Description:
X_YYYYYY_DDDDDDDDDDDDDDDD
A = Site
·
This could be a list of
different business units for which OMW Project is created for
B = Functional Area
·
This could be a list of
functional area such as Accounting, Finance, IT, ESU etc
N = JDE Internal Next
Number
X = Project Type
·
Such as I = Issue, P =
Project
Y = FRICE/Issue Number on
Share Point
·
Support list or tracking
number
D = Project Short Description
·
Description of the project
After entering this information, click button. This will populate Last OMW Project ID
and Last OMW Project Description Fields.
Example:
Now, users can go to OMW and see their
project ID created for them.
Now, let’s dive into the details of how
it was developed.
1. Create a
custom table – F5598010 – Next Project Number
Field
|
Description
|
Comments
|
SY
|
Product Code
|
Hard Code ‘98’
|
BU21
|
Load
Code 1
|
Stores
Site #
|
BU22
|
Load
Code 2
|
Stores
Functional Area
|
NNBR
|
Next
Number
|
Stores
Project Next Number
|
EV01
|
Event
Point Flag
|
Stores
Project Type
|
MATH01
|
Math
Numeric 01
|
Stores
FRICE Number
|
OMWDESC
|
OMW
Project Desc
|
Stores
OMW Project Description
|
OMWPRJID
|
OMW
Project ID
|
Stores
OMW Project ID
|
USER,PID,
JOBN, UPMJ, UPMT
|
Audit
Fields
|
Audit
Fields
|
2. Create a
new view – V5598010 – this will include all columns of F5598010
3. Create a
custom application - P5598010 – OMW Project Creation Application
Application
Logic:
a.
This
application queries against F98220 to fetch the highest number assigned in
OMWPJN1 field and then stores this number in F5598010 by inserting a record in
F5598010 if no record exists, otherwise, it updates the record that already
exists. There will only be 1 line that exist in F5598010.NNBR field. By adding
1 to this number, this application generates new OMW project number.
b.
User fills in
site, functional area, project type, FRICE number and project short description
and presses OK button.
c.
This application
then generates new Project ID and Project Description, updates the record in
F5598010 and inserts a record in F98220 and F98221.
EVENT
RULES
Form: OMW Project Creation App [W5598010A] -
Event: Post Dialog is Initialized
Event GUID: 2b9609b8-2ad3-450f-ac19-0d09e382b659
Event: Post Dialog is Initialized
Event GUID: 2b9609b8-2ad3-450f-ac19-0d09e382b659
00001 FC Program ID [PID] = "P5598010"
00002 GetAuditInfo(B9800100.GetAuditInfo)
FC User ID [USER] <- szUserName [USER]
FC Date Updated [UPMJ] <- jdDate [DTE]
VA frm_TimeLastUpdated_UPMT [UPMT] <- mnTime [TME0]
FC Work Station ID [JOBN] <- szMachineKey [MKEY]
00003 FC Time Format = [VA frm_TimeLastUpdated_UPMT]
00004 FormatAndEditTime(B1700280.FormatAndEditTime)
VA frm_TimeLastUpdated_UPMT [UPMT] <> mnNumericTime [UPMT]
FC Time Format [UL02] <> szFormattedTime [FTIME]
"1" -> cMode [EV01]
00005 FC Product Code [SY] = "98"
00006 //
00007 // Build Generic Key for Record Reservation
00008 VA frm_GenericKey_GENKEY = [FC Product Code]
00015 //
00016 F5598010.FetchSingle [Index 1: SY]
FC Product Code [SY] = TK Product Code [SY]
FC Next Number [NNBR] <- TK Next Number [NNBR]
00017 If SV File_IO_Status is equal to CO SUCCESS
00018 | // Add 1 number to project NN if already exists in F5598010
00019 | FC Next Number = [FC Next Number]+1
00020 | FC Object Management Project Name [OMWPRJID] = VA frm_SaveLastOMWProjectName [OMWPRJID]
00021 | FC Description [OMWDESC] = VA frm_SaveLastOMWDesc_DSC1 [DSC1]
00022 Else
00023 | // If no record exist on F5598010, then fetch the maximum number from
00024 | // F98220.OMWPJN1 field and insert in F5598010
00025 | F98220.Select [Index 1: Project Name]
| VA frm_OMWProjectName_OMWPRJID [OMWPRJID] <> TK Object Management Project Name [OMWPRJID]
00026 | F98220.FetchNext [Index 1: Project Name]
| VA frm_OMWProjectNN_OMWPJN1 [OMWPJN1] <- TK OMW Project Future Use Numeric 1 [OMWPJN1]
00027 | While SV File_IO_Status is equal to CO SUCCESS
00028 | | If VA frm_OMWProjectNN_OMWPJN1 [OMWPJN1] is greater than or equal to VA frm_SaveLast_OMWPJN1 [OMWPJN1]
00029 | | | VA frm_SaveLast_OMWPJN1 [OMWPJN1] = VA frm_OMWProjectNN_OMWPJN1 [OMWPJN1]
00030 | | End If
00031 | | F98220.FetchNext [Index 1: Project Name]
| | VA frm_OMWProjectNN_OMWPJN1 [OMWPJN1] <- TK OMW Project Future Use Numeric 1 [OMWPJN1]
00032 | End While
00033 | F5598010.Insert [Index 1: SY]
| FC Product Code [SY] -> TK Product Code [SY]
| FC Site [BU21] -> TK Load Code 1 [BU21]
| FC Functional Code [BU22] -> TK Load Code 2 [BU22]
| VA frm_SaveLast_OMWPJN1 [OMWPJN1] -> TK Next Number [NNBR]
| FC Project Type [EV01] -> TK J.D. EnterpriseOne Event Point 01 [EV01]
| FC Description [OMWDESC] -> TK Object Management Project Description [OMWDESC]
| FC User ID [USER] -> TK User ID [USER]
| FC Program ID [PID] -> TK Program ID [PID]
| FC Work Station ID [JOBN] -> TK Work Station ID [JOBN]
| FC Date Updated [UPMJ] -> TK Date - Updated [UPMJ]
| VA frm_TimeLastUpdated_UPMT [UPMT] -> TK Time - Last Updated [UPMT]
| FC Object Management Project Name [OMWPRJID] -> TK Object Management Project Name [OMWPRJID]
00034 | FC Next Number = [VA frm_SaveLast_OMWPJN1]+1
00035 End If
00002 GetAuditInfo(B9800100.GetAuditInfo)
FC User ID [USER] <- szUserName [USER]
FC Date Updated [UPMJ] <- jdDate [DTE]
VA frm_TimeLastUpdated_UPMT [UPMT] <- mnTime [TME0]
FC Work Station ID [JOBN] <- szMachineKey [MKEY]
00003 FC Time Format = [VA frm_TimeLastUpdated_UPMT]
00004 FormatAndEditTime(B1700280.FormatAndEditTime)
VA frm_TimeLastUpdated_UPMT [UPMT] <> mnNumericTime [UPMT]
FC Time Format [UL02] <> szFormattedTime [FTIME]
"1" -> cMode [EV01]
00005 FC Product Code [SY] = "98"
00006 //
00007 // Build Generic Key for Record Reservation
00008 VA frm_GenericKey_GENKEY = [FC Product Code]
00015 //
00016 F5598010.FetchSingle [Index 1: SY]
FC Product Code [SY] = TK Product Code [SY]
FC Next Number [NNBR] <- TK Next Number [NNBR]
00017 If SV File_IO_Status is equal to CO SUCCESS
00018 | // Add 1 number to project NN if already exists in F5598010
00019 | FC Next Number = [FC Next Number]+1
00020 | FC Object Management Project Name [OMWPRJID] = VA frm_SaveLastOMWProjectName [OMWPRJID]
00021 | FC Description [OMWDESC] = VA frm_SaveLastOMWDesc_DSC1 [DSC1]
00022 Else
00023 | // If no record exist on F5598010, then fetch the maximum number from
00024 | // F98220.OMWPJN1 field and insert in F5598010
00025 | F98220.Select [Index 1: Project Name]
| VA frm_OMWProjectName_OMWPRJID [OMWPRJID] <> TK Object Management Project Name [OMWPRJID]
00026 | F98220.FetchNext [Index 1: Project Name]
| VA frm_OMWProjectNN_OMWPJN1 [OMWPJN1] <- TK OMW Project Future Use Numeric 1 [OMWPJN1]
00027 | While SV File_IO_Status is equal to CO SUCCESS
00028 | | If VA frm_OMWProjectNN_OMWPJN1 [OMWPJN1] is greater than or equal to VA frm_SaveLast_OMWPJN1 [OMWPJN1]
00029 | | | VA frm_SaveLast_OMWPJN1 [OMWPJN1] = VA frm_OMWProjectNN_OMWPJN1 [OMWPJN1]
00030 | | End If
00031 | | F98220.FetchNext [Index 1: Project Name]
| | VA frm_OMWProjectNN_OMWPJN1 [OMWPJN1] <- TK OMW Project Future Use Numeric 1 [OMWPJN1]
00032 | End While
00033 | F5598010.Insert [Index 1: SY]
| FC Product Code [SY] -> TK Product Code [SY]
| FC Site [BU21] -> TK Load Code 1 [BU21]
| FC Functional Code [BU22] -> TK Load Code 2 [BU22]
| VA frm_SaveLast_OMWPJN1 [OMWPJN1] -> TK Next Number [NNBR]
| FC Project Type [EV01] -> TK J.D. EnterpriseOne Event Point 01 [EV01]
| FC Description [OMWDESC] -> TK Object Management Project Description [OMWDESC]
| FC User ID [USER] -> TK User ID [USER]
| FC Program ID [PID] -> TK Program ID [PID]
| FC Work Station ID [JOBN] -> TK Work Station ID [JOBN]
| FC Date Updated [UPMJ] -> TK Date - Updated [UPMJ]
| VA frm_TimeLastUpdated_UPMT [UPMT] -> TK Time - Last Updated [UPMT]
| FC Object Management Project Name [OMWPRJID] -> TK Object Management Project Name [OMWPRJID]
00034 | FC Next Number = [VA frm_SaveLast_OMWPJN1]+1
00035 End If
Form: OMW Project Creation App [W5598010A] -
Event: Add Record to DB - Before
Event GUID: f80395d2-c8df-462e-aa68-8df677a9540a
Event: Add Record to DB - Before
Event GUID: f80395d2-c8df-462e-aa68-8df677a9540a
00001 Suppress Add
Form: OMW Project Creation App [W5598010A] -
Event: Update Record to DB - Before
Event GUID: 1afbeeac-3e68-46c5-a3ea-ee5f4cdc3409
Event: Update Record to DB - Before
Event GUID: 1afbeeac-3e68-46c5-a3ea-ee5f4cdc3409
00001 Suppress Update
Form: OMW Project Creation App [W5598010A] -
Event: Form Variables
Event GUID: f2621a4d-5026-4b45-aba7-9479bed4952d
Event: Form Variables
Event GUID: f2621a4d-5026-4b45-aba7-9479bed4952d
frm_OMWProjectName_OMWPRJID [OMWPRJID]
frm_OMWProjectNN_OMWPJN1 [OMWPJN1]
frm_SaveLast_OMWPJN1 [OMWPJN1]
frm_CreateOMWProject_EV01 [EV01]
frm_OMWProjectStatus_OMWPS [OMWPS]
frm_SaveLastOMWDesc_DSC1 [DSC1]
frm_SaveLastOMWProjectName [OMWPRJID]
frm_NextNumberString_TEXT [TEXT]
frm_FriceNextNumber_TEXT [TEXT]
frm_TimeLastUpdated_UPMT [UPMT]
frm_ProjectType_OMWPCC4 [OMWPCC4]
frm_GenericKey_GENKEY [GENKEY]
frm_szRecordReserveErrMsg_DTAI [DTAI]
frm_NameAlpha_ALPH [ALPH]
frm_ReserveApplicationID_PID [PID]
frm_OMWProjectNN_OMWPJN1 [OMWPJN1]
frm_SaveLast_OMWPJN1 [OMWPJN1]
frm_CreateOMWProject_EV01 [EV01]
frm_OMWProjectStatus_OMWPS [OMWPS]
frm_SaveLastOMWDesc_DSC1 [DSC1]
frm_SaveLastOMWProjectName [OMWPRJID]
frm_NextNumberString_TEXT [TEXT]
frm_FriceNextNumber_TEXT [TEXT]
frm_TimeLastUpdated_UPMT [UPMT]
frm_ProjectType_OMWPCC4 [OMWPCC4]
frm_GenericKey_GENKEY [GENKEY]
frm_szRecordReserveErrMsg_DTAI [DTAI]
frm_NameAlpha_ALPH [ALPH]
frm_ReserveApplicationID_PID [PID]
EVENTS
HC OK/Select -
Event: Button Clicked
Event GUID: c3b5ff5a-5d81-4e0e-94dc-558462604704
Event: Button Clicked
Event GUID: c3b5ff5a-5d81-4e0e-94dc-558462604704
----------------------------------------
Event Level Variables
----------------------------------------
evt_OMWProjectType_OMWTYP [OMWTYP]
evt_SourceRelease_SRCRLS [SRCRLS]
evt_OMWProjectSeverity_OMWSV [OMWSV]
evt_ProductCodeReporting_SYR [SYR]
evt_FriceNumber_MATH01 [MATH01]
----------------------------------------
00001 // Build Project ID
00002 FC Object Management Project Name = concat(concat([FC Site],'_'[FC Functional Code]), )
00003 FC Object Management Project Name = concat([FC Object Management Project Name],'_')
00004 ConvertNumericToString(B0000045.ConvertNumericToString)
FC Next Number [NNBR] -> mnMathNumeric01 [MATH01]
VA frm_NextNumberString_TEXT [TEXT] <- szVideoConstant30A [VC30A]
00005 VA frm_NextNumberString_TEXT = lpad([VA frm_NextNumberString_TEXT],'0' ,8 )
00006 FC Object Management Project Name = concat([FC Object Management Project Name],[VA frm_NextNumberString_TEXT])
00007 VA frm_SaveLastOMWProjectName [OMWPRJID] = FC Object Management Project Name [OMWPRJID]
00008 // Build Project Description
00009 FC FRICE Number = lpad([FC FRICE Number],"0",6)
00010 FC Description = concat(concat([FC Project Type],'_'),[FC FRICE Number])
00011 FC Description = concat(concat([FC Description],'_'[FC Short Description]), )
00012 VA frm_SaveLastOMWDesc_DSC1 [DSC1] = FC Description [OMWDESC]
00013 // Update F5598010
00014 ConvertStringToMathNumeric(B0000580.ConvertStringToMathNumeric)
FC FRICE Number [TEXT] -> szInputString [AA15]
VA evt_FriceNumber_MATH01 [MATH01] <- mnOutputMathNumeric [MATH01]
00015 F5598010.Update [Index 1: SY]
FC Product Code [SY] = TK Product Code [SY]
FC Site [BU21] -> TK Load Code 1 [BU21]
FC Functional Code [BU22] -> TK Load Code 2 [BU22]
FC Next Number [NNBR] -> TK Next Number [NNBR]
FC Project Type [EV01] -> TK J.D. EnterpriseOne Event Point 01 [EV01]
VA evt_FriceNumber_MATH01 [MATH01] -> TK Math Numeric 01 [MATH01]
FC Description [OMWDESC] -> TK Object Management Project Description [OMWDESC]
FC User ID [USER] -> TK User ID [USER]
FC Program ID [PID] -> TK Program ID [PID]
FC Work Station ID [JOBN] -> TK Work Station ID [JOBN]
FC Date Updated [UPMJ] -> TK Date - Updated [UPMJ]
VA frm_TimeLastUpdated_UPMT [UPMT] -> TK Time - Last Updated [UPMT]
FC Object Management Project Name [OMWPRJID] -> TK Object Management Project Name [OMWPRJID]
00016 // Insert record in F98220
00017 VA frm_OMWProjectStatus_OMWPS [OMWPS] = "21"
00018 VA evt_OMWProjectType_OMWTYP [OMWTYP] = "02"
00019 VA evt_SourceRelease_SRCRLS [SRCRLS] = "E900"
00020 VA evt_OMWProjectSeverity_OMWSV [OMWSV] = "11"
00021 VA evt_ProductCodeReporting_SYR [SYR] = "55"
00022 VA frm_ProjectType_OMWPCC4 = [FC Project Type]
00023 //
00024 F98220.Insert [Index 1: Project Name]
FC Object Management Project Name [OMWPRJID] -> TK Object Management Project Name [OMWPRJID]
FC Description [OMWDESC] -> TK Object Management Project Description [OMWDESC]
VA frm_OMWProjectStatus_OMWPS [OMWPS] -> TK Object Management Project Status [OMWPS]
VA evt_OMWProjectType_OMWTYP [OMWTYP] -> TK Object Management Project Type [OMWTYP]
VA evt_SourceRelease_SRCRLS [SRCRLS] -> TK Source Release Number [SRCRLS]
VA evt_OMWProjectSeverity_OMWSV [OMWSV] -> TK Object Management Project Severity [OMWSV]
VA evt_ProductCodeReporting_SYR [SYR] -> TK Product Code/Reporting [SYR]
SL DateToday -> TK OMW Project Creation Date [OMWCD]
FC Site [BU21] -> TK OMW Category Code 2 [OMWPCC2]
FC Functional Code [BU22] -> TK OMW Category Code 3 [OMWPCC3]
VA frm_ProjectType_OMWPCC4 [OMWPCC4] -> TK OMW Category Code 4 [OMWPCC4]
FC Next Number [NNBR] -> TK OMW Project Future Use Numeric 1 [OMWPJN1]
FC Program ID [PID] -> TK Program ID [PID]
FC Work Station ID [JOBN] -> TK Machine Key [MKEY]
FC User ID [USER] -> TK User ID [USER]
FC Date Updated [UPMJ] -> TK Date - Updated [UPMJ]
00025 F98221.Insert [Index 1: Project, User, Role]
FC Object Management Project Name [OMWPRJID] -> TK Object Management Project Name [OMWPRJID]
FC User ID [USER] -> TK OMW Project User [OMWUSER]
VA evt_OMWProjectType_OMWTYP [OMWTYP] -> TK Object Management User Role [OMWUR]
FC Program ID [PID] -> TK Program ID [PID]
FC Work Station ID [JOBN] -> TK Machine Key [MKEY]
FC User ID [USER] -> TK User ID [USER]
FC Date Updated [UPMJ] -> TK Date - Updated [UPMJ]
VA frm_TimeLastUpdated_UPMT [UPMT] -> TK Time - Last Updated [UPMT]
Event Level Variables
----------------------------------------
evt_OMWProjectType_OMWTYP [OMWTYP]
evt_SourceRelease_SRCRLS [SRCRLS]
evt_OMWProjectSeverity_OMWSV [OMWSV]
evt_ProductCodeReporting_SYR [SYR]
evt_FriceNumber_MATH01 [MATH01]
----------------------------------------
00001 // Build Project ID
00002 FC Object Management Project Name = concat(concat([FC Site],'_'[FC Functional Code]), )
00003 FC Object Management Project Name = concat([FC Object Management Project Name],'_')
00004 ConvertNumericToString(B0000045.ConvertNumericToString)
FC Next Number [NNBR] -> mnMathNumeric01 [MATH01]
VA frm_NextNumberString_TEXT [TEXT] <- szVideoConstant30A [VC30A]
00005 VA frm_NextNumberString_TEXT = lpad([VA frm_NextNumberString_TEXT],'0' ,8 )
00006 FC Object Management Project Name = concat([FC Object Management Project Name],[VA frm_NextNumberString_TEXT])
00007 VA frm_SaveLastOMWProjectName [OMWPRJID] = FC Object Management Project Name [OMWPRJID]
00008 // Build Project Description
00009 FC FRICE Number = lpad([FC FRICE Number],"0",6)
00010 FC Description = concat(concat([FC Project Type],'_'),[FC FRICE Number])
00011 FC Description = concat(concat([FC Description],'_'[FC Short Description]), )
00012 VA frm_SaveLastOMWDesc_DSC1 [DSC1] = FC Description [OMWDESC]
00013 // Update F5598010
00014 ConvertStringToMathNumeric(B0000580.ConvertStringToMathNumeric)
FC FRICE Number [TEXT] -> szInputString [AA15]
VA evt_FriceNumber_MATH01 [MATH01] <- mnOutputMathNumeric [MATH01]
00015 F5598010.Update [Index 1: SY]
FC Product Code [SY] = TK Product Code [SY]
FC Site [BU21] -> TK Load Code 1 [BU21]
FC Functional Code [BU22] -> TK Load Code 2 [BU22]
FC Next Number [NNBR] -> TK Next Number [NNBR]
FC Project Type [EV01] -> TK J.D. EnterpriseOne Event Point 01 [EV01]
VA evt_FriceNumber_MATH01 [MATH01] -> TK Math Numeric 01 [MATH01]
FC Description [OMWDESC] -> TK Object Management Project Description [OMWDESC]
FC User ID [USER] -> TK User ID [USER]
FC Program ID [PID] -> TK Program ID [PID]
FC Work Station ID [JOBN] -> TK Work Station ID [JOBN]
FC Date Updated [UPMJ] -> TK Date - Updated [UPMJ]
VA frm_TimeLastUpdated_UPMT [UPMT] -> TK Time - Last Updated [UPMT]
FC Object Management Project Name [OMWPRJID] -> TK Object Management Project Name [OMWPRJID]
00016 // Insert record in F98220
00017 VA frm_OMWProjectStatus_OMWPS [OMWPS] = "21"
00018 VA evt_OMWProjectType_OMWTYP [OMWTYP] = "02"
00019 VA evt_SourceRelease_SRCRLS [SRCRLS] = "E900"
00020 VA evt_OMWProjectSeverity_OMWSV [OMWSV] = "11"
00021 VA evt_ProductCodeReporting_SYR [SYR] = "55"
00022 VA frm_ProjectType_OMWPCC4 = [FC Project Type]
00023 //
00024 F98220.Insert [Index 1: Project Name]
FC Object Management Project Name [OMWPRJID] -> TK Object Management Project Name [OMWPRJID]
FC Description [OMWDESC] -> TK Object Management Project Description [OMWDESC]
VA frm_OMWProjectStatus_OMWPS [OMWPS] -> TK Object Management Project Status [OMWPS]
VA evt_OMWProjectType_OMWTYP [OMWTYP] -> TK Object Management Project Type [OMWTYP]
VA evt_SourceRelease_SRCRLS [SRCRLS] -> TK Source Release Number [SRCRLS]
VA evt_OMWProjectSeverity_OMWSV [OMWSV] -> TK Object Management Project Severity [OMWSV]
VA evt_ProductCodeReporting_SYR [SYR] -> TK Product Code/Reporting [SYR]
SL DateToday -> TK OMW Project Creation Date [OMWCD]
FC Site [BU21] -> TK OMW Category Code 2 [OMWPCC2]
FC Functional Code [BU22] -> TK OMW Category Code 3 [OMWPCC3]
VA frm_ProjectType_OMWPCC4 [OMWPCC4] -> TK OMW Category Code 4 [OMWPCC4]
FC Next Number [NNBR] -> TK OMW Project Future Use Numeric 1 [OMWPJN1]
FC Program ID [PID] -> TK Program ID [PID]
FC Work Station ID [JOBN] -> TK Machine Key [MKEY]
FC User ID [USER] -> TK User ID [USER]
FC Date Updated [UPMJ] -> TK Date - Updated [UPMJ]
00025 F98221.Insert [Index 1: Project, User, Role]
FC Object Management Project Name [OMWPRJID] -> TK Object Management Project Name [OMWPRJID]
FC User ID [USER] -> TK OMW Project User [OMWUSER]
VA evt_OMWProjectType_OMWTYP [OMWTYP] -> TK Object Management User Role [OMWUR]
FC Program ID [PID] -> TK Program ID [PID]
FC Work Station ID [JOBN] -> TK Machine Key [MKEY]
FC User ID [USER] -> TK User ID [USER]
FC Date Updated [UPMJ] -> TK Date - Updated [UPMJ]
VA frm_TimeLastUpdated_UPMT [UPMT] -> TK Time - Last Updated [UPMT]
About Author:
Zaki Ahmed has over 13 years
of experience with JD Edwards development and implementation. Currently, he is
working as a Principal Business Analyst in a manufacturing company in
Wisconsin. You may contact the author at zaki.ahmed@gmail.com