Can RD output be viewed from any other application other than WSJ

kathirvJDE

Member
I am trying to use system function "View Report Definition Output" to view a RD output but I always end up with error "Retrieve report definition cannot be called from this application." on JDEDEBUG and "Corrective Action :You may ONLY use "View Report Definition Output" system function from P95630 or P986110B " on JAS log. Have any one of had such requirement before to view RD output using this system function on your custom app? Please share your thoughts.
 
Yes, i've also the same problems. I've tried to duplicate P986110B to test and with the same error. I think it is hard coded. To do that, i've developped a java class and i'm able to retrieve PDF output and XML source directly from database.
 
the solution is in this link as long as it's only UBE .In syntax you have to emulate the functionality of the P986161 and P986110Bhttp://www.jdelist.com/vb4/showthread.php/7700-Clone-P986110B-Job-Control-Master/page2if BI PU ( p95630 ) I still can not find the solution within JDE .
 
Hello. I was wondering, three years later, if a solution has been found to view the BI Publisher output from a custom version of P986110B. We have a custom P986110B and will be switching in the near future to BI Publisher reports. Please let me know if there is any update on this issue. Looks like there is non from Oracle (Issue: bug 11016231 "View Report Definition Output" is still at the status Internal review) but hoping someone has found a workaround. Thanks in advance. Natalie
 
At a guess I would say you probably need use BSFN B9861101 SetF986110DS before you try and get yor code to read F986110 to get your system to point to the correct location of that file. Usually not SY900 but your server address data source
 
Thanks but this business function is already in use to point to the correct data source. Still searching.
 
As far as I can tell "View Report Definition Output" can only be called from very specific applications - it seems to be hard coded into the system call.

In my case I wanted to automatically display RD output when user clicked a button on form. What I did was modified P95630 to take parameters to display the output for a given job and then close P95630 (thus P95630 is never actually displayed to the user). I then wrapped that form call into a client only NER so now I just make a client only NER BSFN call passing in the job number info and it displays the RD output. It did get a little more complicated since I didn't want to modify the W95630E form interconnect structure so I had to use a technique to pass additional custom FI params W95630E, but in general that is the approach I took.

Example from client caller
Code:
0016       AcmeViewReportDefinitionOutput
              VA evt_mnUbeServerJobNumber -> BF mnUBEServerJobNumber
              VA evt_szExecutionHostName -> BF szUBEExecutionHostName

AcmeViewReportDefinitionOutput listing:
Code:
Listing of ER for Named ER: N5800002


=======================================================================
     NAMED ER: AcmeViewReportDefinitionOutput
=======================================================================
     evt_ACTION_SET
     evt_DISPLAY_MODE_PASSTHROUGH
     evt_mnHandle
     OPT: Using Defaults
0001 VA evt_ACTION_SET = "1"
0002 VA evt_DISPLAY_MODE_PASSTHROUGH = "1"
0003 //
0004 AcmePassCustomFIToW95630E
        VA evt_mnHandle <- BF mnHandle
        VA evt_ACTION_SET -> BF nAction
        BF mnRPDFJobNumber -> BF mnRPDFJobNumber
        VA evt_DISPLAY_MODE_PASSTHROUGH -> BF nDisplayMode
0005 Call( App:P95630 , Form:W95630E )
        VA evt_mnHandle -> FI mnRPDFJobNumber
        BF szRPDFExeHost -> FI szRPDFExeHost
        BF mnUBEServerJobNumber -> FI mnUBEServerJobNumber
        BF szUBEExecutionHostName -> FI szUBEExecutionHostName
        BF szUserIdFilter -> FI szUserIdFilter


AcmePassCustomFIToW95630E Listing:
Code:
JDEBFRTN (ID) JDEBFWINAPI AcmePassCustomFIToW95630E (LPBHVRCOM lpBhvrCom, LPVOID lpVoid, LPDSD5800044A lpDS)  
 
