JD Edwards

JD Edwards
Lokesh Reddy Blog

Wednesday, October 11, 2017

Non-JDE WIndows FTP File Deletion from JDE using Batch File

FTP File Deletion 
Listing Named ER for Function: FTPFileDeletion
Listing of ER for Named ER: N5601001


=======================================================================
NAMED ER:
=======================================================================
evt_HEIszFTPFileName_VAR1
evt_HEIszFTPRecord_VAR1
evt_HEIidGenericLong_VAR1
OPT: Using Defaults
// **************************************************************
// Added Logic for FTP File Deletion
// By Lokesh on 9/10/2017
// **************************************************************
VA evt_HEIszFTPFileName_VAR1 = concat(ltrim(rtrim([BF HEIszE1ServerPath_NFLF],' '),' '),concat(concat("/",rtrim(ltrim([BF HEIszCommandFileName_FILENAME],' '),' ')),".bat"))
Replace Character in String
   VA evt_HEIszFTPFileName_VAR1 -> BF szInputString
   VA evt_HEIszFTPFileName_VAR1 <- BF szOutputString
   "/" -> BF cReplCharOld
   "\" -> BF cReplCharNew
Open Flat File
   BF HEIcErrorCode <- BF cErrorCode
   VA evt_HEIidGenericLong_VAR1 <- BF idFilePtr
   VA evt_HEIszFTPFileName_VAR1 -> BF szFilePath
//
If VA evt_HEIidGenericLong_VAR1 is greater than <Zero>
   //
   VA evt_HEIszFTPRecord_VAR1 = "@echo off"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_VAR1 -> BF idFilePtr
      VA evt_HEIszFTPRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszFTPRecord_VAR1 = "echo user svcbase.ftp01> ftpcmd.dat"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_VAR1 -> BF idFilePtr
      VA evt_HEIszFTPRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszFTPRecord_VAR1 = "echo Heineken1122>> ftpcmd.dat"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_VAR1 -> BF idFilePtr
      VA evt_HEIszFTPRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszFTPRecord_VAR1 = "echo bin>> ftpcmd.dat"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_VAR1 -> BF idFilePtr
      VA evt_HEIszFTPRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszFTPRecord_VAR1 = concat("echo cd ",concat(ltrim(rtrim([BF HEIszFTPServerPath_NFLF],' '),' ')," >>ftpcmd.dat"))
   Write One Line To Flat File
      VA evt_HEIidGenericLong_VAR1 -> BF idFilePtr
      VA evt_HEIszFTPRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszFTPRecord_VAR1 = concat("echo delete ",concat(ltrim(rtrim([BF HEIszCommandFileName_FILENAME],' '),'')," >>ftpcmd.dat"))
   Replace Character in String
      VA evt_HEIszFTPRecord_VAR1 -> BF szInputString
      VA evt_HEIszFTPRecord_VAR1 <- BF szOutputString
      "/" -> BF cReplCharOld
      "\" -> BF cReplCharNew
   Write One Line To Flat File
      VA evt_HEIidGenericLong_VAR1 -> BF idFilePtr
      VA evt_HEIszFTPRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszFTPRecord_VAR1 = "echo quit>> ftpcmd.dat"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_VAR1 -> BF idFilePtr
      VA evt_HEIszFTPRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszFTPRecord_VAR1 = "ftp -n -s:ftpcmd.dat 10.12.66.17"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_VAR1 -> BF idFilePtr
      VA evt_HEIszFTPRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszFTPRecord_VAR1 = "del ftpcmd.dat"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_VAR1 -> BF idFilePtr
      VA evt_HEIszFTPRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   //
   Close Flat File
      VA evt_HEIidGenericLong_VAR1 -> BF idFilePtr
   //
   Execute External Program
      BF HEIcErrorCode <- BF cErrorCode
      VA evt_HEIszFTPFileName_VAR1 -> BF szCommandLine
   //
!    Time to sleep
!       "15000" -> BF szSleepTimeString
   Delete Or Copy Flat File
      VA evt_HEIszFTPFileName_VAR1 -> BF szOriginalFlatFile
      "1" -> BF cActionOnFlatFiles
End If
// **************************************************************
// Added Logic for FTP File Deletion
// By Lokesh on 9/10/2017
// **************************************************************

File Transfer From JDE Winows Server to Non-JDE WIndows Server(FTP) using Batch File

File Transfer From JDE Winows Server to Non-JDE WIndows Server(FTP)
Description :This Business Function is developed using the FTP Windows Scripting using Batch File. Will create the file with windows command and transfer the file by excuting the batch file.
Listing Named ER for Function: FileTransferJDEToFTP
Listing of ER for Named ER: N5601001


=======================================================================
NAMED ER:
=======================================================================
evt_HEIcErrorCode_ERRC
evt_HEIidGenericLong_GENLNG
evt_HEIszBatFileRecord_VAR1
evt_HEIszBatFileName_NFLF
evt_HEIwasFound_EV01
OPT: Using Defaults
// ********************************************************************
// Developer   Prjct             Start Date
// Lokehs Vedium  FTP    04/08/2017
// Desc : NER will copy the file from FTP Local Server to E1 Server
// ********************************************************************
VA evt_HEIszBatFileName_NFLF = concat(ltrim(rtrim([BF HEIszE1ServerPath_NFLF],' '),' '),concat(concat("/",rtrim(ltrim([BF HEIszCommandFileName_FILENAME],' '),' ')),".bat"))
Replace Character in String
   VA evt_HEIszBatFileName_NFLF -> BF szInputString
   VA evt_HEIszBatFileName_NFLF <- BF szOutputString
   "/" -> BF cReplCharOld
   "\" -> BF cReplCharNew
Open Flat File
   VA evt_HEIcErrorCode_ERRC <- BF cErrorCode
   VA evt_HEIidGenericLong_GENLNG <- BF idFilePtr
   VA evt_HEIszBatFileName_NFLF -> BF szFilePath
//
If VA evt_HEIidGenericLong_GENLNG is greater than <Zero>
   //
   VA evt_HEIszBatFileRecord_VAR1 = "@echo off"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   //
   VA evt_HEIszBatFileRecord_VAR1 = concat(concat("copy ",concat(ltrim(rtrim([BF HEIszE1ServerPath_NFLF],' '),' '),concat("/",rtrim(ltrim([BF HEIszCommandFileName_FILENAME],' '),' '))))," c:/Temp")
   Replace Character in String
      VA evt_HEIszBatFileRecord_VAR1 -> BF szInputString
      VA evt_HEIszBatFileRecord_VAR1 <- BF szOutputString
      "/" -> BF cReplCharOld
      "\" -> BF cReplCharNew
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   VA evt_HEIszBatFileRecord_VAR1 = "echo user svcbase.ftp01> ftpcmd.dat"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszBatFileRecord_VAR1 = "echo Heineken1122>> ftpcmd.dat"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszBatFileRecord_VAR1 = "echo bin>> ftpcmd.dat"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszBatFileRecord_VAR1 = concat("echo cd ",concat(ltrim(rtrim([BF HEIszFTPServerPath_NFLF],' '),' ')," >>ftpcmd.dat"))
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszBatFileRecord_VAR1 = concat("echo put c:/Temp/",concat(ltrim(rtrim([BF HEIszCommandFileName_FILENAME],' '),'')," >>ftpcmd.dat"))
   Replace Character in String
      VA evt_HEIszBatFileRecord_VAR1 -> BF szInputString
      VA evt_HEIszBatFileRecord_VAR1 <- BF szOutputString
      "/" -> BF cReplCharOld
      "\" -> BF cReplCharNew
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszBatFileRecord_VAR1 = "echo quit>> ftpcmd.dat"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszBatFileRecord_VAR1 = "ftp -n -s:ftpcmd.dat 10.12.66.17"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszBatFileRecord_VAR1 = "del ftpcmd.dat"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszBatFileRecord_VAR1 = concat("del c:/Temp/",ltrim(rtrim([BF HEIszCommandFileName_FILENAME],' '),' '))
   Replace Character in String
      VA evt_HEIszBatFileRecord_VAR1 -> BF szInputString
      VA evt_HEIszBatFileRecord_VAR1 <- BF szOutputString
      "/" -> BF cReplCharOld
      "\" -> BF cReplCharNew
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   Close Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
   //
   Execute External Program
      BF HEIcErrorCode <- BF cErrorCode
      VA evt_HEIszBatFileName_NFLF -> BF szCommandLine
   //
   Time to sleep
      "15000" -> BF szSleepTimeString
   Delete Or Copy Flat File
      VA evt_HEIszBatFileName_NFLF -> BF szOriginalFlatFile
      "1" -> BF cActionOnFlatFiles
Else
End If
// **************************************************************

NER to Transfer File From Non-JDE WIndows Server(FTP) to JDE Windows Server using Batch File


File Transfer From Non-JDE WIndows Server(FTP) to JDE Winows Server: 
Description :This Business Function is developed using the FTP Windows Scripting using Batch File. Will create the file with windows command and transfer the file by excuting the batch file.
Listing Named ER for Function: FileTransferFTPToJDE
Listing of ER for Named ER: N5601001


=======================================================================
NAMED ER:
=======================================================================
evt_HEIidGenericLong_GENLNG
evt_HEIszBatchFileRecord_VAR1
evt_HEIcErrorCode_ERRC
evt_HEIszBatFileNamePath_NFLF
OPT: Using Defaults
// ****************************************************************
// HEI Modification History
// Buisness Function to copy File From FTP to JDE (Inbound) using the Shell
// Scripting
// Developer                   Prjct    Date
// Lokesh Vedium        FTP       02/08/2017
// ****************************************************************
VA evt_HEIszBatFileNamePath_NFLF = concat(ltrim(rtrim([BF HEIszE1ServerPath_NFLF],' '),' '),concat(concat("/",rtrim(ltrim([BF HEIszCommandFileName_FILENAME],' '),' ')),".bat"))
Replace Character in String
   VA evt_HEIszBatFileNamePath_NFLF -> BF szInputString
   VA evt_HEIszBatFileNamePath_NFLF <- BF szOutputString
   "/" -> BF cReplCharOld
   "\" -> BF cReplCharNew
