Dynamic Update of UBE Data Selections

SCoyle

Member
Hi All...is there any way to update the data selection criteria of a UBE version from within another UBE? I have a UBE that processes job numbers, I want to add these job numbers to the data selections of another UBE and then call that UBE. Thanks for any help.....Steve
 
Here is a possible method. Before calling the second UBE write the job numbers to a temporary file. You might even be able to use a custom UDC to store the job numbers. Then call the second UBE. In the Initialise Section ER of the second UBE create a loop to loop through the job numbers from where you have stored them (using SELECT and FETCHNEXT table IO functions if needed) and use the Set User Selection system function (general) to set the data selection to select the job number. I will provide more detail/info if needed.
 
OK...I understand what you're saying but it brings up another question. I would probably key the temp file with User/Date/Time but the UBE that reads this file must have access to the time. The UBE I need to read the file is a JDE UBE. Is there any way to pass the time as a parameter without modifying JDE's report interconnect?
 
To put my suggestion into action you will need to modify the ER in the second (JDE) UBE that you are calling from the first UBE. So the JDE UBE will need to be modified. If you don't want to modify the standard JDE UBE it might be possible, depending on exactly what you want to do and to which UBE's you are referring, to "clone" the standard JDE UBE.

If the reason you would include and key the temp file with user/date/time is to indentify the records to read so that you get the correct job numbers, then all you need to do is modify the ER in the second (JDE) UBE to delete all the records in the temp file when the data selection set up is complete. Then the temp file would always only contain the job numbers you need.

However, if this temp file is going to be accessed at the same time by UBE's requiring different sets of job numbers, both contained in the temp file, then you will need to include and key the temp file with user/date/time as you say. In any case it would be best to delete the records after they have been used. I cannot think of another way of passing the user/date/time to the second (JDE) UBE apart from the report interconnect, that would work.

Maybe someone else can. There may be a better way of accomplishing your requirements.
 
Back
Top