This document is to explain how to implement below business functions in interactive application or in other business function to describe meaningful error/warning/information for users additionally this document explains example of callmap.
This function sets error on the form (form level error) and error remains until the form is closed. Therefore this function cannot be used if error needs to be cleared on the form after error has been corrected on the form. Instead design custom business function described in : <Document 626614.1> E1: DD: Creating a Text Substitution Error Message <Document 1342870.1> E1: FDA: How to Use a Text Substitution Error Message in Form Design Aid?
Purpose: This business function is to enable you to set meaningful error message to appear on screen. You may choose any error code (DD alias) which has one variable (appear as &1 in Item Glossary) or error code up to five variables. Note that this function can be called in application or in other business functions.
Example Error Code (DD alias): TEXTSUB with description "&1 &2 &3 &4"
Parameter
Data Structure: D0800366 - Text Substitution Error
Parameter Name
Data Item
Data Type
I/O
Req
Purpose
szErrorMesssageID[11]
DTAI
JCHAR
I/O
Y
Choose Error Code with &1
mnErrorCode
MATH06
MATH_NUMERIC
O
szSustituionText1[41]
DSCA
JCHAR
I
Any value which is shorter than 40 characters
szSustituionText2[41]
DSCA
JCHAR
I
szSustituionText3[41]
DSCA
JCHAR
I
szSustituionText4[41]
DSCA
JCHAR
I
szSustituionText5[41]
DSCA
JCHAR
I
Detail Routine:
Look for Error ID which has variable &1
SubstitutionText1 to 5 is optional so depends on your business requirement you may populate it
Implementation
Example (Interactive Application - P4824 Burden Information)
F00095 Reserve Object VA frm_szRcdResObjectID_PID -> BF szNameObject SL UserID -> BF szUserId "1" -> BF cSuppressErrorMessage VA frm_szRecordReserveErrMsg_DTAI <- BF szErrorMessageID VA frm_szReserversNameAlpha_ALPH <- BF szReserversNameAlpha VA frm_szRecordResKey_GENKEY -> BF szGenericKey VA frm_szUniqueIDRRString_GENKEY -> BF szApplication
Text Substitution Error "189E" -> BF szErrorMessageID VA frm_szReserversNameAlpha_ALPH -> BF szSubstitutionText1 VA frm_szRecordResKey_GENKEY -> BF szSubstitutionText2
Note:
Error ID (DD Alias) TEXTSUB is good example to implement this business function
This function enable you to populate up to 5 parameters
Each parameter returns value to &1, &2, &3, &4 and &5
So depends on the error code you have chosen the number of parameter can be vary
IMPORTANT: This function is to stop users from processing a certain transaction. So the error will be remained till you close the opened form. For this reason, this function can not be used to indicate correction of certain information in opened form.
B4207010 - TextSubstitutionErrorForMultLine (Text Substitution Error with Error Mapping)
Purpose: This business function is to describe how &1 and &2 can be utilized which is defined in Generic Text message for DD alias 42B6. Though this business function can be used in different purpose, actual implementation is limitted at this moment.
Error Code (DD Alias): 42B6 with description "Promotional Item Assigned"
Parameter
Data Structure: D4207010 - Text Substitution Error with Error Mapping
Parameter Name
Data Item
Data Type
I/O
Req
Purpose
szErrorMessageID[11]
DTAI
JCHAR
I
Y
42B6
mnErrorCode
MATH06
MATH_NUMERIC
O
N/A
szSubstitutionText1[41]
DSCA
JCHAR
I
&1
szSubstitutionText2[41]
DSCA
JCHAR
I
&2
szSubstitutionText3[41]
DSCA
JCHAR
I
&3
szSubstitutionText4[41]
DSCA
JCHAR
I
&4
szSubstitutionText5[41]
DSCA
JCHAR
I
&5
szItemNumber
UITM
JCHAR
I
To indicate specific cell value for error
szGenericText1[31]
DESC
JCHAR
N/A
szGenericText2[31]
DESC
JCHAR
N/A
szGenericCharacter1
EV01
JCHAR
N/A
szGenericCharacter2
EV01
JCHAR
N/A
szGenericMath1
MATH01
MATH_NUMERIC
N/A
szGenericMath2
MATH01
MATH_NUMERIC
N/A
Detail Routine:
Look for Error Code which have variable &1, &2 and so on in Generic Text Message
This function is currently limitted usage for P4210 to handle promotional item
This warning messsage will be issued when substitute item is promotional item for orders which is not direct ship or transfer order Promotional Item Assigned
Generic Text for Error Code 42B6 (Content of the error message):-
Item &1 has been replaced by item &2. Item &2 is a promotional item for item &1.
Implementation
Example 1 (Interactive Application - P4210 - Sales Order Entry)
Text Substitution Error For Multiple Lines "42B6" -> BF szErrorMessageID GC Item Number -> BF szSubstitutionText1 GB Item Number -> BF szSubstitutionText2 GC Item Number -> BF szItemNo
Below section is to describe possible way to implement callmap based on existing routines in EnterpriseOne. Note that proficient programming knowledge may be required to implement this properly.
Example of CALLMAP: Business Scenario: When the flag F03012.porq (Customer PO Required (Y/N)) flag is on in Billing Information Customer PO (F4201.vr01) has to be populated and Customer's PO Number has to be unique otherwise error code '2597 - WARNING: Duplicate Customer Order Number) to show warning message is to be issued on screen of P4210.
For this scenario, P4210 - Sales Order Entry | ---- F4211FSBeginDoc (B4200310 - F4211 Begin Document) | --- VerifyCustomerPONumberIsUnique (B4200130 - Customer PO Number, Verify for Uniqueness) For this example, error determined by 2nd Level Business Function (B4200130) has to return value to the 1st level calling business function B4200310 which in return error code '2597' on the screen. This is a typical needs for ErrorMap (or CallMap).
*** Break In Code in B4200310 - F4211FSBeginDoc ***
D. Explanation
The 23rd parameter of B4200310.h is IDERRszReference_23 is a pointer to szReference[26] in B4200310 - F4211FSBeginDoc routine
The 1st parameter of B4200130.h is IDERRszCustomerPONumber_1 a pointer to szCustomerPONumber [26]
Data Structure of F4211FSBeginDoc is DSD4200310H
For CALLMAP array, the 1st parameter of called BSFN B4200130 is assigned to the 23rd parameter of B4200310
Data Structure of B4200130 is defined as DSD4200130
If input from application P4210 szReference (as FC Reference value is assigned to F4211FSBeginDoc)
In calling jdeCallObject() API data structure pointer &dsD4200130 is used
(LPCALLMAP) is used as defined at 4 (&clmp)
Since Error Map is defined in 7, the integer value for nNumMap (or nErrorMap) is defined as 1
Based on cErrorCode in called routine B4200130 which repeats in calling routine B4200130. idErrorFlag value 1 is to indicate the error level is warning not error (which is value 2)
Note: This routine is simplified routine to explain Error Map or Call Map so actual code can be different from this example