3 different blocks in same report

Hello,
    My client needs to display the output in 3 different blocks on the same report, is there some class/method to achieve it?
Thanks for help in advance
  SDN powered

Hi,
Check this code.In this you will get two ALV in the same report.You can append one more in this.
REPORT  Ztest_MULTIPLE_ALV                     .
type-pools : slis.
data : alvfc type slis_t_fieldcat_alv.
data : alvly type slis_layout_alv.
data : alvev type slis_t_event .
DATA : BEGIN OF itab OCCURS 0.
include structure t001.
DATA: END OF itab.
DATA : BEGIN OF ptab OCCURS 0.
INCLUDE STRUCTURE t000.
DATA: END OF ptab..
start-of-selection.
SELECT DATA
SELECT * FROM t001 into table itab.
select * from t000 into table ptab.
INIT BLOCK ALV
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
i_callback_program = sy-repid.
ADD INTERNAL TABLE ITAB
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'ITAB'
I_INCLNAME = SY-REPID
CHANGING
CT_FIELDCAT = ALVFC.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = alvly
it_fieldcat = alvfc
i_tabname = 'ITAB'
it_events = alvev
TABLES
t_outtab = ITAB
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 2
OTHERS = 3.
ADD INTERNAL TABLE PTAB
REFRESH ALVFC[].
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'PTAB'
I_INCLNAME = SY-REPID
CHANGING
CT_FIELDCAT = ALVFC.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = alvly
it_fieldcat = alvfc
i_tabname = 'PTAB'
it_events = alvev
TABLES
t_outtab = PTAB
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 2
OTHERS = 3.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = alvly
it_fieldcat = alvfc
i_tabname = 'PTAB'
it_events = alvev
TABLES
t_outtab = PTAB
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 2
OTHERS = 3.
DISPLAY
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
EXCEPTIONS
program_error = 1
OTHERS = 2.

