Third-party console application to populate JDE E1 database

0

Here is a sample code(pre-built) for console application with JDE E1 functionality.
It performs search for customer number 3333 in F0301 table and insert exactly same data to F0301 table with new customer number 33333333 (e.g. it copies 3333 customer to 33333333 customer).
Pre-Built solution and source code (JDE E1 XE, Visual Studio 6.0)

Header file stdafx.h

// stdafx.h : include file for standard system include files,
//  or project specific include files that are used frequently, but
//      are changed infrequently
//

#if !defined(AFX_STDAFX_H__CF1308CC_7B91_44F5_852D_82F8301BB19F__INCLUDED_)
#define AFX_STDAFX_H__CF1308CC_7B91_44F5_852D_82F8301BB19F__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers

#include <stdio.h>

// TODO: reference additional headers your program requires here
#define KERNEL /D "KERNEL"
#include "jde.h"
#include <stdio.h>
#pragma comment(lib, "JDEKRNL.lib")
#pragma comment(lib, "jdel.lib")
#include "conio.h"
#include <f0301.h>
#include <b9800100.h>

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__CF1308CC_7B91_44F5_852D_82F8301BB19F__INCLUDED_)

#ifndef DATASTRUCTURE_D550301
#define DATASTRUCTURE_D550301

typedef struct tagDSD550301
{
	MATH_NUMERIC      mnSourceCustomer;
	MATH_NUMERIC      mnTargetCustomer;
	char              szErrorCode[11];
} DSD550301, *LPDSD550301;

#define IDERRmnSourceCustomer_1                   1L
#define IDERRmnTargetCustomer_2                   2L
#define IDERRszErrorCode_3                        3L

#endif

Source file b7333console.cpp

// b7333console.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

