viernes, 1 de abril de 2022

[JD Edwards - BSSV] Import external JAVA library (ENG)

Hi jde friends,

Sometimes, we find ourselves with need to extend JD Edwards functionalities and we find many functionalities in JAVA packages or libraries, JAVA is one of the most languages and platform used in technologies. For example, recently I worked in a project to implement Bidimensional code QR. So, what is the JDE solution?


Well, we use a JAVA library to facilitate the coding. In this case IdAutomation (that is license paid, but there are other as Google (Zxing) and many other open source, depending on each case and use). So, this provider provides a java library in witch it has a class and a method for facility implementation, that we pass the string to be encoded and it return as array string encoded. Later, to this array we put a font in BIPublisher and we already have our encoded QR code. Easy right?

Then, we generated our BSSV object (and we cannot forget our BSFN in C to communicate our report or application with BSSV component), with our class and main method. But, how import IdAutomation QR library to our JD Developer project?

1. On our project, we press the rigth button and in the context menu click on Project Properties:

2. Press in Librares and Classpath menu and next press button Add JAR Directory

3. Select the JAVA library (I recommend leaving in the JDE Path JDE system\Classes (later I explain the reason)

4. Press on Open button in the dialog, and it is added to the project:

5. Press OK and save the project. We can use library classes and method importing to our java class.

               boolean bestMask = true;           // Best pattern mask
               
               String resultQREncode = qre.FontEncode(dataToEncode, applyTilde, encodingMode, errorCorrectionLevel, version, bestMask);
               internalVO.setSzQREncodedData(resultQREncode);
               
               printMsg(context, "Encoded => ");
               printMsg(context, resultQREncode);

And we have everything ready in our project!!!

To deploy, we have to configure system to use a external library for when compiling and generating deploy package it imports the external library in jar jde deploy package. This configuration is done in deploy server (although I also configure it in my fat client).

1. Copy the library to system\Classes folder:

2. Modify the file sbffoundation.ini inside the same folder, in the section [Foundation] y and add a line "LIB" + "next sequence" + "=" + "library name"

And with this we already our BSSV project with an external library ready to deploy!

Pd: I have also used an external library for Datamatrix code, integrate with Webcenter Content through RIDC standard java package, and recently to create a proxy client webservice through an external library with java wsimport command to integrate with Salesforce that you can see here.

Good code JDE Friends!

sábado, 19 de febrero de 2022

[JD Edwards] Form Charts - ChartControl Component (ENG)

Hola jdedwerds,

I recently worked on a project where we needed to display KPI's of sales orders processed automatically, so beside showing the boring tables with the processed orders info and the percentage calculation in certain fields, I thought of adding a graph which is always more visually pleasing.

This time I have done it natively, it's true that we have had this tool for quite some time but I've rarely seen it used even in a standard apps - on the P41021 availability app and on some planning/production applications- and I don't understand why (it are not the most powerful charts for that there are other tools, but for simple cases use it should be enough)

It's true that we have other tools in the environment itself such as One View Reporting OVR or that KPI's are usuarlly analyzed in business with Business Intelligence BI tools, but why not give them a touch of color to our JDE applications??




The first thing to do is to insert a ChartControl in our form:



Then, in the event where we have the information to display (after reading each grid line, at the end of the grid, etc.) we create a variable to load the XML tags needed for the chart -in my case a foot chart-. Then, we load the information to the chart through the Set Data XML function available in the Chart Control Functions section of the System Functions. And finally, we perform the action to draw the chart with the Draw Chart function avaible in the same section previously seen:




Therefore, the code would like this:


The following chart types are available:

  • bar_basic
  • bar_basic_percent
  • cluster_bar_basic
  • combo_basic
  • line_basic
  • pie_basic
  • pie_ontime
  • stacked_bar_basic
  • stacked_bar_ontime

We can perform visualization tests of graphs and examples created in our installation on our web server with the resource http://<webhost>:<webport>/jde/GraphPrototype.maf




For more oficial information in the next link: https://support.oracle.com/epmos/faces/DocumentDisplay?id=648865.1

The next thing I want to integrate are external charts from Google Charts, through a TextBlock and with the API's provided by Google. I'll try to make a POC, soon.

I hope you found it interesting and useful.

Best regards.

Alfredo.

viernes, 18 de febrero de 2022

[JD Edwards] Gráficos Formularios - Componente ChartControl (ESP)

Hola jdedwerds,

Recientemente trabajé en un proyecto donde necesitaba mostrar unos KPI's de pedidos de ventas procesados automáticamente, por lo que aparte de mostrar las aburridas tablas con la info de pedidos procesados y el cálculo del porcentaje en ciertos campos, se me ocurrió añadir una gráfica que siempre resulta más agradable visualmente. 

Ésta vez lo hice de manera nativa, es cierto que tenemos desde hace bastante tiempo ésta herramienta pero pocas veces la he visto ser utilizada incluso de manera estándar -en pantalla disponibilidad P41021 y en algunas de planificación/producción- y no entiendo el motivo (no son las gráficas más potentes para eso existen otras herramientas, pero para un uso y casos sencillos debería ser suficiente).. 

Es cierto que disponemos de otras herramientas en el propio entorno como One View Reporting OVR o que normalmente los KPI's se analizan en negocio con herramientas de Business Intelligence BI, pero por qué no darles un toque de color a nuestras pantallas JDE??




Lo primero que debemos realizar es insertar un ChartControl en nuestro formulario:



A continuación en el evento donde dispongamos de la información para mostrar (después de leer cada línea, al finalizar el grid, etc.), lo que haremos será crear una variable para cargar las etiquetas XML necesarias para el gráfico -en mi caso un gráfico de pie-. Posteriormente, cargamos la información al gráfico a través de la función Set Data XML disponible en la sección Chart Control Functions de las System Functions. Y finalmente realizamos la acción para que se dibuje el gráfico con la función Draw Chart disponible en la misma sección anteriormente vista:




Por lo cual, el código quedaría tal que así:


Disponemos de los siguientes tipos de gráficos:

  • bar_basic
  • bar_basic_percent
  • cluster_bar_basic
  • combo_basic
  • line_basic
  • pie_basic
  • pie_ontime
  • stacked_bar_basic
  • stacked_bar_ontime

Podemos realizar pruebas de visualización de gráficas y ejemplos creados en nuestra instalación, en nuestro servidor web con el recurso http://<webhost>:<webport>/jde/GraphPrototype.maf




Para más información oficial en el siguiente enlace: https://support.oracle.com/epmos/faces/DocumentDisplay?id=648865.1

Lo siguiente que quiero integrar son gráficas externas de Google Charts, mediante un TextBlock y con las API's facilitadas por Google. Intentaré hacer una POC, próximamente.

Espero les haya resultado interesante y útil.

Un saludo,

Alfredo.