Report Sub-Heading output

Hi All,
I have a report sub-heading named "Opening Blance" on my report. I want that when the report output is more than 1 page then "Opening Blance" Heading should be change to "Balance Brought Forward" to 2nd and onward pages but on 1st page it should be "Opening Blance".
I am using the 10.1.2 Report Builder.
Any help would highly appriciated.
Regards

You may have to add your column headings as selected data e.g.
SELECT 'col1name', 'col2name', 'col3name'
FROM DUAL
as a query at the top of each page.
If you do this then you can control the contents of the title fields with something like this
function F_col1name_IDFormatTrigger return boolean is
page_num NUMBER;
begin
srw.get_page_num(page_num);
IF page_num != 1
THEN
srw.set_field_char (0,'col1 other name');
END IF;
return (TRUE);
end;
This will check the page number and set the value of the field, which in our case is used to display a column title, so a different value.
Hope this helps

Similar Messages

  • SSRS subreport with a sub-report as header on all pages

    Hello,
    I need some guidance on how to get a sub-report with a sub-report header and an expanding table. Please see below.
    This is the structure of things that I have:
    Main Report 1 is being invoked by ONLY Parameter 1 (User Text Box Entry).
    It Contains:
         Page 1: Sub-Report 1 invoked by Parameter 1
         Page 2 or more Pages: Sub-report 2 and a table (T1) expanding vertically based on Parameter 1 and Parameter 2. The Sub-report 2 should appear as header on all pages where T1 rows are there. Additionally, multiple Parameter 2
    values may be present and if so, they need to appear on a different page with appropriate header/table data. Parameter 1 and 2 are associated with a ONE dataset & its fields.
         Last Page: Sub-Report 3 and few text boxes below it. Invoked by Parameter 1
    The issue is I don't know how to insert Page 2 content. I tried making a new report with Sub-report 2 and the T1 below it. This is working fine but I'm not able to get the sub-report as header on all pages EXCEPT the first page. FixedData and RepeatOnNewPage
    properties are TRUE & KEEPwithGroup is set to 'AFTER'. Also, once I'm done with this report how do I insert it in the main report. Would it be in group / outside group in the group properties -- I would really appreciate if you can guide me with steps.
    Thank you,
    Nichesl
    Nichesl

    Thanks Asha ,
    Actually this is how my Report  layout is
    Group Header
    ---Detail1
    ---Detail2
    ---Detail3
    Group Footer1 (New Page After and Show at Bottom Setting)
    Group Footer 2 (New Page Before Setting)
    This is the layout of my report.
    When Details and Group Footer1 come in same page then my Group Header works perfect.
    When there are many details then the Group Footer1 skips into next page and Group Header does not show up in that page.
    Our requirement is such a way that Group Footer1 should have Group Header and Group Footer2 should always come in new page (i.e. last Page)
    I think I made it clear on my issue/requirement.
    Again I really appreciate for your reply.
    Regards
    Kalyan

  • Remove Header when running report with ALV output

    Hi,
    We are running ITS Version 6200.1022.63326.3, Build 84960 connecting to R/3 Enterprise 4.7 on 6.40 Kernel Patch 196.
    I have a situation where I run a report through ITS, starting with a selection screen, I can remove the header part of the ITS generated screen by commenting out:
    <!--
        `SAP_TemplateHeader()`
    -->
    in my template. This works great.
    Now when I run the report and the output is given in the form of an ALV grid, there is no screen to manipulate as it uses the webgui generated html due to me having set parameter:
    GENERATEDYNPRO = 1.
    When I receive the report output, the SAP  header with "Quit" and "Help" is back, due to it being driven by the standard webgui generated templates.
    I have searched on SDN and found some guidelines but no answers are answered and then the thread goes dead so I just wanted to know if someone has ever successfully removed this header.
    I have set noheaderokcode = 1 in the service file, in webgui.srvc as well as in global.srvc.
    I have also started editing the templatelibrary files but to me it is not a very clean solution.
    If someone out there has had this challenge and solved it, please advise.
    Thank you very much and regards,
    Ronald G. Meyer

    Hi,
    Thanks for the feedback.
    Does not seem like the Basis team will be patching the ITS landscape soon, so is there anyone who has more input on this?
    I have found a programmatical example in this thread:
    /thread/76409 [original link is broken]
    But none of the examples work like I expect it to.
    Just wanted to know if someone has implemented this successfully.
    Regards,
    Ronald Meyer

  • Report Painter - how to insert sub header rows with no values

    In a report painter, I am designing a report with several rows with formulas. I need to insert a sub-header row in the middle of the rows. That will not have a value. It shall contain no value, but I am given only options of either insert a row of characteristics or a formula. I need neither of them. Can we have something excel  like feature in report painter (4.6c) just to insert a sub header row? If so how do we get that.
    e.g
    ADMINISTRATIVE EXPENSES (how to insert this row?)
    Account 1 - 10

    Hi,
    try to add a formular row containing a formular like = +x -x.
    Maybe you can use "formatting / row" and use overscores / underscores to get a blank row (underscore one line, overscore the line thats following).
    No other idea...
    best regards, Christian

  • Write again sub-header and header for every start of new page in report

    Hello experts,
    In my report, I declared my line-count to be 0. I don't know if this is correct
    but what I want to do is that for every new page, I want to write again my
    sub-header and header. How do I do this? Thanks again guys!

    Hi again,
    1. CALL METHOD top->top_of_page
    What does it do ?
    Probably it prints the headings and sub-headings.
    2. Now, again in start-of-selection,
       we have written,
    CALL METHOD main->display_subheader.
    CALL METHOD main->display_header.
    , so it becomes twice.
    3. Ideally it could be like this :
    <b>TOP-OF-PAGE.</b>
    <b>CALL METHOD main->display_subheader.
    CALL METHOD main->display_header.</b>
    Remove
    CALL METHOD main->display_subheader.
    CALL METHOD main->display_header.
    from start-of-selection.
    regards,
    amit m.

  • Report giving Empty output

    Hi Gurus,
    In R12 I ran Oracle reports with the output type as PDF. The report completing normal but the output was not coming. Only empty page is coming up.
    When i ran the main query in TOAD it giving output. In the report itself i have set the policy context values.
    If no data available means atleast heading and other columns would be displaying right, in my case the output file is 1KB size and nothing there in it.
    Could you please help me to resolve the issue.
    Thanks in advance
    Regards,
    Sathya

    Hi Yuvraj,
    The report was upgrading from 11i to R12. The same report was working fine in 11i.
    In the report we have 2 date parameter as From_Date and To_Date.
    In concurrent program definition the parameter was Date
    In RDF the parameter was defined as String but in the query they used TO_DATE function to convert the string into Date.
    Is there any other standard report errors?

  • Display sub header from second group in each page without page break

    Hi All,. I need to show the sub header in each page in pdf output using rtf. I have two grouping region and category. I have used start:body and end:body concept to repeat the header in each page. The region is repeating in each page but I also want the category to repeat in each page without having page break. Any suggestions. Thanks, Sushil

    You could added the category value to the header row and set the table properties for row to repeat on each page.. I have sent a reply to your email. Take a look to see if the output is per expectations.
    Thanks,
    Bipuser

  • Script spol to mail , and report which sends output to spools

    Hi All,
    Please give me
    script spol to mail , and report which sends output to spool.
    thaks,
    babu

    Hi,
    Check the below code:
    scripts through email:
    *& Report  ZRICHA_OTF_PDF
    report  zricha_otf_pdf
        message-id zz.
    CONSTANTS                                                           *
    constants : c_x(1)      type c value 'X',      " For constant value
                c_otf(3)    type c value 'OTF',    " For format
                c_u(1)      type c value 'U'.      " Mail Option
    VARIABLES                                                           *
    data : v_rqident  type tsp01-rqident,  " For Spool Number
           v_rqclient type tsp01-rqclient, " For Client
           v_rqo1name type tsp01-rqo1name, " For Object name
           v_spool    type tsp01-rqident,  " For Spool Number
           v_spool1   type tsp01-rqident.  " For Spool Number
    FLAGS                                                               *
    data : f_spool type c.
      INTERNAL TABLES                                                    *
    Internal table for sending mails
    data: it_pdf          like tline      occurs 10 with header line,
          it_xi_pdf       like tline      occurs 0  with header line,
          it_html         like solisti1   occurs 0  with header line,
          it_xi_temp      like bapiqcmime occurs 0  with header line,
          it_xi_mime(255) type c          occurs 0  with header line.
    For sending mail
    data: it_objpack like sopcklsti1 occurs 2 with header line.
    Internal table for Single List with Column Length 255
    data : it_objbin like solisti1 occurs 10 with header line.
    Internal table for Single List with Column Length 255
    data : it_objtxt like solisti1 occurs 10 with header line.
    Internal table for Structure of the API Recipient List
    data : it_reclist like somlreci1 occurs 5 with header line.
    Structure of the API Recipient List
    data: x_doc_chng like sodocchgi1.
    Internal table for storing the variants
    data : begin of it_variant1 occurs 0,
            variant like varid-variant,
           end   of it_variant1.
    Internal table to store variants for the programs
    data: it_variant2 like it_variant1 occurs 0 with header line.
    Internal table for storing the selected values
    data it_return type ddshretval occurs 0 with header line.
    Internal table for storing the mail-ids
    data : begin of it_mailid occurs 0,
            kokrs like csks-kokrs,
            kostl like csks-kostl,
            datbi like csks-datbi,
            telx1 like csks-telx1,
           end   of it_mailid.
    Internal table for storing the mail-ids
    data : it_mailid1 like it_mailid occurs 0 with header line.
      SELECTION SCREEN                                                   *
    data : v_char type char50.
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_email for v_char  no intervals
                    lower case
                    no-display.
    select-options: s_email1 for v_char  no intervals
                    lower case
                    no-display.
    selection-screen end of block b1.
    selection-screen begin of block a1 with frame title text-028.
    selection-screen begin of line.
    parameters : p_c1 as checkbox.
    selection-screen comment 3(66) text-026 for field p_c1.
    selection-screen end of line.
    parameters : p_set like tsp1d-papart matchcode object zh_tsp1d.
    selection-screen skip 1.
    parameters : p_vara1 type rs38m-selset.
    selection-screen end of block a1.
    selection-screen begin of block a2 with frame title text-029.
    selection-screen begin of line.
    parameters : p_c2 as checkbox.
    selection-screen comment 3(56) text-027 for field p_c1.
    selection-screen end of line.
    parameters : p_set1 like tsp1d-papart matchcode object zh_tsp1d.
    selection-screen skip 1.
    parameters : p_vara2 type rs38m-selset.
    selection-screen end of block a2.
    AT SELECTION SCREEN ON VALUE REQUEST
    at selection-screen on value-request for p_vara1.
    For fetching the variants available for the program
      perform fetch_variants.
    at selection-screen on value-request for p_vara2.
    For fetching the variants available for the program
      perform fetch_variants1.
    AT SELECTION SCREEN
    at selection-screen.
    For Validation
      perform validation.
    START OF SELECTION                                                  *
    start-of-selection.
    To get the output data and mail
      perform fetch_data.
    END OF SELECTION                                                    *
    end-of-selection.
      if f_spool = c_x.
        message e000 with 'Spool Not Generated'(060).
      endif.
    *&      Form  fetch_data
          To get the output data and mail
    form fetch_data .
    To send the output to spool
      perform generate_spool.
    endform.                    " fetch_data
    *&      Form  generate_spool
          To send the output to spool
    form generate_spool .
      data: l_params like pri_params,
            l_days(1)  type n value 2,
            l_count(3) type n value 1,
            l_valid    type c,
            l_valid1   type c,
            l_params1  like pri_params.
      data: l_device type usr01-spld.
    *Get the printer name for the user
      select single spld into l_device from usr01 where bname = sy-uname.
      if l_device is initial.
        l_device = 'LOCL'.
      endif.
    For report-1
      if p_c1 = 'X'.
    Setting the print parameters
        call function 'GET_PRINT_PARAMETERS'
          exporting
            destination    = l_device
            copies         = l_count
            list_name      = sy-uname
            list_text      = 'SUBMIT ... TO SAP-SPOOL'(008)
            release        = c_x
            new_list_id    = c_x
            expiration     = l_days
           LINE_SIZE      = 255
           LINE_COUNT     = 65
            layout         = p_set
            sap_cover_page = space
            cover_page     = space
            receiver       = 'SAP*'(010)
            department     = 'System'(011)
            no_dialog      = c_x
          importing
            out_parameters = l_params
            valid          = l_valid.
        if l_valid <> space.
          clear v_spool.
    Fetch the spool number b4 submit
          perform fetch_recent_spool using v_spool.
    Submitting the program to spool
          submit rkaep000 to sap-spool
            using selection-set p_vara1
            spool parameters l_params
            without spool dynpro
            and return.
          clear v_spool1.
    Fetch the spool number after submit
          perform fetch_recent_spool using v_spool1.
          if v_spool = v_spool1.
            f_spool = c_x.
            if p_c2 is initial.
              stop.
            endif.
          else.
    Checking the format ( ABAP/OTF)
            perform format_check tables s_email.
          endif.
        else.
          message e000 with 'Problem in print settings'(003).
          stop.
        endif.
      endif.
    For Report-2
      if p_c2 = 'X'.
    Setting the print parameters
        call function 'GET_PRINT_PARAMETERS'
          exporting
            destination    = l_device
            copies         = l_count
            list_name      = sy-uname
            list_text      = 'SUBMIT ... TO SAP-SPOOL'(008)
            release        = c_x
            new_list_id    = c_x
            expiration     = l_days
           LINE_SIZE      = 200
           LINE_COUNT     = 65
            layout         = p_set1
            sap_cover_page = space
            cover_page     = space
            receiver       = 'SAP*'(010)
            department     = 'System'(011)
            no_dialog      = c_x
          importing
            out_parameters = l_params1
            valid          = l_valid1.
        if l_valid1 <> space.
          clear v_spool.
    Fetch the spool number b4 submit
          perform fetch_recent_spool using v_spool.
    Submitting the program to spool
          submit gp3diehxy88snfj0391v7kf9ek7050 to sap-spool
            using selection-set p_vara2
            spool parameters l_params1
            without spool dynpro
            and return.
          clear v_spool1.
    Fetch the spool number after submit
          perform fetch_recent_spool using v_spool1.
          if v_spool = v_spool1.
            message e000 with 'Spool Not Generated'(060).
            stop.
          endif.
    Checking the format ( ABAP/OTF)
          perform format_check tables s_email1.
        else.
          message e000 with 'Problem in print settings'(003).
          stop.
        endif.
      endif.
    endform.                    " generate_spool
    *&      Form  fetch_recent_spool
          Fetch the recent spool number generated
    form fetch_recent_spool using p_v_spool type tsp01-rqident .
      data:  l_user like tsp01-rq2name.
      clear : v_rqident,
              v_rqclient,
              v_rqo1name.
      l_user = sy-uname.
    Get latest Spool No
      select single rqident
                    rqclient
                    rqo1name
             into (v_rqident , v_rqclient , v_rqo1name)
        from tsp01
       where rqcretime =   ( select max( rqcretime )
                                    from tsp01
                                   where rq2name eq l_user
                                     and rqfinal eq '.' ).
      if sy-subrc = 0 .
        p_v_spool = v_rqident.
      endif.
    endform.                    " fetch_recent_spool
    *&      Form  format_check
          Checking the format ( ABAP/OTF)
    form format_check tables p_s_email structure s_email.
      data : l_objtype    like rststype-type.
      call function 'RSTS_GET_ATTRIBUTES'
        exporting
          authority     = 'SP01'(019)
          client        = v_rqclient
          name          = v_rqo1name
          part          = 1
        importing
          objtype       = l_objtype
        exceptions
          fb_error      = 1
          fb_rsts_other = 2
          no_object     = 3
          no_permission = 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.
      if l_objtype(3) = c_otf.
    Convert OTF Spool to PDF
        perform convert_otf2pdf tables p_s_email.
      else.
    Convert ABAP Spool to PDF
        perform convert_abap2pdf tables p_s_email.
      endif.
    endform.                    " format_check
    *&      Form  convert_otf2pdf
          Convert OTF Spool to PDF
    form convert_otf2pdf tables p_p_s_email structure s_email .
      clear   it_pdf.
      refresh it_pdf.
      data : l_bytecount  type i.
    Fn. to get the PDF format
      call function 'CONVERT_OTFSPOOLJOB_2_PDF'
        exporting
          src_spoolid              = v_rqident
          no_dialog                = 'X'
        importing
          pdf_bytecount            = l_bytecount
        tables
          pdf                      = it_pdf
        exceptions
          err_no_otf_spooljob      = 1
          err_no_spooljob          = 2
          err_no_permission        = 3
          err_conv_not_possible    = 4
          err_bad_dstdevice        = 5
          user_cancelled           = 6
          err_spoolerror           = 7
          err_temseerror           = 8
          err_btcjob_open_failed   = 9
          err_btcjob_submit_failed = 10
          err_btcjob_close_failed  = 11.
      if sy-subrc = 0.
    For page format
        perform page_format tables p_p_s_email.
      else.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    endform.                    " convert_otf2pdf
    *&      Form  convert_abap2pdf
           Convert ABAP Spool to PDF
    form convert_abap2pdf tables p_p_s_email structure s_email.
      clear   it_pdf.
      refresh it_pdf.
      data : l_bytecount  type i.
    Fn. to convert to PDF format
      call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
        exporting
          src_spoolid              = v_rqident
          no_dialog                = 'X'
        importing
          pdf_bytecount            = l_bytecount
        tables
          pdf                      = it_pdf
        exceptions
          err_no_abap_spooljob     = 1
          err_no_spooljob          = 2
          err_no_permission        = 3
          err_conv_not_possible    = 4
          err_bad_destdevice       = 5
          user_cancelled           = 6
          err_spoolerror           = 7
          err_temseerror           = 8
          err_btcjob_open_failed   = 9
          err_btcjob_submit_failed = 10
          err_btcjob_close_failed  = 11.
      if sy-subrc = 0.
    For page formatting
        perform page_format tables p_p_s_email.
      else.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    endform.                    " convert_abap2pdf
    *&      Form  send_mail
          For sending mail
    form send_mail tables mail structure s_email .
    Structures and internal tables for the send data
      data: objpack like sopcklsti1 occurs 2  with header line,
            objhead like solisti1   occurs 1  with header line,
            objbin  like solisti1   occurs 0  with header line,
            objtxt  like solisti1   occurs 10 with header line,
            reclist like somlreci1  occurs 5  with header line.
      data: doc_chng like sodocchgi1,
            tab_lines like sy-tabix.
    Data for the status output after sending
      data: sent_to_all like sonv-flag.
      clear: it_reclist, it_reclist[],
             it_objtxt , it_objtxt[],
             it_objpack, it_objpack[],
             it_objbin , it_objbin[],x_doc_chng.
      loop at it_html.
        objbin-line = it_html-line.
        append objbin.
        clear objbin.
      endloop.
    Create the document which is to be sent
      doc_chng-obj_name  = 'List'(012).
      doc_chng-obj_descr = 'Mail'(013).
    Heading
      objtxt-line = 'Mail with pdf attachment'(014).
      append objtxt.
      clear objtxt.
    Size
      describe table objtxt lines tab_lines.
      read table objtxt index tab_lines.
      doc_chng-doc_size = ( tab_lines - 1 ) * 255 + strlen( objtxt ).
    Fill the fields of the packing_list for the main document:
      clear objpack-transf_bin.
    The document needs no header (head_num = 0)
      objpack-head_start = 1.
      objpack-head_num = 0.
    Body
      objpack-body_start = 1.
      objpack-body_num = tab_lines.
      objpack-doc_type = 'RAW'(015).
      append objpack.
    Create the attachment (the list itself)
      describe table objbin lines tab_lines.
    Fill the fields of the packing_list for the attachment:
      objpack-transf_bin = 'X'.
    Header
      objpack-head_start = 1.
      objpack-head_num = 0.
    Body
      objpack-body_start = 1.
      objpack-body_num = tab_lines.
      objpack-doc_type = 'PDF'(016).
      objpack-obj_name = 'Attachment'(017).
      objpack-obj_descr = 'Mail with pdf Attachment'(018).
      objpack-doc_size = tab_lines * 255.
      append objpack.
    *-Fill the mail recipient list
      loop at mail.
        reclist-receiver = mail-low.
        reclist-rec_type = c_u.
        append reclist.
        clear: reclist,
               mail.
      endloop.
    *-Send the document by calling the SAPoffice API1 module for sending
    *-documents with attachments
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        exporting
          document_data              = doc_chng
          put_in_outbox              = c_x
          commit_work                = c_x
        importing
          sent_to_all                = sent_to_all
        tables
          packing_list               = objpack
          object_header              = objhead
          contents_bin               = objbin
          contents_txt               = objtxt
          receivers                  = reclist
        exceptions
          too_many_receivers         = 1
          document_not_sent          = 2
          operation_no_authorization = 4
          others                     = 99.
      case sy-subrc .
        when 0.
          message i000 with 'Mail has been sent successfully'(006).
        when others.
          message e000 with 'Problem in sending the mail'(023).
      endcase.
    endform.                    " send_mail
    *&      Form  page_format
           For page foramtting
    form page_format tables email structure s_email .
      data : l_lines       type i,
             l_temp(500)   type c,
             l_offset      type p,
             l_lineslen(2) type p,
             l_mimelen(2)  type p,
             l_tabix       like sy-tabix.
      clear : it_xi_pdf,
              it_xi_temp.
      refresh : it_xi_pdf,
                it_xi_temp.
      it_xi_pdf[] = it_pdf[].
    Reformat the line to 255 characters wide (code from SAP)
      clear: l_temp, l_offset, it_xi_temp.
      describe table it_xi_pdf   lines  l_lines.
      describe field it_xi_pdf   length l_lineslen in character mode.
      describe field it_xi_temp  length l_mimelen in character mode.
      loop at it_xi_pdf.
        l_tabix = sy-tabix.
        move it_xi_pdf to l_temp+l_offset.
        if l_tabix = l_lines.
          l_lineslen = strlen( it_xi_pdf ).
        endif.
        l_offset = l_offset + l_lineslen.
        if l_offset ge l_mimelen.
          clear it_xi_temp.
          it_xi_temp = l_temp(l_mimelen).
          append it_xi_temp.
          shift l_temp by l_mimelen places.
          l_offset = l_offset - l_mimelen.
        endif.
        if l_tabix = l_lines.
          if l_offset gt 0.
            clear it_xi_temp.
            it_xi_temp = l_temp(l_offset).
            append it_xi_temp.
          endif.
        endif.
      endloop.
      clear : it_xi_mime,
              it_xi_mime[].
      loop at it_xi_temp.
        it_xi_mime(255) = it_xi_temp-line.
        append it_xi_mime.
        clear  it_xi_mime.
      endloop.
    Final Data
      clear : it_html,
              it_html[].
      it_html[] = it_xi_mime[].
    For sending mail
      perform send_mail tables email.
    endform.                    " page_format
    *&      Form  fetch_variants
          For fetching the variants available for the program
    form fetch_variants .
      data : l_program like rs38m-programm value 'RKAEP000',
             l_vara1 type dfies-fieldname value 'P_VARA1'.
      clear : it_variant1,
              it_variant1[].
    Get variants
      perform get_variants tables it_variant1
                           using l_program.
    F4 Help
      if not it_variant1[] is initial.
        perform get_f4_help tables it_variant1
                             using l_vara1
                            changing p_vara1.
      else.
        message e000 with 'No variants available for report1'(054).
      endif.
    endform.                    " fetch_variants
    *&      Form  validation
          For Validation
    form validation .
      data : l_pro1 like rs38m-programm value 'RKAEP000',
             l_pro2 like rs38m-programm value 'GP3DIEHXY88SNFJ0391V7KF9EK7050',
             l_c1,
             l_c2.
    If both check-box are unchecked
      if p_c1 is initial
    and p_c2 is initial.
        message e000 with 'Check any one check-box'(049).
      endif.
    If checked without varaint
      if not p_c1 is initial and p_vara1 is initial.
        message e000 with 'Please give any one of the variant for report1'(055).
      endif.
    If checked without varaint
      if not p_c2 is initial and p_vara2 is initial.
        message e000 with 'Please give any one of the variant for report2'(061).
      endif.
    Reading the variant and fetching the mail-ids
      if p_c1 = c_x.
        l_c1 = '1'.
        clear : s_email,
                s_email[].
        perform read_variants tables it_mailid
                                     s_email
                               using p_vara1
                                     l_pro1
                                     l_c1.
        if s_email[] is initial.
          message e000 with 'No Id available for given Cost report1'(066).
        else.
          sort s_email by low.
          delete adjacent duplicates from s_email comparing low.
        endif.
      endif.
    Reading the variant and fetching the mail-ids
      if p_c2 = c_x.
        clear : s_email1,
                s_email1[].
        l_c2 = '2'.
        perform read_variants tables it_mailid1
                                     s_email1
                               using p_vara2
                                     l_pro2
                                     l_c2.
        if s_email1[] is initial.
          message e000 with 'No Id available for given Cost report2'(067).
        else.
          sort s_email1 by low.
          delete adjacent duplicates from s_email1 comparing low.
        endif.
      endif.
    endform.                    " validation
    *&      Form  GET_VARIANTS
          Fetching Variants
    form get_variants  tables   p_it_variant structure it_variant1
                       using    p_v_program  type rs38m-programm.
      select variant
             from varid
             into table p_it_variant
             where report = p_v_program.
    endform.                    " GET_VARIANTS
    *&      Form  GET_F4_HELP
          text
    form get_f4_help  tables   p_it_variant1 structure it_variant1
                       using   p_l_vara1 like dfies-fieldname
                      changing p_p_vara like p_vara1.
    Fn. for Pop-Up
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        exporting
          retfield        = p_l_vara1
          value_org       = 'S'
          display         = ' '
        tables
          value_tab       = p_it_variant1
          return_tab      = it_return
        exceptions
          parameter_error = 1
          no_values_found = 2
          others          = 3.
      if sy-subrc = 0.
        p_p_vara = it_return-fieldval.
      else.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    endform.                    " GET_F4_HELP
    *&      Form  FETCH_VARIANTS1
          text
    form fetch_variants1 .
      data : v_program1 like rs38m-programm value 'GP3DIEHXY88SNFJ0391V7KF9EK7050',
             l_vara2  type dfies-fieldname value 'P_VARA2'.
      clear : it_variant2,
              it_variant2[].
    Get Variants
      perform get_variants tables it_variant2
                           using v_program1.
    F4 Help
      if not it_variant2[] is initial.
        perform get_f4_help tables it_variant2
                            using  l_vara2
                          changing p_vara2.
      else.
        message e000 with 'No variants available for report2'(050).
      endif.
    endform.                    " FETCH_VARIANTS1
    *&      Form  read_variants
           Reading the variant and fetching the mail-ids
    form read_variants tables p_it_mailid structure it_mailid
                              p_s_email   structure s_email
                       using  p_p_vara1   like p_vara1
                              p_l_pro1    like rs38m-programm
                              p_l_c1      type c.
      data : l_temp(44),
             it_valutab like rsparams occurs 0 with header line.
      ranges : r_cocen for csks-kostl.
    Function Module to get the variant contents
      call function 'RS_VARIANT_CONTENTS'
        exporting
          report               = p_l_pro1
          variant              = p_p_vara1
        tables
          valutab              = it_valutab
        exceptions
          variant_non_existent = 1
          variant_obsolete     = 2
          others               = 3.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
      clear : r_cocen,
              r_cocen[].
      loop at it_valutab where selname = 'KOSTL'
                            or selname = '_C-CCTR'.
    Getting the range of cost centers
        if it_valutab-option = 'BT'.
          r_cocen-low    = it_valutab-low.
    For Conversion Routine
          perform conversion using r_cocen-low.
          r_cocen-high   = it_valutab-high.
    For Conversion Routine
          perform conversion using r_cocen-high.
          r_cocen-option = 'BT'.
          r_cocen-sign   = 'I'.
          append r_cocen.
          clear  r_cocen.
        endif.
    Getting the single cost centers
        if it_valutab-option = 'EQ'.
          r_cocen-low    = it_valutab-low.
    For Conversion Routine
          perform conversion using r_cocen-low.
          r_cocen-option = 'EQ'.
          r_cocen-sign   = 'I'.
          append r_cocen.
          clear  r_cocen.
        endif.
      endloop.
    If no cost centers
      if not r_cocen[] is initial.
        select kokrs
               kostl
               datbi
               telx1
          from csks
               into table p_it_mailid
         where kostl in r_cocen.
        if p_it_mailid[] is initial.
          if p_l_c1 = '1'.
            message e000 with 'No IDs available for report1'(059).
          elseif p_l_c1 = '2'.
            message e000 with 'No IDs available for report2'(062).
          endif.
        endif.
    Deleting the blank entries
        delete p_it_mailid where telx1 = space.
        clear l_temp.
        read table p_it_mailid index 1.
        l_temp = p_it_mailid-telx1.
        data : l_check.
        loop at p_it_mailid where telx1 <> l_temp.
          l_check = c_x.
        endloop.
    For checking the unique ids
        if l_check = c_x.
          if p_l_c1 = '1'.
            message e000 with 'No unique mail-ids for  report1'(058).
          elseif p_l_c1 = '2'.
            message e000 with 'No unique mail-ids for  report2'(065).
          endif.
        endif.
    Populating the IDs for the cost centers
        loop at p_it_mailid.
          set locale language sy-langu.
          translate p_it_mailid-telx1 to lower case.
          set locale language space .
          concatenate p_it_mailid-telx1 '@allergan.com' into l_temp.
          p_s_email-low = l_temp.
          p_s_email-sign = 'I'.
          p_s_email-option = 'EQ'.
          append p_s_email.
          clear  p_s_email.
        endloop.
      else.
        if p_l_c1 = '1'.
          message e000 with 'No Cost Center Available for report1'(057).
        elseif p_l_c1 = '2'.
          message e000 with 'No Cost Center Available for report2'(063).
        endif.
      endif.
    endform.                    " read_variants
    *&      Form  CONVERSION
          For Conversion Routine
    form conversion  using    p_it_valutab_low type c.
      call function 'CONVERSION_EXIT_ALPHA_INPUT'
        exporting
          input  = p_it_valutab_low
        importing
          output = p_it_valutab_low.
    endform.                    " CONVERSION
    REPORT Z_RMTIWARI_SEND_SPOOL_MAIL_ATT .
    PARAMETERS : P_SPOOL TYPE TSP01-RQIDENT OBLIGATORY .
    PARAMETERS : P_MAIL TYPE char100 OBLIGATORY .
    TYPES : TY_LINE type string.
    DATA: IT_ATTACHMENT TYPE soli OCCURS 0 WITH HEADER LINE.
    DATA: IT_ATTACHMENT_LONG TYPE TY_LINE OCCURS 0 WITH HEADER LINE.
    DATA: LV_PDF_SIZE type i.
    DATA: LT_PDF type standard table of tline with header line.
    PERFORM SEND_EMAIL USING P_SPOOL P_MAIL.
    FORM send_email
    --> X_SPOOL_ID
    --> X_EMAIL
    FORM send_email USING X_SPOOL_ID X_EMAIL.
    DATA: LT_OBJPACK LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE,
    LT_OBJHEAD LIKE solisti1 OCCURS 1 WITH HEADER LINE,
    LT_OBJBIN LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    LT_OBJTXT LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    LT_RECLIST LIKE somlreci1 OCCURS 5 WITH HEADER LINE,
    LV_DOCUMENT_DATA TYPE sodocchgi1.
    DATA: L_ATT_LINES TYPE i.
    DATA : LV_SPOOL_DESC(68) type c.
    CHECK NOT ( X_EMAIL IS INITIAL ).
    CLEAR: LT_RECLIST, LT_RECLIST[],
    LT_OBJHEAD, LT_OBJHEAD[],
    LT_OBJTXT, LT_OBJTXT[],
    LT_OBJBIN, LT_OBJBIN[],
    LT_OBJPACK, LT_OBJPACK[].
    CLEAR LV_DOCUMENT_DATA.
    Read spool and get the pdf internal table and name of spool
    PERFORM READ_SPOOL USING X_SPOOL_ID LV_SPOOL_DESC.
    CHECK NOT ( LT_PDF[] IS INITIAL ).
    Convert pdf itab to 255 line itab.
    data :LV_COUNTER type i.
    data :LV_FROM type i.
    loop at LT_PDF.
    translate LT_PDF using ' ~' .
    concatenate IT_ATTACHMENT_LONG LT_PDF into it_attachment_long.
    endloop.
    translate IT_ATTACHMENT_LONG using '~ ' .
    append IT_ATTACHMENT_LONG.
    clear : LV_COUNTER.
    DO.
    LV_COUNTER = strlen( IT_ATTACHMENT_LONG ).
    if LV_COUNTER ge 255.
    IT_ATTACHMENT = IT_ATTACHMENT_LONG(255).
    append IT_ATTACHMENT.
    SHIFT IT_ATTACHMENT_LONG by 255 places.
    else.
    IT_ATTACHMENT = IT_ATTACHMENT_LONG(lv_counter).
    append IT_ATTACHMENT.
    exit.
    endif.
    ENDDO.
    Body of email
    MOVE 'Email sent to you from SAP' TO LT_OBJTXT.
    APPEND LT_OBJTXT.
    LV_DOCUMENT_DATA-obj_name = 'SpoolMail'.
    Title of the email as spool name
    LV_DOCUMENT_DATA-obj_descr = LV_SPOOL_DESC.
    LV_DOCUMENT_DATA-sensitivty = 'O'.
    LV_DOCUMENT_DATA-expiry_dat = SY-datum + 15.
    LV_DOCUMENT_DATA-doc_size = STRLEN( LT_OBJTXT ).
    e-mail body
    CLEAR LT_OBJPACK.
    LT_OBJPACK-head_start = 1.
    LT_OBJPACK-head_num = 0.
    LT_OBJPACK-body_start = 1.
    LT_OBJPACK-body_num = 1.
    LT_OBJPACK-doc_type = 'RAW'.
    LT_OBJPACK-doc_size = STRLEN( LT_OBJTXT ).
    APPEND LT_OBJPACK.
    For e-mail attachment
    DESCRIBE TABLE IT_ATTACHMENT LINES L_ATT_LINES.
    READ TABLE IT_ATTACHMENT INDEX L_ATT_LINES.
    CLEAR LT_OBJPACK.
    LT_OBJPACK-transf_bin = 'X'.
    LT_OBJPACK-head_start = 1.
    LT_OBJPACK-head_num = 1.
    LT_OBJPACK-body_start = 1.
    LT_OBJPACK-body_num = L_ATT_LINES.
    LT_OBJPACK-doc_type = 'PDF'.
    LT_OBJPACK-obj_name = 'email'.
    LT_OBJPACK-obj_descr = LV_SPOOL_DESC.
    LT_OBJPACK-doc_size = ( 255 * ( L_ATT_LINES - 1 ) ) + STRLEN( IT_ATTACHMENT-line ).
    APPEND LT_OBJPACK.
    make recipient list
    LT_RECLIST-receiver = X_EMAIL.
    LT_RECLIST-rec_type = 'B'. "To external email id
    APPEND LT_RECLIST.
    send mail with attachment
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = LV_DOCUMENT_DATA
    put_in_outbox = 'X'
    TABLES
    packing_list = LT_OBJPACK
    object_header = LT_OBJHEAD
    contents_bin = IT_ATTACHMENT
    contents_txt = LT_OBJTXT
    receivers = LT_RECLIST
    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.
    If SY-subrc = 0.
    write:/ 'Message sent'.
    else.
    write:/ 'Error encountered'.
    endif.
    ENDFORM. " send_email
    *& Form read_spool
    FORM read_spool USING X_SPOOL_ID Y_SPOOL_DESC.
    DATA : LV_SPOOL_TYPE TYPE TSP01-RQDOCTYPE.
    SELECT SINGLE RQDOCTYPE RQTITLE
    INTO (lv_spool_type, y_spool_desc)
    FROM TSP01
    WHERE RQIDENT eq X_SPOOL_ID.
    IF Y_SPOOL_DESC IS INITIAL.
    concatenate 'Spool-' X_SPOOL_ID into Y_SPOOL_DESC.
    ENDIF.
    IF LV_SPOOL_TYPE eq 'LIST'. " If spool is a list
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
    EXPORTING
    SRC_SPOOLID

  • Sub Heading  and Footer in BAM

    Can any one tell me to add features like sub heading and Footer using BAM.
    Is there anything like label or text box kind of thing.

    Check out the Columnar Report to see if it meets your needs. It has Report Headers and Footers, and also Group Headers and Footers.
    Regards, Stephen

  • When running an xml publisher report the xml output leads to 9 mb and the excel output file leads to 20 mb.But the output records is originally 4000 records. When copy to new excel it is showing 3.5 mb only. Does anyone knows the answer for this issue?

    When running an xml publisher report the xml output leads to 9 mb and the excel output file leads to 20 mb. The records contained in excel file is 4000 records. When taking the excel records and copy to new excel file the excel file size is 3.5 mb only.Why does the oracle software generates 20mb file?
    Does any one knows the answer please advice?

    Hello,
    This issue is because the Excel output from BI Publisher is MHTML (XML Publisher generates XHTML) not binary .xls.
    MHTML and XHTML are more verbose formats than binary .xls.
    It will be large because the current Excel output is just an HTML and not compressed like PDF. Please use the workaround (save it as .xls file).  This is a known limitation of RTF layout templates.
    BI Publisher Enterprise has a new feature True Excel Templates. The layouts generate binary Excel output.
    Excel Output File Size Generated By BI Publisher is Very Large (Doc ID 760437.1)
    Bogdan

  • Crystal report - sub report

    Hi everyone
    Can anybody help me with crystal report - sub report problem  as i am new to crystal report.
    I have created two reports"mainreport" and "subreport" using crysta report XI with the same query for both reports using stored procedure. I set the links for both reports at design time and its works fine there. then i added those two reports into my .net application and now i want to set the paramaters and also want to set the datasource  programatically with same query but with two different functions which returns datatable. I am using .visual studio 2008 (.net 3.5) and sql 2005 as back end.
    Any help will be appreciated.
    Thanks In Advance
    Regards,
    Shruti Batra

    Only CR 2008 (12.x) and CR 10.5 (bundles with .NET 2008) is supported with .NET 2008. And while running reports created in CR XI with CR 10.5 may work, you are taking your chances with parameterized reports as there have been a lot of changes in the parameter behavior between CR 10 and CR XI. Thus, my recommendation would be to upgrade to CR 2008, ensuring your version is 12.3.0.601.
    Re. programming questions. Start with sample apps:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
    See the [Crystal Reports For Visual Studio 2005 Walkthroughs|https://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23&overridelayout=true]. It will apply to CR 2008 and VS 2008.
    See the developer help files;
    https://boc.sdn.sap.com/developer/library
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup

  • In BI Publisher Report of excel output for one column is filled with spaces

    Hello,
    We have issue in BI Publisher report of excel output.
    In Excel output for one column few records are displaying as left alignment
    and few record are displaying as right alignment.
    If you are having any xml tag or any syntax for removing spaces for left side
    Please help on this issue.
    Thanks in Advance.
    Regards,
    Swaraj

    Please post the details of the application release, database version and OS along with BI Publisher.
    Is the issue with all reports or specific one(s) only?
    Do you have the patches in the following docs applied?
    Overview of Available Update Patches for Oracle BI Publisher Enterprise 10g [ID 797057.1]
    Overview of Available Update Patches for Oracle BI Publisher Enterprise 11g [ID 1276869.1]
    Overview of Available Patches for Oracle XML Publisher embedded in the Oracle E-Business Suite [ID 1138602.1]
    BI Publisher 10g RTF Template Changes Alignment Settings for Numbered Lists [ID 1418504.1]
    Thanks,
    Hussein

  • How to stop to display the main report page header in the subreport!

    Hello all,
    I have an existed report that display the CR page header on every page of the report. Now I added another subreport into report footer without using link. How do I stop to display the main report page header and display the subreport in the new page with subreport header only? I really appreciate your time to help me out on this issue. Thanks.

    Hi,
    I tried to supress the page header with (onlastrecord and TotalpageCount > 1) condition, but the last page of main report without page header. I still like the page header display on last record, but not on the subreport only. How do I get it? Thanks in advance.

  • Report based on Output Type

    Dear Friends,
    If there is any functionality or Table from where i can get list of Invoices based on OUTPUT TYPE
    we have diff invoice types like sales invoice, service invoice, lease invoice and for all invoices there is dif output type is assigned. If i want to generate service invoices report based on output types assgined to it how we can do that?
    Regards
    Vishal

    hi
    Thanks Friend
    But again there is one problem when i am running this in Devlopment client its working fine but in other client not working n giving message No messages for initial processing exist
    what may be the problme?
    Regards
    Vishal

  • Moan about Reports ability to output to Excel

    Hi there
    This is more of a general moan on this topic, but am I the only person who thinks that Oracle Reports' ability to output to excel should be WAY better than it is at the moment?
    I've just looked at the 9i demo, showing how to get report output into excel. It was horrific - grubbing round in raw html code and setting up an Excel template with dummy data doesn't make Reports the slick reporting tool that we'd all like.
    Guys @ Oracle - have a look at Cognos Impromptu - I'm definitely no fan of Cognos, as I prefer to be able to define exactly what I want in SQL. However, one thing they have got right is the facility to save report output into formatted Excel - Oracle Reports should have this too!!
    At the moment, if I'm asked to produce a report in Excel format, I have to either use PL/SQL to generate a CSV file with the results I want, or Oracle Reports to produce a similar CSV file. I then have to open the CSV file in Excel and format it, change column widths etc, so that it looks presentable. If it's a regular-running report, I have to manually intervene every time the report is produced. Producing a similar report in Cognos (for all its faults) would require no manual intervention once it's set up, and the whole process can be controlled with macro language and the Cognos Scheduler.
    So please, improve this feature of Reports!
    Andrew Woodward
    UK

    Hello again
    All I'd like to be able to do is to write an Oracle Report and have the figures from the report delivered in an Excel spreadsheet. (A number of report users here specify that they want their reports delivered in this way.)
    Oracle Reports (I'm on version 6i) allows me to generate a .csv file which will open in Excel, but there's no formatting present. My point was simply that I have to manually intervene to produce a .xls which is formatted properly. In Cognos Impromptu, after the report has been run, you just select SaveAs->(input filename) and select 'Excel with Format' for SaveAs Type. The output is a pretty good approximation of how the output appears on the screen. You can run reports automatically using a scheduler, and with macro language, you can deliver the report in this format with no further intervention needed. If Cognos can do this, then so can Oracle!!
    Incidentally, I've noticed that every post on this forum which mentions Excel receives a plug from Lion Van for his RepExcel product. I had a look at his website and it looks pretty good - perhaps Oracle should approach him with a generous offer?! I'm not sure however that these forums should be used for advertising in this way.
    Best regards
    Andrew
    UK

Maybe you are looking for