JD Edwards

JD Edwards
Lokesh Reddy Blog

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

Tuesday, June 14, 2016

Copy Data From XML File to Flat File


/*****************************************************************************
 *    Header File:  B55001XM.h
 *
 *    Description:  Copy Data From XML to Flat File Header File
 *
 *        History:
 *          Date        Programmer  Email
 *          ----------  ----------  -------------------------------------------
 *   Author 11/10/2015  Lokesh Reddy        - 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 __B55001XM_H
#define __B55001XM_H

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

/*****************************************************************************
 * External Business Function Header Inclusions
 ****************************************************************************/
  #include <xerceswrapper.h>
/*****************************************************************************
 * Global Definitions
 ****************************************************************************/

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

/*****************************************************************************
 * DS Template Type Definitions
 ****************************************************************************/
 /*****************************************
 * TYPEDEF for Data Structure
 *    Template Name: Copy Data From XML to Flat File                            
 *    Template ID:   D55001XML
 *    Generated:     Thu Nov 11 16:37:25 2010
 *
 * 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_D55001XML
#define DATASTRUCTURE_D55001XML

typedef struct tagDSD55001XML
{
  JCHAR             szXMLPath[251];                    
  JCHAR             szFlatFilePath1[256];              
  JCHAR             szFlatFilePath2[256];              
  JCHAR             szErrorMessage[101];                
} DSD55001XML, *LPDSD55001XML;

#define IDERRszXMLPath_1                          1L
#define IDERRszFlatFilePath1_2                    2L
#define IDERRszFlatFilePath2_3                    3L
#define IDERRszErrorMessage_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 copyDataXMLtoFlatFile            (LPBHVRCOM lpBhvrCom, LPVOID lpVoid, LPDSD55001XML lpDS);


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

#endif    /* __B55001XM_H */


#include <jde.h> 
 
#define b55001xm_c 
 
 
/***************************************************************************** 
 *    Source File:  b55001xm 
 * 
 *    Description:  Copy Data From XML to Flat File Source File 
 * 
 *        History: 
 *          Date        Programmer  Email 
 *          ----------  ----------  ------------------------------------------- 
 *   Author 11/11/2015  Lokesh Reddy         - 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 <b55001xm.h> 
 
 
/************************************************************************** 
 *  Business Function:  copyDataXMLtoFlatFile 
 * 
 *        Description:  Copy Data XML Data to Flat File 
 * 
 *         Parameters: 
 *           LPBHVRCOM           lpBhvrCom    Business Function Communications 
 *           LPVOID              lpVoid       Void Parameter - DO NOT USE! 
 *           LPDSD5500           lpDS         Parameter Data Structure Pointer   
 * 
 *************************************************************************/ 
 
JDEBFRTN (ID) JDEBFWINAPI copyDataXMLtoFlatFile (LPBHVRCOM lpBhvrCom, LPVOID lpVoid, LPDSD55001XML lpDS)  
 
   /************************************************************************ 
    *  Variable declarations 
    ************************************************************************/ 