Open Flat File
   VA evt_HEIcErrorCode_ERRC <- BF cErrorCode
   VA evt_HEIidGenericLong_GENLNG <- BF idFilePtr
   VA evt_HEIszBatFileNamePath_NFLF -> BF szFilePath
//
If VA evt_HEIidGenericLong_GENLNG is greater than <Zero>
   //
   VA evt_HEIszBatchFileRecord_VAR1 = "@echo off"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatchFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszBatchFileRecord_VAR1 = "echo user svcbase.ftp01> ftpcmd.dat"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatchFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszBatchFileRecord_VAR1 = "echo Heineken1122>> ftpcmd.dat"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatchFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszBatchFileRecord_VAR1 = "echo bin>> ftpcmd.dat"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatchFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszBatchFileRecord_VAR1 = concat("echo cd ",concat(ltrim(rtrim([BF HEIszFTPServerPath_NFLF],' '),' ')," >>ftpcmd.dat"))
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatchFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszBatchFileRecord_VAR1 = "echo lcd c:/Temp >>ftpcmd.dat"
   Replace Character in String
      VA evt_HEIszBatchFileRecord_VAR1 -> BF szInputString
      VA evt_HEIszBatchFileRecord_VAR1 <- BF szOutputString
      "/" -> BF cReplCharOld
      "\" -> BF cReplCharNew
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatchFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszBatchFileRecord_VAR1 = concat("echo get ",concat(ltrim(rtrim([BF HEIszCommandFileName_FILENAME],' '),''),">>ftpcmd.dat"))
   Replace Character in String
      VA evt_HEIszBatchFileRecord_VAR1 -> BF szInputString
      VA evt_HEIszBatchFileRecord_VAR1 <- BF szOutputString
      "/" -> BF cReplCharOld
      "\" -> BF cReplCharNew
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatchFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszBatchFileRecord_VAR1 = "echo quit>> ftpcmd.dat"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatchFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszBatchFileRecord_VAR1 = "ftp -n -s:ftpcmd.dat 10.12.66.17"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatchFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszBatchFileRecord_VAR1 = "del ftpcmd.dat"
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatchFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszBatchFileRecord_VAR1 = concat("copy ",concat("c:/Temp",concat("/",concat(rtrim(ltrim([BF HEIszCommandFileName_FILENAME],' '),' '),concat(" ",ltrim(rtrim([BF HEIszE1ServerPath_NFLF],' '),' '))))))
   Replace Character in String
      VA evt_HEIszBatchFileRecord_VAR1 -> BF szInputString
      VA evt_HEIszBatchFileRecord_VAR1 <- BF szOutputString
      "/" -> BF cReplCharOld
      "\" -> BF cReplCharNew
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatchFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   VA evt_HEIszBatchFileRecord_VAR1 = concat("del c:/Temp/",ltrim(rtrim([BF HEIszCommandFileName_FILENAME],' '),' '))
   Replace Character in String
      VA evt_HEIszBatchFileRecord_VAR1 -> BF szInputString
      VA evt_HEIszBatchFileRecord_VAR1 <- BF szOutputString
      "/" -> BF cReplCharOld
      "\" -> BF cReplCharNew
   Write One Line To Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
      VA evt_HEIszBatchFileRecord_VAR1 -> BF szRecord
      "1500" -> BF szLargeString
   //
   Close Flat File
      VA evt_HEIidGenericLong_GENLNG -> BF idFilePtr
   //
   Execute External Program
      BF HEIcErrorCode <- BF cErrorCode
      VA evt_HEIszBatFileNamePath_NFLF -> BF szCommandLine
   //
   Time to sleep
      "15000" -> BF szSleepTimeString
   Delete Or Copy Flat File
      VA evt_HEIszBatFileNamePath_NFLF -> BF szOriginalFlatFile
      "1" -> BF cActionOnFlatFiles
End If

Thursday, October 20, 2016

C Business Function For Subsystem Job.



Header File:
/*****************************************************************************
 *    Header File:  B5642pic.h
 *
 *    Description:  Sub System C BSFN Source File
 *
 *        History:
 *          Date        Programmer  SAR# - Description
 *          ----------  ----------  -------------------------------------------
 *   Author 29/09/16    Unkno       Unknown  - Created 
 *
 *
 * Copyright (c) J.D. Edwards World Source Company, 1996
 *
 * This unpublished material is proprietary to J.D. Edwards World Source 
 * Company.  All rights reserved.  The methods and techniques described 
 * herein are considered trade secrets and/or confidential.  Reproduction
 * or distribution, in whole or in part, is forbidden except by express
 * written permission of J.D. Edwards World Source Company.
 ****************************************************************************/

#ifndef __B5642PIC_H
#define __B5642PIC_H

/*****************************************************************************
 * Table Header Inclusions
 ****************************************************************************/
#include <r5642pil.h>
/*****************************************************************************
 * External Business Function Header Inclusions
 ****************************************************************************/

/*****************************************************************************
 * Global Definitions
 ****************************************************************************/

/*****************************************************************************
 * Structure Definitions
 ****************************************************************************/

/*****************************************************************************
 * DS Template Type Definitions
 ****************************************************************************/
/*****************************************
* TYPEDEF for Data Structure
*    Template Name: Sub System C BSFN
*    Template ID:   D5642PIC
*    Generated:     Mon Oct 10 13:33:09 2016
*
* DO NOT EDIT THE FOLLOWING TYPEDEF
*    To make modifications, use the OneWorld Data Structure
*    Tool to Generate a revised version, and paste from
*    the clipboard.
*
**************************************/

#ifndef DATASTRUCTURE_D5642PIC
#define DATASTRUCTURE_D5642PIC

typedef struct tagDSD5642PIC
{
    MATH_NUMERIC      mnUserReservedAmount;
    MATH_NUMERIC      mnUserReservedNumber;
    JDEDATE           jdUserReservedDate;
    JCHAR             szVersionR5642PIL[11];
    JCHAR             cSubsystemQue;
    JCHAR             cSuppressErrorMessage;
    JCHAR             szErrorMessage[57];
    MATH_NUMERIC      mnWaveID;
    JCHAR             cRegularorSpecialWaveType;
    MATH_NUMERIC      mnNumberOfCases;
    JCHAR             cAutoOrOnDemand;
    JDEDATE           jdDateUpdated;
    MATH_NUMERIC      mnTimeLastUpdated;
} DSD5642PIC, *LPDSD5642PIC;

#define IDERRmnUserReservedAmount_2               2L
#define IDERRmnUserReservedNumber_3               3L
#define IDERRjdUserReservedDate_5                 5L
#define IDERRszVersionR5642PIL_6                  6L
#define IDERRcSubsystemQue_7                      7L
#define IDERRcSuppressErrorMessage_8              8L
#define IDERRszErrorMessage_9                     9L
#define IDERRmnWaveID_12                          12L
#define IDERRcRegularorSpecialWaveType_13         13L
#define IDERRmnNumberOfCases_14                   14L
#define IDERRcAutoOrOnDemand_15                   15L
#define IDERRjdDateUpdated_16                     16L
#define IDERRmnTimeLastUpdated_17                 17L

#endif

/*****************************************************************************
 * Source Preprocessor Definitions
 ****************************************************************************/
#if defined (JDEBFRTN)
    #undef JDEBFRTN
#endif

#if defined (WIN32)
    #if defined (WIN32)
        #define JDEBFRTN(r) __declspec(dllexport) r
    #else
        #define JDEBFRTN(r) __declspec(dllimport) r
    #endif
#else
    #define JDEBFRTN(r) r
#endif

/*****************************************************************************
 * Business Function Prototypes
 ****************************************************************************/
 JDEBFRTN (ID) JDEBFWINAPI SubSytemJobsCustom               (LPBHVRCOM lpBhvrCom, LPVOID lpVoid, LPDSD5642PIC lpDS);

/*****************************************************************************
 * Internal Function Prototypes
 ****************************************************************************/

#endif    /* __B5642PIC_H */

Source File:
#include <jde.h>

#define b5642pic_c


/*****************************************************************************
 *    Source File:  b5642pic
 *
 *    Description:  Sub System C BSFN Source File
 *
 *        History:
 *          Date        Programmer  SAR# - Description
 *          ----------  ----------  -------------------------------------------
 *   Author 05/10/16    Unkno       Unknown  - Created  
 *
 * Copyright (c) J.D. Edwards World Source Company, 1996
 *
 * This unpublished material is proprietary to J.D. Edwards World Source Company.
 * All rights reserved.  The methods and techniques described herein are
 * considered trade secrets and/or confidential.  Reproduction or
 * distribution, in whole or in part, is forbidden except by express
 * written permission of J.D. Edwards World Source Company.
 ****************************************************************************/
/**************************************************************************
 * Notes:
 *
 **************************************************************************/

#include <b5642pic.h>


/**************************************************************************
 *  Business Function:  SubSytemJobsCustom
 *
 *        Description:  Sub System Jobs Custom
 *
 *         Parameters:
 *           LPBHVRCOM           lpBhvrCom    Business Function Communications
 *           LPVOID              lpVoid       Void Parameter - DO NOT USE!
 *           LPDSD564            lpDS         Parameter Data Structure Pointer  
 *
 *************************************************************************/

JDEBFRTN (ID) JDEBFWINAPI SubSytemJobsCustom (LPBHVRCOM lpBhvrCom, LPVOID lpVoid, LPDSD5642PIC lpDS) 

