Call Report output via a Button click

Hello,
I am using a button placed on a SCREEN.
WHen i click on the button i am doing some process using on user command.
I want the output on a report (as a list output) based ob my write statments
I tried with  leave to list processing , set screen 0..etc stuff but thats not calling my report output.
Can any one suggest?
Thanks
Ricky

hmmm... sounds to me like you're looking for something like
* Print report
  NEW-PAGE PRINT ON NEW-SECTION PARAMETERS Z_L_PRI_PARAMS NO DIALOG.
  FORMAT COLOR COL_BACKGROUND INTENSIFIED OFF.
  LOOP AT Z_T_ITAB INTO Z_L_ITAB.
    WRITE: / SY-VLINE(01), Z_L_ITAB-EBELN,
             SY-VLINE(01), Z_L_ITAB-EBELP,
             SY-VLINE(01), Z_L_ITAB-AEDAT,
             SY-VLINE(01), Z_L_ITAB-OID_EXTBOL.
  ENDLOOP.
  NEW-PAGE PRINT OFF.
  COMMIT WORK AND WAIT.
Lookup NEW-PAGE

Similar Messages

  • Open mutiple PDF report outputs with one button click

    I need to open multiple PDF outputs depending on check boxes on the front end (Asp.net C#) app connecting to Crystal report server XI. Here is my code. I'm able to open only one PDF not multiple. If I use Response.end() at the end except first nothing is displayed. If I remove response.end() it opens Adobe and displays error msg saying file is corrupted. Please let me know if there is any other way to display multiple PDF outputs
    SessionMgr sessionMgr = new SessionMgr();
            EnterpriseSession enterpriseSession;
            ReportAppFactory reportAppFactory;
            ReportClientDocument reportClientDocument;
            EnterpriseService enterpriseService;
            InfoStore infoStore;
            InfoObjects infoObjects;
            InfoObject infoObject;
            String crServerName = ConfigurationManager.AppSettings.Get("CRServerName");
            String crUserID = ConfigurationManager.AppSettings.Get("CRUserID");
            String crPwd = ConfigurationManager.AppSettings.Get("CRPwd");
            String dbUserID = ConfigurationManager.AppSettings.Get("DBUserID");
            String dbPwd = ConfigurationManager.AppSettings.Get("DBPwd");
            enterpriseSession = sessionMgr.Logon(crUserID, crPwd, crServerName, "secEnterprise");
            enterpriseService = enterpriseSession.GetService("InfoStore");
            infoStore = new InfoStore(enterpriseService);
            infoObjects = infoStore.Query("Select SI_ID From CI_INFOOBJECTS Where SI_NAME='" + reportName + "' And SI_INSTANCE=0");
            infoObject = infoObjects[1];
            EnterpriseService tempService = enterpriseSession.GetService("", "RASReportFactory");
            reportAppFactory = (ReportAppFactory)tempService.Interface;
            reportClientDocument = reportAppFactory.OpenDocument(infoObject.ID, 0);
            // Pass datbase logon credentials
            reportClientDocument.DatabaseController.logon(dbUserID, dbPwd);
    reportClientDocument.DataDefController.ParameterFieldController.SetCurrentValues("", "ProjectID", ddlProjects.SelectedValue);
            PrintOutputController rasPrintOutputController;
               CrReportExportFormatEnum rasReportExportFormat = CrReportExportFormatEnum.crReportExportFormatPDF;
                           rasPrintOutputController = doc.PrintOutputController;
                ByteArray tempByteArray = rasPrintOutputController.Export(rasReportExportFormat, 0);
                Byte[] byteStreamOutput = tempByteArray.ByteArray;
                Response.AddHeader("content-disposition", "attachment;filename=" + reportName + ".pdf");
               Response.ContentType = "application/pdf";
                Response.BinaryWrite(byteStreamOutput);
    Response.end();

    Hello, Anu;
    Business Objects will create one PDF from one report. Once the report object has been formatted as a PDF it is no longer handled by Business Objects but uses the functionality of Adobe.
    If they were being saved as .pdf files, would there be a way to open more than one at a time?
    Elaine

  • Sending report output via E-mail (excel pivoted format)

    Hi all,
    i have a written a report where i need to send the report output to somebody via
    E-mail.i am sending this report output via E-mail successfully.The receiver receives, my output in excel format.but this excel is not <b>pivoted</b>.
    i want , the receiver should get my output in pivoted excel format.i.e my output data should be exactly fit in the excel sheet.
    now the columns in excel sheet are overlapping.once i double clicked, the columns are getting separated.i do not want to double click.i want all the columns should come properly i.e excel field  length should be adjusted as per the output field length.
    i am giving my coding below.plz suggest how i can do the above thing .it's urgent.
    any idea will be highly appreaciated.
    Regards
    if not p_email1 is initial.
         perform fill_report_csv.
         perform f_send_internet_mail.
      endif.
    FORM fill_report_csv.
       data :   l_text(232) type c,
               v_matnr1(21) type c,
               v_matnr(21) type c,
               v_matkl(14) type c,
               v_maktx(45) type c,
               v_ttlstk(14) type c,
               v_verpr(14) type c,
               v_werks(14) type c,
               v_lgort(14) type c,
               v_char(10) type c,
               v_stks type p ,
               v_po(40) type c,
               v_qty(13) type c,
                v_qty1 type sy-datum,
               v_date(15) type c,
               v_date1(15) TYPE C,
               v_name(35) type c,
               v_eknam(18) type c,
               v_lifnr(15) type c,
            l_po(40) type c,
            v_matnr(20) type c,
             l_rate(11) type  p decimals 5,
             l_flag type c.
      concatenate c_equal c_colon 'PO no.' c_colon
                    into v_po.
      concatenate c_equal c_colon 'Material no.' c_colon
                    into v_matnr.
      concatenate c_equal c_colon 'Description.' c_colon
                    into v_maktx.
      concatenate c_equal c_colon 'Due Qty.' c_colon
                    into v_qty.
      concatenate c_equal c_colon 'Del Date.' c_colon
                    into v_date.
      concatenate c_equal c_colon 'Vendor.' c_colon
                    into v_name.
      concatenate c_equal c_colon 'Buyer.' c_colon
                    into v_eknam.
      concatenate c_equal c_colon 'Vendor Code.' c_colon
                    into v_lifnr.
    concatenate
             v_po v_matnr v_maktx v_qty
             v_date v_name v_eknam v_lifnr
             into i_download
             SEPARATED BY con_tab.
      append i_download .
    clear : v_po,v_matnr, v_maktx, v_qty, v_date, v_name, v_eknam,v_lifnr .
    clear wa_output.
    loop at i_output into wa_output.
       on change of wa_output-ebeln.
         clear v_lines.
         loop at i_eket into wa_eket
                 where ebeln = wa_output-ebeln.
           v_lines = v_lines + 1.
           clear wa_eket.
         endloop.
    **-- Checking of page break
         v_lines = sy-linno + v_lines .
         if 55 < v_lines  .
           write:/0(161) sy-uline.
           new-page.
         endif.
      clear v_lines.
          loop at i_eket into wa_eket
                  where ebeln = wa_output-ebeln.
            v_lines = v_lines + 1.
            clear wa_eket.
          endloop.
    *-- Calculating the due qty.
        wa_output-dumng = wa_output-menge - wa_output-wemng.
    *-- Writing the Line items of the PO.
        read table i_ekpo into wa_ekpo
              with key ebeln = wa_output-ebeln
                       ebelp = wa_output-ebelp.
         l_rate = wa_ekpo-netpr / wa_ekpo-peinh.
    *-- Writing of PO detail
         if wa_output-dumng gt 0 .
         v_qty = wa_output-dumng.
        v_date1 = wa_output-eindt.
        v_maktx = wa_output-maktx.
         if wa_output-maktx+0(1) = '"' .
                concatenate  c_equal wa_output-maktx
                   into v_maktx  .
             else .
                concatenate  c_equal c_colon wa_output-maktx c_colon
                   into v_maktx  .
             endif .
       if wa_output-name1+0(1) = '"' .
                concatenate  c_equal wa_output-name1
                   into v_name  .
             else .
                concatenate  c_equal c_colon wa_output-name1 c_colon
                   into v_name  .
             endif .
        v_name = wa_output-name1.
        v_lifnr = wa_output-lifnr.
         write wa_output-eindt to v_date1 DD/MM/YYYY.
         concatenate '="' wa_output-ebeln '/'
                wa_output-ebelp '"' into v_po .
         concatenate '="' wa_output-matnr '"' into v_matnr .
             concatenate  c_equal c_colon wa_output-maktx c_colon
               into v_maktx  .
              concatenate  c_equal c_colon wa_output-dumng c_colon
               into v_qty1  .
               concatenate  c_equal c_colon wa_output-eindt c_colon
               into v_date1  .
              concatenate  c_equal c_colon wa_output-name1 c_colon
               into v_name  .
                concatenate  c_equal c_colon wa_output-eknam c_colon
                into v_eknam  .
              concatenate  c_equal c_colon wa_output-lifnr c_colon
               into v_lifnr  .
              concatenate  c_equal c_colon wa_mard-werks '/'
               wa_mard-lgort c_colon
               into v_lgort .
                 concatenate '="' wa_output-lifnr '"' into v_lifnr .
    condense:v_po,v_matnr, v_maktx, v_qty, v_date, v_name, v_eknam,v_lifnr .
         concatenate
             v_po v_matnr v_maktx v_qty
             v_date1 v_name v_eknam v_lifnr
             into i_download
             SEPARATED BY con_tab.
        concatenate con_cret i_download INTO i_download .
        append i_download .
      endif.
    clear : v_po,v_matnr, v_maktx, v_qty, v_date, v_name, v_eknam,v_lifnr .
    endloop.
    ENDFORM.                    " fill_report_csv
    *&      Form  f_send_internet_mail
          text
    -->  p1        text
    <--  p2        text
    FORM f_send_internet_mail.
    Variables
    data:   it_packing_list like sopcklsti1 occurs 0 with header line,
            it_contents like solisti1 occurs 0 with header line,
            it_receivers like somlreci1 occurs 0 with header line,
            it_attachment like solisti1 occurs 0 with header line,
            gd_cnt type i,
            gd_sent_all(1) type c,
            gd_doc_data like sodocchgi1,
            gd_error type sy-subrc.
    data:   it_message type standard table of SOLISTI1 initial size 0
                    with header line.
    data : found_receiver type c,
           v_title(80) type c,
           l_text(180) type c.
    Fill the document data.
      gd_doc_data-doc_size = 1.
    Adds text to email text table
      append 'Pls see attached open purchase order report.' to it_message.
      append '' to it_message.
      concatenate 'Note: This is system generated report'
                  ', figures may subject to actual physical count.'
                  into l_text separated by space.
      append l_text to it_message.
    Populate the subject/generic message attributes
      CLEAR gd_doc_data.
      READ TABLE i_download INDEX w_cnt.
      gd_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( i_download ).
      gd_doc_data-obj_langu  = sy-langu.
      gd_doc_data-obj_name   = 'SAPRPT'.
    if p_asdate is initial .
         concatenate p_title ' '
                  sy-datum sy-uzeit into v_title separated by space.
    else .
        concatenate p_title ' '
                 p_bldat p_cputm into v_title separated by space.
    endif .
      gd_doc_data-obj_descr  = v_title .
      gd_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = i_download[].
    Describe the body of the message
      clear it_packing_list.
      refresh it_packing_list.
      it_packing_list-transf_bin = space.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      describe table it_message lines it_packing_list-body_num.
      it_packing_list-doc_type = 'RAW'.
      append it_packing_list.
    Create attachment notification
      it_packing_list-transf_bin = 'X'.
      it_packing_list-head_start = 1.
      it_packing_list-head_num   = 1.
      it_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES it_packing_list-body_num.
      it_packing_list-doc_type   =  'XLS'.
      it_packing_list-obj_descr  =  'OPEN PURCHASE ORDER' .
      it_packing_list-obj_name   =  'PO.XLS' .
      it_packing_list-doc_size   =  it_packing_list-body_num * 255.
      APPEND it_packing_list.
    assign SAP user smtp address from successful retrieval.
      loop at p_email.
    Add the recipients email address
         found_receiver = 'X' .
         it_receivers-receiver = p_email-low.
         it_receivers-rec_type = 'U'.
         it_receivers-com_type = 'INT'.
         it_receivers-notif_del = ''.
         it_receivers-notif_ndel = 'X'.
         append it_receivers .
      endloop .
    Add default recipient email when unable to locate purc group email
       if found_receiver is initial .
           it_receivers-receiver = p_email.
           it_receivers-rec_type = 'U'.
           it_receivers-com_type = 'INT'.
           it_receivers-notif_del = ''.
           it_receivers-notif_ndel = 'X'.
          append it_receivers.
       endif .
    Call the FM to post the message to SAPMAIL
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           exporting
                document_data              = gd_doc_data
                put_in_outbox              = 'X'
                commit_work                = 'X'
           importing
                sent_to_all                = gd_sent_all
           tables
                packing_list               = it_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = it_receivers
           exceptions
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                others                     = 8.
    Store function module return code
      gd_error = sy-subrc.
    Get it_receivers return code
      loop at it_receivers.
      endloop.
    Instructs mail send program for SAPCONNECT to send email.
      wait up to 2 seconds.
      if gd_error eq 0.
          submit rsconn01 with mode = 'INT'
                        with output = ' '
                        and return.
      endif.
    ENDFORM.                    " f_send_internet_mail

    Hi,
    go through this link,
    http://www.sapdevelopment.co.uk/reporting/email/emailhome.htm
    you have some sample programs.
    Regards,
    Raghavendra

  • Report output via E-mail

    Hi all,
    i have a written a report where i need to send the report output to somebody via
    E-mail.i am sending this report output via E-mail successfully.The receiver receives, my output in excel format.but this excel is not <b>pivoted</b>.
    i want , the receiver should get my output in pivoted excel format.i.e my output data should be exactly fit in the excel sheet.
    now the columns in excel sheet are overlapping.once i double clicked, the columns are getting separated.i do not want to double click.i want all the columns should come properly i.e excel field  length should be adjusted as per the output field length.
    i am giving my coding below.plz suggest how i can do the above thing .it's urgent.
    any idea will be highly appreaciated.
    Regards
    if not p_email1 is initial.
         perform fill_report_csv.
         perform f_send_internet_mail.
      endif.
    FORM fill_report_csv.
       data :   l_text(232) type c,
               v_matnr1(21) type c,
               v_matnr(21) type c,
               v_matkl(14) type c,
               v_maktx(45) type c,
               v_ttlstk(14) type c,
               v_verpr(14) type c,
               v_werks(14) type c,
               v_lgort(14) type c,
               v_char(10) type c,
               v_stks type p ,
               v_po(40) type c,
               v_qty(13) type c,
                v_qty1 type sy-datum,
               v_date(15) type c,
               v_date1(15) TYPE C,
               v_name(35) type c,
               v_eknam(18) type c,
               v_lifnr(15) type c,
            l_po(40) type c,
            v_matnr(20) type c,
             l_rate(11) type  p decimals 5,
             l_flag type c.
      concatenate c_equal c_colon 'PO no.' c_colon
                    into v_po.
      concatenate c_equal c_colon 'Material no.' c_colon
                    into v_matnr.
      concatenate c_equal c_colon 'Description.' c_colon
                    into v_maktx.
      concatenate c_equal c_colon 'Due Qty.' c_colon
                    into v_qty.
      concatenate c_equal c_colon 'Del Date.' c_colon
                    into v_date.
      concatenate c_equal c_colon 'Vendor.' c_colon
                    into v_name.
      concatenate c_equal c_colon 'Buyer.' c_colon
                    into v_eknam.
      concatenate c_equal c_colon 'Vendor Code.' c_colon
                    into v_lifnr.
    concatenate
             v_po v_matnr v_maktx v_qty
             v_date v_name v_eknam v_lifnr
             into i_download
             SEPARATED BY con_tab.
      append i_download .
    clear : v_po,v_matnr, v_maktx, v_qty, v_date, v_name, v_eknam,v_lifnr .
    clear wa_output.
    loop at i_output into wa_output.
       on change of wa_output-ebeln.
         clear v_lines.
         loop at i_eket into wa_eket
                 where ebeln = wa_output-ebeln.
           v_lines = v_lines + 1.
           clear wa_eket.
         endloop.
    **-- Checking of page break
         v_lines = sy-linno + v_lines .
         if 55 < v_lines  .
           write:/0(161) sy-uline.
           new-page.
         endif.
      clear v_lines.
          loop at i_eket into wa_eket
                  where ebeln = wa_output-ebeln.
            v_lines = v_lines + 1.
            clear wa_eket.
          endloop.
    *-- Calculating the due qty.
        wa_output-dumng = wa_output-menge - wa_output-wemng.
    *-- Writing the Line items of the PO.
        read table i_ekpo into wa_ekpo
              with key ebeln = wa_output-ebeln
                       ebelp = wa_output-ebelp.
         l_rate = wa_ekpo-netpr / wa_ekpo-peinh.
    *-- Writing of PO detail
         if wa_output-dumng gt 0 .
         v_qty = wa_output-dumng.
        v_date1 = wa_output-eindt.
        v_maktx = wa_output-maktx.
         if wa_output-maktx+0(1) = '"' .
                concatenate  c_equal wa_output-maktx
                   into v_maktx  .
             else .
                concatenate  c_equal c_colon wa_output-maktx c_colon
                   into v_maktx  .
             endif .
       if wa_output-name1+0(1) = '"' .
                concatenate  c_equal wa_output-name1
                   into v_name  .
             else .
                concatenate  c_equal c_colon wa_output-name1 c_colon
                   into v_name  .
             endif .
        v_name = wa_output-name1.
        v_lifnr = wa_output-lifnr.
         write wa_output-eindt to v_date1 DD/MM/YYYY.
         concatenate '="' wa_output-ebeln '/'
                wa_output-ebelp '"' into v_po .
         concatenate '="' wa_output-matnr '"' into v_matnr .
             concatenate  c_equal c_colon wa_output-maktx c_colon
               into v_maktx  .
              concatenate  c_equal c_colon wa_output-dumng c_colon
               into v_qty1  .
               concatenate  c_equal c_colon wa_output-eindt c_colon
               into v_date1  .
              concatenate  c_equal c_colon wa_output-name1 c_colon
               into v_name  .
                concatenate  c_equal c_colon wa_output-eknam c_colon
                into v_eknam  .
              concatenate  c_equal c_colon wa_output-lifnr c_colon
               into v_lifnr  .
              concatenate  c_equal c_colon wa_mard-werks '/'
               wa_mard-lgort c_colon
               into v_lgort .
                 concatenate '="' wa_output-lifnr '"' into v_lifnr .
    condense:v_po,v_matnr, v_maktx, v_qty, v_date, v_name, v_eknam,v_lifnr .
         concatenate
             v_po v_matnr v_maktx v_qty
             v_date1 v_name v_eknam v_lifnr
             into i_download
             SEPARATED BY con_tab.
        concatenate con_cret i_download INTO i_download .
        append i_download .
      endif.
    clear : v_po,v_matnr, v_maktx, v_qty, v_date, v_name, v_eknam,v_lifnr .
    endloop.
    ENDFORM.                    " fill_report_csv
    *&      Form  f_send_internet_mail
          text
    -->  p1        text
    <--  p2        text
    FORM f_send_internet_mail.
    Variables
    data:   it_packing_list like sopcklsti1 occurs 0 with header line,
            it_contents like solisti1 occurs 0 with header line,
            it_receivers like somlreci1 occurs 0 with header line,
            it_attachment like solisti1 occurs 0 with header line,
            gd_cnt type i,
            gd_sent_all(1) type c,
            gd_doc_data like sodocchgi1,
            gd_error type sy-subrc.
    data:   it_message type standard table of SOLISTI1 initial size 0
                    with header line.
    data : found_receiver type c,
           v_title(80) type c,
           l_text(180) type c.
    Fill the document data.
      gd_doc_data-doc_size = 1.
    Adds text to email text table
      append 'Pls see attached open purchase order report.' to it_message.
      append '' to it_message.
      concatenate 'Note: This is system generated report'
                  ', figures may subject to actual physical count.'
                  into l_text separated by space.
      append l_text to it_message.
    Populate the subject/generic message attributes
      CLEAR gd_doc_data.
      READ TABLE i_download INDEX w_cnt.
      gd_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( i_download ).
      gd_doc_data-obj_langu  = sy-langu.
      gd_doc_data-obj_name   = 'SAPRPT'.
    if p_asdate is initial .
         concatenate p_title ' '
                  sy-datum sy-uzeit into v_title separated by space.
    else .
        concatenate p_title ' '
                 p_bldat p_cputm into v_title separated by space.
    endif .
      gd_doc_data-obj_descr  = v_title .
      gd_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = i_download[].
    Describe the body of the message
      clear it_packing_list.
      refresh it_packing_list.
      it_packing_list-transf_bin = space.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      describe table it_message lines it_packing_list-body_num.
      it_packing_list-doc_type = 'RAW'.
      append it_packing_list.
    Create attachment notification
      it_packing_list-transf_bin = 'X'.
      it_packing_list-head_start = 1.
      it_packing_list-head_num   = 1.
      it_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES it_packing_list-body_num.
      it_packing_list-doc_type   =  'XLS'.
      it_packing_list-obj_descr  =  'OPEN PURCHASE ORDER' .
      it_packing_list-obj_name   =  'PO.XLS' .
      it_packing_list-doc_size   =  it_packing_list-body_num * 255.
      APPEND it_packing_list.
    assign SAP user smtp address from successful retrieval.
      loop at p_email.
    Add the recipients email address
         found_receiver = 'X' .
         it_receivers-receiver = p_email-low.
         it_receivers-rec_type = 'U'.
         it_receivers-com_type = 'INT'.
         it_receivers-notif_del = ''.
         it_receivers-notif_ndel = 'X'.
         append it_receivers .
      endloop .
    Add default recipient email when unable to locate purc group email
       if found_receiver is initial .
           it_receivers-receiver = p_email.
           it_receivers-rec_type = 'U'.
           it_receivers-com_type = 'INT'.
           it_receivers-notif_del = ''.
           it_receivers-notif_ndel = 'X'.
          append it_receivers.
       endif .
    Call the FM to post the message to SAPMAIL
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           exporting
                document_data              = gd_doc_data
                put_in_outbox              = 'X'
                commit_work                = 'X'
           importing
                sent_to_all                = gd_sent_all
           tables
                packing_list               = it_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = it_receivers
           exceptions
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                others                     = 8.
    Store function module return code
      gd_error = sy-subrc.
    Get it_receivers return code
      loop at it_receivers.
      endloop.
    Instructs mail send program for SAPCONNECT to send email.
      wait up to 2 seconds.
      if gd_error eq 0.
          submit rsconn01 with mode = 'INT'
                        with output = ' '
                        and return.
      endif.
    ENDFORM.                    " f_send_internet_mail

    ans

  • How to call Report output in Modulepools

    hi
    can any one suggest me
    How to call Report output in Modulepools
    i have a push button in modulepool after clicking that pushbutton i need a report output
    how to do this
    Thanks & Regards
    kalyan

    Hi Kalyan,
    From Module pool program you have to go display A Report output..
    So at User-Command of PAI use LEAVE TO LIST PROCESSING.
    Regarding this check the Demo program DEMO_LEAVE_TO_LIST_PROCESSING.
    And for further reference please check this SAP Help
    http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9d2f35c111d1829f0000e829fbfe/frameset.htm
    For more help please check this thread
    Re: LEAVE TO LIST-PROCESSING
    Hope this would help you.
    Good luck
    Narin

  • How to call web service on a button click in Web UI

    Hi Experts,
    I have a requirement to call/consume external web service on a button click in CRM web UI. Can someone help me with the code sample for invoking web service from crm web ui?
    Thanks in advance.
    Cheers,
    Sumit Mittal

    Consuming external web service directly without xi system in between.
    u2022     SE80
    u2022     Create Enterprise Service-> Choose object type as u201CService Consumeru201D
    u2022     Select URL HTTP destination in the next step
    u2022     Give the WSDL url in the url point
    u2022     Give any package name or store it in the local object.
    u2022     Corresponding proxies and data types will be generated inside the enterprise service tag
    Code sample for invoking the service via report.
    u2022     Create an object of the client proxy type here itu2019s io_clientproxy.
    u2022     Declare input and output parameters as per the structure of the service input/output parameters.
    u2022     Fill in input parameters what your service expect and call the object methods for relevant task.
    REPORT  ZWEBSERVICE_CREATNUPDATE.
    DATA: io_clientproxy TYPE REF TO zzco_user_data_service .
    DATA: output_crnup TYPE zzcreate_or_update_user_data1,
          input_crnup TYPE zzcreate_or_update_user_data_1.
    DATA :
           ls_param_crnup_in TYPE zzcreate_or_update_user_data, " CU input
           ls_param_crnup TYPE zzcreate_or_update_user_data_r, "CU Response
           ls_return_crnup  TYPE zzcrm_user, " CU Response
           ls_arg0 TYPE zzcrm_user.
    ls_arg0-first_name = 'shashank'.
    ls_arg0-last_name = 'testw/ouserid'.
    ls_arg0-org_name = 'Test_Org'.
    "ls_arg0-USER_ID = '369713'.
    ls_param_crnup_in-arg0 = ls_arg0.
    input_crnup-parameters = ls_param_crnup_in.
    TRY.
        CREATE OBJECT io_clientproxy
          EXPORTING
            logical_port_name = 'LP4'.
      CATCH cx_ai_system_fault .
    ENDTRY.
    TRY.
        CALL METHOD io_clientproxy->create_or_update_user_data
          EXPORTING
            input  = input_crnup
          IMPORTING
            output = output_crnup.
      CATCH cx_ai_system_fault .
      CATCH cx_ai_application_fault .
    ENDTRY.
    ls_param_crnup = output_crnup-parameters.
    ls_return_crnup = ls_param_crnup-return.
    IF ls_return_crnup IS INITIAL.
      WRITE : 'User creation failed'.
    ELSE.
      WRITE :  'Process Status : ',ls_return_crnup-process_status,
               /'User Id : ',ls_return_crnup-user_id,
                       /'First Name :',ls_return_crnup-first_name,
               /'Last Name :',ls_return_crnup-last_name,
               /'Org Name : ',ls_return_crnup-org_name.
    ENDIF.

  • CRM5.2 UI-Call a dynamic URL on button click

    Hi all, 
               My requirement is to call a dynamic url on the click of a button in the overview page. I have added a custom button in  the method  IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS , and the related code in do_handle_event.I have created a custom method for the button event. I have enhanced a custom controller and created an attribute.In the custom method created for the button event, I have written the code for retrieving the parameters to be passed to the url.
    In the layout of the view associated with the display view , I have written the following code for calling the URL in a new window.
    <%
    DATA: lr_cuco_EMA TYPE REF TO ZL_BP_CONT_BPCONT_IMPL,
          lv_url TYPE string,
          lv_url1 type string,
          lv_count type i.
      lr_cuco_EMA ?= controller->get_custom_controller( 'ZBP_CONT/BPCONT' ).
      check lr_cuco_EMA is bound.
      if lr_cuco_EMA->gv_VALUE is not initial.
      if lr_cuco_EMA->gv_COUNT IS NOT INITIAL.
      clear lr_cuco_EMA->gv_COUNT.
      endif.
      LV_URL = lr_cuco_EMA->gv_VALUE.
      Concatenate 'http:/' LV_URL  into LV_URL1.
      Concatenate '"http:/' LV_URL '"' into LV_URL.
        lv_count = lr_cuco_EMA->gv_COUNT mod '2'.
        if lv_count Ne 0.
      lv_url = lv_url1.
    endif.
      %>
         <scrpt language="Javascript">
            window.open(<%= lv_url%>).focus();
          </script>
       <%
             lr_cuco_EMA->gv_COUNT = lr_cuco_EMA->gv_COUNT + 1.
             clear lr_cuco_EMA->gv_value.
             clear lv_count.
             clear lv_url.
             clear lv_url1.
             ENDIF.
    %>
    But here my URl is getting called alternate times.If I do not write the code  by using the variable GV_COUNT the url is getting called only the first time of the button click  and to call the URL again you need to navigate back to the search page and again back to the overview page and click on the button.
    Can anyone help me regarding this? I want the URL to be called in a new page on every button click.
    Thanks in Advance,
    Chandana

    Hi Nisha,
    The crux of your issue here is that you want to call the event triggered with onClick before calling the event triggered on onClientClick. This can be achieved by the following code in the function called on the onClientClick.
    function fn_button()
               htmlbSL(this,2,'b_row_selection:onInputProcessing()');
               window.open("new_page",target="BLANK");
    Here, fn_button is the javascript function called on button click, and b_row_selection is the event triggered on the onClick event of row selection.
    Try this out and let us know if it works for you.
    Regards,
    Saurabh

  • Send report output via email as zipped attachment

    Is it possible for the report output to be zipped before being attached to an email when running on a windows reports_server? On unix we theoretically have the ability to modify the mail.sh shell script that performs the mail operation for reports.

    Hi Richard
    This is a Reports 9i solution.
    You may create a batch file that runs the report, compresses the file and invokes, say, a Java application that mails the given .zip file.
    More "advanced" options would be:
    You may create a pluggable destination that captures report output. Next, your code does the compresses the output file and mails it.
    A simpler solution would be to run two reports. First, that creates the reports output file. In its AFTER_REPORT trigger, call Java method (thru. Java Importer), that picks up the output file and compresses it. Second, that uses XML distribution feature of Reports 9i and mails the .zip file as a file attachment using appropriate construct.
    Regard
    Sripathy

  • Forms calling Reports output issue RTF/PDF - strange issue

    Dear All,
    I'm looking for a bit of help with a strange situation calling reports from Forms.
    This problem I'm getting in both 11.1.1 and 11.1.2 of Forms/Reports. Client is WinXP/7 (issue appears on both), Weblogic server is Linux (SLES11 and Red Hat - issue on both)
    So the issue is
    1. calling a report with output as RTF (this works fine and we use OLE2 to open the report in Word)
    2. Wihile in that form call the same report though change the output to be created as PDF in the cache and the report then opens in IE (this too works fine)
    3. Now if we try and do number 1 again (still in the same form) and run the same report again and choose to generate as RTF and open in word, it erroneously generates the report in PDF format but with an .RTF extension on the file.
    Of course most of the time people would not want to do this, but the client has identified this issue and classified it as a bug, so we need to fix it (and it doesn't happen in the Forms6i version it is migrated from).
    I have tried to ensure that the parameter list is correctly deleted and re-created, which appears to be the case. I also tried to generate a new unique parameter list for every run, which made no difference to the problem.
    If I choose to run a completely different report, the problem has reset itself. So the problem exists only when I've chosen the PDF output and then run the same report thereafter as RTF output to a file.
    Code to prepare for the RTF option is:
    Add_Parameter(pl_id,'destype',TEXT_PARAMETER,'FILE');
    Add_Parameter(pl_id,'desname',TEXT_PARAMETER,l_temp_env||'/'|| p_report || '.rtf');
    l_report_desname := l_temp_env||'/'|| p_report || '.rtf';
    Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER,'RTF');
    Add_Parameter(pl_id,'REPORT_DESFORMAT',TEXT_PARAMETER,'RTF');
    Add_Parameter(pl_id,'mode',TEXT_PARAMETER,'BITMAP');
    l_report := p_report;
    Code used to prepare for PDF option is:
    Add_Parameter(pl_id,'destype',TEXT_PARAMETER,'CACHE');
    Add_Parameter(pl_id,'desname',TEXT_PARAMETER,'');
    Add_Parameter(pl_id,'desformat',TEXT_PARAMETER,'PDF');
    l_report := p_report;
    Any ideas gratefully received.
    cheers
    Tony

    So I delete the paramlist correctly, then the code is:
    IF (p_display_method = 'W')
    THEN
    --WORD Format
         --delete file on client
         Delete_File('c:\temp'||'\'|| p_report || '.rtf');
         --delete file on app server
         host('rm '||l_temp_env||'/'|| p_report || '.rtf');
         Add_Parameter(pl_id,'REPORT_DESTYPE',TEXT_PARAMETER,'FILE');
         Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER,'FILE');
         Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER,l_temp_env||'/'|| p_report || '.rtf');
         l_report_desname := l_temp_env||'/'|| p_report || '.rtf';
         Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER,'RTF');
         Add_Parameter(pl_id,'REPORT_DESFORMAT',TEXT_PARAMETER,'RTF');     
         Add_Parameter(pl_id,'MODE',TEXT_PARAMETER,'BITMAP');
         Add_Parameter(pl_id,'printjob',TEXT_PARAMETER,'no');
         l_report := p_report;
    ELSIF (p_display_method = 'E')
    THEN
    --EXCEL format
         --delete file on client
         Delete_File('c:\temp'||'\'|| p_report || '.csv');
         Delete_File('c:\temp'||'\'|| p_report || '.xls');
         --delete file on app server
         host('rm '||l_temp_env||'/'|| p_report || '.csv');
         Delete_File(l_temp_env||'\'|| p_report || '.cvs');
         Delete_File(l_temp_env||'\'|| p_report || '.xls');
         Add_Parameter(pl_id,'destype',TEXT_PARAMETER,'FILE');
         Add_Parameter(pl_id,'desname',TEXT_PARAMETER,l_temp_env||'/'|| p_report || '.csv');
         Add_Parameter(pl_id,'desformat',TEXT_PARAMETER,'csv.prt');
         Add_Parameter(pl_id,'REPORT_DESFORMAT',TEXT_PARAMETER,'csv.prt');
         Add_Parameter(pl_id,'MODE',TEXT_PARAMETER,'character');
         Add_Parameter(pl_id,'printjob',TEXT_PARAMETER,'no');
         l_report := p_report || '_d';
    ELSIF (p_display_method = 'P')
    THEN
    -- PDF Format
         Add_Parameter(pl_id,'destype',TEXT_PARAMETER,'CACHE');
         Add_Parameter(pl_id,'desname',TEXT_PARAMETER,l_temp_env||'/'|| p_report || '.pdf');
         Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER,'PDF');
         Add_Parameter(pl_id,'REPORT_DESFORMAT',TEXT_PARAMETER,'PDF');     
         l_report := p_report;
    END IF;
    So all of the above works fine when generating a report the first time you enter a form, but if you run a PDF output report then immediately in the same form generate the report again to a non-PDF format, it comes out in incorrectly in PDF format.
    rgds
    Tony
    Edited by: tony.g on Nov 29, 2012 1:37 PM

  • HOW TO CALL APPROVAL WORK FLOW ON BUTTON CLICK EVENT OF VISUAL WEB PART?

    Hiall,
    I created an OOB an approval work flow I want to start that approval work flow through visual web  part button click event
    In work flow Settings I selected to manually start .Is this possible ? if possible please guide me how to do this
    Thanking you,
    Arun  kumar

    Hi,
    If you have an instance of SPListItem, and know the workflow association name, you can start it. First you need to find workflow assocation instance and tell SPSite.SPWorkflowManager to start your workflow.
    See this for more information:
    http://blog.mmasood.com/2012/06/programatically-start-workflow.html
    Please remember to up-vote or mark the reply as answer if you find it helpful.

  • Automatically produce Reports output via Portal

    Hi.
    I'm new to Oracle Portal, so please excuse if I ask a stupid question.
    We have some Oracle Report Builder reports, which we'd like to automate (automatically produce the output for the users). Is there some way of defining it in Portal so that it automatically via URL's or something runs these reports to produce the output automatically ?
    If not, then I suppose we'll probably be using CRON to automate them....
    Thank you.
    Marcel

    Hi,
    All the components have something have called the batch mode which submits this job
    to the job queue. This option also stores the results in the database for a period
    of time which you can change. You can see if this helps.
    thanks,
    Sharmila

  • Insufficient privileges error while calling the seeded page on button click

    hi all
    I am working on Customers Online module.
    I have added a normal button on a standard page through personalization .
    The destination for the button is set to call the seeded Create organization page
    destination="OA.jsp?OAFunc=XXIIMC_NG_ORG_CREATE&amp;OAHP=IMC_NG_MAIN_MENU&amp;OASF=IMC_NG_ORG_CREATE"
    System Admin --> functions --> XXIIMC_NG_ORG_CREATE is a copy of standard function IMC_NG_ORG_CREATE.
    It calls the page "OA.jsp?page=/oracle/apps/imc/ocong/party/organization/webui/ImcCreateOrg&HzPuiAddressEvent=CREATE"
    When i click on the button i get the error *"You have insufficient privileges for the current operation. Please contact your System Administrator"*
    1. The profiles *"FND Function Validation Level"* and *"FND Validation Level"* are set to NONE
    2. Bounced apache also.
    3. The responsibility Customers Online Superuser is assigned to my user.
    We are doing R12 upgrade. The similar functionality is working fine in 11i.
    Please let me know what could be the reason of this error and how to correct it.

    Hi,
    Grant is not given to the create organization page. Ask your DBA for this issue.
    Thanks,
    Kumar

  • Phase event InitMethod() is calling 4 times on Back button click???

    Hi Everyone,
    My Jdev version is 11.1.2.3.0.
    I have developed one ADF application with 3 pages.
    First page has a button to move to second and third pages. In the same way second and third pages have the Back buttons to first page. Everything is working very fine.
    But the first page has phase event InitMethod which executes when the page loads. At the starting of the Initmethod i kept the some code to return back if any event takes place that is also working fine.
    But When i press Back button in second or third page then the InitMethod of First page is being called for four times.
    What can be the reason?
    How could i control this behaviour?
    Please let me know....
    Thanks...............

    Hi Jovito,
    I also think the same that it's not possible. Now my issue is how to get my requirement.
    FYI..
    To open Classification screen directly we have a function module CLFM_OBJECT_CLASSIFICATION. But if I want to open IA06
    Inspection characterstics screen we don't have any FM or API to do the same.
    So how will I get my requirement done. That why I use the BDC call transaction to open IA06 Insp. characterstics screen but here I am facing this Back issue.
    Please advice if there is any suggestion.

  • Call another form with a button click (Oracle 10g)

    I have two forms. (One called Main Form and 2nd Called Notification summary)
    I want to call Main Form from notification summary. I have a unique column which is both in Main form and notification summary.
    I want to pass that unique column from notification summary to main form so that specific detail open in main form.
    Please suggest solution.
    Edited by: 871590 on Jul 11, 2011 4:29 PM

    Starting with a question: why do you need an own (main) form, if you need to call that form in another context, it's fine. If you will use this functionality only once, consider a second canvas (content or stacked, whatever fits better) or a second window within your form (notification).
    If its only on value you need to pass use a data parameter or a global variable; the first would be preferable to me.
    If there are more values in your column you may use global record group or (preferable to me) some kind of "temporary" table. It may be a global temporary table as provided by the oracle db or you are doing this with a normal permanent table. For the latter you will have slight higher amount of programming for organisational purposes.

  • How to call elem. Search help on Button click event in WD appilcation

    Hello All,
    i have requirement to call elem. search help on button click event in WD application. currently i am calling FM  F4IF_START_VALUE_REQUEST but getting the short dump as below,
    The following error text was processed in the system X31 : Screen output without connection to user.
    The error occurred on the application server saps_X31_31 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    SYSTEM-EXIT of program SAPLSDH4
    Function: F4_PRESEL_WITH_TABSTRIP of program SAPLSDH4
    Form: F4PROZ_STEP_PRESEL of program SAPLSDSD
    Function: DD_SHLP_SINGLE_STEP of program SAPLSDSD
    Form: F4PROZ_LOOP of program SAPLSDSD
    Form: F4PROZ of program SAPLSDSD
    Function: F4IF_START_VALUE_REQUEST of program SAPLSDHI
    Method: ONACTIONSEARCH_CUSTOMER of program /1BCWDY/50TU5ZEXF3K0IWCWE153==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/50TU5ZEXF3K0IWCWE153==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
    is there any way to achieve the required behaviour.
    please let me know.
    Regards,
    Chandra

    Hi Friends,
    I have the similar kind of requirement. Upon click on a Button on screen i need to call a search help, and collect one or more selected material numbers.
    The search help is working fine and i am getting the entries with the following code.
    The problem is i am finding extra popup on screen.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname         =  space
    fieldname       =  space
    SEARCHHELP      =  'MAT1'
    MULTIPLE_CHOICE =  'X'
    STEPL           =  0
    value           = 'MATNR'
    *dynpprog        =  progname
    *dynpnr          =  dynnum
    *dynprofield     = 'CARRIER'
    CALLBACK_PROGRAM          = 'ZTEST_1_PRA'
    CALLBACK_FORM             = 'F4CALLBACK'
    TABLES
    RETURN_TAB                = RETURN_TAB
    EXCEPTIONS
    FIELD_NOT_FOUND           = 1
    NO_HELP_FOR_FIELD         = 2
    INCONSISTENT_HELP         = 3
    NO_VALUES_FOUND           = 4
    OTHERS                    = 5.

Maybe you are looking for

  • Purchase metric report

    hi all currently i am doing purchase metric report i dont have a clear report on this, so plz help me on this issue. thanks in advance. i my selection screen i have                                 material                                 plant       

  • Financial reports Books

    Hi , 1.what are books in financial reports. 2.What is the purpose of them. 3.How do we work on them. please give some imp points about them. Thnx

  • Opening pdf ..urgent

    Hi, i have a page on which i have a link 'View'.On clicking the link a pdf document opens. In some machines on clicking the 'View' link the browser prompts for the Open/Save options in pop-up(the one that we usually get while downloading a file from

  • Converting video to flash file (newbie ?)

    Hi I was trying to convert an 14 mb mpeg 4 video file to an FLV file using the flash encoder.  The resulting flash file to my surprise was 18 MB I was expecting a very small file that I could post on the web.  Can someone tell me what Im doing wrong.

  • Regarding the sequence of the fields in Marketing Documents.....

    Dear