XRCS_hParser hParser = NULL;
XRCS_Status XRCSStatus = XRCS_SUCCESS;
XRCS_hDocument hDoc = NULL;
XRCS_hElement hRootElm = NULL;
XRCS_hElement *hElm1 = NULL;
unsigned int nElmCount1 = 0;
XRCS_hElement *hElm2 = NULL;
JCHAR *elmName2 = NULL;
JCHAR *elmValue2 = NULL;
unsigned int nElmCount2 = 0;
XRCS_hElement *hElm3 = NULL;
JCHAR *elmName3 = NULL;
unsigned int nElmCount3 = 0;
XRCS_hElement *hElm4 = NULL;
unsigned int nElmCount4 = 0;
XRCS_hElement *hElm5 = NULL;
JCHAR *elmName5 = NULL;
unsigned int nElmCount5 = 0;
XRCS_hElement *hElm6 = NULL;
JCHAR *elmName6 = NULL;
JCHAR *elmValue6 = NULL;
unsigned int nElmCount6 = 0;
XRCS_hElement *hElm7 = NULL;
JCHAR *elmName7 = NULL;
JCHAR *elmValue7 = NULL;
unsigned int nElmCount7 = 0;
XRCS_hElement *hElm8 = NULL;
unsigned int nElmCount8 = 0;
XRCS_hElement *hElm9 = NULL;
JCHAR *elmName9 = NULL;
JCHAR *elmValue9 = NULL;
unsigned int nElmCount9 = 0;
XRCS_hElement *hElm10 = NULL;
JCHAR *elmName10 = NULL;
JCHAR *elmValue10 = NULL;
unsigned int nElmCount10 = 0;
XRCS_hElement *hElm11 = NULL;
unsigned int nElmCount11 = 0;
unsigned int i = 0;
unsigned int i1 = 0;
unsigned int i2 = 0;
unsigned int i3 = 0;
unsigned int i4 = 0;
unsigned int i5 = 0;
unsigned int i6 = 0;
unsigned int i7 = 0;
unsigned int i8 = 0;
unsigned int i9 = 0;
FILE *fpFlat1;
FILE *fpFlat2;
   /************************************************************************ 
    * Declare structures 
    ************************************************************************/ 
 
   /************************************************************************ 
    * Declare pointers 
    ************************************************************************/ 
 
   /************************************************************************ 
    * Check for NULL pointers 
    ************************************************************************/ 
   if ((lpBhvrCom == (LPBHVRCOM) NULL) || 
       (lpVoid    == (LPVOID)    NULL) || 
       (lpDS      == (LPDSD55001XML) NULL)) 
   { 
     jdeErrorSet (lpBhvrCom, lpVoid, (ID) 0, _J("4363"), (LPVOID) NULL); 
     return ER_ERROR; 
   } 
 
   /************************************************************************ 
    * Set pointers 
    ************************************************************************/ 
 
   /************************************************************************ 
    * Main Processing 
    ************************************************************************/ 
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J(" "));

/* open flat file1 in Binary Mode*/
if( (fpFlat1 = jdeFopen(lpDS->szFlatFilePath1, _J("wb") )) == NULL )
{
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("Flat File1 open failed"));
return ER_ERROR;
}

/* open flat file2 in Binary Mode*/
if( (fpFlat2 = jdeFopen(lpDS->szFlatFilePath2, _J("wb") )) == NULL )
{
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("Flat File2 open failed"));
return ER_ERROR;
}

/* Initialize Xerces Engine */
XRCSStatus = XRCS_initEngine();
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("XRCS_initEngine failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("XRCS_initEngine failed"));
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}

/* Get the Xerces Parser */
XRCSStatus = XRCS_getParser(&hParser);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("XRCS_getParser failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("XRCS_getParser failed"));
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}

/* Parse the XML String */
XRCSStatus = XRCS_parseXMLFile(hParser,lpDS->szXMLPath, &hDoc);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("XRCS_parseXMLFile failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("XRCS_parseXMLFile failed"));
XRCS_freeParser(hParser);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}

/* Get Root Element */
XRCSStatus = XRCS_getDocumentElement(hDoc,&hRootElm);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("XRCS_getDocumentElement failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("XRCS_getDocumentElement failed"));
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}
/* Get Elements in XML Document*/
XRCSStatus = XRCS_getElementChildren(hRootElm,&hElm1,&nElmCount1);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("XRCS_getElementChildren1 failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("XRCS_getElementChildren1 failed"));
XRCS_freeElement(hRootElm);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}