int _cdecl main(int argc, char* argv[])
{
/************************************************************************
*  Variable declarations
    ************************************************************************/

	HUSER hUser;
	HENV hEnv;
	char	pEnv[255],pUser[255],pPass[255];
	JDEDB_RESULT rcode;
	ID                           idReturnValue                            = ER_SUCCESS;        /* Return Code */
    ID                           idJDEDBReturn                         = JDEDB_PASSED;    /* DB API Return Code */
    HREQUEST          hRequestF0301                         = (HREQUEST)NULL;
	LPBHVRCOM	 lpBhvrCom	 = NULL;
	LPCG_BHVR	 lpVoid	 = NULL;
	/************************************************************************
    * Declare structures
    ************************************************************************/
    F0301                    dsF0301;
    KEY1_F0301        dsF0301Key1;
    DSD9800100        dsD9800100;

	// Initialize Environment Handle
	if ( (rcode = JDB_InitEnv(&hEnv)) != JDEDB_PASSED)
	{
		return(FALSE);
	}

	// Initialize User
	if ( (rcode = JDB_InitUser(hEnv, &hUser, NULL, JDEDB_COMMIT_AUTO))
		!= JDEDB_PASSED)
	{
		return(FALSE);
	}
	else
	{
		if(lpBhvrCom==NULL) /* GET LPBHVRCOM!!!!!!! */
			jdeCreateBusinessFunctionParms(hUser,&lpBhvrCom,(LPVOID*)&lpVoid);
/************************************************************************
* Main Processing
		************************************************************************/
		/* Open Table */
		idJDEDBReturn = JDB_OpenTable(hUser,NID_F0301,ID_F0301_ADDRESS,0,
			(unsigned short)0,(char *) NULL,&hRequestF0301);

		if (idJDEDBReturn == JDEDB_PASSED)
		{
			/* Retrieve source record */
			LongToMathNumeric(3333, &dsF0301Key1.a5an8);
//			MathCopy(&dsF0301Key1.a5an8,&lpDS->mnSourceCustomer);
			idJDEDBReturn = JDB_FetchKeyed(hRequestF0301,(ID)0,
				(void *)&dsF0301Key1,
				(unsigned short)1,(LPVOID)&dsF0301,
				(int)FALSE);
			if (idJDEDBReturn == JDEDB_PASSED)
			{
				/* Modify fields to use new customer number */
				LongToMathNumeric(33333333, &dsF0301.a5an8);
//				MathCopy(&dsF0301.a5an8,&lpDS->mnTargetCustomer);
				LongToMathNumeric(3333, &dsF0301.a5arpy);
//				MathCopy(&dsF0301.a5arpy,&lpDS->mnTargetCustomer);

				/* Get and set the data for the audit fields */
				memset((void *)(&dsD9800100),(int)(''),sizeof(DSD9800100));
				idReturnValue = jdeCallObject("GetAuditInfo", NULL,
					lpBhvrCom,lpVoid,(LPVOID)&dsD9800100,
					(CALLMAP *)NULL,(int)0,(char *)NULL,
					(char *)NULL,(int)0);
				if (idReturnValue == ER_SUCCESS)
				{
					strcpy((char *)dsF0301.a5user,(const char *) dsD9800100.szUserName);
					strcpy((char *)dsF0301.a5jobn,(const char *) dsD9800100.szWorkstation_UserId);
					MathCopy(&dsF0301.a5upmt,&dsD9800100.mnTime);
					memcpy((void *)&dsF0301.a5upmj,(const void *)&dsD9800100.jdDate, sizeof(JDEDATE));
					memcpy((void *)&dsF0301.a5daoj,(const void *)&dsD9800100.jdDate, sizeof(JDEDATE));
					strcpy((char *)dsF0301.a5popn,(const char *) dsD9800100.szUserName);

				}
				strcpy((char *)dsF0301.a5pid,(const char *)"WIN32APP");

				/* Insert new record into table */
				idJDEDBReturn = JDB_InsertTable(hRequestF0301,NID_F0301, ID_F0301_ADDRESS,(void *)&dsF0301);
				if (idJDEDBReturn == JDEDB_PASSED)
					printf("","%s");
				else
					printf("018L", "%s");
			}
			else
			{
				printf("025B", "%s");
			}
		}
		else
		{
			printf("130I\r\n", "%s");
		}
		JDB_CloseTable (hRequestF0301);
    JDB_FreeBhvr(hUser);
	}

	if (lpVoid)
	{
			jdeFree(((LPCG_BHVR)(lpVoid))->lpErrorEventKey);
			jdeErrorTerminateEx(((LPCG_BHVR)(lpVoid))->lpHdr);
			jdeFreeBusinessFunctionParms(((LPBHVRCOM)(lpBhvrCom)),(LPCG_BHVR)(lpVoid));
			lpBhvrCom = NULL;
			lpVoid = NULL;
	}

	if (hUser)
	{
		if ((rcode = JDB_FreeUser(hUser)) != JDEDB_PASSED)
		{
			return(FALSE);
		}
	}

	if (hEnv)
	{
		if ((rcode = JDB_FreeEnv(hEnv)) != JDEDB_PASSED)
		{
			return(FALSE);
		}
	}

	printf("JDE initialized and deinitialized successfully\r\n", "%s");
	_getch();

	return 0;
}
SELECT F0301.A5AN8, F0301.A5USER, F0301.A5PID, F0301.A5JOBN, F0301.A5UPMJ, F0301.A5UPMJ, F0301.A5ASN
FROM F0301
WHERE (((F0301.A5AN8)=3333)) OR (((F0301.A5AN8)=33333333));

Query results before application run

Query results after application run

Visual studio settings link here

Original idea was brought from Scott’s Library
Happy coding !

Report Design Aid – Section – Sequencing (Level Break)

0

If you need level break down to particular sequencing column, make sure you have checked all superior columns to have level break.

BSFN – Remove illegal characters for a string

2

This core business-function (B1702080) removes illegal characters(new-lines) from a string.

PJSTR szTmp = lpName;
while (*szTmp)
{
    switch (*szTmp)
    {
        case _J('^'):
        case _J('\n'):
        case _J('\r'):
        *szTmp = _J(' ');
        break;
        default:
        break;
    }
    szTmp++;
}
return;