{
   /************************************************************************
    *  Variable declarations
    ************************************************************************/
    ID          idReturnValue      = ER_SUCCESS;     /* Return Code  */
    ID          idJDEDBReturn      = JDEDB_PASSED;   /* DB API Return Code */
    ID            idReturnValue2       = ER_SUCCESS;     /* Return Code  */
    HUSER       hUser              = (HUSER) NULL;  
    JCHAR       szErrorID[11]      = _J(" ");                 /* Error Message ID */
   /************************************************************************
    * Declare structures
    ************************************************************************/
    DSRIR5642PIL ds5642pil = {0};  /* Location Selection DS */
   /************************************************************************
    * Declare pointers
    ************************************************************************/

   /************************************************************************
    * Check for NULL pointers
    ************************************************************************/
   if ((lpBhvrCom == (LPBHVRCOM) NULL) ||
       (lpVoid    == (LPVOID)    NULL) ||
       (lpDS      == (LPDSD5642PIC)    NULL))
   {
     jdeErrorSet (lpBhvrCom, lpVoid, (ID) 0, _J("4363"), (LPVOID) NULL);
     return ER_ERROR;
   }
    /************************************************************************
    *Intitialize Behavior Routine
    ************************************************************************/

   idJDEDBReturn = JDB_InitBhvr((void *)lpBhvrCom, &hUser, (JCHAR *) NULL, JDEDB_COMMIT_AUTO);

   if (idJDEDBReturn != JDEDB_PASSED)
   {
       jdeErrorSet(lpBhvrCom, lpVoid, (ID) 0, _J("3143"), (LPVOID) NULL);
       return ER_ERROR;
   }

   /************************************************************************
    * Set pointers
    ************************************************************************/

   /************************************************************************
    * Main Processing
    ************************************************************************/
    /* Initialize Error ID to blank */

   jdeStrcpy((JCHAR *)(szErrorID), (const JCHAR *)(_J("    ")));

   if ( lpDS->cSubsystemQue  == _J('2') )
   {
      
      memset((void *)(&ds5642pil),(int)(_J('\0')), sizeof(DSRIR5642PIL));
      MathCopy (&ds5642pil.mnWaveID, &lpDS->mnWaveID);
      MathCopy (&ds5642pil.mnNumberOfCases, &lpDS->mnNumberOfCases);
      ds5642pil.cRegularorSpecialWaveType = lpDS->cRegularorSpecialWaveType;
      ds5642pil.cAutoOrOnDemand = lpDS->cAutoOrOnDemand;
      if ((MathZeroTest(&ds5642pil.mnUserReservedNumber)))
      {
        MathCopy (&ds5642pil.mnUserReservedNumber, &lpDS->mnUserReservedNumber);
      }
      if ((MathZeroTest(&ds5642pil.mnUserReservedAmount)))
      {
        MathCopy (&ds5642pil.mnUserReservedAmount, &lpDS->mnUserReservedAmount);
      }
      MathCopy (&ds5642pil.mnTimeLastUpdated, &lpDS->mnTimeLastUpdated);
      memcpy((void *)(&ds5642pil.jdUserReservedDate),
                (const void *)(&lpDS->jdUserReservedDate),
                sizeof(JDEDATE));
       memcpy((void *)(&ds5642pil.jdDateUpdated),
                (const void *)(&lpDS->jdDateUpdated),
                sizeof(JDEDATE));
       
   
       if (IsStringBlank(lpDS->szVersionR5642PIL))
       {
           jdeStrcpy((JCHAR *) (lpDS->szVersionR5642PIL), (const JCHAR *)(_J("PARSO00001")));
       }

       idReturnValue2 = ubeReport_AddSubsystemRecord (hUser,        /*User Handle*/
                       _J("R5642PIL"),                            /*Name of Subsyste*/
                       lpDS->szVersionR5642PIL,                     /*Subsystem Version (modified 4/17/98)*/
                       NULL,                                /*Name of the Override Envir.  Not used */
                       NULL,                                /*Name of the Server*/
                       &ds5642pil);                            /*Subsystem Connect DS*/
                      
   }

   if(idReturnValue2 == 0)
   {
       idReturnValue = ER_ERROR;
       if (lpDS->cSuppressErrorMessage != _J('1'))
       {
         
           jdeErrorSet(lpBhvrCom, lpVoid, (ID) 0, _J("099R"), (LPVOID) NULL);
           jdeStrcpy((JCHAR *)(lpDS->szErrorMessage), (const JCHAR *)(_J("099R")));
       }
   }

  

   /************************************************************************
    * Function Clean Up
    ************************************************************************/

   return (ER_SUCCESS);
}

/* Internal function comment block */
/**************************************************************************
 *   Function:  Ixxxxxxx_a   // Replace "xxxxxxx" with source file number
 *                           // and "a" with the function name
 *      Notes:
 *
 *    Returns:
 *
 * Parameters:
 **************************************************************************/


Saturday, October 1, 2016

Business Function For Get Column Value From F03012 By Passing Alias

Description: Get Column Value From F03012 By Passing Alias

Header&Source File:

/*****************************************************************************
 *    Header File:  B5603012.h
 *
 *    Description:  GetColumnValuefromF03012 Header File
 *
 *        History:
 *          Date        Programmer  SAR# - Description
 *          ----------  ----------  -------------------------------------------
 *   Author 26/09/16    Lokesh Vedium      Unknown  - Created 
 *
 *
 * Copyright (c) J.D. Edwards World Source Company, 1996
 *
 * This unpublished material is proprietary to J.D. Edwards World Source 
 * Company.  All rights reserved.  The methods and techniques described 
 * herein are considered trade secrets and/or confidential.  Reproduction
 * or distribution, in whole or in part, is forbidden except by express
 * written permission of J.D. Edwards World Source Company.
 ****************************************************************************/

#ifndef __B5603012_H
#define __B5603012_H

/*****************************************************************************
 * Table Header Inclusions
 ****************************************************************************/
 #include <f03012.h>
/*****************************************************************************
 * External Business Function Header Inclusions
 ****************************************************************************/
 #include<b4700220.h>
/*****************************************************************************
 * Global Definitions
 ****************************************************************************/

/*****************************************************************************
 * Structure Definitions
 ****************************************************************************/

/*****************************************************************************
 * DS Template Type Definitions
 ****************************************************************************/
 /*****************************************
 * TYPEDEF for Data Structure
 *    Template Name: GetColumnValuefromF03012                                   
 *    Template ID:   D5603012
 *    Generated:     Mon Sep 26 20:32:27 2016
 *
 * DO NOT EDIT THE FOLLOWING TYPEDEF
 *    To make modifications, use the OneWorld Data Structure
 *    Tool to Generate a revised version, and paste from
 *    the clipboard.
 *
 **************************************/

#ifndef DATASTRUCTURE_D5603012
#define DATASTRUCTURE_D5603012

typedef struct tagDSD5603012
{
  JCHAR             szColumnName[11];                   
  MATH_NUMERIC      mnAddressNumber;                    
  JCHAR             szCompany[6];                       
  JCHAR             szColumnValue[37];                  
} DSD5603012, *LPDSD5603012;

#define IDERRszColumnName_1                       1L
#define IDERRmnAddressNumber_2                    2L
#define IDERRszCompany_3                          3L
#define IDERRszColumnValue_4                      4L

#endif

/*****************************************************************************
 * Source Preprocessor Definitions
 ****************************************************************************/
#if defined (JDEBFRTN)
    #undef JDEBFRTN
#endif

#if defined (WIN32)
    #if defined (WIN32)
        #define JDEBFRTN(r) __declspec(dllexport) r
    #else
        #define JDEBFRTN(r) __declspec(dllimport) r
    #endif
#else
    #define JDEBFRTN(r) r
#endif

/*****************************************************************************
 * Business Function Prototypes
 ****************************************************************************/
 JDEBFRTN (ID) JDEBFWINAPI GetColumnValuefromF03012         (LPBHVRCOM lpBhvrCom, LPVOID lpVoid, LPDSD5603012 lpDS);


/*****************************************************************************
 * Internal Function Prototypes
 ****************************************************************************/

#endif    /* __B5603012_H */

 #include <jde.h>

#define b5603012_c


/*****************************************************************************
 *    Source File:  b5603012
 *
 *    Description:  GetColumnValuefromF03012 Source File
 *
 *        History:
 *          Date        Programmer  SAR# - Description
 *          ----------  ----------  -------------------------------------------
 *   Author 26/09/16    Lokesh Vedium      Unknown  - Created  
 *
 * Copyright (c) J.D. Edwards World Source Company, 1996
 *
 * This unpublished material is proprietary to J.D. Edwards World Source Company.
 * All rights reserved.  The methods and techniques described herein are
 * considered trade secrets and/or confidential.  Reproduction or
 * distribution, in whole or in part, is forbidden except by express
 * written permission of J.D. Edwards World Source Company.
 ****************************************************************************/
/**************************************************************************
 * Notes:
 *
 **************************************************************************/

#include <b5603012.h>


/**************************************************************************
 *  Business Function:  GetColumnValuefromF03012
 *
 *        Description:  Get ColumnValue from F03012
 *
 *         Parameters:
 *           LPBHVRCOM           lpBhvrCom    Business Function Communications
 *           LPVOID              lpVoid       Void Parameter - DO NOT USE!
 *           LPDSD560            lpDS         Parameter Data Structure Pointer  
 *
 *************************************************************************/

JDEBFRTN (ID) JDEBFWINAPI GetColumnValuefromF03012 (LPBHVRCOM lpBhvrCom, LPVOID lpVoid, LPDSD5603012 lpDS) 

