Abstract: This
document is to explain how User Reserved Columns can be added into F0411 –
Account Payable Ledger through P4314 Voucher Match application
This is just example code so actual implementation may
vary.
Caution: This
document may contain information, software, products or services which are not
supported by Oracle Support Services and are being provided ‘as is’ without
warranty. Please refer to the following site for My Oracle Support Terms of
Use: https://support.oracle.com/CSP/ui/TermsOfUse.html
Before implementing ensure that a back-up
of all the objects to be modified has been run.
Introduction
User
Interface
Action Plan
Example
of Implementation
The given columns/controls in P4314 –
Voucher Match may not be sufficient to hold information for your daily
business.
Unlike other major applications (e.g P4210 Sales Order Entry, P4310 Purchase Order Entry, or
P4312 Purchase Order Receipt) P4314 Voucher Match has a unique structure in
dealing with data.
In major application in Distribution
module, it handles data as below,
n
Call
F0411FSBeginDoc at header level to initialize/validate header information
n Call F0411FSEditLine at Grid to validate
Grid Data and store it into Cache
n Call F0411FSEndDoc at OK button clicked
to commit cache to table F0411 – Account Payable Ledger
But in P4314, Business Function B0400047
- F0411FSEditLine is not called directly rather it gets called through XT4314Z2
– F4314EditLineInternalFunctions and the business view is defined at F4314Z
which is a temporary/work file in matching voucher.
Then generate
it to synchronize Business View specification between JDE and Database
à
This is to change Data Structure of standard business function so the impact is
huge
à
Unless you know
object management cycle do not change this
à
If you do not handle this properly you may get ‘Memory Violation’
*** Break In
Code of XT4314ZN.h ***
#ifndef DATASTRUCTURE_DXT4314ZB
#define DATASTRUCTURE_DXT4314ZB
typedef struct tagDSDXT4314ZB
{
MATH_NUMERIC
mnAPJobNumber;
MATH_NUMERIC
mnGLJobNumber;
MATH_NUMERIC mnPOJobNumber;
JCHAR szComputerID[16];
MATH_NUMERIC
mnWorkFileLineNumber;
…
JCHAR
szUserReserveCode[4];
JDEDATE
jdUserReservedDate;
MATH_NUMERIC
mnUserReservedAmount;
MATH_NUMERIC
mnUserReservedNumber;
JCHAR
szUserReservedReference[16];
} DSDXT4314ZB, *LPDSDXT4314ZB;
#define IDERRmnAPJobNumber_1 1L
#define
IDERRmnGLJobNumber_2
2L
#define IDERRmnPOJobNumber_3 3L
#define IDERRszComputerID_4 4L
#define IDERRmnWorkFileLineNumber_6 6L
…
#define IDERRszUserReserveCode_93 145L
#define IDERRjdUserReservedDate_94 146L
#define IDERRmnUserReservedAmount_95 147L
#define IDERRmnUserReservedNumber_96 148L
#define
IDERRszUserReservedReference_97
149L
#endif
NOTE: The number of columns can be vary per E1 Release
*** Break In
Code of XT4314ZN.h ***
n Typedef DXT4314ZB through OMW to copy
typedef of DSDXT4314ZB to clipboard
n Paste it to notepad
n Open XT4314ZN.h and look for typedef
struct tagDSDXT4314ZB
n Replace it
à
If XT4314ZN get called multiple times, repeat mapping
è
Repeat
this every where F0422FSEditLine gets called in XT4314Z2.c
*** Break Code
of XT4314Z2 ***
/* Oracle Testing for User
Reserved Columns */
jdeStrcpy((JCHAR
*) (dsAPEditLine.szUserReserveCode),
(const JCHAR *)(lpDS->szUserReservedCode));
memcpy((void
*)(&dsAPEditLine.jdUserReservedDate),(const void *)
(&lpDS->jdUserReservedDate),
sizeof(JDEDATE));
MathCopy(&dsAPEditLine.mnUserReservedAmount,
&lpDS.mnUserReservedAmount );
MathCopy(&dsAPEditLine.mnUserReservedNumber,
&lpDS.mnUserReservedNumber );
jdeStrcpy((JCHAR
*) (dsAPEditLine.szUserReservedReference), (const JCHAR *)(lpDS->szUserReservedReference));
NOTE: Standard
Code has typo it is szUserReserveCode not szUserReservedCode
if ((lpDS->cVoucherLogging != _J('1'))
&& (idReturnValue!= ER_ERROR))
{
idReturnValue
= jdeCallObject(_J("F0411FSEditLine"),
NULL ,
lpBhvrCom,
lpVoid,
(LPVOID)
&dsAPEditLine,
(CALLMAP
*) &cmAPError,
(int)
nNumErrAP,
(JCHAR
*)NULL,
(JCHAR
*)NULL,
(int)0);
}
***
Break In Code ***
n For this example, lpDS is value which
user has input and dsAPEditLine is the data structure in calling
F0411FSEditLine
n If there are more than one B0400047
calling above mapping have to be repeated
Alternatively,
User Reserved Data can be stored in calling form of W4314B – [Receipt to Match]
with Data Structure of DSD4302450A dsVMCache;
This
can be performed as below,
***
Break Code of XT4314Z2 ***
/* Oracle Testing for User Reserved
Columns */
NOTE: Below code is valid when User Reserved Columns are populated
in Order Detail or
Receipt Detail Screen
jdeStrcpy((JCHAR *) (dsAPEditLine.szUserReservedCode),
(const JCHAR *)(dsVMCache->szUserReservedCode));
memcpy((void
*)(&dsAPEditLine.jdUserReservedDate),(const void *)
(&dsVMCache->jdUserReservedDate),
sizeof(JDEDATE));
MathCopy(&dsAPEditLine.mnUserReservedAmount,
&dsVMCache.mnUserReservedAmount );
MathCopy(&dsAPEditLine.mnUserReservedNumber,
&dsVMCache.mnUserReservedNumber );
jdeStrcpy((JCHAR *) (dsAPEditLine.szUserReservedReference),
(const JCHAR *)(dsVMCache.szUserReservedReference));
if ((dsVMCache->cVoucherLogging !=
_J('1')) && (idReturnValue!= ER_ERROR))
{
idReturnValue =
jdeCallObject(_J("F0411FSEditLine"),
NULL ,
lpBhvrCom,
lpVoid,
(LPVOID)
&dsAPEditLine,
(CALLMAP
*) &cmAPError,
(int)
nNumErrAP,
(JCHAR
*)NULL,
(JCHAR
*)NULL,
(int)0);
}
***
Break In Code ***
E1: FDA: Object
Modification Recommendations: Interactive Applications (Doc ID 626586.1)
E1: BSFN:
Object Modification Recommendations: Business Functions (Doc ID 626581.1)
E1: FDA: Object
Modification Recommendations: Data Structures (Doc ID 626584.1)
E1: FDA: Object
Modification Recommendations: Event Rules (Doc ID 626585.1)
E1: RDA: Object
Modification Recommendations: Reports - UBEs (Doc ID 626587.1)
E1: TDA: Object
Modification Recommendations: Business Views (Doc ID 626582.1)