About

Here is just another JD Edwards Developer’s Blog.

Usefull tips, code samples, interactive tutorials and other neats will be posted here.

Please feel free to contact me via email, skype or linkedin.

Skype Me™!

Disclaimer

1. Acceptance of our Terms

By visiting the website jdedev.org, viewing, accessing or otherwise using any of the services or information created, collected, compiled or submitted to jdedev.org, you agree to be bound by the following Terms and Conditions of Service. If you do not want to be bound by our Terms your only option is not to visit, view or otherwise use the services of jdedev.org. You understand, agree and acknowledge that these Terms constitute a legally binding agreement between you and jdedev.org and that your use of jdedev.org shall indicate your conclusive acceptance of this agreement.

2. Provision of Services

You agree and acknowledge that jdedev.org is entitled to modify, improve or discontinue any of its services at its sole discretion and without notice to you even if it may result in you being prevented from accessing any information contained in it. Furthermore, you agree and acknowledge that jdedev.org is entitled to provide services to you through subsidiaries or affiliated entities.

3. Proprietary Rights

You acknowledge and agree that jdedev.org may contain proprietary and confidential information including trademarks, service marks and patents protected by intellectual property laws and international intellectual property treaties. jdedev.org authorizes you to view and make a single copy of portions of its content for offline, personal, non-commercial use. Our content may not be sold, reproduced, or distributed without our written permission. Any third-party trademarks, service marks and logos are the property of their respective owners. Any further rights not specifically granted herein are reserved.

4. Submitted Content

When you submit content to jdedev.org you simultaneously grant jdedev.org an irrevocable, worldwide, royalty free license to publish, display, modify, distribute and syndicate your content worldwide. You confirm and warrant that you have the required authority to grant the above license to jdedev.org.

5. Termination of Agreement

The Terms of this agreement will continue to apply in perpetuity until terminated by either party without notice at any time for any reason. Terms that are to continue in perpetuity shall be unaffected by the termination of this agreement.

6. Disclaimer of Warranties

You understand and agree that your use of jdedev.org is entirely at your own risk and that our services are provided “As Is” and “As Available”. jdedev.org does not make any express or implied warranties, endorsements or representations whatsoever as to the operation of the jdedev.org website, information, content, materials, or products. This shall include, but not be limited to, implied warranties of merchantability and fitness for a particular purpose and non-infringement, and warranties that access to or use of the service will be uninterrupted or error-free or that defects in the service will be corrected.

7. Limitation of Liability

You understand and agree that jdedev.org and any of its subsidiaries or affiliates shall in no event be liable for any direct, indirect, incidental, consequential, or exemplary damages. This shall include, but not be limited to damages for loss of profits, business interruption, business reputation or goodwill, loss of programs or information or other intangible loss arising out of the use of or the inability to use the service, or information, or any permanent or temporary cessation of such service or access to information, or the deletion or corruption of any content or information, or the failure to store any content or information. The above limitation shall apply whether or not jdedev.org has been advised of or should have been aware of the possibility of such damages. In jurisdictions where the exclusion or limitation of liability for consequential or incidental damages is not allowed the liability of jdedev.org is limited to the greatest extent permitted by law.

8. External Content

jdedev.org may include hyperlinks to third-party content, advertising or websites. You acknowledge and agree that jdedev.org is not responsible for and does not endorse any advertising, products or resource available from such resources or websites.

9. Jurisdiction

You expressly understand and agree to submit to the personal and exclusive jurisdiction of the courts of the country, state, province or territory determined solely by jdedev.org to resolve any legal matter arising from this agreement or related to your use of jdedev.org. If the court of law having jurisdiction, rules that any provision of the agreement is invalid, then that provision will be removed from the Terms and the remaining Terms will continue to be valid.

10. Entire Agreement

You understand and agree that the above Terms constitute the entire general agreement between you and jdedev.org. You may be subject to additional Terms and conditions when you use, purchase or access other services, affiliate services or third-party content or material.