Similar Messages

  • Module-pool: how to create different blocks at same screen

    hi experts,
    can i create different blocks at same selection-screen in module-pool? if yes,how?and can i use 'loop at screen' in dat case?
    thanks.

    you can do that...
    you have create subscreen areas in the screen painter and call the selection screen on those areas..
    Just see the stpes..and follow the sample code..
    REPORT  ztest_mod.
    DATA: kunnr TYPE kunnr.
    "if you want to create blocks same like selection screen the
    "you have to create them as subscreen,
    "place them in subscreen area.
    * Custom Selection Screen a
    SELECTION-SCREEN BEGIN OF SCREEN 0200 AS SUBSCREEN.
    SELECT-OPTIONS: s_kunnr FOR  kunnr.
    SELECTION-SCREEN END OF SCREEN 0200.
    START-OF-SELECTION.
      "in this screen i have a button with function code 'SEARCH'
      " and a subscreen area with name sub
      CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS'.
    ENDMODULE.                    "status_0100 OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    MODULE user_command_0100 INPUT.
    "for reading the selection screen fields
      DATA:
          i_dyn_fields LIKE TABLE
                         OF dynpread
                       WITH HEADER LINE.
      MOVE:
        'S_KUNNR-LOW' TO i_dyn_fields-fieldname.
      APPEND i_dyn_fields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = '0200'
        TABLES
          dynpfields           = i_dyn_fields
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc eq 0.
       read table i_dyn_fields index 1.
        s_kunnr-low = i_dynp_fields-VALUE
        s_kunnr-sign = 'I'.
        s_kunnr-option = 'EQ'.
        append s_kunnr.
      ENDIF.
      DATA: it_kunnr TYPE TABLE OF kna1.
      CASE sy-ucomm.
        WHEN 'SEARCH'.
          SELECT * FROM kna1
          INTO TABLE it_kunnr
          WHERE kunnr IN s_kunnr.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                    "user_command_0100 INPUT
    Flow Logic
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      CALL SUBSCREEN sub INCLUDING sy-repid '0200'.
    PROCESS AFTER INPUT.
      MODULE user_command_0100.
    Regards
    Vijay Babu Dudla

  • Copy values from a filed to another in different blocks in same table

    Hi All,
    How to copy value from a filed to another field in different blocks in same form ?
    example if i change value in Field A of block 1 it should reflect in Field B block 2 and again if i change in Field B block 2 it should reflect in Field A of block 1.
    values will change twice or thrice then it will not change. It is happening like that.
    how to do this ?
    Regards

    Same table / different blocks
    I guess, both blocks will be marked for update, and when your user presses commit, the same table will be updated twice!
    Are you sure that this is what you want to do? Is the same record current in both blocks? If so, you better use 1 block (it can be spread over several canvases and windows) and synchronize the items with the "synchronize item" property.
    Anyway: If you can't apply the synchronize-property bcos the items are in different blocks, you can synchronize with 2 when-validate-item triggers.
    Wolfram

  • Why's the SQL format different for the same report on different PCs?

    I have 2 PCs running the same version of Crystal Reports (11.0.0.1994) using an identically configured system DSN with the exact same driver. When I view the SQL that CR is using on PC 1, part of it looks like this:
    " FROM   {oj (("PUB"."LOQEstimate" "LOQEstimate1" LEFT OUTER JOIN "PUB"."LOQComponent" "LOQComponent1" ON ("LOQEstimate1"."Estimate-ID"="LOQComponent1"."Estimate-ID") AND"
    On PC 2 it looks like this:
    "FROM   "PUB"."LOQEstimate" "LOQEstimate1", "PUB"."LOQComponent" "LOQComponent1", "PUB"."CustContact" "CustContact1", "PUB"."LOQSegment" "LOQSegment1"
    WHERE"
    It's the exact same report. Can someone tell me why the SQL is different?
    TIA for the help.

    Thanks for the reply, Patrick. Here are the answers you requested:
    1. Verify you are indeed using the same driver, and they are of the same version
    The driver on both PCs is the Progress OpenEdge 10.1A driver. The file is pgoe1021.dll, version 05.10.0037.
    2. Verify if you have the same database client install on both computer.
    Both use prowin32.exe, v10.1.1.1326
    If everything is the same, then it might be a registry key, and in this case, can you provide the following information:
    1. What database are you connecting to? ( Oracle, DB2, ... )
    Progress OpenEdge 10 RDMS (/community [original link is broken])
    2. What is the version of the database?
    10.1A
    3. What is the version of the database client?
    v10.1.1.1326
    4. How are you connecting to your database? ( Native, ODBC, OLEDB,... )
    ODBC
    5. If you are connecting via ODBC, what is the name of the driver used and it's version?
    The driver is the Progress OpenEdge 10.1A driver. The file is pgoe1021.dll, version 05.10.0037.
    6. What is the SQL query syntax do you prefer? ( PC 1, or the one generated on PC 2 )
    The SQL generated on PC1 doesn't return any records. The SQL generated on PC2 does. Records are preferable ;o)

  • Distribution working differently for the same report

    Hello all,
    I created a template with 3 reports, each of which opens for 4 plants.
    Then, when I schedule the offline distribution process, 2 of the reports are generated correctly for all plants, while the 3rd has a strange behavior. This 3rd report has 2 sheets and opens correctly for 2 of the plants, while for the other 2:
    - in one sheet, the formulas are not converted to offline mode (like _epmOfflineCondition_ ) giving an "#Error, no current connection." message and the sheet is not protected; however, the report data is correct.
    - in the other sheet, everything works ok and  the sheet is protected;
    Any thoughts? Thanks,
    Ana-Maria

    Thanks Ashok,
    but unfortunately the above points are not applicable to the issue indicated:
    1. Log off&log on has no effect since this problem appears on all PCs and always for the same data group.
    2. The data group is available in the model cube and master data.
    3. We are using the ADMIN user to execute the process so we have all authorizations (also, these are defined at Country level and only one Plant from a Country is not working).
    4. The formula is correct.
    5. Since the report executes correctly as a standalone report and works for other plants, I don't believe there is an issue with it.
    The issue still persists.
    Ana-Maria

  • Data from different databases in the same report.

    Hi Everyone,
    I am trying to build a reconciliation report in which I need to show the data from the source and target, side by side.
    Source and target are both different databases, although being oracle only
    Whenever a new data model is created, it gets attached to a data source and in the report we need to choose a specific data model.
    Can we have data from different databases in the same report ?

    Yes, it is possible.
    One way Is to use dataTemplates. There you can make queries from any number of different databases (The max I have done is 5).
    It looks something like that:
    <dataTemplate name="NameOfTemplate">
    <dataQuery>
         <sqlStatement name="Q1" dataSourceRef="Connection1">
              <![CDATA[     select * from table1]]>
         </sqlStatement>
         <sqlStatement name="Q2" dataSourceRef="Connection2">
              <![CDATA[     select * from table2]]>
         </sqlStatement>
      </dataQuery>
      <dataStructure>
         <group name="RESULT1" source="Q1">
              <element name="P_FIRST_NAME" value="P_FIRST_NAME"/>
         </group>
         <group name="RESULT2" source="Q2">
              <element name="P_DATE" value="P_DATE"/>     
         </group>
      </dataStructure>
    </dataTemplate>dataStructure is very important when you get data from different places, if you don't define those elements, then only the result from Q1 is shown.
    The second possible way is to make as two different data models, each containing their own query and then set Main Data Set as concatenated SQL Data Source.
    Best of luck,
    Evelyn

  • Same report, 2 identical servers, 2 different outputs???

    We have a report that is produced correctly on our Staging server, but when we promote the same report to our Production server (which is a mirror of our Staging server), we get different output. The machines are identical in every respect except for the name. The same queues, fonts, and version of Crystal Report (10.2.3600.0) is installed on both. I wish I could upload the 2 versions of the pdfs that are outputted for you to see the differences, but there doesn't seem to be a way to do that here. Any ideas of what could be causing the discrepancies?

    Hi Amanda,
    Can I back track a bit here?  I would like a bit more clarification on how this is being tested.  From what I understand:
    1)  You have the same application running on 2 different servers which are mirrors of each other. 
    2)  The report is exported to PDF directly, not previewed or printed first. 
    3)  The PDF is opened locally on the client machine. 
    A couple of questions I have: 
    1)  Is the client machine viewing the PDFs from both servers or are these 2 different clients as well?  If the clients are different, then can you try opening the PDF from the second server onto your original client and see if they formatting is the same?  I say this because I want to make sure the Acrobat reader is the same version on both machines and to eliminate the possibility that the PDF is fine but the reader may be the culprit. 
    2)  You've removed the printer in the report I see.  On the client machine, is there default printer installed and is it something other than the Generic Text Driver? 
    3)  Same question as above but on the second server?  A printer is important to Crystal even if you are not printing.  Many years ago if a printer was not installed, the print engine would crash the report when you tried to run it.  That's when the No Printer option was added but that's a different story.  I just needed to stress the importance of having a printer installed. 
    Thanks,
    Brian

  • Use same report with different MySQL database

    I am using CR2008 with MySQL 5.1.
    I have a report that works with one of the tables (T1) in a MySQL database (DB1).  I have another MySQL database (DB2) with the same table name and structure, except that the data has been updated.
    I want to use the same report, but just ask CR2008 to now use DB2 and T1.
    Try as I may (using Set Data Source Location...), but I'm not getting anything to work.
    I looked for a previous thread on this, but was unsuccessful. 
    Thanks for any help.
    David

    Thank you for your helpful response.  What I am really asking is this -- when there is a CR2008 report based on db1, table1, and you want to use the SAME report with an identical table in a DIFFERENT database (db2, table1), can I easily use the same report?  Or, do I have to generate another version of the report?
    Thank you again.
    David

  • Print same report  with different watermark

    i want to print the one report with different watermark
    means suppose we generate the report and print the 10 copy of the same report but want 4 copy with one watermark and 6 with different watermark.
    i have the number of watermark copy in the table .
    pls give me the solution
    regards
    anurag

    Thank you for your helpful response.  What I am really asking is this -- when there is a CR2008 report based on db1, table1, and you want to use the SAME report with an identical table in a DIFFERENT database (db2, table1), can I easily use the same report?  Or, do I have to generate another version of the report?
    Thank you again.
    David

  • Linking different measures from different cubes on to same report ,

    Team ,
    I have a report  which is targetting CUBE_1 retrieving dimensions A,B,C and Measures X,Y,Z . Now i also want to retrieve some more measures from a different Cube CUBE_2 which is  still has same dimensions  onto same report .
    I do not want to use a SubReport here .I dont want to use LooKUp's() too ..
    Can you please advise with some pointers how can we achieve this using MDX  ? Thanks in advance !
    Rajkumar Yelugu

    Hi Rajkumar,
    According to your description, what you want it that retrieving dimensions A,B,C and Measures X,Y,Z from Multiple CUBE1 and CUBE2 in an MDX query.
    The short answer is yes. To query multiple cubes from a single MDX statement use the LOOKUPCUBE function (you can't specify multiple cubes in your FROM statement). The LOOKUPCUBE function will only work on cubes that utilize the same source database as the
    cube on which the MDX statement is running. For the detail information about it, please refer to the link below to see the blog.
    Retrieving Data From Multiple Cubes in an MDX Query Using the Lookupcube Function
    Hope this helps.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Different output format on pdf,  same report same data same user Report 10g

    Hi
    I’ve recently came up with a very strange problem
    I have the same report ( DevSuite 10g ) running on a win2003 server and without any obvious reason the output format changes from the original –correct one - ( the underlined text is not correct , font size is decreased , line spacing differs)
    The report is executed with the same user, the same parameters and the same data...
    Problem is solved only after a full server restart ( restarting only the report server, web cacle will not make any difference )
    Once the report is formatted strangely we cannot run it correctly (reboot is needed)
    Trace and log files shows nothing strange about the execution.
    Can you please tell me how to start investigate or suggest a solution?
    Thank you,
    M

    This is a wild guess, but it could be the result of there being no default printer. If you're using an in-process Reports Server, this runs by default under the LocalSystem operating system account. By default, this account does not have a default printer. Without a default printer, Reports may not format fonts correctly when producing PDF output.
    For more information, see "Printing and Font Errors When Using In-process Server" in Appendix D (Troubleshooting OracleAS Reports Services) of Oracle Application Server Reports Services Publishing Reports to the Web 10g Release 2 (10.1.2). It (like Metalink note 272017.1) suggests changing the registry to set a default printer that the LocalSystem account can "see"). Metalink note 370150.1 offers a more drastic solution -- configuring the Reports Server to run under a different operating system account that does have a default printer.
    Still, the theory that this "default printer" issue is the problem is not exactly consistent with the fact that your reports do work as expected at first, although there could be explanations for why the default printer is periodically changing (startup scripts, user intervention, etc.).
    Hope this helps.

  • Different page orientation in same report!

    As in Microsoft Word I am trying to customize a mail merge totally in Crystal Reports using Access as the data engine.  Can Crystal have a cover letter, with merge fields, from Access as portrait orientation (page 1) and then all subsequent pages in landscape orientation (recipients data pages).  In summary I need Crystal to be able to have page 1 as portrait and all other pages as landscape within the same report.  This answer is dependent on whether I purchase Crystal Reports.
    Thank You

    Hello,
    This functionality is new with CR2008. You can visit the [Crystal Reports 2008 Features|http://www.sap.com/solutions/sapbusinessobjects/sme/reporting-dashboarding/reporting/crystalreports/featuresfunctions/index.epx] page for more information.
    Sincerely,
    Dan Kelleher

  • Run a query multiple times in the same report for different nodes in Hier

    Hi,
    I have created a query as per my requirements. But my issue is I need to run the report for all the profit centers in a hierarchy. Right now I enter a node value of the hierarchy in the variable and I get the result. But I want to run it for each node in the hierarchy and display the result in the same report.Is it possible to do so in web using information broadcaster or any BI 7.0 tools. Has anyone done similar to this in web. I would prefer the web route rather than the excel but if excel is the only answer I will follow the excel path.
    Looking forward to your suggestions on this.
    Thanks,
    Kal

    Hello Kal,
    if the number of Profit Centers is limited, you could probably work with query views (one for each PC) and include all these into your Web Template.
    If this is not appropriate, I don´t know if there is any way of programming possible.
    Regards
    Cornelia

  • WS-SDK Scheduling two instances of the same report with different params

    I'm using the web services SDK for Business Objects XI 3.1 SP 2 to schedule reports. I've got it so that I can successful schedule a report with prompts, setting the value for the prompt and running the report.
    However, I'm now trying to schedule two instances of the same report using a single call to BIPlatform.Schedule. It creates the correct number of new instances, the last of which is completely correct. The first one (and in fact if I do more than two all the rest except the last) lose the parameter value from the prompt and the schedule information and the type. So for example if I schedule two instances, both PDF, both for 8am tomorrow with parameters of 1 and 2, I get:
    A Webi instance, scheduled to run immediately with no parameters specified and
    A PDF instance, scheduled for 8am tomorrow with parameter 2
    Any idea what I'm doing wrong?
    Cheers,
    Jack
    Edited by: Jackson Pope on Feb 3, 2011 1:34 PM

    Can you possibly post your code here that sets params and schedules? Also as you schedule 2 instances on a single report in a sinlgle biplatform.schedule call(): as you query for InfoObject what you actually query for a single report isn't it, or do you schedule a report template and reschdule it previous instance?

  • Call the same report

    Hi experts,
    I have a urgent requirements ......
    In the selection screen i have three fields . And i m displaying one alv report for a perticular vendor number .My requirement is when i am double clicking the vendor number then it'll show another output of the same report for different selection criteria ...
    plase help its an urgen t.
    regards,
    Satya

    hi
    this code is also for the same thing follow the code
    it will be help ful
    *& Report  Z_SWAS_FUNCTIONAL
    report  z_swas_functional.
    tables: qmel,viqmel,iloa,afko.
    -- global data declerations--
    data: ok_code like sy-ucomm,
          gt_itab type table of zfunctional,
          t_output type table of zfunctional,
          g_container type scrfname value 'CUSTOM_CONTROL',
          grid1  type ref to cl_gui_alv_grid,
          g_custom_container type ref to cl_gui_custom_container,
          e_row type lvc_s_row,
          e_column type lvc_s_col,
          es_row_no type lvc_s_roid.
    *CLASS DECLARATION
    class z_functional definition.
    public section.
    class-methods : handle_double_click
                    for event double_click of cl_gui_alv_grid
                         importing e_row  e_column.
    endclass.
    *CLASS IMPLEMENTATION
    class z_functional implementation.
    method handle_double_click.
           perform handle_double_click using e_row e_column es_row_no.
    endmethod.
    endclass.
    *CODE FOR SELECTION SCREEN
    selection-screen begin of block 84433  with frame title text-t01.
    parameters : n_number like viqmel-qmnum as listbox visible length 10,
                    n_type like qmel-qmart,
                    f_loca like iloa-tplnr,
                    name like qmel-qmnam.
    selection-screen end of block 84433.
                        screen validation event                          *
    at selection-screen on n_number.
      select single *
        from viqmel
          where qmnum eq n_number.
    if sy-subrc ne 0.
      MESSAGE 'NOTIFICATION NUMBER DOESNOT EXIST' TYPE 'E'.
    endif.
    select qmart from qmel into qmel where qmart eq N_TYPE.
    endselect.
    if sy-subrc ne 0.
      MESSAGE 'NOTIFICATION TYPE DOES NOT EXIST' TYPE 'E'.
    endif.
    *START OF SELECTION EVENT
    start-of-selection.
        perform fetchdata.
    end-of-selection.
    *Call screen event
    call screen 100.
    *PERFORM DISPLAY.
    *&      Form  FETCHDATA
          text
    -->  p1        text
    <--  p2        text
    form fetchdata .
    *SELECT VIQMEL~QMNUM VIQMEL~QMTXT VIQMEL~QMDAT VIQMEL~LTRMN VIQMEL~PRIOK
          VIQMELBEZDT VIQMELAUFNR VIQMELTPLNR AFKOGLTRP into corresponding fields of table GT_ITAB
             FROM VIQMEL INNER JOIN AFKO ON VIQMELAUFNR = AFKOAUFNR
                   WHERE VIQMELQMNUM IN N_NUMBER and VIQMELQMART IN N_TYPE AND VIQMEL~QMNAM IN NAME.
    call function 'ZSWAS_TEST'
      exporting
        qmnum         = n_number
       qmart         = n_type
       tplnr         = f_loca
       qmnam         = name
      tables
        output        = gt_itab
    if sy-subrc ne 0.
       message e000(z84433_msg_class).
    endif.
    endform.                    " FETCHDATA
    *&      Module  STATUS_0100  OUTPUT
          text
    module status_0100 output.
      set pf-status 'MAIN'.
    SET TITLEBAR 'xxx'.
    *creating custom container and grid instance
    if g_custom_container is initial.
        create object g_custom_container
               exporting container_name = g_container.
        create object grid1
               exporting i_parent = g_custom_container.
        call method grid1->set_table_for_first_display
          exporting
            i_structure_name = 'ZFUNCTIONAL'
          changing
            it_outtab        = gt_itab.
    *set handler events
        set handler z_functional=>handle_double_click for grid1.
      endif.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    module user_command_0100 input.
    case ok_code.
       when 'EXIT'.
        perform exit_program.
    endcase.
      clear ok_code.
    endmodule.                 " USER_COMMAND_0100  INPUT
    *&      Form  EXIT_PROGRAM
          text
    -->  p1        text
    <--  p2        text
    form exit_program .
    leave program.
    endform.                    " EXIT_PROGRAM
    *&      Form  handle_double_click
          text
         -->P_E_ROW  text
         -->P_E_COLUMN  text
         -->P_ES_ROW_NO  text
    form handle_double_click  using   e_row type lvc_s_row
                                      e_column type lvc_s_col
                                      es_row_no type lvc_s_roid.
    data: t_output type  zfunctional.
        read table gt_itab into t_output index e_row-index .
      if sy-subrc = 0 and e_column-fieldname eq 'QMNUM'.
        set parameter id 'K01' field t_output-qmnum.
        call transaction 'ZSMART' and skip first screen .
      endif.
    endform.                    " handle_double_click
    thanks s
    swaroop

Maybe you are looking for