Arrays in JDE

Rauf

Rauf

VIP Member
Is the term array is familiar to JDE ? What replaces array in JDE ? For example, if I want to pass ten names to a report, what should I do ? My thought is to have a longer processing option item and place each name separated by commas. Even if I do so, how can I manipulate inside the report using ER, as ER supports only limited functionality.
grin.gif
 
I'm curious, pass 10 names from where? If you are passing from an application you can use the report data structure or use a custom table. If you want to pass in runtime you can pass it through data selection (assuming you just want to check with the view) or like you said use a processing option (you have system functions to help you out). JDE doesn't have the concept of an array in the ER section but you can always use a BSFN and then use array
wink.gif
 
Yeah we don't have an array like an RPG array no.

We have cache which will do the same thing, manipulated with a pointer. Begin doc, Edit Line, End doc etc.
Lots of JDE BSFNs use cache to store many like records (just like an array)

Can you please explain the 10 names things a bit more, as you may find we will find a far simpler way to achieve your goal than any form of array
smile.gif
 
Hi Rauf, Yes we have no arrays. Here are some solutions that I have implemented in the past.

Whenever it is setup data that you would normally put in processing options, you can use one field and separate the values (CSV-like), or you can bite the bullet and put in 10 (or more) proc. opt. fields in the PO template. Both of these methods make it a little more difficult to code for (parsing and referring to each PO name) and more difficult to populate by the user (having to remember to format with commas or checking all the fields each time). I typically create a setup table with a unique identifier for the general key with a counter for each repetitive line (kinda like an array) and build an application around it (doesn't really take that long). This way users can set up several options at once and then all they have to do is put a processing option for the unique identifier in the template.

If the array is for information being passed between forms or form to report, then I use the same method only I call it a work file where I create a unique ID and pass the ID between control objects. This is basically what the original cache options would fall back on when the memory functions were still being worked out. I think. Anyway, many of the MBFs still have an option to use memory or workfile depending upon a flag value.

Ben again,
 
Back
Top