Launch Batch Application/UBE Dynamically from Interactive Apps

There have been many instances where you need to call different Version of an UBE/ Batch application based on the parameters of the application. Doing that is very easy, where in you just need to pass the Version name dynamically and the Report Name is hard coded into the ER.

But, if there arises a situation to call the Report/UBE Dynamically, you flinch a little. No worries, its as easy to do.

Following are two methods of calling ANY UBE from an Interactive Application.

*Note: You can not do Report Interconnects, or set PO Values/Data Selection dynamically

Launch Batch Application system function

Launch Batch Application system function is used only for WEB application that will launch the UBE. The system function will act like the Report Interconnect. It will launch the UBE.

Parameters

Parameter Description I/O Required Notes
Report Name String I Y UBE Application ID
Version Name String I Y Y/N
Print Preview? Character I Y
Data Selection? Character I Y Y/N – Override the data selection
Data Sequencing? Character I Y Y/N – Override the data sequencing
Push Spec Only? Character I Y Y/N – submit version specification only
PO Template String I Y PO Data Structure
Prompt for values? Character I Y Y/N – Display the processing options dialog
Date Last Executed JDEDATE I Y Date
Data Source Override String I Y Server Name
JDE Log? Character I Y Y/N – Create JDE.log
JDEDebug Log? Character I Y Y/N – Create Jdedebug.log
UBE Logging Level Integer I Y Level of detail for Jdedebug.log
Jargon Code String I Y
Cover page? Character I Y Y/N – print cover page
Job Queue name String I Y
TC Prompting? Character I Y Y/N
Process Type Character I Y

Special Handling Instructions and Prerequisites
·    Must be used in a WEB application only.  Available on all events of Interactive applications


Business Functions to Launch a UBE

The Business Functions use the same JDE API – jdeLaunchUBEEx(); to launch the UBE.


B9800240 – Call UBE Application

Usage

Call UBE Application

“R55xxxxxx” -> szProgramId
“VER00001” ->  szVersion
UNDEFINED X  cSuppressErrorMessages
UNDEFINED X  szErrorMessageID
1 ->  cPrintFlag

The PrintFlag can be passed any value 1/0 depending on your choice of print immediate or not.


B91300C – Launch Batch Application

Functional Description
This function launches a UBE from ER. Unlike Report Interconnect, this launches UBEs with out Report Interconnect and returns an error status. However, Report Interconnect cannot be used.
Purpose
To be able to launch UBEs without Report Interconnect from Event Rules and be able to check the return status of that UBE.
Setup Notes and Prerequisites
If called in synchronous mode, the BSFN will return error if the UBE failed along the way (blow-ups, spec not found, etc.). In asynchronous mode, the BSFN will return error only if it failed to launch (better always to use Asynch)
If the data source override is left blank, then OCM will be used to determine where the UBE will run.

Parameters :
szReport : Report Name
szVerzsionJDE : Version Name (if you execute the batch on the enterprise server, the version must exist there. You must launch the version at least once before use this BSFN on the server)
cSynch : 1 = Synchronous, 0 or anything else is Asynchronous.
cPrintPreview : I don’t know exactly the functionality of this parameter. (1 or blank works)
szDataSourceOverride : Not required. Only if you want launch the batch on a specific server or in local mode
cJDELogging : 1 log into jde.log, 0 nothing
cTracing : 1 log into jdedebug.log, 0 nothing
cUBEloggingLevel : 1..6 Debug Level
szJobQUEUE : Name of the Queue Batch where the batch is executed. it could be blank.

The BSFN returns a Job Number and an error code.


Give a thumbs up/share the site, if this helped you.

6 thoughts on “Launch Batch Application/UBE Dynamically from Interactive Apps

  1. OJAS E Reply

    i want to call a report from interactive application.
    Currently it is calling locally, Since the called report is a BI report ,XML files are genreated locally, but i want the same to be generated on server.
    Can u please give some tips so that i can execute the calling report on server not locally

  2. Leo Reply

    Launch Batch Application system function:
    Hi Deepesh. Hope you are well. On tools 8.97 I am having trouble with prompt for values when using the above system function. Both on Web Dev or Web proper the PO Values do not come up. Parameter is marked Y and PO template provided. Any Ideas?
    Leo

  3. Nitin Doshi Reply

    Hi Deepesh
    Your website always provide good solutions for many of the common problems we developers face.
    I have a question for you in regards to launching UBE from an application. I need to submit UBE from application but i would not like system to show printer selection screen and i wans to pass some parameters to UBE. In order to achieve this, i created a NER BF which does the job. Unfortunately, this method is working fine on thick clients but not working from Web.
    Are there any other method you can think of?
    Thanks in advance for your help.
    With Regards
    Nitin Doshi
    +61 414 998 340.

  4. Venkat Reply

    HI Deepesh,
    Is there any way to submit UBE (UBE name and version will be getting at run time) with Report interconnect values? Please let me know the possibility.
    Thanks
    Venkat

Leave a Reply