CRM ONLINE 2013: On Approval Of Quotation, Run Report, Generate PDF and Send an Email With PDF as attachment

Hi,
I am using CRM ONLINE 2013.
How to automate below process?
1. On Approval Of Quotation, Run Report.
2. Generate PDF.
3. Send an Email With PDF as attachment.
As i have gone through many forums for this topic, but creating a plugin code for generating Report PDF is not possible in CRM ONLINE.
So, What is the alternate way to do this..?
Thanks.

This is my entire code mentioned below:-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
    <script type="text/javascript">
        if (typeof (SDK) == "undefined")
        { SDK = { __namespace: true }; }
        SDK.JScriptRESTDataOperations = {
            _context: function () {
                if (typeof GetGlobalContext != "undefined")
                { return GetGlobalContext(); }
                else {
                    if (typeof Xrm != "undefined") {
                        return Xrm.Page.context;
                    else { return new Error("Context is not available."); }
            _getServerUrl: function () {
                var serverUrl = this._context().getServerUrl()
                if (serverUrl.match(/\/$/)) {
                    serverUrl = serverUrl.substring(0, serverUrl.length - 1);
                return serverUrl;
            _ODataPath: function () {
                return this._getServerUrl() + "/XRMServices/2011/OrganizationData.svc/";
            _errorHandler: function (req) {
                return new Error("Error : " +
  req.status + ": " +
  req.statusText + ": " +
  JSON.parse(req.responseText).error.message.value);
            _dateReviver: function (key, value) {
                var a;
                if (typeof value === 'string') {
                    a = /Date\(([-+]?\d+)\)/.exec(value);
                    if (a) {
                        return new Date(parseInt(value.replace("/Date(", "").replace(")/", ""), 10));
                return value;
            Create: function (object, type, successCallback, errorCallback) {
                var req = new XMLHttpRequest();
                req.open("POST", this._ODataPath() + type + "Set", true);
                req.setRequestHeader("Accept", "application/json");
                req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                req.onreadystatechange = function () {
                    if (this.readyState == 4 /* complete */) {
                        if (this.status == 201) {
                            successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
                        else {
                            errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                req.send(JSON.stringify(object));
            Retrieve: function (id, type, successCallback, errorCallback) {
                var req = new XMLHttpRequest();
                req.open("GET", this._ODataPath() + type + "Set(guid'" + id + "')", true);
                req.setRequestHeader("Accept", "application/json");
                req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                req.onreadystatechange = function () {
                    if (this.readyState == 4 /* complete */) {
                        if (this.status == 200) {
                            successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
                        else {
                            errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                req.send();
            Update: function (id, object, type, successCallback, errorCallback) {
                var req = new XMLHttpRequest();
                req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
                req.setRequestHeader("Accept", "application/json");
                req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                req.setRequestHeader("X-HTTP-Method", "MERGE");
                req.onreadystatechange = function () {
                    if (this.readyState == 4 /* complete */) {
                        if (this.status == 204 || this.status == 1223) {
                            successCallback();
                        else {
                            errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                req.send(JSON.stringify(object));
            Delete: function (id, type, successCallback, errorCallback) {
                var req = new XMLHttpRequest();
                req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
                req.setRequestHeader("Accept", "application/json");
                req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                req.setRequestHeader("X-HTTP-Method", "DELETE");
                req.onreadystatechange = function () {
                    if (this.readyState == 4 /* complete */) {
                        if (this.status == 204 || this.status == 1223) {
                            successCallback();
                        else {
                            errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                req.send();
            RetrieveMultiple: function (type, filter, successCallback, errorCallback) {
                if (filter != null) {
                    filter = "?" + filter;
                else { filter = ""; }
                var req = new XMLHttpRequest();
                req.open("GET", this._ODataPath() + type + "Set" + filter, true);
                req.setRequestHeader("Accept", "application/json");
                req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                req.onreadystatechange = function () {
                    if (this.readyState == 4 /* complete */) {
                        if (this.status == 200) {
                            successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d.results);
                        else {
                            errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                req.send();
            __namespace: true
    </script>
    <script type="text/javascript">
        //Create Email and link it with Order as Regarding field
        var Xrm;
        var email = new Object();
        var ownerID = "";
        var CustomerId = "";
        if (window.opener) { Xrm = window.opener.Xrm; }
        else if (window.parent) { Xrm = window.parent.Xrm; }
        //Get ownerid who send email of quotation to customer
        function GetOwnerID() {
            var owner = Xrm.Page.getAttribute("ownerid").getValue();
            ownerID = owner[0].id;
            var ownerName = owner[0].name;
            var entityType = owner[0].entityType;
            GetToEmailGUID();
        //Get customerid who receive email of quotation from owner
        function GetToEmailGUID() {
            var Customer = Xrm.Page.getAttribute('customerid').getValue();
            CustomerId = Customer[0].id;
            var CustomerName = Customer[0].name;
            var entityType = Customer[0].entityType;
            //if CustomerId is type of "Account" then get Primary Contact id of that account
            if (entityType == "account") {
                var contact = Xrm.Page.getAttribute("customerid").getValue();
                if (contact === null) return;
                var serverUrl = Xrm.Page.context.getClientUrl();
                var oDataSelect = serverUrl + "/XRMServices/2011/OrganizationData.svc/AccountSet(guid'" + contact[0].id + "')?$select=PrimaryContactId";
                var req = new XMLHttpRequest();
                req.open("GET", oDataSelect, false);
                req.setRequestHeader("Accept", "application/json");
                req.setRequestHeader("Content-Type", "application/json;charset=utf-8");
                req.onreadystatechange = function () {
                    if (req.readyState === 4) {
                        if (req.status === 200) {
                            var retrieved = JSON.parse(req.responseText).d;
                            CustomerId = retrieved.PrimaryContactId.Id;
                        else {
                            alert(this.statusText);
                req.send();
        function CreateEmail() {
            GetOwnerID();
            email.Subject = "Email with Report Attachment";
            //Set The current order as the Regarding object
            email.RegardingObjectId = {
                Id: Xrm.Page.data.entity.getId(),    //Get the current entity Id , here OrderId
                LogicalName: Xrm.Page.data.entity.getEntityName()//Get the current entity name, here it will be “salesOrder”
            //Create Email Activity
            SDK.JScriptRESTDataOperations.Create(email, "Email", EmailCallBack, function (error) { alert(error.message); });
        // Email Call Back function
        function EmailCallBack(result) {
            email = result; // Set the email to result to use it later in email attachment for retrieving activity Id
            var activityPartyFrom = new Object();
            // Set the From party of the ActivityParty to relate an entity with Email From field
            activityPartyFrom.PartyId = {
                Id: CustomerId, //"79EBDD26-FDBE-E311-8986-D89D6765B238",  // id of entity you want to associate this activity with.        
                LogicalName: "contact"
            // Set the "activity" of the ActivityParty
            activityPartyFrom.ActivityId = {
                Id: result.ActivityId,
                LogicalName: "email"
            // Now set the participation type that describes the role of the party on the activity).
            activityPartyFrom.ParticipationTypeMask = { Value: 2 }; // 2 means ToRecipients
            // Create the from ActivityParty for the email
            SDK.JScriptRESTDataOperations.Create(activityPartyFrom, "ActivityParty", ActivityPartyFromCallBack, function (error) { alert(error.message); });
            var activityPartyTo = new Object();
            // Set the From party of the ActivityParty to relate an entity with Email From field
            activityPartyTo.PartyId = {
                Id: ownerID, //"79EBDD26-FDBE-E311-8986-D89D6765B238",  // id of entity you want to associate this activity with.        
                LogicalName: "systemuser"
            // Set the "activity" of the ActivityParty  
            activityPartyTo.ActivityId = {
                Id: result.ActivityId,
                LogicalName: "email"
            // Now set the participation type that describes the role of the party on the activity).    
            activityPartyTo.ParticipationTypeMask = { Value: 1 }; // 1 means Sender
            // Create the from ActivityParty
            SDK.JScriptRESTDataOperations.Create(activityPartyTo, "ActivityParty", ActivityPartyToCallBack, function (error) { alert(error.message); });
        //ActivityParty From Callback
        function ActivityPartyFromCallBack(result) {
        //ActivityParty To Callback
        function ActivityPartyToCallBack(result) {
            GetReportId('ABM_Infotech_SalesQuote');
        //Create attachment for the created email
        function CreateEmailAttachment() {
            //get reporting session and use the params to convert a report in PDF
            var params = getReportingSession();
            //Email attachment parameters
            var activitymimeattachment = Object();
            activitymimeattachment.ObjectId = Object();
            activitymimeattachment.ObjectId.LogicalName = "email";
            activitymimeattachment.ObjectId.Id = email.ActivityId;
            activitymimeattachment.ObjectTypeCode = "email",
                activitymimeattachment.Subject = "File Attachment";
            activitymimeattachment.Body = encodePdf(params);
            activitymimeattachment.FileName = "Report1.pdf";
            activitymimeattachment.MimeType = "application/pdf";
            //Attachment call
            SDK.JScriptRESTDataOperations.Create(activitymimeattachment, "ActivityMimeAttachment", ActivityMimeAttachmentCallBack, function (error) { alert(error.message); });
        //ActivityMimeAttachment CallBack function
        function ActivityMimeAttachmentCallBack(result) {
            var features = "location=no,menubar=no,status=no,toolbar=no,resizable=yes";
            var width = "800px";
            var height = "600px";
            window.open(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", features);
            // To open window which works in outlook and IE both
            //openStdWin(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", width,
height, features);
        //This method will get the reportId based on a report name that will be used in            getReportingSession() function
        function GetReportId(reportName) {
            var oDataSetName = "ReportSet";
            var columns = "ReportId";
            var filter = "Name eq '" + reportName + "'";
            retrieveMultiple(oDataSetName, columns, filter, onSuccess);
        function retrieveMultiple(odataSetName, select, filter, successCallback) {
            var serverUrl = Xrm.Page.context.getServerUrl();
            var ODATA_ENDPOINT = "/XRMServices/2011/OrganizationData.svc";
            var odataUri = serverUrl + ODATA_ENDPOINT + "/" + odataSetName + "?";
            if (select) {
                odataUri += "$select=" + select + "&";
            if (filter) {
                odataUri += "$filter=" + filter;
            $.ajax({
                type: "GET",
                contentType: "application/json; charset=utf-8",
                datatype: "json",
                url: odataUri,
                beforeSend: function (XMLHttpRequest) {
                    XMLHttpRequest.setRequestHeader("Accept", "application/json");
                success: function (data) {
                    if (successCallback) {
                        if (data && data.d && data.d.results) {
                            successCallback(data.d.results);
                        else if (data && data.d) {
                            successCallback(data.d);
                        else {
                            successCallback(data);
                error: function (XmlHttpRequest, errorThrown) {
                    if (XmlHttpRequest && XmlHttpRequest.responseText) {
                        alert("Error while retrieval ; Error – " + XmlHttpRequest.responseText);
        function onSuccess(data) {
            reportId = data[0].ReportId.replace('{', ").replace('}', ");
            CreateEmailAttachment(); // Create Email Attachment
        //Gets the report contents
        function getReportingSession() {
            var pth = Xrm.Page.context.getServerUrl() + "/CRMReports/rsviewer/reportviewer.aspx";
            var retrieveEntityReq = new XMLHttpRequest();
            var Id = Xrm.Page.data.entity.getId();
            var quotationGUID = Id.replace('{', ""); //set this to selected quotation GUID
            quotationGUID = quotationGUID.replace('}', "");
            var reportName = "ABM_Infotech_SalesQuote"; //set this to the report you are trying to download
            var reportID = "751089AA-74B8-E211-B52F-D8D3855B253B"; //set this to the guid of the report you are trying to download
            var rptPathString = ""; //set this to the CRMF_Filtered parameter
            var strParameterXML = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'><entity name='quote'><all-attributes /><filter type='and'><condition
attribute='quoteid' operator='eq' uitype='quote' value='" + quotationGUID + "' /> </filter></entity></fetch>";
            retrieveEntityReq.open("POST", pth, false);
            retrieveEntityReq.setRequestHeader("Accept", "*/*");
            retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
            rptPathString = "id=%7B" + reportID + "%7D&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName="
+
                            reportName + "&isScheduledReport=false&p:ABMFilteredQuote=" + strParameterXML;
            //remove the part starting from &p:salesorderid if your report has no parameters
            retrieveEntityReq.send(rptPathString);
            var x = retrieveEntityReq.responseText.indexOf("ReportSession=");
            var ret = new Array();
            ret[0] = retrieveEntityReq.responseText.substr(x + 14, retrieveEntityReq.responseText.indexOf("&", x) - x - 14); //the session id
            x = retrieveEntityReq.responseText.indexOf("ControlID=");
            ret[1] = retrieveEntityReq.responseText.substr(x + 10, retrieveEntityReq.responseText.indexOf("&", x) - x - 10); //the control id
            return ret;
        var bdy = new Array();
        var bdyLen = 0;
        function concat2Bdy(x) {
            bdy[bdyLen] = x;
            bdyLen++;
        function encodePdf(params) {
            bdy = new Array();
            bdyLen = 0;
            var retrieveEntityReq = new XMLHttpRequest();
            var pth = Xrm.Page.context.getServerUrl() + "/Reserved.ReportViewerWebControl.axd?ReportSession=" + params[0] +
            "&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=" + params[1] +
            "&OpType=Export&FileName=Public&ContentDisposition=OnlyHtmlInline&Format=PDF";
            retrieveEntityReq.open("GET", pth, false);
            retrieveEntityReq.setRequestHeader("Accept", "*/*");
            retrieveEntityReq.send();
            BinaryToArray(retrieveEntityReq.responseBody);
            return encode64(bdy);
        var StringMaker = function () {
            this.parts = [];
            this.length = 0;
            this.append = function (s) {
                this.parts.push(s);
                this.length += s.length;
            this.prepend = function (s) {
                this.parts.unshift(s);
                this.length += s.length;
            this.toString = function () {
                return this.parts.join('');
        var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
        function encode64(input) {
            var output = new StringMaker();
            var chr1, chr2, chr3;
            var enc1, enc2, enc3, enc4;
            var i = 0;
            while (i < input.length) {
                chr1 = input[i++];
                chr2 = input[i++];
                chr3 = input[i++];
                enc1 = chr1 >> 2;
                enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
                enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
                enc4 = chr3 & 63;
                if (isNaN(chr2)) {
                    enc3 = enc4 = 64;
                } else if (isNaN(chr3)) {
                    enc4 = 64;
                output.append(keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4));
            return output.toString();
    </script>
    <script type="text/vbscript">
    Function BinaryToArray(Binary)
           Dim i
           ReDim byteArray(LenB(Binary))
           For i = 1 To LenB(Binary)
                 byteArray(i-1) = AscB(MidB(Binary, i, 1))
                 concat2Bdy(AscB(MidB(Binary, i, 1)))
         Next
          BinaryToArray = byteArray
   End Function     
    </script>
</head>
<body>
    <input type="button" onclick="CreateEmail();" value="Attach Report" />
</body>
</html>

Similar Messages

  • Running the alv report  in  background and sending it thro email

    hi,
          i have to run the  alv report in background and send the output through email

    Hi
    Many a times there is a requirement to display ALV Grid (not ALV List) in the background Job. I have checked the SDN Forum for the same and it has been mentioned that ALV Grid cannot be displayed in Background, but the list output of ALV is possible. So user won’t have the actual Grid interface but the List interface.
    There is a workaround to display ALV Grid in Background Job. The only restriction is you can’t schedule the job through SM36. You need to execute the transaction of the report program, fill in the selection screen data and hit Execute.
    The job would be executed in background. User will be able to see the Job Log and Job Status after executing the program. User doesn’t have to go to SM37 to view the job status/log. Once the Job Status is changed to “COMPLETED”, user can click on “DISPLAY SPOOL” to view the ALV Grid.
    Limitations:
    Can’t schedulea background job
    The session should be active until the background job is completed. If the session is closed, then user won’t be able to check the output in ALV Grid. User would be able to check the output through spool or SM37
    Advantages:
    If the spool width is greater than 255 characters, then the entire width could be seen in the output because the output is directed to an ALV Grid and not to spool
    Interface of ALV Grid is available instead of ALV List even though it’s a background job.
    Program won’t give the TIME OUT error
    Steps Required:
    1. Once you execute the program, the following screen would be displayed
    2. Click “Display Job Status” to check the Status of the Background Job
    3. Click on “Display the Job Log” to check the Log
    4. Click on “Display Job Status” to check the Job Status
    5. Click on “DISPLAY SPOOL” to check the spool content once the Job Status is changed to “COMPLETED”. Output is displayed in ALV Grid
    Programs:
    1.  Two different programs needs to be created
    ZPROGRAM_ONE: This is the 1st program, where the selection screen and all the data validations would be done. Error handling for invalid data should be done in this program.
    Once the data validation is done, this program would call the 2nd program ZPROGEAM_TWO. Build the logic to display ALV Grid in this program. The logic will only display ALV in foreground and it won’t be reflected in the spool.
    ZPROGRAM_TWO: This program would fetch all the data and do all the processing. If you want the spool output along with ALV Grid output, then build the logic in this program to display ALV Grid.
    *& Report  ZPROGRAM_ONE                                                *
    REPORT  zprogram_one                            .
    PRASHANT PATIL
    TABLES : mara,
             tsp01.
    type-pools:slis.
    TYPES : BEGIN OF t_mara,
              matnr   TYPE mara-matnr,
              ersda   TYPE mara-ersda,
              ernam   TYPE mara-ernam,
              laeda   TYPE mara-laeda,
            END OF t_mara.
    DATA : i_mara       TYPE STANDARD TABLE OF t_mara,
           wa_mara      TYPE t_mara,
           wa_index     TYPE indx,        " For Index details
           wa_index_key TYPE indx-srtfd VALUE 'PRG_ONE',
           i_jobsteplist     TYPE STANDARD TABLE OF tbtcstep, " For spool number
           wa_params         TYPE pri_params,  " To Get Print Parameters
           wa_jobhead        TYPE tbtcjob,     " To know the status of job
           wa_jobsteplist    TYPE tbtcstep,    " To know the spool
           w_jobname         TYPE tbtco-jobname,  " Job name for bckgrnd job
           w_jobcount        TYPE tbtco-jobcount, " Unique id for bckgrd job
           w_path            TYPE string,         " Upload path
           w_lsind           TYPE sy-lsind,       " Index
           wa_seltab         TYPE rsparams,
           i_seltab          TYPE STANDARD TABLE OF rsparams,
           wa_index1         TYPE indx,        " For Index details
           wa_index_key1     TYPE indx-srtfd VALUE 'PRG_TWO',
           i_fieldcat        TYPE slis_t_fieldcat_alv,
           wa_fieldcat       LIKE LINE OF i_fieldcat.
            CONSTANTS DECLARATION                                        *
    CONSTANTS :
             c_a(1) TYPE c VALUE 'A',
             c_m(1) TYPE c VALUE 'M',
             c_l(1) TYPE c VALUE 'L',
             c_c(1) TYPE c VALUE 'C',
             c_zfdr(4) TYPE c VALUE 'ZFDR',
             c_x(1)    TYPE c VALUE 'X',
             c_locl(4) TYPE c VALUE 'LOCL', " Destination is LOCAL
             c_f(1)    TYPE c VALUE 'F',   " Job Status - Failed
             c_s(1)    TYPE c VALUE 'S',
             c_p(1)    TYPE c VALUE 'P'.
    SELECTION SCREEN PARAMETERS
    SELECT-OPTIONS : s_matnr FOR mara-matnr.
    START-OF-SELECTION.
    Before the export, fill the data fields before CLUSTR
      wa_index-aedat = sy-datum.
      wa_index-usera = sy-uname.
      EXPORT s_matnr
           TO DATABASE indx(st) FROM wa_index ID wa_index_key.
    To Open the Job for background processing
      PERFORM open_job.
    To get the print parameters
      PERFORM get_print_parameters.
    Submit the job in background
      PERFORM job_submit.
    Close the background job
      PERFORM job_close.
    This is the output screen with the buttons ********
    Create 3 buttons DISPLAY SPOOL, STATUS, JOBLOG
      SET PF-STATUS 'ZS001'.
      WRITE: / 'The program is submitted in Background'.
      WRITE: / 'Press DISPLAY SPOOL to see the spool'.
      WRITE: / 'Press STATUS to see the status of the background'.
    AT USER-COMMAND.
    If user presses the 'BACK' button
      IF sy-ucomm = 'BAK'.
        IF  wa_jobhead-status = c_f OR
            wa_jobhead-status = c_a.
          LEAVE TO SCREEN 0.
        ENDIF.
      ENDIF.
    If the user presses the 'DISPLAY SPOOL' Button
      IF sy-ucomm = 'DISPLAY'.
        PERFORM display_spool.
      ENDIF.
    If the user presses the 'JOB STATUS' Button
      IF sy-ucomm = 'STATUS'.
        PERFORM display_status.
      ENDIF.
    If the user presses the 'JOB LOG' Button
      IF sy-ucomm = 'JOBLOG'.
        PERFORM display_job_log.
      ENDIF.
    *&      Form  open_job
          text
    -->  p1        text
    <--  p2        text
    FORM open_job .
    This is to Create a new job which is to be submitted in background to
    process sales order/delivery/invoice
    Here we would get a unique id ( Jobcount ) which identifies our job
    along with the job name which we have assigned to our job
      CONCATENATE sy-uname
                  sy-datum
                  sy-uzeit
                          INTO w_jobname .  " Assign unique jobname
      CALL FUNCTION 'JOB_OPEN'
       EXPORTING
      DELANFREP              = ' '
      JOBGROUP               = ' '
        jobname                = w_jobname
      SDLSTRTDT              = NO_DATE
      SDLSTRTTM              = NO_TIME
      JOBCLASS               =
      IMPORTING
       jobcount                = w_jobcount
    CHANGING
      RET                    =
    EXCEPTIONS
       cant_create_job        = 1
       invalid_job_data       = 2
       jobname_missing        = 3
       OTHERS                 = 4
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " open_job
    *&      Form  get_print_parameters
          text
    -->  p1        text
    <--  p2        text
    FORM get_print_parameters .
      DATA : l_valid TYPE c.
    This is to get the Print Parameters for the job which is to be
    submitted in background to process sales order/delivery/invoice
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
       EXPORTING
      ARCHIVE_ID                   = C_CHAR_UNKNOWN
      ARCHIVE_INFO                 = C_CHAR_UNKNOWN
      ARCHIVE_MODE                 = C_CHAR_UNKNOWN
      ARCHIVE_TEXT                 = C_CHAR_UNKNOWN
      AR_OBJECT                    = C_CHAR_UNKNOWN
      ARCHIVE_REPORT               = C_CHAR_UNKNOWN
      AUTHORITY                    = C_CHAR_UNKNOWN
      COPIES                       = C_NUM3_UNKNOWN
      COVER_PAGE                   = C_CHAR_UNKNOWN
      DATA_SET                     = C_CHAR_UNKNOWN
      DEPARTMENT                   = C_CHAR_UNKNOWN
          destination                  = c_locl " LOCL
      EXPIRATION                   = C_NUM1_UNKNOWN
          immediately                  = space
      IN_ARCHIVE_PARAMETERS        = ' '
      IN_PARAMETERS                = ' '
      LAYOUT                       = C_CHAR_UNKNOWN
      LINE_COUNT                   = C_INT_UNKNOWN
      LINE_SIZE                    = C_INT_UNKNOWN
      LIST_NAME                    = C_CHAR_UNKNOWN
      LIST_TEXT                    = C_CHAR_UNKNOWN
      MODE                         = ' '
          new_list_id                  = c_x
      PROTECT_LIST                 = C_CHAR_UNKNOWN
          no_dialog                    = c_x
      RECEIVER                     = C_CHAR_UNKNOWN
      RELEASE                      = C_CHAR_UNKNOWN
      REPORT                       = C_CHAR_UNKNOWN
      SAP_COVER_PAGE               = C_CHAR_UNKNOWN
      HOST_COVER_PAGE              = C_CHAR_UNKNOWN
      PRIORITY                     = C_NUM1_UNKNOWN
      SAP_OBJECT                   = C_CHAR_UNKNOWN
      TYPE                         = C_CHAR_UNKNOWN
          user                         = sy-uname
      USE_OLD_LAYOUT               = ' '
      UC_DISPLAY_MODE              = C_CHAR_UNKNOWN
      DRAFT                        = C_CHAR_UNKNOWN
      ABAP_LIST                    = ' '
      USE_ARCHIVENAME_DEF          = ' '
      DEFAULT_SPOOL_SIZE           = C_CHAR_UNKNOWN
      PO_FAX_STORE                 = ' '
      NO_FRAMES                    = C_CHAR_UNKNOWN
       IMPORTING
      OUT_ARCHIVE_PARAMETERS       =
          out_parameters               = wa_params
       valid                        = l_valid
       EXCEPTIONS
         archive_info_not_found       = 1
         invalid_print_params         = 2
         invalid_archive_params       = 3
         OTHERS                       = 4
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " get_print_parameters
    *&      Form  job_submit
          text
    -->  p1        text
    <--  p2        text
    FORM job_submit .
    The job which we have created & the unique id ( jobcount ) which we
    have got identifies our job. Hence those parameters are passed along
    with the name of the background program "ZPROGRAM_TWO"
    The job is submitted in background.
      CALL FUNCTION 'JOB_SUBMIT'
        EXPORTING
      ARCPARAMS                         =
        authcknam                         = sy-uname
      COMMANDNAME                       = ' '
      OPERATINGSYSTEM                   = ' '
      EXTPGM_NAME                       = ' '
      EXTPGM_PARAM                      = ' '
      EXTPGM_SET_TRACE_ON               = ' '
      EXTPGM_STDERR_IN_JOBLOG           = 'X'
      EXTPGM_STDOUT_IN_JOBLOG           = 'X'
      EXTPGM_SYSTEM                     = ' '
      EXTPGM_RFCDEST                    = ' '
      EXTPGM_WAIT_FOR_TERMINATION       = 'X'
        jobcount                          = w_jobcount
        jobname                           = w_jobname
      LANGUAGE                          = SY-LANGU
        priparams                         = wa_params
        report                            = 'ZPROGRAM_TWO'
      VARIANT                           = ' '
    IMPORTING
      STEP_NUMBER                       =
       EXCEPTIONS
         bad_priparams                     = 1
         bad_xpgflags                      = 2
         invalid_jobdata                   = 3
         jobname_missing                   = 4
         job_notex                         = 5
         job_submit_failed                 = 6
         lock_failed                       = 7
         program_missing                   = 8
         prog_abap_and_extpg_set           = 9
         OTHERS                            = 10
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " job_submit
    *&      Form  job_close
          text
    -->  p1        text
    <--  p2        text
    FORM job_close .
    Once the job is submitted in background then the job is closed
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
      AT_OPMODE                         = ' '
      AT_OPMODE_PERIODIC                = ' '
      CALENDAR_ID                       = ' '
      EVENT_ID                          = ' '
      EVENT_PARAM                       = ' '
      EVENT_PERIODIC                    = ' '
        jobcount                          = w_jobcount
        jobname                           = w_jobname
      LASTSTRTDT                        = NO_DATE
      LASTSTRTTM                        = NO_TIME
      PRDDAYS                           = 0
      PRDHOURS                          = 0
      PRDMINS                           = 0
      PRDMONTHS                         = 0
      PRDWEEKS                          = 0
      PREDJOB_CHECKSTAT                 = ' '
      PRED_JOBCOUNT                     = ' '
      PRED_JOBNAME                      = ' '
      SDLSTRTDT                         = NO_DATE
      SDLSTRTTM                         = NO_TIME
      STARTDATE_RESTRICTION             = BTC_PROCESS_ALWAYS
        strtimmed                         = c_x
      TARGETSYSTEM                      = ' '
      START_ON_WORKDAY_NOT_BEFORE       = SY-DATUM
      START_ON_WORKDAY_NR               = 0
      WORKDAY_COUNT_DIRECTION           = 0
      RECIPIENT_OBJ                     =
      TARGETSERVER                      = ' '
      DONT_RELEASE                      = ' '
      TARGETGROUP                       = ' '
      DIRECT_START                      =
    IMPORTING
      JOB_WAS_RELEASED                  =
    CHANGING
      RET                               =
       EXCEPTIONS
         cant_start_immediate              = 1
         invalid_startdate                 = 2
         jobname_missing                   = 3
         job_close_failed                  = 4
         job_nosteps                       = 5
         job_notex                         = 6
         lock_failed                       = 7
         invalid_target                    = 8
         OTHERS                            = 9
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " job_close
    *&      Form  display_spool
          text
    -->  p1        text
    <--  p2        text
    FORM display_spool .
    To Read the Job to get the spool details
      DATA : l_rqident TYPE tsp01-rqident, " Spool Number
             l_spoolno TYPE tsp01_sp0r-rqid_char.
      CLEAR : l_rqident,
              w_lsind,
              wa_jobsteplist.
      REFRESH : i_jobsteplist.
      SET PF-STATUS 'ZAR02'.
    Get the Spool Number
      CALL FUNCTION 'BP_JOB_READ'
        EXPORTING
          job_read_jobcount           = w_jobcount
          job_read_jobname            = w_jobname
          job_read_opcode             = '20'
        JOB_STEP_NUMBER             =
       IMPORTING
         job_read_jobhead            = wa_jobhead
       TABLES
         job_read_steplist           = i_jobsteplist
    CHANGING
       RET                         =
       EXCEPTIONS
         invalid_opcode              = 1
         job_doesnt_exist            = 2
         job_doesnt_have_steps       = 3
         OTHERS                      = 4
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Read the Job Step list to get the spool number
      READ TABLE i_jobsteplist INTO wa_jobsteplist INDEX 1.
      CHECK wa_jobsteplist-listident <> space.
    Spool Number
      l_rqident = wa_jobsteplist-listident.
      MOVE l_rqident TO l_spoolno.
    Check the spool in TSP01
      SELECT SINGLE * FROM tsp01 WHERE rqident = l_rqident.
      IF  sy-subrc = 0.
        LEAVE TO LIST-PROCESSING.
        CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
          EXPORTING
            spoolid       = l_spoolno
        IMPORTING
          RC            =
          STATUS        =
        PERFORM show_alv.
      ENDIF.
      w_lsind = sy-lsind.
      IF sy-lsind GE 19.
        sy-lsind = 1.
      ENDIF.
    ENDFORM.                    " display_spool
    *&      Form  show_alv
          text
    -->  p1        text
    <--  p2        text
    FORM show_alv .
    Before the import, fill the data fields before CLUSTR.
      wa_index1-aedat = sy-datum.
      wa_index1-usera = sy-uname.
    To Import the selection screen data from Calling Program
      IMPORT i_mara
      FROM DATABASE indx(st) ID wa_index_key1 TO wa_index1.
      FREE MEMORY ID wa_index_key1.
    This prepares the field-catalog for ALV.
      PERFORM prepare_fieldcatalog.
    This displays the output in  ALV format .
      PERFORM display_alv.
    ENDFORM.                    " show_alv
    *&      Form  display_status
          text
    -->  p1        text
    <--  p2        text
    FORM display_status .
    To Display the STATUS of the JOB which is exectued in background
      CLEAR : wa_jobsteplist.
      REFRESH : i_jobsteplist.
      WRITE:/ 'DISPLAYING JOB STATUS'.
      CALL FUNCTION 'BP_JOB_READ'
        EXPORTING
          job_read_jobcount           = w_jobcount
          job_read_jobname            = w_jobname
          job_read_opcode             = '20'
        JOB_STEP_NUMBER             =
       IMPORTING
         job_read_jobhead            = wa_jobhead
       TABLES
         job_read_steplist           = i_jobsteplist
    CHANGING
       RET                         =
       EXCEPTIONS
         invalid_opcode              = 1
         job_doesnt_exist            = 2
         job_doesnt_have_steps       = 3
         OTHERS                      = 4
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    To Display the status text as per the status type
      CASE wa_jobhead-status.
        WHEN 'S'. WRITE: / 'Scheduled'.
        WHEN 'R'. WRITE: / 'Released'.
        WHEN 'F'. WRITE: / 'Completed'.
        WHEN 'A'. WRITE: / 'Cancelled'.
        WHEN OTHERS.
      ENDCASE.
      IF sy-lsind GE 19.
        sy-lsind = 1.
      ENDIF.
    ENDFORM.                    " display_status
    *&      Form  display_job_log
          text
    -->  p1        text
    <--  p2        text
    FORM display_job_log .
    To display the log of the background program
      LEAVE TO LIST-PROCESSING.
      CALL FUNCTION 'BP_JOBLOG_SHOW_SM37B'
        EXPORTING
          client                    = sy-mandt
          jobcount                  = w_jobcount
          joblogid                  = ' '
          jobname                   = w_jobname
        EXCEPTIONS
          error_reading_jobdata     = 1
          error_reading_joblog_data = 2
          jobcount_missing          = 3
          joblog_does_not_exist     = 4
          joblog_is_empty           = 5
          joblog_show_canceled      = 6
          jobname_missing           = 7
          job_does_not_exist        = 8
          no_joblog_there_yet       = 9
          no_show_privilege_given   = 10
          OTHERS                    = 11.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " display_job_log
    *&      Form  prepare_fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    FORM prepare_fieldcatalog .
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname    = 'MATNR'.
      wa_fieldcat-tabname      = 'I_MARA'.
      wa_fieldcat-reptext_ddic = 'Material no.'.
      wa_fieldcat-outputlen    = '18'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname    = 'ERSDA'.
      wa_fieldcat-tabname      = 'I_MARA'.
      wa_fieldcat-reptext_ddic = 'Creation date'.
      wa_fieldcat-outputlen    = '10'.
      APPEND  wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname    = 'ERNAM'.
      wa_fieldcat-tabname      = 'I_MARA'.
      wa_fieldcat-reptext_ddic = 'Name of Person'.
      wa_fieldcat-outputlen    = '10'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname    = 'LAEDA'.
      wa_fieldcat-tabname      = 'I_MARA'.
      wa_fieldcat-reptext_ddic = ' Last Change'.
      wa_fieldcat-outputlen    = '10'.
      APPEND  wa_fieldcat TO i_fieldcat.
    ENDFORM.                    " prepare_fieldcatalog
    *&      Form  display_alv
          text
    -->  p1        text
    <--  p2        text
    FORM display_alv .
    Call ABAP List Viewer (ALV)
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          it_fieldcat  = i_fieldcat
        tables
          t_outtab     = i_mara.
    ENDFORM.                    " display_alv
    •     ZPROGRAM_TWO: This is the 2nd program which would be called from program ZPROGRAM_ONE.
    *& Report  ZPROGRAM_TWO                                                *
    REPORT  zprogram_two                            .
    PRASHANT PATIL
    TABLES : mara.
    TYPE-POOLS:slis.
    TYPES : BEGIN OF t_mara,
              matnr   TYPE mara-matnr,
              ersda   TYPE mara-ersda,
              ernam   TYPE mara-ernam,
              laeda   TYPE mara-laeda,
            END OF t_mara.
    DATA : i_mara        TYPE STANDARD TABLE OF t_mara,
           wa_mara       TYPE t_mara,
           wa_index      TYPE indx,        " For Index details
           wa_index_key  TYPE indx-srtfd VALUE 'PRG_ONE',
           wa_index1     TYPE indx,        " For Index details
           wa_index_key1 TYPE indx-srtfd VALUE 'PRG_TWO',
           i_fieldcat        TYPE slis_t_fieldcat_alv,
           wa_fieldcat       LIKE LINE OF i_fieldcat.
    SELECT-OPTIONS : s_matnr FOR mara-matnr.
    Before the import, fill the data fields before CLUSTR.
    wa_index-aedat = sy-datum.
    wa_index-usera = sy-uname.
    To Import the selection screen data from Calling Program
    IMPORT s_matnr
    FROM DATABASE indx(st) ID wa_index_key TO wa_index.
    FREE MEMORY ID wa_index_key.
    SELECT matnr
           ersda
           ernam
           laeda
           FROM mara
           INTO TABLE i_mara
           WHERE matnr IN s_matnr.
    PERFORM prepare_fieldcatalog.
    PERFORM display_alv.
    Before the export, fill the data fields before CLUSTR
    wa_index1-aedat = sy-datum.
    wa_index1-usera = sy-uname.
    EXPORT i_mara
    TO DATABASE indx(st) FROM wa_index1 ID wa_index_key1.
    *&      Form  prepare_fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    FORM prepare_fieldcatalog .
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname    = 'MATNR'.
      wa_fieldcat-tabname      = 'I_MARA'.
      wa_fieldcat-outputlen    = '18'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname    = 'ERSDA'.
      wa_fieldcat-tabname      = 'I_MARA'.
      wa_fieldcat-outputlen    = '10'.
      APPEND  wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname    = 'ERNAM'.
      wa_fieldcat-tabname      = 'I_MARA'.
      wa_fieldcat-outputlen    = '10'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname    = 'LAEDA'.
      wa_fieldcat-tabname      = 'I_MARA'.
      wa_fieldcat-outputlen    = '10'.
      APPEND  wa_fieldcat TO i_fieldcat.
    ENDFORM.                    " prepare_fieldcatalog
    *&      Form  display_alv
          text
    -->  p1        text
    <--  p2        text
    FORM display_alv .
    Call ABAP List Viewer (ALV)
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          it_fieldcat = i_fieldcat
        TABLES
          t_outtab    = i_mara.
    ENDFORM.                    " display_alv
    its possible to display ALV Grid using OO ALV. Following code can be used instead of FM.
    In the PBO, add following code
    SET PF-STATUS 'ZSTAT'.
    If program is executed in background
    CALL METHOD cl_gui_alv_grid=>offline
    RECEIVING
    e_offline = off.
    IF off IS INITIAL.
    IF container1 IS INITIAL.
    CREATE OBJECT container1
    EXPORTING
    container_name = 'CC_ALV1' .
    ENDIF.
    ENDIF.
    CREATE OBJECT g_grid1
    EXPORTING
    i_parent = container1.
    CALL METHOD g_grid1->set_table_for_first_display
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME =
    IS_VARIANT =
    i_save = 'A'
    i_default = ' '
    is_layout =
    is_print =
    IT_SPECIAL_GROUPS =
    it_toolbar_excluding =
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    CHANGING
    it_outtab = i_output
    it_fieldcatalog = i_fieldcatalog
    IT_SORT =
    IT_FILTER =
    EXCEPTIONS
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    OTHERS = 4
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Reward points if useful
    Regards
    Anji

  • Attempted to mail an email with a large attachment file.  One of the addresses was bad.  When my Outlook is running, the Mac tries to send it and shows the progress.  However, when I look in my Outbox the files are not there.  It does show up in the Outb

    attempted to mail an email with a large attachment file.  One of the addresses was bad.  When my Outlook is running, the Mac tries to send it and shows the progress.  However, when I look in my Outbox the files are not there.  It does show up in the Outbox progress section but I can not delete it when it is there.
    Where do these files reside?
    Is there a hidden Outbox??
    MacBook Pro, Mac OS X (10.7.1)

    If you think getting your web pages to appear OK in all the major browsers is tricky then dealing with email clients is way worse. There are so many of them.
    If you want to bulk email yourself, there are apps for it and their templates will work in most cases...
    http://www.iwebformusicians.com/Website-Email-Marketing/EBlast.html
    This one will create the form, database and send out the emails...
    http://www.iwebformusicians.com/Website-Email-Marketing/MailShoot.html
    The alternative is to use a marketing service if your business can justify the cost. Their templates are tested in all the common email clients...
    http://www.iwebformusicians.com/Website-Email-Marketing/Email-Marketing-Service. html
    "I may receive some form of compensation, financial or otherwise, from my recommendation or link."

  • Running report from a button in forms 6 with parameter

    im new to reports 6 please give me the code for running report from a button in forms 6 with parameter
    regards

    Hi ,
    Use this SRW.RUN_REPORT..
    Go thru the help in Reports by typying
    Running a report from Form Builder or Graphics Builder
    go thru the instuctions and examples.
    --Basava.S                                                                                                                                                                                                                                                                                                                                                                           

  • Still 'Pending Send' after successful inbound and outbound test. CRM Online 2013

    I am using CRM Online and Office365. After testing successfully within the admin window for inbound and outbound- emails are still not sending- sitting in Pending Send. Triggers for Email Router is set for inbound and outbound. What
    am I missing?

    Try the following:
    http://www.powerobjects.com/blog/2013/09/19/dynamics-crm-email-router-troubleshooting-101-outgoing-emails/
    I always find this page a good place to start to rule out most of the common issues.

  • Connecting soap logger to dynamics crm online 2013

    using soap logger to connect to dynamics crm online its getting error.how to connect with soap logger and get that soap request and responses from using C#.
    This is my error pic.
    hsk srinivas

    i specified yes as well before. its throwing me error like this below is the screen shot.
    hsk srinivas
    Seems that you have to install
    Identity Foundation.
    Dynamics CRM MVP/ Technical Evangelist at
    SlickData LLC
    My blog

  • Running a ALV Report in bakcground and sending it to Email/FAX

    Hi,
         I am designing a ALV report to send a email/fax/Printer which has to be run in background or foreground according to selection screen inputs.
    I am doing the following
    1. After generating ALV report, converting it to pdf
    2. Sending Email or Fax or Print from selection screen value.
    3. after that scheduling in background using JOB_OPEN and JOB_SUBMIT FM's.
    Can I use SO_DOCUMENT_SEND_API1 FM for both Email and Fax.
    When I schedule the report in the background using JOB_OPEN, at which point I have to code it inside the report. Is it after I generate the ALV Report and Email sending code or before it..
    Thanks

    Hi
    How did you end up doing the emailing? I have the same task.....

  • Error when run report 10g (10.1.2.0.2) with Paper parameter form

    Dear Friends
    I just installed Developer suite 10g and Database 10g on my pc (10.1.2.0.2) when I run report in Report builder with paper parameter form (I selected only one system parameter : Destination type) I got the message
    Reports Error Page
    Fri Apr 07 09:06:01 GMT+07:00 2006
    javax.servlet.jsp.JspException: REP-56092: No class defined for destination type Screen
    How to solve it? Please give me the instruction or Oracle link that I can get the documents. If someone has the white paper .pdf please give me.
    Hope with help
    Thanks & Best regards,
    Bansak K.
    [email protected]

    Thanks for the tip.
    Correct me if I am wrong but you have set up SLED SP1 connecting to an OS like (RHEL 4/OEL 4,SuSE 9) using VMWare Server. What OS is SLED?
    I chose SUSE 10.3 as its free and I want to set up apps server for purely training purposes. Do you know of a free linux OS that is certified to run AS 10g 10.1.2.0.2?
    Thanks
    Jon

  • Error when running report in CMC and Infoview

    Hi all,
    i have this following problem:
    - when i try to run report in cmc it fails and i get this error message: Error in File ~tmp1a745af945b59b0.rpt: Failed to load database information
    - when i try to run the report in infoview the error message looks like this: Error in File test_4: Failed to load database information.
    Where can be the possible problem ?
    Thanks for any suggestions.

    <b>i dont know if this could help you, but i found something when trying to refresh report in infoview - the full error log:</b>
    2009-05-27 08:40:54
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Error in File Vykaz_2:
    Failed to load database information.---- Error code:-2147215357 Error code name:internal
         at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(Unknown Source)
         at com.crystaldecisions.sdk.occa.managedreports.ps.internal.f.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.managedreports.ps.internal.f.findGroup(Unknown Source)
         at com.businessobjects.report.web.event.q.a(Unknown Source)
         at com.businessobjects.report.web.event.z.a(Unknown Source)
         at com.businessobjects.report.web.event.bt.broadcast(Unknown Source)
         at com.businessobjects.report.web.event.ak.a(Unknown Source)
         at com.businessobjects.report.web.a.q.if(Unknown Source)
         at com.businessobjects.report.web.e.a(Unknown Source)
         at com.businessobjects.report.web.e.a(Unknown Source)
         at com.businessobjects.report.web.e.if(Unknown Source)
         at com.crystaldecisions.report.web.viewer.CrystalReportViewerUpdater.a(Unknown Source)
         at com.crystaldecisions.report.web.ServerControl.processHttpRequest(Unknown Source)
         at com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet.if(Unknown Source)
         at com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595):
    Edited by: Martin  Zluky on Jul 27, 2009 9:35 AM

  • Error when running report in CMC and Infoview_2

    I made this same thread in BOBJ Administration section but maybe it belongs here..........
    Hi all,
    i have this following problem:
    - when i try to run report in cmc it fails and i get this error message: Error in File ~tmp1a745af945b59b0.rpt: Failed to load database information
    - when i try to run the report in infoview the error message looks like this: Error in File test_4: Failed to load database information.
    Where can be the possible problem ?
    Thanks for any suggestions.

    Hi,
    this forum is about the Integration Kit with SAP. seems to belong to the BusinessObjects administration area
    Ingo

  • How to run report in web and pdf format

    hi all,
    i am using developer 9i.
    i can run the report in paper layout but i could not be able to run that report in web layout.
    i have no html backgroud so what modification i have to do in the web source?
    and how to run the report in pdf format.
    thanks
    Muhammad Nadeem
    03469307639

    hi
    you have run report in web than i help you
    you use script lung in you from miss and form eaxm asp script
    you have create report in char fromat
    and call report using script script to define report content all thing are long process if you need then i give you , but in pdf format i not tri it but it's easy
    i my project i have create report and to convert in to txt file and file are show in script in web

  • Hyperion IR BQY job run successful few month but recently failed to export pdf and sending email

    Anyone have encountered the problem that the BQY jobs which are running more than 3 years successfully. But recently no one update the report, but the job export keep failing to send result pdf to receivers intermittently.
    It shouldn't be BQY job itself problem. Because this job has running years and fine. Only recent days comes out this problem. And user manually run the report can also be successful.
    After checking the server log, find out that Hyperion IR retrieved data successfully but export-excel/bqy type file all works except pdf format. And in one week, some day it works fine. Some day it failed.
    Trace in workspace job schedule log, it saying:
    Emailing section 'xxxxxx' as 'PDF' to:
    [email protected]
    [email protected]
    Export failed with unknown error.
    And checked the server_message_IRJobService.log it just saying:
    Error in export.[[
    And
    TCApp::ExecuteJavaScript failed:
    We stuck at this error for a period of time. Anyone can help? Oracle Support has mentioned it might be system performance issue. Will keep an eye on this issue, to see any solution can be find.

    Hi RamKumar,
    Thank you very much for your inputs. We haven't tried
    Increase the memory for the Hyperion Framework Services
    will test and see if it can solve the problem. For 'Hyperion Framework Service', do you mean 'Reporting and Analysis Framework'?
    We only tried increase the parameter of "Job Service" and "Intelligence Service" which called Dynamic Service Properties set to "PROCESS_MEMORY_LIMIT=2500MB". But seems hyperion this 32bit application only can reach to 2047MB.
    Our EPM version is 11.1.2.1.600.07.
    a. We have increased the memory from 24G to 48G and add more memory for JobService (now it has 2 GB memory).
         For the provided solution.
         Set the filters in the query to return smaller amount of data
         We are still working on, but it seems slightly solve the "Error in export" problem.
    b. We have confirmed the SMTP Server configuration is correct. So this solution not fit for our case. As the trouble job has been running more than 3 years, until recent month it starts with this error. And the job failed this error only happens intermittently e.g. Monday,Tuesday,Friday it all works fine(Proved the job it self is OK) but Wednesday some period, it failed to export. So we are thinking it might the hyperion performance issue.
    For the KM reference:
    Interactive Reporting (IR) Jobs do not Send Emails. Error: "Export failed. Error Sending Mail" (Doc ID 1401854.1)
    We have already read and checked, we do have correct configuration.
    Interactive Reporting Job Completing With Javascript Errors - Not Producing Excel Output (Doc ID 1065483.1)
    Our case is customer can successful extract data and send excel/bqy result to customer with no problem. But it failed to send pdf result sometime.
    Thanks and Regards,
    Erica

  • Different output running Report  on server and running local

    hi all
    I have the following problem, running my report on development environment i have the desidered results, but running the same report with the same parameters on Web server side, I have no results.
    Could you help me???
    Thanks in advance
    Antonio

    Hi
    Yes other reports work without these problems...
    I think that the problem is the report parameter form, and the parameter report definition.... I think so, because, if I set the report execution parameter "paramform" to no, giving the same input execution values it functs as local, but if I set it to yes it doesn't work.
    I'm trying to cancel report parameter form on the report and remake it, I'll let you know.
    Thanks in advance
    Antonio

  • Run report on background and save to file

    Hi all,
    I have a development suite 10g.
    I have created simple paper report with one parameter.
    And I want to run this report on background from forms and get it
    saved to file (PDF or RTF). The parameter for report should be passed from
    my form.
    Thanks for any suggestions.
    Brano.

    Hi,
    I use the following progam unit to generate a pdf file:
    if RUN_PRODUCT does not work on 10g check out the built-in RUN_REPORT_OBJECT.
    PROCEDURE create_pdf_report IS
    l_pl_id ParamList;
    v_report_from_date date;
    v_report_to_date date;
    /* PDF file name */
    v_file_name varchar2(150);
    /* network location where to save the pdf file*/
    v_output_path varchar2(100):= :control.report_dir;
    begin
    v_report_from_date := :control.from_date;
    v_report_to_date := :control.to_date;
    v_file_name := v_output_path||'\your_pdf_filename.pdf';
    L_pl_id := Get_Parameter_List ('REPORT_PARAMS');
    If Not ID_NULL (l_pl_id) then
    Destroy_Parameter_List (l_pl_id);
    End if;
    L_pl_Id := Create_Parameter_List ('REPORT_PARAMS');
    /* Parameters to send output to pdf file*/      
    Add_Parameter(L_pl_id, 'DESTYPE' ,TEXT_PARAMETER, 'FILE');
    Add_Parameter(L_pl_id, 'DESFORMAT' ,TEXT_PARAMETER, 'PDF');
    Add_Parameter(L_pl_id, 'DESNAME' ,TEXT_PARAMETER, v_file_name);
    Add_Parameter(L_pl_id, 'PARAMFORM' ,TEXT_PARAMETER, 'NO');
    Add_Parameter(L_pl_id, 'BACKGROUND' ,TEXT_PARAMETER, 'YES');
    /* Addtional data parameters */
    Add_Parameter(L_pl_id, 'P_other_param' ,TEXT_PARAMETER, :CONTROL.MY_ITEM);
    Add_Parameter(L_pl_id, 'P_FROM_DATE' ,TEXT_PARAMETER, to_char(v_report_from_date,'DD-MON-YYYY') );
    Add_Parameter(L_pl_id, 'P_TO_DATE' ,TEXT_PARAMETER, to_char(v_report_to_date,'DD-MON-YYYY') );
    -- call the report synchronously
    Run_Product(REPORTS
    ,'YOUR_REPORT_NAME'
    ,SYNCHRONOUS
    ,RUNTIME
    ,FILESYSTEM
    ,L_pl_id
    ,NULL
    exception
    when others then
    message('Error running report. '||sqlerrm, acknowledge);
    end;
    Regards,
    Hugo

  • Video runs slow on firefox and out of sync with audio with abode flash 12.

    Ever since I installed adobe flash player 12 my videos run slow and out of sync with the audio it is like it pauses for a couple seconds and starts back working and keeps doing that.

    Hi jth10,
    The troubleshooting steps provided by Adobe can be found here: [http://helpx.adobe.com/flash-player/kb/video-playback-issues.html#main_For_Windows_users]
    * Are there any settings in the Flash settings manager that changed when you updated? [http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager03.html]
    *These are the recommended settings for specific resolutions [http://helpx.adobe.com/flash-player/kb/poor-video-quality-flash-player.html]
    You can also try to disable hardware acceleration in the Adobe settings menu.

Maybe you are looking for

  • I have this error that i cannot fix and i have no idea what causes it

    I downloaded and installed a version of the JDK (version 1.3 actually) and something in the software had a bug that would not recognize java command line class files. i would try to run a perfectly good java class that works on other computers and i

  • Importance of quality box in sap landscape.

    Hi All, Can anyone explain about why generally all the companies using the QUALITY BOX in the SAP LANDSCAPE, Anyway we are already testing with the DEVELOPMENT BOX, so we can transfer directly from DEV to PRD na.....Why the need of QTY there. This qu

  • How to keep Lion Server wiki service running in bootcamp windows?

    I know this is a stupid question, but ... I used to run mac mini server as the wiki & file sharing server within my team, and use vmware to load the win7 on the bootcamp partition to do some jobs which need M$ visual studio. Now I have some new thing

  • XI message interface type

    Hi , I have scenario file-XI-R/3.I am not doing any mapping. I have created 2 message interface say MOUT of type outbound with message type MT1 and MIB of type Inbound with message type MT2. In Integration directory by mistake I have put MIB everywhe

  • Lucene search and order by Date attribute

    Hello, We have a requirement where we have to search assets and sort assets via some date attribute (Article Publication Date) using Lucene Search. There is no issue in searching and displaying results in any order we want. Problem occurs when some a