{
   /************************************************************************
    *  Variable declarations
    ************************************************************************/
    ID                idReturnCode            = ER_SUCCESS;   
    ID                idJDBReturn             = JDEDB_PASSED;
    ID                  idSelectSuccess          = ER_SUCCESS; 
     HUSER              hUser                = NULL;

    NID                  szTable              =  {0};   
    int               nNumSelect              =  0; 
    ID                idJDEDBResult        = JDEDB_PASSED;
    ID                   idJDEDBReturn = JDEDB_PASSED;
    HREQUEST               hRequestF03012=(HREQUEST)NULL;
   
    ID                idFetchResult        = JDEDB_PASSED;

    JCHAR            cValue            = _J('0');/*Temporary Character Value for Character Format */
    JCHAR            szTempCharValue[2];        /*Temporary Character Value for Character Format */
    JCHAR            szTemporaryValue[100];    /*Temporary Variable for String Format */
    MATH_NUMERIC    mnValue;                /*Temporary Variable for Math Numeric Value */
    JDEDATE            jdValue;                /*Temporary Variable for Date Format*/   
    JCHAR            szFormatMask[]    = _J("OSASR"); /* Format Mask for JDEDATE to string conversion*/
    MATH_NUMERIC    mnTempValue;            /*Temporary Math Numeric Value for Integer Format*/
    int                iValue            = 0;    /*Temporary Integer Value for Integer Format*/   
    ID                idValue            = (ID)NULL;/*Temporary Variable for Long Integer Format */
    long int        iDataItemSize    = 0;
    int                iDataType        = 0;
    int                iValueSize        = 36;/*Size of szAlphaValue */
    short           sNumberOfKeysF4101 = 6;

   /************************************************************************
    * Declare structures
    ************************************************************************/
    DBREF zDbRef = { 0 };
   

    KEY1_F03012        dsF03012Key;
    F03012            dsF03012;
    DSD4700220A        dsGetDataDictionaryInfo;

   /************************************************************************
    * Declare pointers
    ************************************************************************/
    LPVOID            pVoid = (LPVOID)NULL;
    LPCOLINFO        lpCol;
   /************************************************************************
    * Check for NULL pointers
    ************************************************************************/
   if ((lpBhvrCom == (LPBHVRCOM) NULL) ||
       (lpVoid    == (LPVOID)    NULL) ||
       (lpDS      == (LPDSD5603012)    NULL))
   {
     jdeErrorSet (lpBhvrCom, lpVoid, (ID) 0, _J("4363"), (LPVOID) NULL);
     return ER_ERROR;
   }

   /************************************************************************
    * Set pointers
    ************************************************************************/

   /************************************************************************
    * Main Processing
    ************************************************************************/
    idJDBReturn = JDB_InitBhvr(lpBhvrCom, &hUser, (JCHAR *)NULL, JDEDB_COMMIT_AUTO);
            if (idJDBReturn != JDEDB_PASSED)
            {
                jdeSetGBRError(lpBhvrCom, lpVoid, (ID) 0, _J("078S"));
                idReturnCode = ER_ERROR;
            }

            memset ((void *) &dsGetDataDictionaryInfo,(int) (_J('\0')), sizeof(DSD4700220A));   
        memset((void *)&zDbRef, (int)_J('\0'), sizeof(zDbRef));
        memset((void *)szTemporaryValue, (int)_J('\0'), sizeof(szTemporaryValue));
        memset((void *)&mnValue, (int)_J('\0'), sizeof(MATH_NUMERIC));
        memset((void *)(&jdValue),(int)(_J('\0')), sizeof(JDEDATE));
        ZeroMathNumeric(&mnTempValue);
           
             idJDEDBResult = JDB_OpenTable (hUser, NID_F03012,
                    ID_F03012_ADDRESS_COMPANY, NULL,
                    (ushort) 0, (JCHAR *) NULL, &hRequestF03012); 

           
              if (idJDBReturn != JDEDB_PASSED)
   {
       idReturnCode = ER_ERROR;
   }
   else
   {
       memset ((void *) &dsF03012Key,(int) (_J('\0')), sizeof(KEY1_F03012));
                /* Load Keys */
        MathCopy (&dsF03012Key.aian8, &lpDS->mnAddressNumber);
        jdeStrcpy((JCHAR *)(dsF03012Key.aico),
             (const JCHAR *)(lpDS->szCompany));

      idFetchResult = JDB_FetchKeyed(hRequestF03012,ID_F03012_ADDRESS_COMPANY,
                                   (void *)(&dsF03012Key),(short)2,
                                   (void *)(&dsF03012), (int)(FALSE));
      jdeNIDcpy( zDbRef.szDict , lpDS->szColumnName);
                        jdeNIDcpy( zDbRef.szTable , _J("F03012") );
                        zDbRef.idInstance = 0L;
                        pVoid = JDB_GetTableColValue( hRequestF03012, zDbRef );
                         if ( pVoid == (LPVOID)NULL )
                        {
                            idJDEDBReturn = JDEDB_FAILED;
                            idReturnCode = ER_ERROR;
                            goto FunctionCleanUp;
                        }
                          else
                 {
                /*Get Data Type information about the DD Item representing the Column passed in*/
            jdeStrcpy ((JCHAR *) dsGetDataDictionaryInfo.szDataItem,
                        (const JCHAR *) (lpDS->szColumnName));
       
            idJDEDBReturn = jdeCallObject(_J("GetDataDictionaryInformation"),
                                         NULL, lpBhvrCom, lpVoid,
                                         &dsGetDataDictionaryInfo,
                                         (CALLMAP *) NULL,(int) 0,
                                         (JCHAR *) NULL, (JCHAR *) NULL,
                                         (int) 0);
            /* Convert Data Item Size to long integer */
            MathNumericToInt(&dsGetDataDictionaryInfo.mnLength,
                             (LPINT)&iDataItemSize);
            iDataItemSize = iDataItemSize * sizeof(JCHAR);
   
            /* Get Data Type Values for correponding fields */
            jdeSscanf(dsGetDataDictionaryInfo.szDataType,_J("%d"),&iDataType);
   
            switch (iDataType)
            {
                case 1 : /* Character Value */
                memcpy((void *)(&cValue), (const void *)pVoid,
                sizeof (JCHAR));
                /* Convert character to string */
                szTempCharValue[0] = cValue;
                szTempCharValue[1] = _J('\0');
                jdeStrncpy((JCHAR *)lpDS->szColumnValue, (const JCHAR *)szTempCharValue,
                iValueSize - 1);
                break;
           
                case 2 :
                case 20 : /* String Value */
                memcpy((void *)szTemporaryValue,
                   (const void *)pVoid, iDataItemSize);
                jdeStrncpy((JCHAR *)lpDS->szColumnValue, (const JCHAR *)szTemporaryValue,
                    iValueSize - 1);
                break;

                case 7 : /* ID */
                memcpy((void*)&idValue,
                   (const void *)pVoid, sizeof (ID));
                /* Convert ID (a long integer) to math numeric and
                * math numeric to string */
                LongToMathNumeric(idValue, &mnTempValue);
                FormatMathNumeric(lpDS->szColumnValue, &mnTempValue);
                break;

                case 9 : /* Math Numeric Value */
                memcpy((void*)&mnValue,
                   (const void *)pVoid, sizeof(MATH_NUMERIC));
       
                /* Convert Math Numeric value to string */
                FormatMathNumeric((PJSTR)lpDS->szColumnValue,
                                (LPMATH_NUMERIC)&mnValue);
                break;

                case 11 : /* JDEDATE */
                memcpy((void*)&jdValue,
                   (const void *)pVoid, sizeof(JDEDATE));
                /* Convert JDEDATE to string */
                FormatDate(lpDS->szColumnValue, &jdValue, szFormatMask);
                break;

                case 15 : /* Integer Value */
                memcpy((void*)&iValue,
                   (const void *)pVoid, sizeof (int));
           
                /* Convert integer to math numeric and
                 * math numeric to string */
                IntToMathNumeric(iValue, &mnTempValue);
                FormatMathNumeric(lpDS->szColumnValue, &mnTempValue);
                break;

            } /* End of the switch construct to get values */
        } /* End if pVoid is not NULL */
    }

    FunctionCleanUp:
   /************************************************************************
    * Function Clean Up
    ************************************************************************/

    JDB_FreeBhvr(hUser);
     if (hRequestF03012 != (HREQUEST)NULL)
    {
        JDB_CloseTable(hRequestF03012);
    }
  
   return (ER_SUCCESS);
}

/* Internal function comment block */
/**************************************************************************
 *   Function:  Ixxxxxxx_a   // Replace "xxxxxxx" with source file number
 *                           // and "a" with the function name
 *      Notes:
 *
 *    Returns:
 *
 * Parameters:
 **************************************************************************/

Monday, June 20, 2016

Retrieve Processing Option Values Based on Application Version


By Using the C Business Function API AllocatePOVersionData, Need to Retrieve the Processing Option Value from Sales order PO T4210.
/*****************************************************************************
 *    Header File:  B554210.h
 *
 *    Description:  Retrieve (P4210) Processing Option Header File
 *
 *        History:
 *          Date        Programmer  SAR# - Description
 *          ----------  ----------  -------------------------------------------
 *   Author 6/17/2016   Unkno       Unknown  - Created
 *
 *
 * Copyright (c) J.D. Edwards World Source Company, 1996
 *
 * This unpublished material is proprietary to J.D. Edwards World Source
 * Company.  All rights reserved.  The methods and techniques described
 * herein are considered trade secrets and/or confidential.  Reproduction
 * or distribution, in whole or in part, is forbidden except by express
 * written permission of J.D. Edwards World Source Company.
 ****************************************************************************/

#ifndef __B554210_H
#define __B554210_H

/*****************************************************************************
 * Table Header Inclusions
 ****************************************************************************/

/*****************************************************************************
 * External Business Function Header Inclusions
 ****************************************************************************/

/*****************************************************************************
 * Global Definitions
 ****************************************************************************/

/*****************************************************************************
 * Structure Definitions
 ****************************************************************************/

/**
 * TYPEDEF for Data Structure
 * T4210 : Sales Order Entry
 *
 * Copyright Oracle USA
 *
 * This is a JDEdwards EnterpriseOne generated file.
 * Do not modify this file.
 * Only re-generate with the appropriate tool.
 * Generation Date : 6/18/2016
 */

#ifndef DATASTRUCTURE_T4210
#define DATASTRUCTURE_T4210

