Standard footer in different reports

Hi,
Does anybody know whether it is possible to reuse the same footer in different reports?
The same footer information will be used in a number of different reports. There is a code to retrieve this information.
Is it possible to invoke this footer info into a XML Publisher template created for some report or do we need to have the same code in all the reports?
If the footer information is changed it would be great to update only one object instead of all related reports.
thank you
// Grigori

See in the 115 page number of the xml publisher user guide 5.5.
Ex: <?import:xdo://APPCODE.TEMPLATE_CODE.LANG.TERR?>

Similar Messages

  • Display different footer in main report of SSRS based on sub report

    I have a main report in which there are two sub reports and then those two sub reports each contain one sub-subreport.
    The following will give you an idea
    Main Report
    ----->Sub Report 1
    ------------>Sub Sub Report 1
    ----->Sub Report 2
    ------------>Sub Sub Report 1
    I am trying to display name of subreport in footer of main report depending on which subreport user is currently in. So let's say if user is viewing Sub Report 1 then it should display in footer of main report "Sub Report 1" (this is actually coming
    from database and is not like displaying some static text but for the time being ignore this)  
    If user is viewing Sub Sub Report 1 then footer of main report should say "Sub Report 1: Sub Sub Report 1"  
    After searching a bit I found out that:
    1. Sub report footer will not be shown in Main report hence this option is ruled out
    2. You cannot pass parameter from sub report to main report so this option is also ruled out
    But looks like you can use Shared Variables between Sub Report and Main Report. I tried to do this but looks like it doesn't work. Here's what I did:
    In my Sub Report 1, I declared a shared variable as below:
    Public Shared Dim sharedVariable as String = "Sub Report 1"
    Now in my Main Report I wrote the following function in code just to test if it prints it on screen on not.
    Public Function PrintSharedVariable() as String
    Return sharedVariable
    End Function
    But when I run this report, it shows error that sharedVariable is not declared in Main Report. How do I use shared variables and will it work in my case?

    Hi Frank,
    According to your description, you want to show the subreport name in the main report. Right?
    In Reporting Services, all the custom code is only work for the current report. The sharedVariable you created in subreport can't be used in main report. That's the reason why it throws the error because there's no sharedVariable in main report. For your
    requirement, the most effective workaround is having a textbox with go to report Action and passing the report name as parameter back to main report.
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • ALV Report to have two different Reports

    Hi All,
    I have a need to display two different reports for the same set of data selections, (Successful data and Error Data) in a Single ALV Layout using a Application tool bar Button. Does anyone have a sample code for this kind of requirement. Preferably using Objects.
    Also, how can we check if an object is already created? In other words, how to check for a null reference?
    Thanks in advance.
    Jr.

    Sample code for split alv using OOABAP.
    this would help you in ur requirement.
    go through this program where the screen is divided in two for two alv in different containers.
    DATA: save_ok LIKE sy-ucomm,
          g_container TYPE scrfname VALUE 'CC1',
          g_grid  TYPE REF TO cl_gui_alv_grid,
          g_custom_container TYPE REF TO cl_gui_custom_container,
          gt_fieldcat TYPE lvc_t_fcat,
          g_max TYPE i VALUE 100.
    declarations for top of page event
    Data:  gv_c_split type ref to cl_gui_splitter_container,
           gv_c_ptv type ref to cl_gui_container,
           gv_alv_ptv type ref to cl_gui_alv_grid,
           o_dd_doc TYPE REF TO cl_dd_document,
           text TYPE sdydo_text_element,
           o_split type ref to cl_gui_easy_splitter_container,
           o_top type ref to cl_gui_container,
           o_bot type ref to cl_gui_container,
           gv_c_vp type ref to cl_gui_container.
    end of declaration for top of page.
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    *class lcl_application_dc definition deferred.
    DATA: o_event_receiver TYPE REF TO lcl_event_receiver.
         g_dc type ref to lcl_application_dc.
    DATA: gt_outtab TYPE TABLE OF sbook.
          CLASS lcl_event_receiver DEFINITION
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS: handle_f4 FOR EVENT onf4 OF cl_gui_alv_grid
                   IMPORTING e_fieldname
                             es_row_no
                             er_event_data
                             et_bad_cells
                             e_display,
                handle_top_of_page FOR EVENT top_of_page OF cl_gui_alv_grid
                   IMPORTING e_dyndoc_id.
        METHODS: reset.
        METHODS: show_f4.
      PRIVATE SECTION.
    attributes for creating an own F4-Help
    (using a second ALV Grid Control
        DATA: f4_grid TYPE REF TO cl_gui_alv_grid,
              f4_custom_container TYPE REF TO cl_gui_custom_container.
        TYPES: BEGIN OF ty_f4.
        TYPES: value TYPE s_class.
        TYPES: descr(20) TYPE c.
        TYPES: END OF ty_f4.
        DATA: f4_itab TYPE TABLE OF ty_f4.
        DATA: f4_fieldcatalog TYPE lvc_t_fcat.
    attributes to store event parameters
    (after the CALL SCREEN command, the event parameters
    are not accessible)
        TYPES: BEGIN OF onf4_event_parameters_type.
        TYPES: c_fieldname     TYPE lvc_fname.
        TYPES: cs_row_no       TYPE lvc_s_roid.
        TYPES: cr_event_data   TYPE REF TO cl_alv_event_data.
        TYPES: ct_bad_cells    TYPE lvc_t_modi.
        TYPES: c_display       TYPE char01.
        TYPES: END OF onf4_event_parameters_type.
        DATA: f4_params TYPE onf4_event_parameters_type.
    Methods to create own F4-Help
    (This is done using a second ALV Grid Control)
        METHODS: init_f4.
        METHODS: build_fieldcatalog.
        METHODS: fill_f4_itab .
        METHODS: on_double_click FOR EVENT double_click OF cl_gui_alv_grid
                        IMPORTING es_row_no.
    ENDCLASS.                    "lcl_application_f4 DEFINITION
          CLASS lcl_event_receiver IMPLEMENTATION
    CLASS lcl_event_receiver IMPLEMENTATION.
    *§2. Implement an event handler method for event ONF4.
      METHOD handle_f4.
    Save event parameter as global attributes of this class
    (maybe solved differently if you use a function module!)
        f4_params-c_fieldname = e_fieldname.
        f4_params-cs_row_no = es_row_no.
        f4_params-cr_event_data = er_event_data.
        f4_params-ct_bad_cells = et_bad_cells.
        f4_params-c_display = e_display.
    *§3. Call your own f4 help. To customize your popup check
       first if the cell is ready for input (event parameter E_DISPLAY).
    (parameter E_DISPLAY is checked later in method on_double_click)
    (Probably, you would call a function module at this point,
    pass the needed event parameter and call the popup screen
    within that function module. This is not done in this example
    to avoid scattering its code).
        CALL SCREEN 101 STARTING AT 10 10.
    *§7. Inform the ALV Grid Control that an own f4 help has been processed
       to suppress the standard f4 help.
        er_event_data->m_event_handled = 'X'.
      ENDMETHOD.                                                "on_f4
      METHOD show_f4.
       DATA: ls_outtab TYPE sbook.
    initialize own f4 help if needed
        IF f4_custom_container IS INITIAL.
          CALL METHOD init_f4.
        ENDIF.
        CALL METHOD fill_f4_itab.
    refresh list of values in f4 help and show it
        CALL METHOD f4_grid->refresh_table_display.
    CAUTION: Do not use method REFRESH_TABLE_DISPLAY for
    your editable ALV Grid instances while handling events
    DATA_CHANGED or ONf4. You would overwrite intermediate
    values of your output table on frontend.
    'f4_grid' is a non-editable ALV Grid Control for the
    application specific F4-Help. Therefore, calling
    REFRESH_TABLE_DISPLAY for this instance has no
    negative effect.
        CALL METHOD cl_gui_cfw=>flush.
      ENDMETHOD.                                                "show_f4
      METHOD init_f4.
        DATA: ls_f4_layout TYPE lvc_s_layo.
    build fieldcatalog entries for f4
        CALL METHOD build_fieldcatalog.
    create controls
        CREATE OBJECT f4_custom_container
                  EXPORTING container_name = 'CC_ONF4'.
        CREATE OBJECT f4_grid
                  EXPORTING i_parent = f4_custom_container.
    hide toolbar
        ls_f4_layout-no_toolbar = 'X'.
        CALL METHOD f4_grid->set_table_for_first_display
          EXPORTING
            is_layout       = ls_f4_layout
          CHANGING
            it_fieldcatalog = f4_fieldcatalog
            it_outtab       = f4_itab.
    register event double click on backend
        SET HANDLER me->on_double_click FOR f4_grid.
    flush since 'ls_layout' is local!
        CALL METHOD cl_gui_cfw=>flush.
      ENDMETHOD.                                                "init_f4
      METHOD fill_f4_itab.
        DATA ls_f4_itab TYPE ty_f4.
    Delete all entries in f4_itab to determine
    offered values dynamically
        CLEAR f4_itab[].
        ls_f4_itab-value = 'C'.
        ls_f4_itab-descr = text-t03. "Business Class
        APPEND ls_f4_itab TO f4_itab.
        ls_f4_itab-value = 'Y'.
        ls_f4_itab-descr = text-t04. "Economie Class
        APPEND ls_f4_itab TO f4_itab.
        ls_f4_itab-value = 'F'.
        ls_f4_itab-descr = text-t05. "First Class
        APPEND ls_f4_itab TO f4_itab.
      ENDMETHOD.                    "fill_f4_itab
      METHOD build_fieldcatalog.
        DATA: ls_fcat TYPE lvc_s_fcat.
        CLEAR ls_fcat.
        ls_fcat-fieldname = 'VALUE'.
        ls_fcat-coltext = text-t02.
       ls_fcat-inttype = 'S_CLASS'.
        ls_fcat-outputlen = 5.
        APPEND ls_fcat TO f4_fieldcatalog.
        CLEAR ls_fcat.
        ls_fcat-fieldname = 'DESCR'.
        ls_fcat-coltext = text-t01.
        ls_fcat-inttype = 'C'.
        ls_fcat-outputlen = 20.
        APPEND ls_fcat TO f4_fieldcatalog.
      ENDMETHOD.                    "build_fieldcatalog
      METHOD on_double_click.
    *§5. If not already caught by your own f4 help, check whether
       the triggered cell was ready for input by using E_DISPLAY
       and if not, exit.
        IF f4_params-c_display EQ 'X'.
          LEAVE SCREEN.
        ENDIF.
    *§6. After the user selected a value, pass it to the ALV Grid Control:
    *§  6a. Define a field symbol of type: LVC_T_MODI and a structure of
          type LVC_S_MODI to pass the value later on.
        FIELD-SYMBOLS  TYPE lvc_t_modi.
        DATA: ls_modi TYPE lvc_s_modi,
              ls_f4_itab TYPE ty_f4.
    *§  6b. Dereference attribute M_DATA into your field symbol and add
          the selected value to the table to which this symbol points to.
        ASSIGN f4_params-cr_event_data->m_data->* TO .
        LEAVE TO SCREEN 0.
      ENDMETHOD.                    "on_double_click
      METHOD reset.
        FIELD-SYMBOLS display_document
                 EXPORTING parent = o_top.
      ENDMETHOD.                    "handle_top_of_page
    ENDCLASS.                    "lcl_application_f4 IMPLEMENTATION
    END-OF-SELECTION.
      CALL SCREEN 100.
          MODULE PBO OUTPUT                                             *
    MODULE pbo OUTPUT.
      SET PF-STATUS 'MAIN100'.
      SET TITLEBAR 'MAIN100'.
      IF g_custom_container IS INITIAL.
        PERFORM create_and_init_alv CHANGING gt_outtab[]
                                             gt_fieldcat.
      ENDIF.
    ENDMODULE.                    "pbo OUTPUT
          MODULE PAI INPUT                                              *
    MODULE pai INPUT.
      save_ok = sy-ucomm.
      CLEAR sy-ucomm.
      CASE save_ok.
        WHEN 'EXIT' OR 'BACK' OR 'CANCEL'.
          PERFORM exit_program.
        WHEN 'SWITCH'.
          PERFORM switch_edit_mode.
        WHEN OTHERS.
        do nothing
      ENDCASE.
    ENDMODULE.                    "pai INPUT
          FORM EXIT_PROGRAM                                             *
    FORM exit_program.
      LEAVE PROGRAM.
    ENDFORM.                    "exit_program
    *&      Form  build_fieldcat
          text
         -->PT_FIELDCAT  text
    FORM build_fieldcat CHANGING pt_fieldcat TYPE lvc_t_fcat.
      DATA ls_fcat TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'SBOOK'
        CHANGING
          ct_fieldcat      = pt_fieldcat.
      LOOP AT pt_fieldcat INTO ls_fcat.
    Exchange smoker field with invoice field - just to
    make the dependance between SMOKER and CLASS more transparent
    (Smoking is only allowed in the first class).
        IF ls_fcat-fieldname EQ 'SMOKER'.
          ls_fcat-col_pos = 11.
          ls_fcat-outputlen = 10.
          ls_fcat-edit = 'X'.
    Field 'checktable' is set to avoid shortdumps that are caused
    by inconsistend data in check tables. You may comment this out
    when the test data of the flight model is consistent in your system.
          ls_fcat-checktable = '!'.        "do not check foreign keys
          MODIFY pt_fieldcat FROM ls_fcat.
        ELSEIF ls_fcat-fieldname EQ 'INVOICE'.
          ls_fcat-col_pos = 7.
          MODIFY pt_fieldcat FROM ls_fcat.
        ELSEIF    ls_fcat-fieldname EQ 'CLASS'.
          ls_fcat-edit = 'X'.
          ls_fcat-outputlen = 5.
          ls_fcat-checktable = '!'.        "do not check foreign keys
          MODIFY pt_fieldcat FROM ls_fcat.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    "build_fieldcat
    *&      Form  create_and_init_alv
          text
         -->PT_OUTTAB    text
         -->PT_FIELDCAT  text
    FORM create_and_init_alv CHANGING pt_outtab TYPE STANDARD TABLE
                                      pt_fieldcat TYPE lvc_t_fcat.
      DATA: lt_exclude TYPE ui_functions,
            ls_layout TYPE lvc_s_layo.
      CREATE OBJECT g_custom_container
              EXPORTING container_name = g_container.
    CREATE OBJECT g_grid
            EXPORTING i_parent = g_custom_container.
      CREATE OBJECT gv_c_split
         EXPORTING
          link_dynnr        = lv_dynnr
          link_repid        = lv_repid
          parent            = g_custom_container
          rows              = 2
          columns           = 1
         EXCEPTIONS
           cntl_error        = 1
           cntl_system_error = 2
           others            = 3    .
      CALL METHOD gv_c_split->set_border
       EXPORTING
         border            = space.
      CALL METHOD gv_c_split->get_container
         EXPORTING
           row       = 1
           column    = 1
         RECEIVING
           container = gv_c_ptv.
      CALL METHOD gv_c_split->set_row_height
        EXPORTING
          id                = 1
          height            = 20
        EXCEPTIONS
          cntl_error        = 1
          cntl_system_error = 2
          OTHERS            = 6 .
      CALL METHOD gv_c_split->get_container
         EXPORTING
           row       = 2
           column    = 1
         RECEIVING
           container = gv_c_vp .
      CALL METHOD gv_c_split->set_row_height
        EXPORTING
          id                = 2
          height            = 10
        EXCEPTIONS
          cntl_error        = 1
          cntl_system_error = 2
          OTHERS            = 3 .
       CREATE OBJECT o_split
         EXPORTING
          parent            = gv_c_ptv
          with_border       = 1
         EXCEPTIONS
           cntl_error        = 1
           cntl_system_error = 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.
    o_top = o_split->top_left_container.
    o_bot = o_split->bottom_right_container.
    CREATE OBJECT gv_alv_ptv
         EXPORTING
           i_parent          = o_bot
         EXCEPTIONS
           error_cntl_create = 1
           error_cntl_init   = 2
           error_cntl_link   = 3
           error_dp_create   = 4
           others            = 5    .
    CREATE OBJECT g_grid
            EXPORTING
              i_parent          = gv_c_vp
            EXCEPTIONS
              error_cntl_create = 1
              error_cntl_init   = 2
              error_cntl_link   = 3
              error_dp_create   = 4
              others            = 5    .
      PERFORM build_fieldcat CHANGING pt_fieldcat.
    Optionally restrict generic functions to 'change only'.
      (The user shall not be able to add new lines).
      PERFORM exclude_tb_functions CHANGING lt_exclude.
      PERFORM build_data CHANGING pt_outtab.
      ls_layout-grid_title = 'F4 help implemented for field CLASS'.
      CREATE OBJECT o_event_receiver.
      SET HANDLER o_event_receiver->handle_top_of_page FOR gv_alv_ptv.
      SET HANDLER o_event_receiver->handle_top_of_page FOR g_grid.
      CREATE OBJECT o_dd_doc EXPORTING style = 'ALV_GRID'
                                       no_margins = 'X'.
      CALL METHOD gv_alv_ptv->set_table_for_first_display
       EXPORTING
         is_layout                    = ls_layout
      CHANGING
        it_outtab                     = pt_outtab[]
        it_fieldcatalog               = pt_fieldcat
      EXCEPTIONS
        invalid_parameter_combination = 1
        program_error                 = 2
        too_many_lines                = 3
        OTHERS                        = 4.
      CALL METHOD g_grid->set_table_for_first_display
        EXPORTING
          it_toolbar_excluding = lt_exclude
          is_layout            = ls_layout
        CHANGING
          it_fieldcatalog      = pt_fieldcat
          it_outtab            = pt_outtab[].
      CALL METHOD gv_alv_ptv->list_processing_events
        EXPORTING
          i_event_name      = 'TOP_OF_PAGE'
           i_dyndoc_id       = o_dd_doc.
    register f4 for field CLASS
      PERFORM register_events.
    Set editable cells to ready for input initially
      CALL METHOD g_grid->set_ready_for_input
        EXPORTING
          i_ready_for_input = 1.
    ENDFORM.                               "CREATE_AND_INIT_ALV
    *&      Form  exclude_tb_functions
          text
         -->PT_EXCLUDE text
    FORM exclude_tb_functions CHANGING pt_exclude TYPE ui_functions.
    Only allow to change data not to create new entries (exclude
    generic functions).
      DATA ls_exclude TYPE ui_func.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row.
      APPEND ls_exclude TO pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row.
      APPEND ls_exclude TO pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row.
      APPEND ls_exclude TO pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_insert_row.
      APPEND ls_exclude TO pt_exclude.
      ls_exclude = cl_gui_alv_grid=>mc_fc_loc_move_row.
      APPEND ls_exclude TO pt_exclude.
    ENDFORM.                               " EXCLUDE_TB_FUNCTIONS
    *&      Form  build_data
          text
    -->  p1        text
    <--  p2        text
    FORM build_data CHANGING pt_outtab TYPE STANDARD TABLE.
      DATA: ls_sbook TYPE sbook,
            l_index TYPE i.
      SELECT * FROM sbook INTO TABLE gt_outtab UP TO g_max ROWS.
      IF sy-subrc NE 0.
        PERFORM generate_entries CHANGING pt_outtab.
      ENDIF.
      LOOP AT pt_outtab INTO ls_sbook.
        l_index = sy-tabix.
        CLEAR ls_sbook-class.
    Alternate between smoker and non smoker to make
    it more obvious what this example is about
        l_index = l_index MOD 2.
        IF l_index EQ 1.
          ls_sbook-smoker = 'X'.
        ELSE.
          ls_sbook-smoker = ' '.
        ENDIF.
        MODIFY pt_outtab FROM ls_sbook.
      ENDLOOP.
    ENDFORM.                               " build_data
    *&      Form  generate_entries
          text
         -->PT_SBOOK   text
    FORM generate_entries CHANGING pt_sbook TYPE STANDARD TABLE.
      DATA: ls_sbook TYPE sbook,
            l_month(2) TYPE c,
            l_day(2) TYPE c,
            l_date(8) TYPE c,
         l_prebookid TYPE i.
      ls_sbook-carrid = 'LH'.
      ls_sbook-connid = '0400'.
      ls_sbook-forcurkey = 'DEM'.
      ls_sbook-loccurkey = 'USD'.
      ls_sbook-custtype = 'B'.
      DO 110 TIMES.
        l_prebookid = sy-index.
        ls_sbook-forcuram = sy-index * 10.
        ls_sbook-loccuram = ls_sbook-loccuram * 2.
        ls_sbook-customid = sy-index.
        ls_sbook-counter = 18.
        ls_sbook-agencynum = 11.
        l_month = sy-index / 10 + 1.
        DO 2 TIMES.
          l_day = 3 + l_month + sy-index * 2.
          l_date+0(4) = '2000'.
          l_date+4(2) = l_month.
          l_date+6(2) = l_day.
          ls_sbook-fldate = l_date.
          SUBTRACT 3 FROM l_day.
          ls_sbook-order_date+0(6) = l_date+0(6).
          ls_sbook-order_date+6(2) = l_day.
          ls_sbook-bookid = l_prebookid * 2 + sy-index.
          IF sy-index EQ 1.
            ls_sbook-smoker = 'X'.
          ELSE.
            ls_sbook-smoker = space.
          ENDIF.
          ls_sbook-luggweight = l_prebookid * 10.
          IF ls_sbook-luggweight GE 1000.
            ls_sbook-wunit = 'G'.
            ls_sbook-class = 'C'.
          ELSE.
            ls_sbook-wunit = 'KG'.
            ls_sbook-class = 'Y'.
          ENDIF.
          IF ls_sbook-bookid > 40 AND ls_sbook-wunit EQ 'KG'.
            ls_sbook-invoice = 'X'.
          ENDIF.
          IF ls_sbook-bookid EQ 2.
            ls_sbook-cancelled = 'X'.
            ls_sbook-class = 'F'.
          ENDIF.
          APPEND ls_sbook TO pt_sbook.
        ENDDO.
      ENDDO.
    ENDFORM.                               " generate_entries
    *&      Form  register_events
          text
    FORM register_events.
    *§1. Register event ONF4 at frontend using method
       register_f4_for_fields. For this purpose, you pass a table
       with all fields, for which you want to implement your own
       f4 help.
    remark: If you want to use an own f4 help for fields where
            no standard f4 help exists set field F4AVAILABL for
            this field in the fieldcatalog.
      DATA: lt_f4 TYPE lvc_t_f4 WITH HEADER LINE.
      CLEAR lt_f4.
      lt_f4-fieldname = 'CLASS'.
    If you would like to deregister the field again,
    pass value SPACE with field 'register'.
      lt_f4-register = 'X'.
    *§  1b. If the value range in your f4 help depends on other
          values of cells that are input enabled, set the
          GETBEFORE parameter.
    The consequence is that the ALV Grid Control raises
    event DATA_CHANGED before the f4 help is called to
    check values that the f4 help depends on.
      lt_f4-getbefore = 'X'.
    The next parameter is used to change values after onf4 has
    been processed. The ALV Grid Control will raise
    event DATA_CHANGED afterwards, if you set it.
      lt_f4-chngeafter = space.
      INSERT TABLE lt_f4.
      CALL METHOD g_grid->register_f4_for_fields
        EXPORTING
          it_f4 = lt_f4[].
    register events for abap objects (backend)
      SET HANDLER o_event_receiver->handle_f4 FOR g_grid.
    ENDFORM.                    " register_events
    MODULE status_0101 OUTPUT
    MODULE status_0101 OUTPUT.
      SET PF-STATUS 'POPUP'.
      SET TITLEBAR 'POPUP'.
      CALL METHOD o_event_receiver->show_f4.
    ENDMODULE.                 " STATUS_0101  OUTPUT
    *&      Module  USER_COMMAND_0101  INPUT
          text
    MODULE user_command_0101 INPUT.
      PERFORM user_command.
    ENDMODULE.                 " USER_COMMAND_0101  INPUT
    *&      Form  user_command
          text
    FORM user_command.
      DATA: save_ok TYPE sy-ucomm.
      save_ok = sy-ucomm.
      CLEAR sy-ucomm.
      CASE save_ok.
        WHEN 'CANCEL'.
          CALL METHOD o_event_receiver->reset.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  switch_edit_mode
          text
    FORM switch_edit_mode.
      IF g_grid->is_ready_for_input( ) EQ 0.
    set edit enabled cells ready for input
        CALL METHOD g_grid->set_ready_for_input
          EXPORTING
            i_ready_for_input = 1.
      ELSE.
    lock edit enabled cells against input
        CALL METHOD g_grid->set_ready_for_input
          EXPORTING
            i_ready_for_input = 0.
      ENDIF.
    ENDFORM.                    "switch_edit_mode

  • Header and Footer  in BEX reporting

    Hai friends,
         could you plz tell me how to add Header and Footer in  Bex report.. that means.. i want  some my company name and  address should print on the  top of the report..
    and also.. in the Footer.  i want to display the Number of records are selected...
    Ex :
       XYZ ORGANIZATION
       #301, ITPL,
       BANGALORE.
    4 Records are selected
      so, plz give me the solution .... how to   design a query with this requirement
    thanks
    with regards
    @jay

    Hi Ajay,
    Refer to web tempaltes 0adhoc_header and 0adhoc_Footer , by changing this you should be able to display header and footer for each query out of BW server.
    Hope that helps.
    Regards
    Kapadia
    ***Assigning points is the way to say thanks in SDN.***

  • Cube with different reports data

    Hi
    We have 3 different Reports based on a Multi which has only one Infocube.
    We have new design policy that any New different report that needs to be created should be based only on this Multi and all data should be loaded only into this only infocube on which this Multi is based.
    So for the existing 3 reports,we have three different database views in source database.Fullload will be done from source every weekend(previous week's request will be deleted every week) of snapshot data into three different DSOs from these three different datasources.(Its new policy that every report should have its own DSO ).All these 3 DSOs should be connected to only one cube on which our reporting Multiprovider is based.So from these 3 DSOs,data will be loaded into cube in fullload every weekend(previous week's request will be deleted)
    Now my question is:
    1.when all the data is going to cube from three different views and DSOs(with different keyfigures but some same characteristics in 3 DSOs),how can our 3 different reports pick data that is relevant for it when all data is pooled together in one big cube?Doesnot aggregation happens?
    (When a report is run,does OLAP processor goes into cube and picks only those keyfigures and characteristics in cube thats relevant for that report and by that way,avoids other data??)
    2.I need to create one new report.For this I need to create one new view and one new DSO.So,data will be loaded from view to DSO and this DSO will be connected to existing cube(new dataflow until cube from source view).But our cube doesnot contain one keyfigure.It contains all other characteristics and keyfigures from DSO.
           a)How can I add this new keyfigure from new DSO to cube without disturbing existing data in cube.I donot need to load historical data for this new keyfigure and new report.
          b)I am going to transport this from development.So what care do I need to take while transporting changes to Production cube which contains lots of data and many reports running on it?
    Thanks.

    *1.when all the data is going to cube from three different views and DSOs(with different keyfigures but some same characteristics in 3 DSOs),how can our 3 different reports pick data that is relevant for it when all data is pooled together in one big cube?Doesnot aggregation happens?
    (When a report is run,does OLAP processor goes into cube and picks only those keyfigures and characteristics in cube thats relevant for that report and by that way,avoids other data??)*
    It will depend on what Key Figures you are displaying in your report. If a KF is coming from only 2 DSOs, data from those 2 DSOs will be displayed.  And you are right in saying that OLAP processor will pick only releavnt KFs and Characteristics but it will not filter based on characteristic value e.g. if a characteristis is coming only from DSO 1 and not from DSO2, but KF is coming from both, so for the data in DSO 2 that characteristic will be displayed as #. If you want to filter data, you can put filters in the report.
    Another good option can be to store the DSO name as a characeteristic in your cube, it might be helpful if you want to make a reprot based on data from a particular DSO, then you can put the filter based on DSO name.
    *2.I need to create one new report.For this I need to create one new view and one new DSO.So,data will be loaded from view to DSO and this DSO will be connected to existing cube(new dataflow until cube from source view).But our cube doesnot contain one keyfigure.It contains all other characteristics and keyfigures from DSO.
    a)How can I add this new keyfigure from new DSO to cube without disturbing existing data in cube.I donot need to load historical data for this new keyfigure and new report.
    b)I am going to transport this from development.So what care do I need to take while transporting changes to Production cube which contains lots of data and many reports running on it?*
    You are adding a new KF which is coming only from new DSO, so you do not need to worry about a lot of things, you can move your changes to procudtion and load data from this new DSO. Data which is already there in the cube will not be impacted.
    Regards,
    Gaurav

  • How can I Generate two different reports from single execution of Test cases in NI teststand

    Hi,
    My requirement is to generate two different reports from NI teststand. One for the Logging of error descriptions and the other report is by default generated by the Teststand. How can i generate a txt file that contains error descriptions other than that mentioned in the default report?
    Solved!
    Go to Solution.

    Do you need to do that just for these two sequences but not for other sequences? I don't see a problem to use SequenceFilePostStepRuntimeError. Create this callback in both sequence files and configure them to log into the same file. SequenceFilePostStepRuntimeError callback is called after each step of the sequence file if it has runtime error. You can access the calling step error information via RunState.Caller.Step.Result.Error property. Take a look to attached example.
    The "other way" is useful if you need to log errors not for every step of the sequence file, but for some of them. This is more complex, because you need to create a custom step types for these steps. For the custom step you can create substeps (post-step in your case) which will be executed every time after step of this type executed. Then, this is you job to determine if error happened in the step, acces to step's error information is via Step.Result.Error property. 
    Also, be aware that step's post-expression is not executed in case of error in the step.
    Sergey Kolbunov
    CLA, CTD
    Attachments:
    SequenceFilePostStepRuntimeError_Demo.seq ‏7 KB

  • Different authorisations in different reports?

    Hello,
    I'd like to ask: how can I assign different authorisations for the same user for different reports?
    Example:
    I have a report of sales by customer, additionally groupped by Key Account Manager (KAM)
    KAM
    ....\_____ Customer
    and another one, where data is presented for Customers, groupped by Consultants (CON):
    CON
    ....\_____ Customer
    Both reports are based on the same multiprovider.
    Moreover, both KAM and CON are IObjects which have Customer as a reference char. I'd like to present reports to Key Account Managers and Consultants, showing their sales to respective Customers. But only theirs, not other KAMs' or CONs' sales.
    The point is - one person can be a KAM for one sale, and a CON for another one (although, those are two separate IObjects, they share master data with Customer).
    I have therefore made an authorisation for one user, giving him rights to view 'his' KAM, and ":" CON. After that, I have used this authorisation in a role, and assigned it to the user. This way, the report No. 1 provides correct data - only sales where KAM is the chosen user, regardless of values of CON (the IObject itself is not even present in the query, therefore the ":" has been used).
    How can I arrange the authorisations, so that this user can open the second report, presenting him sales to customers for which he was assigned as a CON?
    To put it shortly:
    How can I give user 001 rights to view all objects AA and only one value of object BB in report ABC1
    but give him rights to view only one value of object AA and all values of object BB in report ABC2?

    Hi,
    OK! try this following work around:
    Make it language dependent again . and unmap in transfer rules  ( cross symbol ).
    remove the info object in right panel too. and write the routine as follows.
    IF TRAN_STRUCTURE-sprache = ' '. ( write code of japanese langauge )
    And tran_structure-sprache = ' ' ( write code for chinese langauge )
      RESULT = 'e'.
    else.
    RESULT = TRAN_STRUCTURE-sprache.
    endif.
    activate the transfer rules and try uploading data again!
    Thanks,
    Ravi

  • How to get the value of a variable in group footer in the report footer also

    I have a placed a formula as below at the group footer and the report footer. The data is grouped on the basis of duedays which is again formula and the value in that is appearing correctly.
    Whilereadingrecords;
    Global Numbervar CNTONE;
    Numbervar P := P+1;
    IF P = 1 AND {@DUEDAYS} = 0
    THEN CNTONE := {spSUPPLIERSOA;1.INVOICEBAL}
    ELSE IF P>1 AND  {@DUEDAYS} = 0
    THEN CNTONE := CNTONE + {spSUPPLIERSOA;1.INVOICEBAL}
    At the group footer I get the value correctly for CNTONE but when I place the formula in Report footer I get the value for CNTONE as 0.
    Please do let me know how I could get the same value in the report footer also.
    Regards
    Sreejith J

    Hi Abhilash;
    When I give the statement whileprintingrecords then my above formula sums up only the first record and the last record of the group and when I give whilereadingrecords it adds up all the data in the group correctly.
    The formula that you mentioned for the report footer had worked out and it is showing my result correctly.
    I did not put up the reset formula on the group footer because as the group changes I had used another variable in another formula for example for the second group I used
    Whilereadingrecords;
    Global Numbervar CNTTWO;
    Numbervar Q := Q+1;
    IF Q = 1 AND {@DUEDAYS} = 30
    THEN CNTTWO := {spSUPPLIERSOA;1.INVOICEBAL}
    ELSE IF Q>1 AND  {@DUEDAYS} = 30
    THEN CNTTWO := CNTTWO + {spSUPPLIERSOA;1.INVOICEBAL}
    I have set up total 5 such formulas as the number of groups that will be formed is 5. I have put up these formulas on the group footer and suppressed it as I dont want to get it displayed.
    The as you suggested the solution for Report Footer I did that and getting the result correctly.
    I dont know I may be following a longer procedure
    Take Care
    Sreejith J

  • Creating Union Report using 3 different reports in OBIEE 11.1.1.5.0

    Hi Gurus,
    This is my first time where I am creating a union report, I have a urgent requirement to create a union report using 3 different reports and it has 3 common dimension columns and each report has 3 measures and a measure label, and 1st report measures has to show $ amounts with column names ,2nd report measures has to show % with column names and 3rd units with column names, the result should be in pivot with all columns and measures ,can someone please help me with steps to approach,I am really confusing with the results when i tried, I really appreciate your inputs.
    Thanks
    KP

    Addendum: I've tried it with CSV instead of XLS. Again, the repository appears to work just fine, but in Answers I get this message, similar to the Excel error:
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 16001] ODBC error state: IM006 code: 0 message: [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed. [nQSError: 16001] ODBC error state: S1009 code: -1023 message: [Microsoft][ODBC Text Driver] '(unknown)' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.. (HY000)

  • What is the best way to produce different report types out of the same SSRS Report

    So I have a request to produce different report types based on a "Line Of Business" Parameter that is provided. I know that SSRS sometimes struggles with gathering the Metadata based on IF Statements.
    What is the best way to provide multiple different report types with different data based on the "Line Of Business" Parameter that is provided? Can I simply do this via the SQL Stored Procedure? And how so that the Metadata is collected correctly?
    Just don't know what the generally accepted business principle is on this and how to go about doing it.
    Thanks in advance for your review and am hopeful for a reply.

    Hi ITBobbyP,
    Per my understanding that you have create an parameter (Line Of Businiess) to get diffetent types of report, I would like to confirm with you want do you mean about the different report types?
    Is that mean you have table and one column named Report type, you want to filtered on this column? Or the report type you mean is like Parameterized reports,Linked reports,Snapshot reports,Subreports and so on.
    If want you want is through the selection of the parameter to change the report type(Parameterized reports,Linked reports,Snapshot reports,Subreports ..),currently it is impossible to acheive this.
    If you still have any problem, please try to provide more details information about your reqirements, the sampe data in the table, the report structure you have designed and so on.
    Any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Standard And Customized BEx Reports & workbooks for the Modules FI,SD,MM

    Hi..All
    Can any one explain about Standard and customized BEx Reports and workbooks which were frequently used in implementation projects for the modules SD,MM and FI?
    Thanks & Regards
    Jonn

    Hi John,
    Find below some of FI(AP) queries....
    1.Accounts Receivable: Payment History -0FIAR_C05_Q0001
    2.Accounts Receivable: Overdue Analysis -0FIAR_C03_Q0005
    3.Accounts Receivable: Days Agreed / Days Taken -0FIAR_C03_Q0001
    you can find some queries in help.sap.com
    I don;t remember the queries used for other modules...you can refer the below link and identify the queries most usefull for your requirements...
    help.sap.com/bw
    thanks,
    vachan

  • How to generate a second csv file with different report columns selected?

    Hi. Everybody:
    How to generate a second csv file with different report columns selected?
    The first csv file is easy (report attributes -> report export -> enable CSV output Yes). However, our users demand 2 csv files with different report columns selected to meet their different needs.
    (The users don't want to have one csv file with all report columns included. They just want to get whatever they need directly, no extra columns)
    Thank you for any help!
    MZ

    Hello,
    I'm doing it usually. Typically example would be in the report only the column "FIRST_NAME" and "LAST_NAME" displayed whereas
    in the csv exported with the UTL_FILE the complete address (street, housenumber, additions, zip, town, state ... ) is written, these things are needed e.g. the form letters.
    You do not need another page, just an additional button named e.g. "export_to_csv" on your report page.
    The csv export itself is handled from a plsql procedure "stored procedure" ( I like to have business logic outside of apex) which is invoked by pressing the button "export_to_csv". Of course the stored procedure can handle also parameters
    An example code would be something like
    PROCEDURE srn_brief_mitglieder (
         p_start_mg_nr IN NUMBER,
         p_ende_mg_nr IN NUMBER
    AS
    export_file          UTL_FILE.FILE_TYPE;
    l_line               VARCHAR2(20000);
    l_lfd               NUMBER;
    l_dateiname          VARCHAR2(100);
    l_datum               VARCHAR2(20);
    l_hilfe               VARCHAR2(20);
    CURSOR c1 IS
    SELECT
    MG_NR
    ,TO_CHAR(MG_BEITRITT,'dd.mm.yyyy') AS MG_BEITRITT ,TO_CHAR(MG_AUFNAHME,'dd.mm.yyyy') AS MG_AUFNAHME
    ,MG_ANREDE ,MG_TITEL ,MG_NACHNAME ,MG_VORNAME
    ,MG_STRASSE ,MG_HNR ,MG_ZUSATZ ,MG_PLZ ,MG_ORT
    FROM MITGLIEDER
    WHERE MG_NR >= p_start_mg_nr
    AND MG_NR <= p_ende_mg_nr
    --WHERE ROWNUM < 10
    ORDER BY MG_NR;
    BEGIN
    SELECT TO_CHAR(SYSDATE, 'yyyy_mm_dd' ) INTO l_datum FROM DUAL;
    SELECT TO_CHAR(SYSDATE, 'hh24miss' ) INTO l_hilfe FROM DUAL;
    l_datum := l_datum||'_'||l_hilfe;
    --DBMS_OUTPUT.PUT_LINE ( l_datum);
    l_dateiname := 'SRNBRIEF_MITGLIEDER_'||l_datum||'.CSV';
    --DBMS_OUTPUT.PUT_LINE ( l_dateiname);
    export_file := UTL_FILE.FOPEN('EXPORTDIR', l_dateiname, 'W');
    l_line := '';
    --HEADER
    l_line := '"NR"|"BEITRITT"|"AUFNAHME"|"ANREDE"|"TITEL"|"NACHNAME"|"VORNAME"';
    l_line := l_line||'|"STRASSE"|"HNR"|"ZUSATZ"|"PLZ"|"ORT"';
         UTL_FILE.PUT_LINE(export_file, l_line);
    FOR rec IN c1
    LOOP
         l_line :=  '"'||rec.MG_NR||'"';     
         l_line := l_line||'|"'||rec.MG_BEITRITT||'"|"' ||rec.MG_AUFNAHME||'"';
         l_line := l_line||'|"'||rec.MG_ANREDE||'"|"'||rec.MG_TITEL||'"|"'||rec.MG_NACHNAME||'"|"'||rec.MG_VORNAME||'"';     
         l_line := l_line||'|"'||rec.MG_STRASSE||'"|"'||rec.MG_HNR||'"|"'||rec.MG_ZUSATZ||'"|"'||rec.MG_PLZ||'"|"'||rec.MG_ORT||'"';          
    --     DBMS_OUTPUT.PUT_LINE (l_line);
    -- in datei schreiben
         UTL_FILE.PUT_LINE(export_file, l_line);
    END LOOP;
    UTL_FILE.FCLOSE(export_file);
    END srn_brief_mitglieder;Edited by: wucis on Nov 6, 2011 9:09 AM

  • Concatenate different reports in a single PDF file

    Hi,
    I need to concatenate different reports in a single PDF file.
    What I want is to have a single PDF file as a result of a single URL request; but my request runs different reports having a single file as a result.
    In other words, I already have the report A, B and C.
    I'd want to build a new report "D" that invokes A, B and C returning a single PDF that contains A + B + C.
    How can I do it? Is there a SRW function?
    Thanks in advance for your help
    Samuele Gallazzi

    You can concatenate pdf's together using Ghostscript on unix. Just a bit of scripting.

  • Can I print 2 different reports consecutively on the same page?

    I need to print two different reports on the same page. E.g.
    Page 1.
    Report 1
    Report 2
    --------------- page break ---------------
    Page 2
    Report 1
    Report 2
    --------------- page break ---------------
    Is there any way to ensure that the physical page in printer does not eject when Reports finishes printing Report # 1? Also Report # 2 could span to multiple pages, but Report # 1 will always be a fixed form report.
    Thanks for your help
    Aparna

    Hi Srini,
    I suppose I could do as you suggested, but then that would be a work around, not a solution... Actually the Report # 2 that I have can be called independently and hence if I do as you suggest, I would have to make the same report twice. Hence any other ideas?
    Thanks,
    Aparna
    null

  • Report viewer web part, show different report everyday (rotate .rdl files)

    We have a report viewer web part on sharepoint site (intranet), which is working fine and showing the report (.rdl file).
    We want to show different report everyday by looping through a list of 4 or 5 important reports  (from sharepoint document library) that can be displayed on our intranet. We have limited space on the intranet to display the report (we have custom built
    reports that will fit in the allocated space).
    Our .net guy says he can do image rotations by custom web part but not sure how to use the .rdl files..
    Has anyone got any ideas on how to achieve this.

    We have a report viewer web part on sharepoint site (intranet), which is working fine and showing the report (.rdl file).
    We want to show different report everyday by looping through a list of 4 or 5 important reports  (from sharepoint document library) that can be displayed on our intranet. We have limited space on the intranet to display the report (we have custom built
    reports that will fit in the allocated space).
    Our .net guy says he can do image rotations by custom web part but not sure how to use the .rdl files..
    Has anyone got any ideas on how to achieve this.

Maybe you are looking for

  • Error in posting the transactions in monthend

    Dear All, My user geting the error at the time of monthend goods issue in process order. ' Enter business place, section code 31000766 ceck TDS code ' In this time I go to GS02 and the order number 31000766 i have to give in that list and save then u

  • Pass symbol instance name to variable

    Hi all, I'm trying to figure out how to pass the instance name (ID) of a clicked object to a variable so I can navigate to a label on the timeline with the same name. So far I've tried different variations of: sym.getSymbol() //logs as "undefined" sy

  • JDeveloper encoding setting

    Hi, I have a problem with this JDev setting. When I set this JDev property to ISO-8859-1, trying to generate a Web Service Stub, the XML generated by this stub (the SOAP request generated on execution time) has UTF-8 as encoding parameter (it appears

  • Is there a connection device to hook up to a denon recever to plug in Ipad2 or iphone 4 to place music thru home stereo

    I would like to hook up my IPAD 2 or IPHONE 4 to my denon AVR3806 recevor to play music thru home stereo.  Does anyone know how to do this? Thank you

  • Booting from RAID 0

    I have set up my Mac Pro to boot from a RAID 0 created from two WD 500 GB RE2 drives. Everythings works great - but - after running bootcamp, Windows XP does not see the Mac startup volume and I have to option-boot when restarting to get back to the