11. Changes to the Terms

jdedev.org reserves the right to modify these Terms from time to time at our sole discretion and without any notice. Changes to our Terms become effective on the date they are posted and your continued use of jdedev.org after any changes to Terms will signify your agreement to be bound by them.

Resume

Download Resume (short) in WordResume (complete) in Word

Sergei Kurian

Oracle JD Edwards EnterpriseOne Technical Consultant/Developer

jdedev@gmail.com

Summary:

  • 9+ years in Information Technology
  • 7+ years Oracle JDE E1 Development and CNC
  • 2+ years of Consulting experience
  • Extensive knowledge of GUI and Client-Server application development
  • Development team lead
  • M.Sc in Computer Science

Key skills:

  • Oracle JDE E1 installation and implementation
  • Oracle JDE E1 development, modification enhancement and testing
  • Full range of Oracle JDE E1 Development Tools
  • Interactive Applications design and development (Form Design Aid)
  • Batch Applications design and development (Report Design Aid)
  • Named Event Rules (NER) and “C” Business-Function development (Business-Function Design Aid, Microsoft Visual C++)
  • Named Event Rules (NER) debugger
  • “C” Business-Function debugger (Microsoft Visual C++ Debug)
  • Oracle JDE E1 Interoperability development (XML, Z-Tables, Table Conversion)
  • SQL (T-SQL, PL/SQL)
  • Creating technical specifications
  • Creating user manuals
  • Preparation and delivery of technical training
  • Ensure full system and data integrity, security control and information exchange between all sub-systems

Education
MSc in Computer Science, National Technical University of Ukraine (Kiev Polytechnic Institute), 1995 – 2001

Honors and Awards
Oracle JD Edwards EnterpriseOne – Technical Foundation Implementation Champion Proficiency Level Assessment

IT Development Team Lead at ELKO Group
July 2008 – Present (1 year 7 months)

  • Oracle JD Edwards E1 development team management
  • Preparation of logically based projects for further distribution of tasks between members of Oracle JD Edwards E1 development team
  • Preparation of reports regarding status of projects for Company management
  • Identification of crucial tasks and distribution of resources for optimal solution of problems related to development of new and modification of existing business processes and applications of Oracle JD Edwards E1
  • Assistance to system analysts during the research of business processes, analysis of goals and problems exposed by system analysts, transformation of formalized solutions, provided by system analysts, in-depth study of technical tasks for further development of business solutions on the basis of Oracle JD Edwards E1
  • Design and development solutions for Oracle JD Edwards E1, checking/testing of correct operation of applications, so that they correspond to announced needs of end-users of Oracle JD Edwards E1
  • Preparation and delivery of technical trainings
  • Creating user manuals, end-user training and support

Latest Implementation Projects:

  • Warehouse – Warehouse wireless scanners implementation. Design, development, testing and implementation of Oracle JD Edwards E1 applications for wireless scanners. Benefits: Step by step control of picking, packing and shipping processes. Security control and data integrity.
  • Warehouse – Warehouse employee efficiency reporting system. Analyze data collected during picking, packing and shipping process, using wireless scanners on different stages of warehouse process. Benefits: Warehouse staff efficiency control, human and monetary resources economy.
  • Account Receivable – Customers bonus system design, development and implementation. Benefits: customer attraction, increased financial stability, more precise warehouse turnover.
  • Account Receivable – Custom delinquency fee system design, development and implementation. Benefits: more flexible client credit management, increased performance of fee calculation process.
  • Accounts Receivable/Accounts Payable – Client-Bank automation – xml based automation of receipts generation, invoice matching, and voucher generation between Oracle JDE E1 and Client-bank application. Benefits: automated routine operations, which may cause data corruption and dis-integrity.

3 recommendations available upon request