typedef struct tagDST4210
{
  JCHAR          szDefaultOrdertype[3];
  JCHAR          szDefaultLinetype[3];
  JCHAR          szDefaultBeginningStatus[4];
  JCHAR          szOverrideNextStatus[4];
  MATH_NUMERIC   mnDefaultLineIncrement;
  JCHAR          szDefaultReasoncode[4];
  JCHAR          szDefaultTransactionUom[3];
  JCHAR          cUsePricingUoM;
  JCHAR          szDupOrdertype[3];
  JCHAR          szDupBeginningStatus[4];
  JCHAR          cDefaultShipToBranch;
  JCHAR          szCreditHold[3];
  JCHAR          cDisableorHideCost;
  JCHAR          cDisableorHidePrice;
  JCHAR          cDisableStatusCodes;
  JCHAR          cEHideClosedLines;
  JCHAR          cHideCreditCardInfo;
  JCHAR          cHideFreightInfo;
  JCHAR          cHideCommission;
  JCHAR          cHideKitComponents;
  JCHAR          cAvailabilityCheck;
  JCHAR          cOtherQuantity1or2;
  MATH_NUMERIC   mnToleranceLimit;
  JCHAR          szNonUpdatableStatus[4];
  JCHAR          cAutoPrintorCommit;
  JCHAR          szSubstituteItemXRef[3];
  JCHAR          szComplementaryItemXRef[3];
  JCHAR          cUseSubsItemPrice;
  JCHAR          szOrderMarginCheck[3];
  JCHAR          szLineMarginCheck[3];
  JCHAR          szMinimumOrderCheck[3];
  JCHAR          szMaximumOrderCheck[3];
  JCHAR          szPartialOrderHold[3];
  JCHAR          cCopyTextOption;
  JCHAR          cAddNewCustomersToAB;
  JCHAR          cLoadHeaderToDetail;
  JCHAR          cHeaderOrDetailFirst;
  JCHAR          szProductAllocHold[3];
  JCHAR          cAutoDisplaySDInquiry;
  JCHAR          szR42520Vers[26];
  JCHAR          szP4021Vers[26];
  JCHAR          szOnDemandPickSlipVersion[26];
  JCHAR          szR42750Vers[26];
  JCHAR          szP42230Vers[26];
  JCHAR          szP40400Vers[26];
  JCHAR          szChkPriceAvailnqVers[26];
  JCHAR          szP4310Vers[26];
  JCHAR          szSupplierMasterVers[26];
  JCHAR          szBOMInquiryVersion[26];
  JCHAR          szP4801Vers[26];
  JCHAR          szInterBranchOrderTypes[26];
  JCHAR          cOrderTemplateAddress;
  JCHAR          cUsePrefProcess;
  JCHAR          cCommitPreference;
  JCHAR          cAutoBlanketRelease;
  JCHAR          cTransferOrderEntry;
  JCHAR          cCostMarkup;
  JCHAR          cAutoReprice;
  JCHAR          cDisplayBeforeAccept;
  JCHAR          szWhsePickVersion[26];
  JCHAR          szWhseOverrideNextStatus[4];
  JCHAR          szCSIFromStatusCode[4];
  JCHAR          szCSIThruStatusCode[4];
  JCHAR          cCSIStatusRangeBasedOnOW;
  JCHAR          cCSIDteRangeBasedOnOW;
  JCHAR          cCSIDisplayTextLines;
  JCHAR          cCSIDisplayBackorderOrCaneled;
  JCHAR          szR42565Vers[26];
  JCHAR          szR42997Vers[26];
  JCHAR          szDupNextStatus[4];
  JCHAR          cAgreementProcessing;
  JCHAR          szReplacementItemXREF[3];
  JCHAR          szCustomerItemNumberXREF[3];
  JCHAR          CurrencyCodeFrom[4];
  JDEDATE        DateTransactionJulian;
  JCHAR          cWhseRequestMode;
  JCHAR          szDefaultBranchPlant[13];
  JCHAR          cStoreAndForwardMode;
  JCHAR          cShoppingCartMode;
  JCHAR          szOrderTemplate[9];
  JCHAR          cMandatoryLandedCost;
  JCHAR          szP32942Vers[26];
  JCHAR          szR4210ZVers[26];
  JCHAR          cWOPlannerEmail;
  JCHAR          cBuyerEmail;
  JCHAR          cActiveMultSchedule;
  JCHAR          szScheduleLine[3];
  JCHAR          cIntercompanyInvoice;
  JCHAR          szTypeTransaction[9];
  JCHAR          cBeforeImageProcessing;
  JCHAR          cDisablePricingRelated;
  JCHAR          szP42050Vers[26];
  JCHAR          szAuthorizeHoldCode[3];
  JCHAR          szSettleHoldCode[3];
  JCHAR          cActivatePrepayProcess;
  JCHAR          szAuthorizeVersion[11];
  JCHAR          szSettleVersion[11];
  JCHAR          szAuthorizedNextStatus[4];
  JCHAR          szSettledNextStatus[4];
  JCHAR          szOrderProcessHold[3];
  JCHAR          cHowToProcessAuthorization;
  JCHAR          cHowToProcessSettlement;
  JCHAR          szP4915Vers[26];
  JCHAR          szP03013Vers[26];
  JCHAR          szOrganizationTypeStructur[4];
  JCHAR          cTurnOffTaxable;
  JCHAR          cCallR45100Mode;
  JCHAR          szR45100Version[11];
  JCHAR          cFreeGoodCatWarning;
  JCHAR          cAdjustVolumeTrans;
  JCHAR          cPromptforCustomerSegmentItems;
  JCHAR          szR45900Version[26];
  JCHAR          szP00391Version[26];
  JCHAR          szCustomerSegmentItemsVersion[11];
  JCHAR          cEnableGrossProfitPricing;
  JCHAR          szAdjustmentReasonCode[4];
  JCHAR          cProfitMarginResolveTest;
  JCHAR          cCheckAscendingDateRule;
  JCHAR          cAssignPromotionID;
  JCHAR          CrossReferencePromotional[3];
  JCHAR          szPreferenceSchedule[9];
  JCHAR          cOrderPromising;
  JCHAR          szApprovalHoldCode[3];
  JCHAR          cUseAuditLog;
  JCHAR          cRequiredReasonCode;
  JCHAR          cRequiredApprovalProcess;
  JCHAR          szExclusiveAdjustmentHold[3];
  JCHAR          cInventoryParent;
  MATH_NUMERIC   mnVolumeTolerancePercentage;
  JCHAR          cDefaultUserID;
  JCHAR          cOverrideSoldToShipTo;
  JCHAR          cOverrideCarrierNumber;
  JCHAR          cMultiBlanketSelect;
  JCHAR          cSingleBlanketSelect;
  JCHAR          szProductVariantsVersion[11];
  JCHAR          szOrderProcessingVer[26];
  JCHAR          cSoldToRecordType;
  JCHAR          cShipToRecordType;
  JCHAR          szInactiveCustomerHold[3];
  JCHAR          szInactiveCustomerType[4];
  JCHAR          szProductCatalogVersion[11];
  JCHAR          szLotGroup[31];
  JCHAR          szR4277702Version[11];
  JCHAR          szP4131Version[11];
  JCHAR          cAutoDisplayAvailableBlanket;
  JCHAR          szCollection[11];
  JCHAR          szSeasonCode[3];
  JCHAR          szSeasonYear[5];
  JCHAR          cValidateItemsWithCollection;
  JCHAR          cCollectionTemplatePrefix;
  JCHAR          szPCW10Version[26];
  JCHAR          cSendAddressNumber;
  JCHAR          cStyleItemSearchType;
  JCHAR          szR4277705Version[11];
  JCHAR          cCalculateOrderScore;
  JCHAR          cResolveSLRules;
  JCHAR          szProductionNumberType[5];
  JCHAR          cProdNoGenerate;
} DST4210 , *LPDST4210;

