How to Implement User Reserved Column in P4314

Title: How to add User Reserved columns in P4314 – Voucher Match

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.


Table of Contents

Introduction
User Interface

Action Plan

Example of Implementation

 


Introduction

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,

  1. The business View for both Header and Detail are same with target tables you want to insert/update
  2. In running application it calls Master Business Functions directly :

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.

Back to Top

User Interface

This will describe simple and standard functionality based on 3-Way voucher match (which detail information is coming from F43121 – Purchase Order Receiver File). Through the transaction it will update the files (Purchase Order Detail, and Purchase Order Receiver file) and creates a single record into F0411 – Account Payable Ledger. Therefore the relationship between A/R Ledger to PO Receipt will be 1 to many.

1.    Launch ‘Match Voucher to Open Receipt’ P0411/W0411G – [Supplier Ledger Inquiry]

2.    In clicking ADD button, P4314/W4314A – [Voucher Match] is called depending on the processing option set in P0411. Note that the data for F0411 is determined at Header Level

3.    Populate Header Information and (Form Exit) Receipt To Match to call P4314/W4314B – [Select Receipt To Match]

4.    Select (multiple grid) and click OK. At this level, cache (it does not write physical file) of F4314Z – Voucher Match Selection File to display selected receipt (of F43121) into Grid of W4314A – [Voucher Match]

5.    Now Header and Detail information in W4314A get populated. To validate and commit the data, click the OK button

Action Plan

 

 

  1. Modify source business view of V4314ZA – Voucher Match Workfile Browse. Note that since F4314Z is an empty table and it does not deliver data through Business View. Columns can be added using Data Dictionary Item (not Business View Columns)
  2. Add additional Grid Column (to handle multiple rows with different information) controls in W4314A
  3. Add additional parameters into Data Structure of DXT4314ZB – F4314 Edit Line
  4. Verify that the change made in DXT4314ZB affect XT4314ZN.h file correctly
  5. Modify event rule of W4314A in clicking OK button
  6. Modify business function of XT4314Z2 to assign User Input value

 

 

Possible Implementation

  1. Modify source business view of V4314ZA – Voucher Match Workfile Browse. Note that since F4314Z is empty table and it does not deliver data through Business View. Columns can be added using Data Dictionary item (not Business View Columns).

Then generate it to synchronize Business View specification between JDE and Database

 

 

 

 

 

 

 

 

 

 

 

 

  1. Add additional Controls in W4314A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  1. Add additional parameters into Data Structure of DXT4314ZB – F4314 Edit Line

à 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’

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  1. Verify that the change made in DXT4314ZB affect XT4314ZN.h file correctly

 

*** 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

 

 

 

 

 

 

 

 

 

 

 

  1. Modify event rule of W4314A in (Grid) Row Exit & Changed - Asynch

à If XT4314ZN get called multiple times, repeat mapping

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  1. Modify business function of XT4314Z2 to assign User Input value

è 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 ***

  1. Compile XT4314Z2 (run BusBuild.exe)

 

  1. Test it

 

 

 

 

 

 

Back to Top

 

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) 

 

Back to Top