Business Applications Consultant at OBI Ukraine
November 2007 – May 2008 (7 months)

  • Study of existing automated computer systems characteristics that are corporate standards of OBI Company. Identification and document recording of required modifications of standard systems for complete correspondence to Ukrainian legislation.
  • Development and implementation of new automated computer systems, taking into consideration all regulations of Ukrainian legislation that cannot be provided by automated computer systems that are corporate standards of OBI Company.
  • Preparation of reports regarding project status for Company management.
  • Training for end-users, drawing up of manuals for operation with automated computer systems.
  • Technical and functional support of automated computer systems to be used.

Senior JDE E1 Consultant at Kvazar-Micro Business Consulting
August 2006 – October 2007 (1 year 3 months)

  • Preparation and delivery of technical training for Oracle JD Edwards E1 developers of Kvazar-Micro Business Consulting.
  • Consulting of software engineers regarding actual issues of business solutions architecture development and modifications of Oracle JD Edwards E1
  • Design of technical architecture of business solutions on the basis of Oracle JD Edwards E1
  • Implementation of such solutions as functionally finished objects of Oracle JD Edwards E1 system (reports, applications, business processes, etc.)
  • Participation in the projects of Oracle JD Edwards E1 implementation as key Software Engineer
  • Preparation of technical documents according to standard or modified business processes and Oracle JD Edwards E1 objects. Preparation of user manuals and reference materials for end user of Oracle JD Edwards
  • Support of end users of Oracle JD Edwards E1

Implementation Projects:

  • Oracle JD Edwards E1 (8.12) Roll-Out at “JSC Micron” (Microelectronic Manufacturing, Moscow, Russia)
  • Oracle JD Edwards E1 (8.11) Roll-Out at “Sitronics” (Consumer Electronics Manufacturing, Moscow, Russia

2 recommendations available upon request

JDE E1 Developer at Independent Professional Services
August 2005 – August 2006 (1 year 1 month)

  • Research of existing standard and modified business processes so to identify the required modifications in the Oracle JD Edwards E1 system objects
  • Research of operating algorithms of Oracle JD Edwards E1 objects
  • Elaboration of requirements and technical tasks for modification of business processes and Oracle JD Edwards E1 objects to meet all business requirements
  • Modification of standard and creation of new JD Edwards E1 objects to meet all business requirements on the basis of technical tasks
  • Documenting of development process so to simplify the follow us support and modification of the Oracle JD Edwards E1 objects
  • Provision of support for final users of Oracle JD Edwards E1 system
  • Creating user manuals and documents for training of end users of Oracle JD Edwards E1 system
  • Operative support of continuous operation of: Oracle JD Edwards E1 system, IBM DB2 DBMS, Citrix terminal server’s continuous operation maintenance

JDE E1 Developer at Robertson and Blums
May 2002 – August 2005 (3 years 4 months)

  • Studying of functional and development facilities of Oracle JD Edwards E1 system, so to identify required modifications of standard application and system business processes
  • Studying of technical features and topology of distributed computer environment of Oracle JD Edwards E1 system for further optimization and acceleration of system operation speed
  • Development of Oracle JD Edwards E1 modifications so to implement business requirements of end users
  • Documenting Oracle JD Edwards E1 objects modification process so to simplify the process of support and system modifications
  • Creating user manuals and documents for training of end users of Oracle JD Edwards E1 system

Implementation Projects:

  • Oracle JD Edwards E1 (XE) Roll-Out at “Alidi” (Consumer goods Distributor, Nizniy Novgorod, Russia)
  • Oracle JD Edwards E1 (XE) Roll-Out at “Alba Ukraine” (Pharmaceutical Distributor, Kyiv, Ukraine
  • Oracle JD Edwards E1 (XE) Roll-Out at “Optima Pharm” (Pharmaceutical Distributor, Kyiv, Ukraine)
  • Oracle JD Edwards E1 (8.10) Roll-Out at “Khortytsa” (Alcohol Beverages Manufacturing, Zaporizhzhya, Ukraine

4 recommendations available upon request

Localization Analyst at Robertson and Blums
September 2000 – May 2002 (1 year 9 months)

  • Localization Team Lead
  • Software/Documentation/User Manual localization
  • Oracle JD Edwards E1 Documentation localization
Go to Top