#define IDERRszDefaultOrdertype_1                 1L
#define IDERRszDefaultLinetype_2                  2L
#define IDERRszDefaultBeginningStatus_3           3L
#define IDERRszOverrideNextStatus_4               4L
#define IDERRmnDefaultLineIncrement_5             5L
#define IDERRszDefaultReasoncode_6                6L
#define IDERRszDefaultTransactionUom_7            7L
#define IDERRcUsePricingUoM_8                     8L
#define IDERRszDupOrdertype_9                     9L
#define IDERRszDupBeginningStatus_10              10L
#define IDERRcDefaultShipToBranch_11              11L
#define IDERRszCreditHold_12                      12L
#define IDERRcDisableorHideCost_20                20L
#define IDERRcDisableorHidePrice_21               21L
#define IDERRcDisableStatusCodes_22               22L
#define IDERRcEHideClosedLines_23                 23L
#define IDERRcHideCreditCardInfo_24               24L
#define IDERRcHideFreightInfo_25                  25L
#define IDERRcHideCommission_26                   26L
#define IDERRcHideKitComponents_28                28L
#define IDERRcAvailabilityCheck_29                29L
#define IDERRcOtherQuantity1or2_30                30L
#define IDERRmnToleranceLimit_31                  31L
#define IDERRszNonUpdatableStatus_32              32L
#define IDERRcAutoPrintorCommit_33                33L
#define IDERRszSubstituteItemXRef_34              34L
#define IDERRszComplementaryItemXRef_35           35L
#define IDERRcUseSubsItemPrice_37                 37L
#define IDERRszOrderMarginCheck_38                38L
#define IDERRszLineMarginCheck_39                 39L
#define IDERRszMinimumOrderCheck_40               40L
#define IDERRszMaximumOrderCheck_41               41L
#define IDERRszPartialOrderHold_42                42L
#define IDERRcCopyTextOption_43                   43L
#define IDERRcAddNewCustomersToAB_44              44L
#define IDERRcLoadHeaderToDetail_45               45L
#define IDERRcHeaderOrDetailFirst_46              46L
#define IDERRszProductAllocHold_47                47L
#define IDERRcAutoDisplaySDInquiry_48             48L
#define IDERRszR42520Vers_49                      49L
#define IDERRszP4021Vers_50                       50L
#define IDERRszOnDemandPickSlipVersion_51         51L
#define IDERRszR42750Vers_52                      52L
#define IDERRszP42230Vers_53                      53L
#define IDERRszP40400Vers_54                      54L
#define IDERRszChkPriceAvailnqVers_55             55L
#define IDERRszP4310Vers_56                       56L
#define IDERRszSupplierMasterVers_57              57L
#define IDERRszBOMInquiryVersion_58               58L
#define IDERRszP4801Vers_59                       59L
#define IDERRszInterBranchOrderTypes_60           60L
#define IDERRcOrderTemplateAddress_61             61L
#define IDERRcUsePrefProcess_62                   62L
#define IDERRcCommitPreference_63                 63L
#define IDERRcAutoBlanketRelease_64               64L
#define IDERRcTransferOrderEntry_65               65L
#define IDERRcCostMarkup_67                       67L
#define IDERRcAutoReprice_70                      70L
#define IDERRcDisplayBeforeAccept_71              71L
#define IDERRszWhsePickVersion_74                 74L
#define IDERRszWhseOverrideNextStatus_75          75L
#define IDERRszCSIFromStatusCode_76               76L
#define IDERRszCSIThruStatusCode_77               77L
#define IDERRcCSIStatusRangeBasedOnOW_78          78L
#define IDERRcCSIDteRangeBasedOnOW_79             79L
#define IDERRcCSIDisplayTextLines_80              80L
#define IDERRcCSIDisplayBackorderOrCaneled_81     81L
#define IDERRszR42565Vers_82                      82L
#define IDERRszR42997Vers_83                      83L
#define IDERRszDupNextStatus_84                   84L
#define IDERRcAgreementProcessing_85              85L
#define IDERRszReplacementItemXREF_86             86L
#define IDERRszCustomerItemNumberXREF_87          87L
#define IDERRCurrencyCodeFrom_88                  88L
#define IDERRDateTransactionJulian_89             89L
#define IDERRcWhseRequestMode_90                  90L
#define IDERRszDefaultBranchPlant_91              91L
#define IDERRcStoreAndForwardMode_92              92L
#define IDERRcShoppingCartMode_93                 93L
#define IDERRszOrderTemplate_94                   94L
#define IDERRcMandatoryLandedCost_95              95L
#define IDERRszP32942Vers_96                      96L
#define IDERRszR4210ZVers_97                      97L
#define IDERRcWOPlannerEmail_98                   98L
#define IDERRcBuyerEmail_99                       99L
#define IDERRcActiveMultSchedule_101              101L
#define IDERRszScheduleLine_102                   102L
#define IDERRcIntercompanyInvoice_103             103L
#define IDERRszTypeTransaction_104                104L
#define IDERRcBeforeImageProcessing_105           105L
#define IDERRcDisablePricingRelated_106           106L
#define IDERRszP42050Vers_107                     107L
#define IDERRszAuthorizeHoldCode_108              108L
#define IDERRszSettleHoldCode_109                 109L
#define IDERRcActivatePrepayProcess_110           110L
#define IDERRszAuthorizeVersion_111               111L
#define IDERRszSettleVersion_112                  112L
#define IDERRszAuthorizedNextStatus_113           113L
#define IDERRszSettledNextStatus_114              114L
#define IDERRszOrderProcessHold_115               115L
#define IDERRcHowToProcessAuthorization_116       116L
#define IDERRcHowToProcessSettlement_117          117L
#define IDERRszP4915Vers_118                      118L
#define IDERRszP03013Vers_119                     119L
#define IDERRszOrganizationTypeStructur_120       120L
#define IDERRcTurnOffTaxable_121                  121L
#define IDERRcCallR45100Mode_122                  122L
#define IDERRszR45100Version_123                  123L
#define IDERRcFreeGoodCatWarning_124              124L
#define IDERRcAdjustVolumeTrans_125               125L
#define IDERRcPromptforCustomerSegmentItems_126   126L
#define IDERRszR45900Version_127                  127L
#define IDERRszP00391Version_128                  128L
#define IDERRszCustomerSegmentItemsVersion_129    129L
#define IDERRcEnableGrossProfitPricing_132        132L
#define IDERRszAdjustmentReasonCode_133           133L
#define IDERRcProfitMarginResolveTest_134         134L
#define IDERRcCheckAscendingDateRule_135          135L
#define IDERRcAssignPromotionID_136               136L
#define IDERRCrossReferencePromotional_137        137L
#define IDERRszPreferenceSchedule_139             139L
#define IDERRcOrderPromising_140                  140L
#define IDERRszApprovalHoldCode_142               142L
#define IDERRcUseAuditLog_143                     143L
#define IDERRcRequiredReasonCode_144              144L
#define IDERRcRequiredApprovalProcess_145         145L
#define IDERRszExclusiveAdjustmentHold_147        147L
#define IDERRcInventoryParent_148                 148L
#define IDERRmnVolumeTolerancePercentage_149      149L
#define IDERRcDefaultUserID_150                   150L
#define IDERRcOverrideSoldToShipTo_151            151L
#define IDERRcOverrideCarrierNumber_152           152L
#define IDERRcMultiBlanketSelect_153              153L
#define IDERRcSingleBlanketSelect_154             154L
#define IDERRszProductVariantsVersion_155         155L
#define IDERRszOrderProcessingVer_156             156L
#define IDERRcSoldToRecordType_157                157L
#define IDERRcShipToRecordType_158                158L
#define IDERRszInactiveCustomerHold_159           159L
#define IDERRszInactiveCustomerType_160           160L
#define IDERRszProductCatalogVersion_161          161L
#define IDERRszLotGroup_162                       162L
#define IDERRszR4277702Version_163                163L
#define IDERRszP4131Version_164                   164L
#define IDERRcAutoDisplayAvailableBlanket_165     165L
#define IDERRszCollection_166                     166L
#define IDERRszSeasonCode_167                     167L
#define IDERRszSeasonYear_168                     168L
#define IDERRcValidateItemsWithCollection_169     169L
#define IDERRcCollectionTemplatePrefix_170        170L
#define IDERRszPCW10Version_171                   171L
#define IDERRcSendAddressNumber_173               173L
#define IDERRcStyleItemSearchType_174             174L
#define IDERRszR4277705Version_175                175L
#define IDERRcCalculateOrderScore_176             176L
#define IDERRcResolveSLRules_177                  177L
#define IDERRszProductionNumberType_178           178L
#define IDERRcProdNoGenerate_179                  179L

#endif /* DATASTRUCTURE_T4210 */


/*****************************************************************************
 * DS Template Type Definitions
 ****************************************************************************/
 /*****************************************
 * TYPEDEF for Data Structure
 *    Template Name: Retrieve (P554210) Processing Option                      
 *    Template ID:   D554210
 *    Generated:     Fri Jun 17 21:58:25 2016
 *
 * DO NOT EDIT THE FOLLOWING TYPEDEF
 *    To make modifications, use the OneWorld Data Structure
 *    Tool to Generate a revised version, and paste from
 *    the clipboard.
 *
 **************************************/

#ifndef DATASTRUCTURE_D554210
#define DATASTRUCTURE_D554210