for(i=0;i<nElmCount1;i++)
{
XRCSStatus = XRCS_getElementChildren(hElm1[i],&hElm2,&nElmCount2);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("XRCS_getElementChildren2 failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("XRCS_getElementChildren2 failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}
for(i1=0;i1<nElmCount2;i1++)
{
XRCSStatus = XRCS_getElementName(hElm2[i1],&elmName2);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("XRCS_getElementName4 failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("XRCS_getElementName4 failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}

XRCSStatus = XRCS_getElementChildren(hElm2[i1],&hElm3,&nElmCount3);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("XRCS_getElementChildren3 failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("XRCS_getElementChildren3 failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElement(elmName2);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}
for(i2=0;i2<nElmCount3;i2++)
{
XRCSStatus = XRCS_getElementName(hElm3[i2],&elmName3);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("XRCS_getElementName4 failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("XRCS_getElementName4 failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}

XRCSStatus = XRCS_getElementChildren(hElm3[i2],&hElm4,&nElmCount4);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("XRCS_getElementChildren4 failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("XRCS_getElementChildren4 failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElement(elmName2);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}

for(i3=0;i3<nElmCount4;i3++)
{
XRCSStatus = XRCS_getElementChildren(hElm4[i3],&hElm5,&nElmCount5);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("XRCS_getElementChildren5 failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("XRCS_getElementChildren5 failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElement(elmName2);
XRCS_freeElementArray(hElm4,nElmCount4);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}

for(i4=0;i4<nElmCount5;i4++)
{
XRCSStatus = XRCS_getElementName(hElm5[i4],&elmName5);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("XRCS_getElementName4 failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("XRCS_getElementName4 failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElementArray(hElm4,nElmCount4);
XRCS_freeElementArray(hElm5,nElmCount5);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}

XRCSStatus = XRCS_getElementChildren(hElm5[i4],&hElm6,&nElmCount6);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("XRCS_getElementChildren6 failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("XRCS_getElementChildren6 failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElement(elmName2);
XRCS_freeElementArray(hElm4,nElmCount4);
XRCS_freeElementArray(hElm5,nElmCount5);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}

for(i5=0;i5<nElmCount6;i5++)
{
XRCSStatus = XRCS_getElementName(hElm6[i5],&elmName6);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("get BuyerLineItemNum Name failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("get BuyerLineItemNum Name failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElement(elmName2);
XRCS_freeElementArray(hElm4,nElmCount4);
XRCS_freeElementArray(hElm5,nElmCount5);
XRCS_freeElementArray(hElm6,nElmCount6);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}
/* Code to get the value of BuyerLineItemNum--Start*/
if (jdeStricmp(elmName6,_J("BuyerLineItemNum"))==0)
{
XRCSStatus = XRCS_getElementText(hElm6[i5],&elmValue6);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("get BuyerLineItemNum Value failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("get BuyerLineItemNum Value failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElement(elmName2);
XRCS_freeElementArray(hElm4,nElmCount4);
XRCS_freeElementArray(hElm5,nElmCount5);
XRCS_freeElementArray(hElm6,nElmCount6);
XRCS_freeElement(elmName7);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}
if ( (JCHAR*)NULL != elmValue6)
{
jdeFputsConvert(lpBhvrCom, elmValue6, fpFlat1);
jdeFputsConvertCRLF(lpBhvrCom, _J(","), fpFlat1);
jdeFputsConvert(lpBhvrCom, elmValue6, fpFlat2);
jdeFputsConvertCRLF(lpBhvrCom, _J(","), fpFlat2);
}
}
/* Code to get the value of BuyerLineItemNum--End*/

/* Code to get the value of GeneralNote--Start*/
if (jdeStricmp(elmName6,_J("GeneralNote"))==0)
{
XRCSStatus = XRCS_getElementText(hElm6[i5],&elmValue6);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("get GeneralNote Value failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("get GeneralNote Value failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElement(elmName2);
XRCS_freeElementArray(hElm4,nElmCount4);
XRCS_freeElementArray(hElm5,nElmCount5);
XRCS_freeElementArray(hElm6,nElmCount6);
XRCS_freeElement(elmName7);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}
if ( (JCHAR*)NULL != elmValue6)
{
jdeFputsConvert(lpBhvrCom, elmValue6, fpFlat2);
jdeFputsConvertCRLF(lpBhvrCom, _J("\r\n"), fpFlat2);
}
}
/* Code to get the value of GeneralNote--End*/
XRCSStatus = XRCS_getElementChildren(hElm6[i5],&hElm7,&nElmCount7);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("XRCS_getElementChildren7 failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("XRCS_getElementChildren7 failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElement(elmName2);
XRCS_freeElementArray(hElm4,nElmCount4);
XRCS_freeElementArray(hElm5,nElmCount5);
XRCS_freeElementArray(hElm6,nElmCount6);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}

for(i6=0;i6<nElmCount7;i6++)
{
/* Code to get the value of Ident--Start*/
XRCSStatus = XRCS_getElementName(hElm7[i6],&elmName7);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("get Ident Name failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("get Ident Name failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElement(elmName2);
XRCS_freeElementArray(hElm4,nElmCount4);
XRCS_freeElementArray(hElm5,nElmCount5);
XRCS_freeElementArray(hElm6,nElmCount6);
XRCS_freeElementArray(hElm7,nElmCount7);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}
if (jdeStricmp(elmName3,_J("ShipToParty"))==0)
{
if (jdeStricmp(elmName5,_J("PartyID"))==0)
{
if (jdeStricmp(elmName7,_J("Ident"))==0)
{
XRCSStatus = XRCS_getElementText(hElm7[i6],&elmValue7);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("get Ident Value failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("get Ident Value failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElement(elmName2);
XRCS_freeElementArray(hElm4,nElmCount4);
XRCS_freeElementArray(hElm5,nElmCount5);
XRCS_freeElementArray(hElm6,nElmCount6);
XRCS_freeElementArray(hElm7,nElmCount7);
XRCS_freeElement(elmName7);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}
if ( (JCHAR*)NULL != elmValue7)
{
jdeFputsConvert(lpBhvrCom, elmValue7, fpFlat1);
jdeFputsConvertCRLF(lpBhvrCom, _J("\r\n"), fpFlat1);
}
}
}
}
/* Code to get the value of Ident--End*/

/* Code to get the value of QuantityValue--Start*/
if (jdeStricmp(elmName7,_J("QuantityValue"))==0)
{
XRCSStatus = XRCS_getElementText(hElm7[i6],&elmValue7);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("get QuantityValue Value failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("get QuantityValue Value failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElement(elmName2);
XRCS_freeElementArray(hElm4,nElmCount4);
XRCS_freeElementArray(hElm5,nElmCount5);
XRCS_freeElementArray(hElm6,nElmCount6);
XRCS_freeElementArray(hElm7,nElmCount7);
XRCS_freeElement(elmName7);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}
if ( (JCHAR*)NULL != elmValue7)
{
jdeFputsConvert(lpBhvrCom, elmValue7, fpFlat1);
jdeFputsConvertCRLF(lpBhvrCom, _J(","), fpFlat1);
}
}
/* Code to get the value of QuantityValue--End*/

/* Code to get the value of RequestedDeliveryDate--Start*/
if (jdeStricmp(elmName7,_J("RequestedDeliveryDate"))==0)
{
XRCSStatus = XRCS_getElementText(hElm7[i6],&elmValue7);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("get RequestedDeliveryDate Value failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("get RequestedDeliveryDate Value failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElement(elmName2);
XRCS_freeElementArray(hElm4,nElmCount4);
XRCS_freeElementArray(hElm5,nElmCount5);
XRCS_freeElementArray(hElm6,nElmCount6);
XRCS_freeElementArray(hElm7,nElmCount7);
XRCS_freeElement(elmName7);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}
if ( (JCHAR*)NULL != elmValue7)
{
jdeFputsConvert(lpBhvrCom, elmValue7, fpFlat1);
jdeFputsConvertCRLF(lpBhvrCom, _J("\r\n"), fpFlat1);
}
}
/* Code to get the value of RequestedDeliveryDate--End*/

XRCSStatus = XRCS_getElementChildren(hElm7[i6],&hElm8,&nElmCount8);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("XRCS_getElementChildren8 failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("XRCS_getElementChildren8 failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElement(elmName2);
XRCS_freeElementArray(hElm4,nElmCount4);
XRCS_freeElementArray(hElm5,nElmCount5);
XRCS_freeElementArray(hElm6,nElmCount6);
XRCS_freeElementArray(hElm7,nElmCount7);
XRCS_freeElement(elmName7);
XRCS_freeElementArray(hElm8,nElmCount8);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}

for(i7=0;i7<nElmCount8;i7++)
{
XRCSStatus = XRCS_getElementChildren(hElm8[i7],&hElm9,&nElmCount9);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("XRCS_getElementChildren9 failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("XRCS_getElementChildren9 failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElement(elmName2);
XRCS_freeElementArray(hElm4,nElmCount4);
XRCS_freeElementArray(hElm5,nElmCount5);
XRCS_freeElementArray(hElm6,nElmCount6);
XRCS_freeElementArray(hElm7,nElmCount7);
XRCS_freeElement(elmName7);
XRCS_freeElementArray(hElm8,nElmCount8);
XRCS_freeElementArray(hElm9,nElmCount9);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}

for(i8=0;i8<nElmCount9;i8++)
{
/* Code to get the value of PartID--Start*/
XRCSStatus = XRCS_getElementName(hElm9[i8],&elmName9);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("get PartID Name failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("get PartID Name failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElement(elmName2);
XRCS_freeElementArray(hElm4,nElmCount4);
XRCS_freeElementArray(hElm5,nElmCount5);
XRCS_freeElementArray(hElm6,nElmCount6);
XRCS_freeElementArray(hElm7,nElmCount7);
XRCS_freeElementArray(hElm8,nElmCount8);
XRCS_freeElementArray(hElm9,nElmCount9);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}
if (jdeStricmp(elmName7,_J("BuyerPartNumber"))==0)
{
if (jdeStricmp(elmName9,_J("PartID"))==0)
{
XRCSStatus = XRCS_getElementText(hElm9[i8],&elmValue9);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("get PartID Value failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("get PartID Value failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElement(elmName2);
XRCS_freeElementArray(hElm4,nElmCount4);
XRCS_freeElementArray(hElm5,nElmCount5);
XRCS_freeElementArray(hElm6,nElmCount6);
XRCS_freeElementArray(hElm7,nElmCount7);
XRCS_freeElementArray(hElm8,nElmCount8);
XRCS_freeElementArray(hElm9,nElmCount9);
XRCS_freeElement(elmName7);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}
if ( (JCHAR*)NULL != elmValue9)
{
jdeFputsConvert(lpBhvrCom, elmValue9, fpFlat1);
jdeFputsConvertCRLF(lpBhvrCom, _J(","), fpFlat1);
}
}
}
/* Code to get the value of PartID--End*/
XRCSStatus = XRCS_getElementChildren(hElm9[i8],&hElm10,&nElmCount10);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("XRCS_getElementChildren10 failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("XRCS_getElementChildren10 failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElement(elmName2);
XRCS_freeElementArray(hElm4,nElmCount4);
XRCS_freeElementArray(hElm5,nElmCount5);
XRCS_freeElementArray(hElm6,nElmCount6);
XRCS_freeElementArray(hElm7,nElmCount7);
XRCS_freeElement(elmName7);
XRCS_freeElementArray(hElm8,nElmCount8);
XRCS_freeElementArray(hElm9,nElmCount9);
XRCS_freeElementArray(hElm10,nElmCount10);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}

for(i9=0;i9<nElmCount10;i9++)
{
/* Code to get the value of RefNum--Start*/
XRCSStatus = XRCS_getElementName(hElm10[i9],&elmName10);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("get RefNum Name failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("get RefNum Name failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElement(elmName2);
XRCS_freeElementArray(hElm4,nElmCount4);
XRCS_freeElementArray(hElm5,nElmCount5);
XRCS_freeElementArray(hElm6,nElmCount6);
XRCS_freeElementArray(hElm7,nElmCount7);
XRCS_freeElementArray(hElm8,nElmCount8);
XRCS_freeElementArray(hElm9,nElmCount9);
XRCS_freeElementArray(hElm10,nElmCount10);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}
if (jdeStricmp(elmName10,_J("RefNum"))==0)
{
XRCSStatus = XRCS_getElementText(hElm10[i9],&elmValue10);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("get RefNum Value failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("get RefNum Value failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElement(elmName2);
XRCS_freeElementArray(hElm4,nElmCount4);
XRCS_freeElementArray(hElm5,nElmCount5);
XRCS_freeElementArray(hElm6,nElmCount6);
XRCS_freeElementArray(hElm7,nElmCount7);
XRCS_freeElementArray(hElm8,nElmCount8);
XRCS_freeElementArray(hElm9,nElmCount9);
XRCS_freeElementArray(hElm10,nElmCount10);
XRCS_freeElement(elmName7);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}
if ( (JCHAR*)NULL != elmValue10)
{
if(i6==0)
{
jdeFputsConvert(lpBhvrCom, elmValue10, fpFlat1);
jdeFputsConvertCRLF(lpBhvrCom, _J(","), fpFlat1);
}
}
}
/* Code to get the value of RefNum--End*/

XRCSStatus = XRCS_getElementChildren(hElm10[i9],&hElm11,&nElmCount11);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("XRCS_getElementChildren11 failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("XRCS_getElementChildren11 failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElement(elmName2);
XRCS_freeElementArray(hElm4,nElmCount4);
XRCS_freeElementArray(hElm5,nElmCount5);
XRCS_freeElementArray(hElm6,nElmCount6);
XRCS_freeElementArray(hElm7,nElmCount7);
XRCS_freeElement(elmName7);
XRCS_freeElementArray(hElm8,nElmCount8);
XRCS_freeElementArray(hElm9,nElmCount9);
XRCS_freeElementArray(hElm10,nElmCount10);
XRCS_freeElementArray(hElm11,nElmCount11);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
} /*end of for loop10*/
} /*end of for loop9*/
} /*end of for loop8*/
} /*end of for loop7*/
} /*end of for loop6*/
} /*end of for loop5*/
} /*end of for loop4*/
} /*end of for loop3*/
} /*end of for loop2*/

/* Code to get the value of OrderIssueDate--Start*/
if (jdeStricmp(elmName2,_J("OrderIssueDate"))==0)
{
XRCSStatus = XRCS_getElementText(hElm2[i1],&elmValue2);
if(XRCSStatus != XRCS_SUCCESS)
{
jdeVWriteLogEntry(_J("B55001XM"), __FILE__, __LINE__, 0, _J("get OrderIssueDate value failed"));
jdeStrcpy((JCHAR *)lpDS->szErrorMessage,(const JCHAR *)_J("get OrderIssueDate value failed"));
XRCS_freeElement(hRootElm);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElement(elmName2);
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_terminateEngine();
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
return ER_ERROR;
}
if ( (JCHAR*)NULL != elmValue2)
{
jdeFputsConvert(lpBhvrCom, elmValue2, fpFlat1);
jdeFputsConvertCRLF(lpBhvrCom, _J(","), fpFlat1);
}
}
/* Code to get the value of OrderIssueDate--End */
} /*end of for loop1*/
}
   /************************************************************************ 
    * Function Clean Up 
    ************************************************************************/ 
XRCS_freeParser(hParser);
XRCS_freeDocument(hDoc);
XRCS_freeElementArray(hElm1,nElmCount1);
XRCS_freeElementArray(hElm2,nElmCount2);
XRCS_freeElementArray(hElm3,nElmCount3);
XRCS_freeElementArray(hElm4,nElmCount4);
XRCS_freeElementArray(hElm5,nElmCount5);
XRCS_freeElementArray(hElm6,nElmCount6);
XRCS_freeElementArray(hElm7,nElmCount7);
XRCS_freeElementArray(hElm8,nElmCount8);
XRCS_freeElementArray(hElm9,nElmCount9);
XRCS_freeElementArray(hElm10,nElmCount10);
XRCS_freeElementArray(hElm11,nElmCount11);
XRCS_freeElement(hRootElm);
jdeFclose(fpFlat1);
jdeFclose(fpFlat2);
XRCS_terminateEngine();
  
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:
 **************************************************************************/