Launch Batch UBE from APPL with Report Interconnect but no prompting

John -

I can't recall if this can be done through a NER, but I have done this several times by turning the UBE into a BI Publisher report. Whether you need the output or not the process works as needed as does not prompt the stupid 'OK' button on report interconnects.

Richard
 
I've only seen C BSFNs used to bypass printer selection when calling UBEs but sounds like Oracle has a solution for NER. I'm curious to know if you get it to work.
 
John,

I know this is a BIG NO-NO, but I modified the printer selection application to skip the printer selection screen in certain circumstances.
 
I got it working by just writing a NER and calling the UBE in the NER from the APPL

Seems to work as the NER gets converted to C+ anyway right
 
So a simple UBE call in a NER like this:

00005 // Call UBE R55NPI passing in Unique Batch ID
00006 // ================================================
00007 Call UBE:R55NPI Version:GTS0001[Asynchronous]
BF mnUniqueKeyBatchID [UKID] -> mnUniqueKeyIDInternal [UKID]

Gets converted to into this C+:

/*********************************************************************
* Business Function: E1AutoItemAddLaunchUBE
*
* Description2: E1 Auto Item Add Launch UBE R55NPI
*
*********************************************************************/

JDEBFRTN(ID) JDEBFWINAPI
E1AutoItemAddLaunchUBE( LPBHVRCOM lpBhvrCom ,
LPVOID lpVoid ,
LPDSD55NPIA lpDS )
{
/*****************************************************************
* Variable declarations
*****************************************************************/
ID idRtnVal = ER_SUCCESS;
JCHAR szLocal2[16] = { 0 };
DWORD iLocal3 = MAX_COMPUTERNAME_LENGTH + 1;

/*****************************************************************
* Declare structures
*****************************************************************/
FORMDSR55NPI zDS0 = { 0 };
UBEVAR zDS1 = { 0 };

/*****************************************************************
* Declare pointers
*****************************************************************/
LPJDEAPP lpObj = (LPJDEAPP)NULL;
LPGLOBALAPP pGlblApp = (LPGLOBALAPP)NULL;

/*****************************************************************
* Check for NULL pointers
*****************************************************************/
if ( ( lpBhvrCom == (LPBHVRCOM)NULL ) ||
( lpVoid == (LPVOID)NULL ) ||
( lpDS == (LPDSD55NPIA)NULL ) )
{
jdeErrorSet( lpBhvrCom , lpVoid , 0L , _J("4363") , (LPVOID)NULL );
return ER_ERROR;
}

/*****************************************************************
* Set pointers
*****************************************************************/
lpObj = lpBhvrCom->lpObj;
pGlblApp = lpObj->lpGlobalApp;

/*****************************************************************
* Main processing
*****************************************************************/

/* ================================================ */
/* Object Creation: John Danter 13/12/2017 */
/* EtQ doc: SPEC-UCS-PDM-NPI-ITMS-004-05656 */
/* */
/* Call UBE R55NPI passing in Unique Batch ID */
/* ================================================ */

/* RI : CALL( UBE:R55NPI , Ver: GTS0001 ) */
MathCopy( &zDS0.mnUniqueKeyIDInternal , &lpDS->mnUniqueKeyBatchID );
jdeNIDcpy( zDS1.szReport , _J("R55NPI") );
jdeNIDcpy( zDS1.szVersion , _J("GTS0001") );
jdeGetHostName( szLocal2 , iLocal3 , 0 );
jdeStrncpy( zDS1.szMachineKey ,
szLocal2 ,
DIM( zDS1.szMachineKey ) - 1 );
GetLocalEnvironmentName( zDS1.szEnhv, DIM( zDS1.szEnhv ) );
jdeNIDcpy( zDS1.szReport , _J("R55NPI") );
zDS1.idRunTime = (GLRTID)lpObj->hDlg << 16;
zDS1.bSynchFlag = FALSE;
zDS1.bPreview = FALSE;
zDS1.bBatchFlag = TRUE;
jdeLaunchUBEEx( pGlblApp->lpHuser ,
&zDS1 , &zDS0 , lpBhvrCom );


return idRtnVal;

} /* end of E1AutoItemAddLaunchUBE */

Works fine. Launches immediately, no prompting at all
 
Last edited:
I agree with John Danter, the only different is that I would use jdeLaunchUBEEx2 function, since the jdeLaunchUbeEx was replaced.

jdeLaunchUBEEx2( pGlblApp->lpHuser, &zDS1, &zDS0, lpBhvrCom, _J('0'), _J('0'), NULL);

You will only be able to use the function "2" if you write the function in C. Use B96210B (LaunchUBEToAnyServer) as a reference point if you want.
The previous LaunchUBEEx function usually throws an error message on the log to inform this was replaced.
 
Back
Top