typedef struct tagDSD554210
{
  JCHAR          szDefaultOrdertype[3];
  JCHAR          szDefaultLinetype[3];
  JCHAR          szDefaultBeginningStatus[4];
  JCHAR          szOverrideNextStatus[4];
  MATH_NUMERIC   mnDefaultLineIncrement;
  JCHAR          szDefaultReasoncode[4];
  JCHAR          szDefaultTransactionUom[3];
  JCHAR          cUsePricingUoM;
  JCHAR          szDupOrdertype[3];
  JCHAR          szDupBeginningStatus[4];
  JCHAR          cDefaultShipToBranch;
  JCHAR          szCreditHold[3];
  JCHAR          cDisableorHideCost;
  JCHAR          cDisableorHidePrice;
  JCHAR          cDisableStatusCodes;
  JCHAR          cEHideClosedLines;
  JCHAR          cHideCreditCardInfo;
  JCHAR          cHideFreightInfo;
  JCHAR          cHideCommission;
  JCHAR          cHideKitComponents;
  JCHAR          cAvailabilityCheck;
  JCHAR          cOtherQuantity1or2;
  MATH_NUMERIC   mnToleranceLimit;
  JCHAR          szNonUpdatableStatus[4];
  JCHAR          cAutoPrintorCommit;
  JCHAR          szSubstituteItemXRef[3];
  JCHAR          szComplementaryItemXRef[3];
  JCHAR          cUseSubsItemPrice;
  JCHAR          szOrderMarginCheck[3];
  JCHAR          szLineMarginCheck[3];
  JCHAR          szMinimumOrderCheck[3];
  JCHAR          szMaximumOrderCheck[3];
  JCHAR          szPartialOrderHold[3];
  JCHAR          cCopyTextOption;
  JCHAR          cAddNewCustomersToAB;
  JCHAR          cLoadHeaderToDetail;
  JCHAR          cHeaderOrDetailFirst;
  JCHAR          szProductAllocHold[3];
  JCHAR          cAutoDisplaySDInquiry;
  JCHAR          szR42520Vers[26];
  JCHAR          szP4021Vers[26];
  JCHAR          szOnDemandPickSlipVersion[26];
  JCHAR          szR42750Vers[26];
  JCHAR          szP42230Vers[26];
  JCHAR          szP40400Vers[26];
  JCHAR          szChkPriceAvailnqVers[26];
  JCHAR          szP4310Vers[26];
  JCHAR          szSupplierMasterVers[26];
  JCHAR          szBOMInquiryVersion[26];
  JCHAR          szP4801Vers[26];
  JCHAR          szInterBranchOrderTypes[26];
  JCHAR          cOrderTemplateAddress;
  JCHAR          cUsePrefProcess;
  JCHAR          cCommitPreference;
  JCHAR          cAutoBlanketRelease;
  JCHAR          cTransferOrderEntry;
  JCHAR          cCostMarkup;
  JCHAR          cAutoReprice;
  JCHAR          cDisplayBeforeAccept;
  JCHAR          szWhsePickVersion[26];
  JCHAR          szWhseOverrideNextStatus[4];
  JCHAR          szCSIFromStatusCode[4];
  JCHAR          szCSIThruStatusCode[4];
  JCHAR          cCSIStatusRangeBasedOnOW;
  JCHAR          cCSIDteRangeBasedOnOW;
  JCHAR          cCSIDisplayTextLines;
  JCHAR          cCSIDisplayBackorderOrCaneled;
  JCHAR          szR42565Vers[26];
  JCHAR          szR42997Vers[26];
  JCHAR          szDupNextStatus[4];
  JCHAR          cAgreementProcessing;
  JCHAR          szReplacementItemXREF[3];
  JCHAR          szCustomerItemNumberXREF[3];
  JCHAR          CurrencyCodeFrom[4];
  JDEDATE        DateTransactionJulian;
  JCHAR          cWhseRequestMode;
  JCHAR          szDefaultBranchPlant[13];
  JCHAR          cStoreAndForwardMode;
  JCHAR          cShoppingCartMode;
  JCHAR          szOrderTemplate[9];
  JCHAR          cMandatoryLandedCost;
  JCHAR          szP32942Vers[26];
  JCHAR          szR4210ZVers[26];
  JCHAR          cWOPlannerEmail;
  JCHAR          cBuyerEmail;
  JCHAR          cActiveMultSchedule;
  JCHAR          szScheduleLine[3];
  JCHAR          cIntercompanyInvoice;
  JCHAR          szTypeTransaction[9];
  JCHAR          cBeforeImageProcessing;
  JCHAR          cDisablePricingRelated;
  JCHAR          szP42050Vers[26];
  JCHAR          szAuthorizeHoldCode[3];
  JCHAR          szSettleHoldCode[3];
  JCHAR          cActivatePrepayProcess;
  JCHAR          szAuthorizeVersion[11];
  JCHAR          szSettleVersion[11];
  JCHAR          szAuthorizedNextStatus[4];
  JCHAR          szSettledNextStatus[4];
  JCHAR          szOrderProcessHold[3];
  JCHAR          cHowToProcessAuthorization;
  JCHAR          cHowToProcessSettlement;
  JCHAR          szP4915Vers[26];
  JCHAR          szP03013Vers[26];
  JCHAR          szOrganizationTypeStructur[4];
  JCHAR          cTurnOffTaxable;
  JCHAR          cCallR45100Mode;
  JCHAR          szR45100Version[11];
  JCHAR          cFreeGoodCatWarning;
  JCHAR          cAdjustVolumeTrans;
  JCHAR          cPromptforCustomerSegmentItems;
  JCHAR          szR45900Version[26];
  JCHAR          szP00391Version[26];
  JCHAR          szCustomerSegmentItemsVersion[11];
  JCHAR          cEnableGrossProfitPricing;
  JCHAR          szAdjustmentReasonCode[4];
  JCHAR          cProfitMarginResolveTest;
  JCHAR          cCheckAscendingDateRule;
  JCHAR          cAssignPromotionID;
  JCHAR          CrossReferencePromotional[3];
  JCHAR          szPreferenceSchedule[9];
  JCHAR          cOrderPromising;
  JCHAR          szApprovalHoldCode[3];
  JCHAR          cUseAuditLog;
  JCHAR          cRequiredReasonCode;
  JCHAR          cRequiredApprovalProcess;
  JCHAR          szExclusiveAdjustmentHold[3];
  JCHAR          cInventoryParent;
  MATH_NUMERIC   mnVolumeTolerancePercentage;
  JCHAR          cDefaultUserID;
  JCHAR          cOverrideSoldToShipTo;
  JCHAR          cOverrideCarrierNumber;
  JCHAR          cMultiBlanketSelect;
  JCHAR          cSingleBlanketSelect;
  JCHAR          szProductVariantsVersion[11];
  JCHAR          szOrderProcessingVer[26];
  JCHAR          cSoldToRecordType;
  JCHAR          cShipToRecordType;
  JCHAR          szInactiveCustomerHold[3];
  JCHAR          szInactiveCustomerType[4];
  JCHAR          szProductCatalogVersion[11];
  JCHAR          szLotGroup[31];
  JCHAR          szR4277702Version[11];
  JCHAR          szP4131Version[11];
  JCHAR          cAutoDisplayAvailableBlanket;
  JCHAR          szCollection[11];
  JCHAR          szSeasonCode[3];
  JCHAR          szSeasonYear[5];
  JCHAR          cValidateItemsWithCollection;
  JCHAR          cCollectionTemplatePrefix;
  JCHAR          szPCW10Version[26];
  JCHAR          cSendAddressNumber;
  JCHAR          cStyleItemSearchType;
  JCHAR          szR4277705Version[11];
  JCHAR          cCalculateOrderScore;
  JCHAR          cResolveSLRules;
  JCHAR          szProductionNumberType[5];
  JCHAR          cProdNoGenerate;
} DSD554210, *LPDSD554210;

#define IDERRszDefaultOrdertype_1                 1L
#define IDERRszDefaultLinetype_2                  2L
#define IDERRszDefaultBeginningStatus_3           3L
#define IDERRszOverrideNextStatus_4               4L
#define IDERRmnDefaultLineIncrement_5             5L
#define IDERRszDefaultReasoncode_6                6L
#define IDERRszDefaultTransactionUom_7            7L
#define IDERRcUsePricingUoM_8                     8L
#define IDERRszDupOrdertype_9                     9L
#define IDERRszDupBeginningStatus_10              10L
#define IDERRcDefaultShipToBranch_11              11L
#define IDERRszCreditHold_12                      12L
#define IDERRcDisableorHideCost_20                20L
#define IDERRcDisableorHidePrice_21               21L
#define IDERRcDisableStatusCodes_22               22L
#define IDERRcEHideClosedLines_23                 23L
#define IDERRcHideCreditCardInfo_24               24L
#define IDERRcHideFreightInfo_25                  25L
#define IDERRcHideCommission_26                   26L
#define IDERRcHideKitComponents_28                28L
#define IDERRcAvailabilityCheck_29                29L
#define IDERRcOtherQuantity1or2_30                30L
#define IDERRmnToleranceLimit_31                  31L
#define IDERRszNonUpdatableStatus_32              32L
#define IDERRcAutoPrintorCommit_33                33L
#define IDERRszSubstituteItemXRef_34              34L
#define IDERRszComplementaryItemXRef_35           35L
#define IDERRcUseSubsItemPrice_37                 37L
#define IDERRszOrderMarginCheck_38                38L
#define IDERRszLineMarginCheck_39                 39L
#define IDERRszMinimumOrderCheck_40               40L
#define IDERRszMaximumOrderCheck_41               41L
#define IDERRszPartialOrderHold_42                42L
#define IDERRcCopyTextOption_43                   43L
#define IDERRcAddNewCustomersToAB_44              44L
#define IDERRcLoadHeaderToDetail_45               45L
#define IDERRcHeaderOrDetailFirst_46              46L
#define IDERRszProductAllocHold_47                47L
#define IDERRcAutoDisplaySDInquiry_48             48L
#define IDERRszR42520Vers_49                      49L
#define IDERRszP4021Vers_50                       50L
#define IDERRszOnDemandPickSlipVersion_51         51L
#define IDERRszR42750Vers_52                      52L
#define IDERRszP42230Vers_53                      53L
#define IDERRszP40400Vers_54                      54L
#define IDERRszChkPriceAvailnqVers_55             55L
#define IDERRszP4310Vers_56                       56L
#define IDERRszSupplierMasterVers_57              57L
#define IDERRszBOMInquiryVersion_58               58L
#define IDERRszP4801Vers_59                       59L
#define IDERRszInterBranchOrderTypes_60           60L
#define IDERRcOrderTemplateAddress_61             61L
#define IDERRcUsePrefProcess_62                   62L
#define IDERRcCommitPreference_63                 63L
#define IDERRcAutoBlanketRelease_64               64L
#define IDERRcTransferOrderEntry_65               65L
#define IDERRcCostMarkup_67                       67L
#define IDERRcAutoReprice_70                      70L
#define IDERRcDisplayBeforeAccept_71              71L
#define IDERRszWhsePickVersion_74                 74L
#define IDERRszWhseOverrideNextStatus_75          75L
#define IDERRszCSIFromStatusCode_76               76L
#define IDERRszCSIThruStatusCode_77               77L
#define IDERRcCSIStatusRangeBasedOnOW_78          78L
#define IDERRcCSIDteRangeBasedOnOW_79             79L
#define IDERRcCSIDisplayTextLines_80              80L
#define IDERRcCSIDisplayBackorderOrCaneled_81     81L
#define IDERRszR42565Vers_82                      82L
#define IDERRszR42997Vers_83                      83L
#define IDERRszDupNextStatus_84                   84L
#define IDERRcAgreementProcessing_85              85L
#define IDERRszReplacementItemXREF_86             86L
#define IDERRszCustomerItemNumberXREF_87          87L
#define IDERRCurrencyCodeFrom_88                  88L
#define IDERRDateTransactionJulian_89             89L
#define IDERRcWhseRequestMode_90                  90L
#define IDERRszDefaultBranchPlant_91              91L
#define IDERRcStoreAndForwardMode_92              92L
#define IDERRcShoppingCartMode_93                 93L
#define IDERRszOrderTemplate_94                   94L
#define IDERRcMandatoryLandedCost_95              95L
#define IDERRszP32942Vers_96                      96L
#define IDERRszR4210ZVers_97                      97L
#define IDERRcWOPlannerEmail_98                   98L
#define IDERRcBuyerEmail_99                       99L
#define IDERRcActiveMultSchedule_101              101L
#define IDERRszScheduleLine_102                   102L
#define IDERRcIntercompanyInvoice_103             103L
#define IDERRszTypeTransaction_104                104L
#define IDERRcBeforeImageProcessing_105           105L
#define IDERRcDisablePricingRelated_106           106L
#define IDERRszP42050Vers_107                     107L
#define IDERRszAuthorizeHoldCode_108              108L
#define IDERRszSettleHoldCode_109                 109L
#define IDERRcActivatePrepayProcess_110           110L
#define IDERRszAuthorizeVersion_111               111L
#define IDERRszSettleVersion_112                  112L
#define IDERRszAuthorizedNextStatus_113           113L
#define IDERRszSettledNextStatus_114              114L
#define IDERRszOrderProcessHold_115               115L
#define IDERRcHowToProcessAuthorization_116       116L
#define IDERRcHowToProcessSettlement_117          117L
#define IDERRszP4915Vers_118                      118L
#define IDERRszP03013Vers_119                     119L
#define IDERRszOrganizationTypeStructur_120       120L
#define IDERRcTurnOffTaxable_121                  121L
#define IDERRcCallR45100Mode_122                  122L
#define IDERRszR45100Version_123                  123L
#define IDERRcFreeGoodCatWarning_124              124L
#define IDERRcAdjustVolumeTrans_125               125L
#define IDERRcPromptforCustomerSegmentItems_126   126L
#define IDERRszR45900Version_127                  127L
#define IDERRszP00391Version_128                  128L
#define IDERRszCustomerSegmentItemsVersion_129    129L
#define IDERRcEnableGrossProfitPricing_132        132L
#define IDERRszAdjustmentReasonCode_133           133L
#define IDERRcProfitMarginResolveTest_134         134L
#define IDERRcCheckAscendingDateRule_135          135L
#define IDERRcAssignPromotionID_136               136L
#define IDERRCrossReferencePromotional_137        137L
#define IDERRszPreferenceSchedule_139             139L
#define IDERRcOrderPromising_140                  140L
#define IDERRszApprovalHoldCode_142               142L
#define IDERRcUseAuditLog_143                     143L
#define IDERRcRequiredReasonCode_144              144L
#define IDERRcRequiredApprovalProcess_145         145L
#define IDERRszExclusiveAdjustmentHold_147        147L
#define IDERRcInventoryParent_148                 148L
#define IDERRmnVolumeTolerancePercentage_149      149L
#define IDERRcDefaultUserID_150                   150L
#define IDERRcOverrideSoldToShipTo_151            151L
#define IDERRcOverrideCarrierNumber_152           152L
#define IDERRcMultiBlanketSelect_153              153L
#define IDERRcSingleBlanketSelect_154             154L
#define IDERRszProductVariantsVersion_155         155L
#define IDERRszOrderProcessingVer_156             156L
#define IDERRcSoldToRecordType_157                157L
#define IDERRcShipToRecordType_158                158L
#define IDERRszInactiveCustomerHold_159           159L
#define IDERRszInactiveCustomerType_160           160L
#define IDERRszProductCatalogVersion_161          161L
#define IDERRszLotGroup_162                       162L
#define IDERRszR4277702Version_163                163L
#define IDERRszP4131Version_164                   164L
#define IDERRcAutoDisplayAvailableBlanket_165     165L
#define IDERRszCollection_166                     166L
#define IDERRszSeasonCode_167                     167L
#define IDERRszSeasonYear_168                     168L
#define IDERRcValidateItemsWithCollection_169     169L
#define IDERRcCollectionTemplatePrefix_170        170L
#define IDERRszPCW10Version_171                   171L
#define IDERRcSendAddressNumber_173               173L
#define IDERRcStyleItemSearchType_174             174L
#define IDERRszR4277705Version_175                175L
#define IDERRcCalculateOrderScore_176             176L
#define IDERRcResolveSLRules_177                  177L
#define IDERRszProductionNumberType_178           178L
#define IDERRcProdNoGenerate_179                  179L
#endif