{ 
   /************************************************************************ 
    *  Variable declarations 
    ************************************************************************/ 
	ID					idReturn = ER_SUCCESS, idHandle = 0;
	MATH_NUMERIC	mnHandle;
	HUSER				hUser = (HUSER)NULL;
	LPDSD5800044A	pSavedParams = (LPDSD5800044A)NULL;
 
   /************************************************************************ 
    * Check for NULL pointers 
    ************************************************************************/ 
   if ((lpBhvrCom == (LPBHVRCOM) NULL) || 
       (lpVoid    == (LPVOID)    NULL) || 
       (lpDS      == (LPDSD5800044A)	NULL)) 
   { 
     jdeErrorSet (lpBhvrCom, lpVoid, (ID) 0, _J("4363"), (LPVOID) NULL); 
     return ER_ERROR; 
   } 
 
   /************************************************************************ 
    * Main Processing 
    ************************************************************************/ 

	/********** Get User Handle **********/
	if(acmeInitBhvr(lpBhvrCom, lpVoid, &hUser, (JCHAR *)NULL, JDEDB_COMMIT_AUTO) != ER_SUCCESS)
		return ER_ERROR;


	switch(lpDS->nAction)
	{
	case E5800044_ACTION_GET:
		MathCopy(&mnHandle, &lpDS->mnHandle);
		ReverseMathNumeric(&mnHandle);
		MathNumericToLong(&mnHandle, (long *)&idHandle);

		if(!idHandle)
		{
			jdeErrorSet(lpBhvrCom, lpVoid, (ID) 0, _J("4363"), (LPVOID) NULL);
			idReturn = ER_ERROR;
		}
		else
		{
			pSavedParams = jdeRemoveDataPtr(hUser, idHandle);

			if(pSavedParams)
			{
				memcpy(lpDS, pSavedParams, sizeof(*lpDS));
				jdeFree(pSavedParams);
			}
			else
			{
				jdeErrorSet(lpBhvrCom, lpVoid, (ID) 0, _J("4363"), (LPVOID) NULL);
				idReturn = ER_ERROR;
			}
		}
		break;

	case E5800044_ACTION_SET:
		pSavedParams = jdeAlloc(COMMON_POOL, sizeof(*pSavedParams), MEM_ZEROINIT);

		if(pSavedParams)
		{
			idHandle = jdeStoreDataPtr(hUser, pSavedParams);
			IDToMathNumeric(idHandle, &lpDS->mnHandle);
			ReverseMathNumeric(&lpDS->mnHandle);
			memcpy(pSavedParams, lpDS, sizeof(*pSavedParams));
		}
		else
			idReturn = acmeErrorSetMalloc(lpBhvrCom, lpVoid, (ID)0);

		break;
	}

	JDB_FreeBhvr(hUser);
	return idReturn;
}


Modified code in W95630E
Code:
=======================================================================
     FORM: Report Definition Output Repository [FIND BROWSE] (W95630E)
=======================================================================
     CONTROL:  FORM
     EVENT:  Dialog is Initialized
-----------------------------------------------------------------------
     evt_XMLP2SPPresent
     evt_ACME_FI_ACTION_GET
     evt_acme_mnHandle
     OPT: Using Defaults
0001 // ========== Acme Mod Begin ==========
0002 VA evt_ACME_FI_ACTION_GET = "0"
0003 VA frm_ACME_DISPLAY_MODE_PASSTHRU = "1"
0004 //
0005 // Get custom Form Interconnects
0006 If FI mnRPDFJobNumber is less than <Zero>
0007    VA evt_acme_mnHandle = FI mnRPDFJobNumber
0008    AcmePassCustomFIToW95630E
           VA evt_acme_mnHandle -> BF mnHandle
           VA evt_ACME_FI_ACTION_GET -> BF nAction
           FI mnRPDFJobNumber <- BF mnRPDFJobNumber
           VA frm_acme_FI_nDisplayMode <- BF nDisplayMode
0009 End If
0010 // ========== Acme Mod End ==========
...


-----------------------------------------------------------------------
     EVENT:  Last Grid Record Has Been Read
-----------------------------------------------------------------------
     evt_nGridRow
     OPT: Using Defaults
0001 // ========== Acme Mod Begin ==========
0002 Get Max Grid Rows(FC Grid, VA evt_nGridRow)
0003 If VA frm_acme_FI_nDisplayMode is equal to VA frm_ACME_DISPLAY_MODE_PASSTHRU And VA evt_nGridRow is greater than <Zero>
0004    VA evt_nGridRow = "1"
0005    Get Grid Row(FC Grid, VA evt_nGridRow)
0006    Press Button(HC View &Output)
0007    Press Button(HC &Close)
0008 End If
0009 // ========== Acme Mod End ==========

...
 
Last edited:
This is fantastic Brian. Thank you so much for sharing. Will try this in our own environment. Will give feedback once tested. Natalie
 
Back
Top