/*****************************************************************************
 * Source Preprocessor Definitions
 ****************************************************************************/
#if defined (JDEBFRTN)
#undef JDEBFRTN
#endif

#if defined (WIN32)
#if defined (WIN32)
#define JDEBFRTN(r) __declspec(dllexport) r
#else
#define JDEBFRTN(r) __declspec(dllimport) r
#endif
#else
#define JDEBFRTN(r) r
#endif

/*****************************************************************************
 * Business Function Prototypes
 ****************************************************************************/
 JDEBFRTN (ID) JDEBFWINAPI RetrieveP554210ProcessingOption (LPBHVRCOM lpBhvrCom, LPVOID lpVoid, LPDSD554210 lpDS);


/*****************************************************************************
 * Internal Function Prototypes
 ****************************************************************************/

#endif    /* __B554210_H */



#include <jde.h> 
 
#define B554210_c 
 
 
/***************************************************************************** 
 *    Source File:  B554210 
 * 
 *    Description:  Retrieve (P4210) Processing Option Source File 
 * 
 *        History: 
 *          Date        Programmer  SAR# - Description 
 *          ----------  ----------  ------------------------------------------- 
 *   Author 6/17/2016   Unkno       Unknown  - Created   
 * 
 * Copyright (c) J.D. Edwards World Source Company, 1996 
 * 
 * This unpublished material is proprietary to J.D. Edwards World Source Company. 
 * All rights reserved.  The methods and techniques described herein are 
 * considered trade secrets and/or confidential.  Reproduction or 
 * distribution, in whole or in part, is forbidden except by express 
 * written permission of J.D. Edwards World Source Company. 
 ****************************************************************************/ 
/************************************************************************** 
 * Notes: 
 * 
 **************************************************************************/ 
 
#include <B554210.h> 
 
 
/************************************************************************** 
 *  Business Function:  RetrieveP4210ProcessingOption 
 * 
 *        Description:  Retrieve (P4210) Processing Option 
 * 
 *         Parameters: 
 *           LPBHVRCOM           lpBhvrCom    Business Function Communications 
 *           LPVOID              lpVoid       Void Parameter - DO NOT USE! 
 *           LPDSD55Z            lpDS         Parameter Data Structure Pointer   
 * 
 *************************************************************************/ 
 
JDEBFRTN (ID) JDEBFWINAPI RetrieveP4210ProcessingOption (LPBHVRCOM lpBhvrCom, LPVOID lpVoid, LPDSD554210 lpDS)  
 
   /************************************************************************ 
    *  Variable declarations 
    ************************************************************************/ 
ID idJDBReturn = JDEDB_PASSED;
HUSER hUser = (HUSER) 0L;
LPDSD4210 lpdsD4210 = (LPDSD4210) 0L;

   /************************************************************************ 
    * Declare structures 
    ************************************************************************/ 
 
   /************************************************************************ 
    * Declare pointers 
    ************************************************************************/ 
 
   /************************************************************************ 
    * Check for NULL pointers 
    ************************************************************************/ 
   if ((lpBhvrCom == (LPBHVRCOM) NULL) || 
       (lpVoid    == (LPVOID)    NULL) || 
       (lpDS      == (LPDSD554210) NULL)) 
   { 
     jdeErrorSet (lpBhvrCom, lpVoid, (ID) 0, _J("4363"), (LPVOID) NULL); 
     return ER_ERROR; 
   } 
 
   /* Initialize Behaviour DS */
   idJDBReturn = JDB_InitBhvr(lpBhvrCom, &hUser,
                              (JCHAR *) NULL, JDEDB_COMMIT_AUTO);
   if(idJDBReturn != JDEDB_PASSED)
   {
      jdeErrorSet (lpBhvrCom, lpVoid, (ID) 0, _J("4363"), (LPVOID) NULL);
      return ER_ERROR;
   }  
   /************************************************************************ 
    * Set pointers 
    ************************************************************************/ 
 
   /************************************************************************ 
    * Main Processing 
    ************************************************************************/ 
/* Retrieve P55P100 Processing Options */
   lpdsT4210 = (LPDST4210) AllocatePOVersionData( hUser, 
                                                    _J("P4210"), 
                                                    lpDS->szVersionconsolidated_VER,
                                                    sizeof(DST4210));
   if(lpdsT4210)
   {
       jdeStrcpy((JCHAR*) lpDS->szDefaultOrdertype_1 ,
             (const JCHAR*) lpdT4210->szDefaultOrdertype_1 );
  jdeStrcpy((JCHAR*) lpDS->szDefaultLinetype_2  ,
             (const JCHAR*) lpdsT4210->szDefaultLinetype_2  );
  jdeStrcpy((JCHAR*) lpDS->szDefaultBeginningStatus_3 ,
             (const JCHAR*) lpdsT4210->szDefaultBeginningStatus_3 );
  jdeStrcpy((JCHAR*) lpDS->szOverrideNextStatus_4 ,
             (const JCHAR*) lpdsT4210->szOverrideNextStatus_4 );
  jdeStrcpy((JCHAR*) lpDS->szDefaultReasoncode_6 ,
             (const JCHAR*) lpdsT4210->szDefaultReasoncode_6  );
   jdeStrcpy((JCHAR*) lpDS->szDefaultTransactionUom_7 ,
             (const JCHAR*) lpdsT554210->szDefaultTransactionUom_7  );
jdeStrcpy((JCHAR*) lpDS->szDefaultReasoncode_6 ,
             (const JCHAR*) lpdsT4210->szDefaultReasoncode_6  );
 jdeStrcpy((JCHAR*) lpDS->szDefaultTransactionUom_7,
             (const JCHAR*) lpdsT4210->szDefaultTransactionUom_7  );
              lpDS->cUsePricingUoM_8 = lpdsT4210->cUsePricingUoM;
jdeStrcpy((JCHAR*) lpDS->sszDupOrdertype_9 ,(const JCHAR*)lpdsT4210->szDupOrdertype_9 );
jdeStrcpy((JCHAR*) lpDS->szDupBeginningStatus_10  ,(const JCHAR*)lpdsT4210->szDupBeginningStatus_10 );
lpDS->cDefaultShipToBranch_11   = lpdsT4210-> cDefaultShipToBranch_11;

/* Retrieving all the remaining Parameters from the above data structutre T4210*/        
   }
   /************************************************************************ 
    * Function Clean Up 
    ************************************************************************/ 
 
   return (ER_SUCCESS); 
 
/* Internal function comment block */
/**************************************************************************
 *   Function:  Ixxxxxxx_a   // Replace "xxxxxxx" with source file number
 *                           // and "a" with the function name
 *      Notes:
 *
 *    Returns:
 *
 * Parameters:
 **************************************************************************/