Dynamic Report Heading - Classical report

Hi,
  Could you please let me know how do I change the heading of a classical report based on the user selection on selection screen. I want to display the selection text that the user has selected in the selection screen as the heading for the report.
Timely help is highly appreciatable.
Thanks in advance.
Regards,
Farhana.

You will have to insert some WRITE instruction in the TOP-OF-PAGE. You may read the current selection via FM [RS_VARIANT_ADMIN_DATA|https://www.sdn.sap.com/irj/scn/advancedsearch?query=rs_variant_admin_data&cat=sdn_all] and print it using FM [PRINT_SELECTION|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&query=print_selection&adv=false&sortby=cm_rnd_rankvalue]. (Look at this sample in Code Gallery [how to print selection screen data in report |https://wiki.sdn.sap.com/wiki/display/Snippets/howtoprintselectionscreendatain+report])
Regards

Similar Messages

  • Report Formatting with Dynamic Height Header/Footer

    I need to generate a printable report (pdf if possible) with a:
    1) Header - Dynamic Height based on recordset output
    2) Body - Recordset output, may carry over to multiple pages
    3) Footer - Dynamic Height based on recordset out
    In short, the whole page is dynamic- The header and footer need to be on every page and whatever height is left over to fit within the print area goes to the body and the line item output of each record (think invoice).  Then the number of pages will depend on how long it takes to output the body recordset (but the header and footer MUST be on each page).
    I have been trying to get this to work using cfdocument since CF7 and have never had any luck. It has not worked due to the reason that since the header and footer are dynamic height, I do not have any way to set the margins properly on page generation (so it shrinks the header or leaves excess whitespace).
    Anyone recommend the best way to go about this? I have heard about the report builder and am not sure if that will fit these requirements.  I appreciate any assistance!

    When the footer goes to the 2nd page the page subform is incremented so you will have to reference the page subform as well. I suggest that you add a button (this is for a test only) to the footer subform and add the code app.alert(this.somExpression). Now render the form and make sure the footer stays on one page. Hit the button and take note of the someExpression. Now add enough rows to force the footer to a new page. Hit th ebutton again and take note of the changed somExpression. So to solve your problem you will have to find out which page your footer is on. and then construct your expression to incorporate this chane in expression. Note that the indexes are 0 based but the page numbering is 1 based.
    Hope that helps
    Paul

  • Javascript popup in dynamic report

    Hello,
    I want to be able to use Javascript popup window from a dynamic report in Apex 4.0. Is there anything built-in to help me out? Or should I use my own javascript function in the header and call it?
    My idea would be that one column would have a icon with a link that calls a javascript function to popup a window.
    Any suggestions?
    Thanks all
    Btw, what is the markup for scripts, again?

    Try:
    javascript:popupUR

  • Create dynamic report or query for piece count

    Hi abaper's
    This is a very straight forward requirement. so please give me code
    First you have to get the corresponding plant from table T320 for the given warehouse numbers in the selection screen. 
    1.     Get the sum of order qty of sales orders from the sales order tables      for the given warehouse(Plant), distribution channel and the give date      range.
    2.     Get the confirmed transfer orders qty from the TO master table where      TO confirmation date is in the given date range and WH number.
    3.     Get the total PGIed qty from the delivery master table where PGI'ed      date in the given date range, shipping point is in the corresponding      plant of the WH and for the given distribution channel.
    As you are going to use the major tables please try to write the select commands effectively to avoid further performance issues.

    How to improve the performance fo this code.....this very urgent.
    & Issue Number          : 22199                                    &
    & Programmer            : Anjaneyulu.Pabba                         &
    & Transport Number      : D01K962471                               &
    & Date of Creation      : 19/03/2008                               &
    & Description           : Dynamic report or query for piece count  &
    & Requested By          : Parvati.Polisetty                        &
    REPORT  ZR_SD_PIECE_COUNT_ALV no standard page heading
                                  line-size 255
                                  line-count 65.
                          TABLES DECLARATION
    *TABLES: T320,   "Assignment IM Storage Location to WM Warehouse Number
          VBAK,   "Sales Document: Header Data
          VBAP,   "Sales Document: Item Data
          TVKOV,  "Org. Unit: Distribution Channels per Sales Organization
          LTAK,   "WM transfer order header
          LTAP,   "Transfer order item
          LIKP,   "SD Document: Delivery Header Data
          LIPS.   "SD document: Delivery: Item data
                          TYPE-POOLS DECLARATION
    TYPE-POOLS: SLIS .
         Internal Table Declaration
    DATA : BEGIN OF TY_T320,
            WERKS TYPE WERKS_D,
            LGNUM TYPE LGNUM,
           END OF TY_T320.
    DATA : BEGIN OF TY_VBAK,
            VBELN  TYPE VBELN_VA,
            VTWEG  TYPE VTWEG,
            WERKS  TYPE WERKS_D,
            KWMENG TYPE KWMENG,
            VSTEL  TYPE VSTEL,
           END OF TY_VBAK.
    DATA : BEGIN OF TY_LTAK,
            LGNUM TYPE LGNUM,
            TANUM TYPE TANUM,
            VISTA TYPE LTAP_VISTA,
           END OF TY_LTAK.
    DATA : BEGIN OF TY_LIKP,
            VBELN TYPE VBELN_VL,
            WERKS TYPE WERKS_D,
            LFIMG TYPE LFIMG,
           END OF TY_LIKP.
    DATA : BEGIN OF TY_ITAB ,
    LGNUM  TYPE LGNUM,    "Warehouse Number / Warehouse Complex
    WERKS  TYPE WERKS_D,  "Plant
    VBELN  TYPE VBELN_VA, "Sales Document
    VTWEG  TYPE VTWEG,   "Distribution Channel
    KWMENG TYPE KWMENG,  "Cumulative order quantity in sales units
    TANUM  TYPE TANUM ,     "Transfer Order Number
    VISTA  TYPE LTAP_VISTA, "Source actual quantity in alternative
                                                 unit of measure
    LFIMG  TYPE LFIMG,  "Actual quantity delivered (in sales units)
    END OF TY_ITAB .
    DATA: T_T320 LIKE STANDARD TABLE OF TY_T320 INITIAL SIZE 0 WITH HEADER
                                                                   LINE,
          T_VBAK LIKE STANDARD TABLE OF TY_VBAK INITIAL SIZE 0 .
    DATA: T_LTAK LIKE STANDARD TABLE OF TY_LTAK INITIAL SIZE 0 WITH HEADER
                                                                    LINE.
    DATA :T_LIKP LIKE STANDARD TABLE OF TY_LIKP INITIAL SIZE 0 WITH HEADER
                                                                    LINE.
    DATA:T_ITAB LIKE STANDARD TABLE OF TY_ITAB INITIAL SIZE 0 WITH HEADER
                                                                   LINE .
    *&      Fieldcatalog Declaration
    DATA : T_FCAT TYPE SLIS_T_FIELDCAT_ALV,
           W_FCAT TYPE SLIS_FIELDCAT_ALV.
    DATA : W_LAYOUT TYPE SLIS_LAYOUT_ALV.
    ********Global Data Declaration***
    DATA :G_REPID        LIKE SY-REPID,
         G_EXIT(1)      TYPE C,
         GX_VARIANT     LIKE DISVARIANT,
         X_SAVE,                          "for Parameter I_SAVE
         GS_VARIANT TYPE DISVARIANT.      "for parameter IS_VARIANT
    data: g_lgnum type t320-lgnum,
          g_vtweg type vbak-vtweg,
          g_erdat type vbak-erdat.
    *&      Selection-Screen
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS : S_LGNUM FOR  g_lgnum, "Warehouse Number
                    S_VTWEG FOR g_vtweg, "Distribution Channel
                    S_ERDAT FOR g_erdat ."Date on which the record was
    **********"created
    SELECTION-SCREEN END OF BLOCK B1 .
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    PARAMETER: P_VARI LIKE DISVARIANT-VARIANT.  "Layout
    SELECTION-SCREEN END OF BLOCK B2.
    *&       INITIALIZATION EVENT
    INITIALIZATION.
      CLEAR GS_VARIANT.
    'gs_variant' must at least contain the report-id to allow
    saving a variant.
      G_REPID = SY-REPID.
    § 2.At least field REPORT of this structure has to be filled!
      GS_VARIANT-REPORT = G_REPID.
    § 3.Determine saving options.
      X_SAVE = 'A'.   "The user may save all types of variants
    *******Validating selection-screen values**********************
    getting F4 value for display variant field
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VARI.
      PERFORM F4_FOR_VARIANT.
    ****validation of F4 value of display variant
    AT SELECTION-SCREEN.
      PERFORM PAI_OF_SELECTION_SCREEN.
    *&      Start-Of-Selection
    START-OF-SELECTION.
    *****Subroutine to  select Plant from T320
      PERFORM FIND_PLANT .
    *****Subroutine to select Order Quantity from VBAP
      PERFORM ORDER_QUANTITY .
    *****Subroutine to select Transfer Order Quantity from LTAK and LTAP
      PERFORM TRANSFER_ORDER_QUANTITY.
    *****Subroutine to select TDelivery Quantity from  LIKP and LIPS
      PERFORM DELIVERY_QUANTITY.
    *&      End-Of-Selection
    END-OF-SELECTION.
    *****Subroutine for Fieldcatalog
      PERFORM FIELDCATALOG .
    *****Subroutine for Final Output
      PERFORM DISPLAY_OUTPUT .
    *&     Subroutine Implementaion
    *&      Form  FIND_PLANT
          text
    -->  p1        text
    <--  p2        text
    FORM FIND_PLANT .
      SELECT  WERKS
              LGNUM
              FROM T320
              INTO  TABLE T_T320
              WHERE LGNUM IN S_LGNUM.
    ENDFORM.                    " FIND_PLANT
    *&      Form  order_quantity
          text
    -->  p1        text
    <--  p2        text
    FORM ORDER_QUANTITY .
      SELECT VK~VBELN
             VK~VTWEG
             VP~WERKS
             VP~KWMENG
             VP~VSTEL
             INTO TABLE T_VBAK FROM VBAK AS VK
             INNER JOIN  VBAP AS VP
             ON VKVBELN = VPVBELN
             FOR ALL ENTRIES IN T_T320
             WHERE VK~VTWEG IN S_VTWEG
             AND   VK~ERDAT IN S_ERDAT
             AND   VP~WERKS = T_T320-WERKS.
    ENDFORM.                    " order_quantity
    *&      Form  Transfer_order_quantity
          text
    -->  p1        text
    <--  p2        text
    FORM TRANSFER_ORDER_QUANTITY .
      SELECT LK~LGNUM
             LK~TANUM
             LP~VISTA
             INTO TABLE T_LTAK FROM LTAK AS LK
             INNER JOIN LTAP AS LP
             ON LKLGNUM = LPLGNUM
             WHERE LK~KQUIT = 'X'
             AND   LK~BDATU IN S_ERDAT
             AND   LK~LGNUM IN S_LGNUM.
    ENDFORM.                    " Transfer_order_quantity
    *&      Form  Delivery_QUANTITY
          text
    -->  p1        text
    <--  p2        text
    FORM DELIVERY_QUANTITY .
      SELECT  VBELN WERKS LFIMG FROM LIPS
              INTO TABLE T_LIKP
              FOR ALL ENTRIES IN T_T320
              WHERE WERKS = T_T320-WERKS
              AND ERDAT IN S_ERDAT
              AND VTWEG IN S_VTWEG.
    ENDFORM.                    " Delivery_QUANTITY
    *&      Form  fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCATALOG .
      W_FCAT-COL_POS       = '1' .
      W_FCAT-FIELDNAME     = 'LGNUM' .
      W_FCAT-REF_TABNAME   = 'T320'.
      W_FCAT-REF_FIELDNAME = 'LGNUM' .
      APPEND W_FCAT TO T_FCAT.
      CLEAR W_FCAT.
      W_FCAT-COL_POS       = '2' .
      W_FCAT-FIELDNAME     = 'VTWEG' .
      W_FCAT-REF_TABNAME   = 'VBAK'.
      W_FCAT-REF_FIELDNAME = 'VTWEG' .
      APPEND W_FCAT TO T_FCAT.
      CLEAR W_FCAT.
      W_FCAT-COL_POS       = '3' .
      W_FCAT-FIELDNAME     = 'KWMENG' .
      W_FCAT-REF_TABNAME   = 'VBAP'.
      W_FCAT-REF_FIELDNAME = 'KWMENG' .
    *w_fcat-seltext_m     = '# of Orders'.
      APPEND W_FCAT TO T_FCAT.
      CLEAR W_FCAT.
      W_FCAT-COL_POS       = '4' .
      W_FCAT-FIELDNAME     = 'VISTA' .
      W_FCAT-REF_TABNAME   = 'LTAP'.
      W_FCAT-REF_FIELDNAME = 'VISTA' .
    *w_fcat-seltext_m     = '# of Pcs Picked'.
      APPEND W_FCAT TO T_FCAT.
      CLEAR W_FCAT.
      W_FCAT-COL_POS       = '5' .
      W_FCAT-FIELDNAME     = 'LFIMG' .
      W_FCAT-REF_TABNAME   = 'LIPS'.
      W_FCAT-REF_FIELDNAME = 'LFIMG' .
    *w_fcat-seltext_m     = '# of Pcs Shipped'.
      APPEND W_FCAT TO T_FCAT.
      CLEAR W_FCAT.
    W_FCAT-COL_POS       = '6' .
    W_FCAT-FIELDNAME     = 'TANUM' .
    W_FCAT-REF_TABNAME   = 'LTAK'.
    W_FCAT-REF_FIELDNAME = 'TANUM' .
    **w_fcat-seltext_m     = '# of Pcs Shipped'.
    APPEND W_FCAT TO T_FCAT.
    CLEAR W_FCAT.
    W_FCAT-COL_POS       = '7' .
    W_FCAT-FIELDNAME     = 'WERKS' .
    W_FCAT-REF_TABNAME   = 'T320'.
    W_FCAT-REF_FIELDNAME = 'WERKS' .
    **w_fcat-seltext_m     = '# of Pcs Shipped'.
    APPEND W_FCAT TO T_FCAT.
    CLEAR W_FCAT.
    ENDFORM.                    " fieldcatalog
    *&      Form  display_output
          text
    -->  p1        text
    <--  p2        text
    FORM DISPLAY_OUTPUT .
      LOOP AT T_T320 INTO TY_T320.
        TY_ITAB-WERKS = TY_T320-WERKS.
        TY_ITAB-LGNUM = TY_T320-LGNUM.
        READ TABLE T_VBAK INTO TY_VBAK WITH KEY WERKS = TY_T320-WERKS.
        IF SY-SUBRC = 0.
        TY_ITAB-VBELN  = TY_VBAK-VBELN.
        TY_ITAB-VTWEG  = TY_VBAK-VTWEG.
        TY_ITAB-KWMENG = TY_VBAK-KWMENG + ty_itab-kwmeng.
        ENDIF.
        READ TABLE T_LTAK INTO TY_LTAK WITH KEY LGNUM = TY_T320-LGNUM.
        IF SY-SUBRC = 0.
        TY_ITAB-TANUM = TY_LTAK-TANUM.
        TY_ITAB-VISTA = TY_LTAK-VISTA + ty_itab-vista.
        ENDIF.
        READ TABLE T_LIKP INTO TY_LIKP WITH KEY WERKS = TY_T320-WERKS.
        IF SY-SUBRC = 0.
        TY_ITAB-LFIMG = TY_LIKP-LFIMG + ty_itab-lfimg.
        ENDIF.
        APPEND TY_ITAB TO T_ITAB.
      ENDLOOP.
    Function Module for Displaying Final Output ********
      W_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM = SY-CPROG
          IS_LAYOUT          = W_LAYOUT
          IT_FIELDCAT        = T_FCAT[]
        TABLES
          T_OUTTAB           = T_ITAB.
    ENDFORM.                    " display_output
    *&      Form  f4_for_variant
          text
    -->  p1        text
    <--  p2        text
    FORM F4_FOR_VARIANT .
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          IS_VARIANT = GS_VARIANT
          I_SAVE     = X_SAVE
        IMPORTING
          E_EXIT     = G_EXIT
          ES_VARIANT = GX_VARIANT
        EXCEPTIONS
          NOT_FOUND  = 2.
      IF SY-SUBRC = 2.
        MESSAGE ID SY-MSGID TYPE 'S'      NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
        IF G_EXIT = SPACE.
          P_VARI = GX_VARIANT-VARIANT.
        ENDIF.
      ENDIF.
    ENDFORM.                    " f4_for_variant
    *&      Form  pai_of_selection_screen
          text
    -->  p1        text
    <--  p2        text
    FORM PAI_OF_SELECTION_SCREEN .
      IF NOT P_VARI IS INITIAL.
        MOVE GS_VARIANT TO GX_VARIANT.
        MOVE P_VARI TO GX_VARIANT-VARIANT.
        CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
          EXPORTING
            I_SAVE     = X_SAVE
          CHANGING
            CS_VARIANT = GX_VARIANT.
        GS_VARIANT = GX_VARIANT.
      ELSE.
        PERFORM VARIANT_INIT.
      ENDIF.
    ENDFORM.                    " pai_of_selection_screen
    *&      Form  variant_init
          text
    -->  p1        text
    <--  p2        text
    FORM VARIANT_INIT .
      CLEAR GS_VARIANT.
      GS_VARIANT-REPORT = G_REPID.
    ENDFORM.                    " variant_init

  • Dynamic Report layout issue - Report builder 10g

    Hi all,
    I try to implement a dynamic report that have:
    1.my_header - variable elasticity
    2.my_footer - variable elasticity - the bottom it is anchored to the bottom of my_report frame
    3.my_body - variable elasticity -must fit between the header and footer - the top it is anchored to the bottom of my_header
    All these frames are inside a main frame my_report(same height and width as body section).
    The issue is that when my_body (I have another frame and a repeating frame inside it) has more than one page, the data overrides the footer data.
    I don't want to put header and footer on margin.
    It will be great if you can give me some hints, or if it is possible to implement such a report
    Thanks,
    Gicu Buimaga

    What exactly do you mean? Are you running out of space on the page when running the report? That can only be resolved by modifying your layout.
    Or are you running out of space in the Layout Editor? In the layout editor you can make a page as long as you want. One physical page is not limited to be designed between the page boundaries you see in the Layout Editor.
    The frames you are using have to have a Variable Vertical Elasticity, though.

  • Fixed columns in dynamic report ( ?horizontal-break-table:1? )

    Hi
    I have a dynamic report that could strech over more than one page horozontally. I use the <?horizontal-break-table:1?> tag on my first header column to show this on every page, but I also need to show the last column on every page. That meens that I have a fixed column on each end of my dynamic report, the last one is just a signatur field so its no logic to it , but its important to show it on every page.
    Any tips on this ?
    PS.
    Sry if this is a noob question, this is not really my knowlegde area, but have to fix it anyhow :)
    Tim

    Robert,
    It sounds like you want a completely populated table regardless of the input data.  To achieve you will need to create a "dummy table" in your database, either as an actual table, or by just doing a view, it's your choice.  Here is a method for the view:
    select '2009-M01' as Dim1
    union
    select '2009-M02' as Dim1
    union
    select '2009-M12' as Dim1
    Next you'll have to introduce this to your universe as a "dummy table".  In WebI, go to Edit Query and click add query, then add Dim1 to your result objects panel.  After you run your query you can perform Merge Dimensions on Dim1 to the first dimension from your report, and voila, you'll have a fully populated table.
    Thanks,
    John

  • ISQL*PLUS dynamic reports - how to pass connect string in the URL

    When we run dynamic reports thru ISQL*PLUS, does anyone know how
    to pass the connect string info in the URL
    The following is the code from ISQL*PLUS users guide but it
    dosen't show how to pass the connect string
    when I tried to pass hr/your_secret_password@dbserver for userid
    I got an error msg
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    <HTML>
    <HEAD>
    <TITLE>iSQL*Plus Dynamic Report</TITLE>
    </HEAD>
    <BODY>
    <H1>iSQL*Plus Report</H1>
    <H2>Query by Employee ID</H2>
    <FORM METHOD=get ACTION="http://host.domain/isqlplus">
    <INPUT TYPE="hidden" NAME="userid"
    VALUE="hr/your_secret_password">
    <INPUT TYPE="hidden" NAME="script"
    VALUE="http://host.domain/employee_id.sql">
    Enter employee identification number: <INPUT TYPE="text"
    NAME="eid" SIZE="10">
    <INPUT TYPE="submit" VALUE="Run Report">
    </FORM>
    </BODY>
    </HTML>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Thanks
    Jay

    The form you use should work when your change
    "hr/your_secret_password" to a valid username, password
    and connect identifier like "hr/hr@MYDB". Don't forget to
    configure MYDB in your tnsnames.ora file on the machine that has
    the iSQL*Plus server.
    What was the error you got?
    The full URL syntax did seem to go missing from the 9.0.1 doc.
    See below for the full syntax. This should be appearing in a
    forthcoming FAQ.
    - CJ
    What syntax can I use to run an iSQL*Plus Dynamic Report?
    You can run a dynamic report by entering the report URI in the
    location field of your browser, or by making the report server a
    link or the action for an HTML form. The iSQL*Plus 9i Release 1
    documentation has examples of these.
    The general syntax for running a dynamic report is:
    {uri}?[userid=logon&]script=location[&param...]
    where uri
    Represents the Uniform Resource Identifier (URI)
    of the iSQL*Plus Server, for example:
    http://host.domain/isqlplus
    where logon
    Represents the log in to the database to which you
    want to connect:
    {username[/password][@connect_identifier]}
    where location
    Represents the URI of the script you want to run.
    The syntax is:
    http://[host.domain/script_name]
    The host serving the script does not have to be
    the same as the machine running the iSQL*Plus server.
    where param
    Specifies the named parameters for the script you
    want to run.
    Named parameters consist of varname=value pairs.
    iSQL*Plus will define the variable varname to equal value prior
    to executing the script e.g.
    ...script=http://server/s1.sql&var1=hello&var2=world
    This is equivalent to the SQL*Plus commands:
    SQL> define var1=hello
    SQL> define var2=world
    SQL> @http://server/s1.sql
    iSQL*Plus, SQL*Plus and SQL keywords are reserved
    and must not be used as the variable names (varname). Note also,
    that since variables are delimited by the ampersand character,
    there is no requirement to enclose space delimited values with
    quotes. However, to embed the ampersand character itself in the
    value, it will be necessary to use quotes.
    For compatibility with older scripts using the &1
    variable syntax, varname may be replaced with the equivalent
    variable position as in:
    ...script=http://server/s1.sql&1=hello&2=world
    Note the & is the URL parameter separator and not
    related to the script's substitution variable syntax.
    Commands and script parameters may be given in any
    order in the dynamic report URI. However, please note that if any
    parameters begin with reserved keywords such as "script" or
    "userid" then it may be interpreted as a command rather than a
    literal parameter.

  • Need correction for dynamic report

    Hi Experts,
    As i have very less experience in SAP , can anyone please help me.
    The report code i attached here generate only 10 columns in the report and all the lines in internal table i am showing in these 10 columns, the problem is if i have more that 10 lines in the tline(script for long material text- MM03) then it leaves those lines, so
    I need to create a dynamic report for this which will create columns depending on the lines in the tline.As i dnt no much about ALV i read so namy things but not able to make it dynamic
    Please, can anyone help me by doing changes in this code and make it dynamic report/ALV
    REPORT  zmm_test_mat_desc.
    TABLES : ekpo,makt, t001w.
    TYPE-POOLS: slis.
    DATA : thread LIKE thead.
    DATA : l_index LIKE sy-tabix.
    DATA : p_index LIKE sy-tabix.
    DATA: BEGIN OF int_out OCCURS 0,
    matnr LIKE makt-matnr,
    maktx LIKE makt-maktx,
    tdline1 LIKE tline-tdline,
    tdline2 LIKE tline-tdline,
    tdline3 LIKE tline-tdline,
    tdline4 LIKE tline-tdline,
    tdline5 LIKE tline-tdline,
    tdline6 LIKE tline-tdline,
    tdline7 LIKE tline-tdline,
    tdline8 LIKE tline-tdline,
    tdline9 LIKE tline-tdline,
    tdline10 LIKE tline-tdline,
    werks LIKE ekpo-werks,
    END OF int_out.
    DATA: BEGIN OF int_out_new OCCURS 0,
    matnr LIKE makt-matnr,
    maktx LIKE makt-maktx,
    tdline1 LIKE tline-tdline,
    tdline2 LIKE tline-tdline,
    tdline3 LIKE tline-tdline,
    tdline4 LIKE tline-tdline,
    tdline5 LIKE tline-tdline,
    tdline6 LIKE tline-tdline,
    tdline7 LIKE tline-tdline,
    tdline8 LIKE tline-tdline,
    tdline9 LIKE tline-tdline,
    tdline10 LIKE tline-tdline,
    tline LIKE tline OCCURS 0,
    werks LIKE ekpo-werks,
    END OF int_out_new.
    DATA: it_tlines LIKE tline OCCURS 10 WITH HEADER LINE.
    ****ALV list definintion
    DATA: ws_cat TYPE slis_fieldcat_alv ,
    int_fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    DATA: g_container TYPE scrfname VALUE 'BCALV_GRID_DEMO_0100_CONT1',
    g_custom_container TYPE REF TO cl_gui_custom_container.
    DATA : it_heading TYPE slis_t_listheader WITH HEADER LINE.
    *DATA : it_fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    DATA : lay TYPE slis_layout_alv.
    DATA : it_sort_subtotal TYPE slis_t_sortinfo_alv WITH HEADER LINE.
    DATA : it_event TYPE slis_t_event WITH HEADER LINE.
    DATA: v_repid LIKE sy-repid.
    *selection-screen
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_werks FOR ekpo-werks OBLIGATORY .
    SELECT-OPTIONS: s_matnr FOR makt-matnr OBLIGATORY .
    SELECTION-SCREEN END OF BLOCK b1.
    INITIALIZATION.
    AT SELECTION-SCREEN.
      SELECT SINGLE * FROM t001w WHERE werks IN s_werks.
      IF sy-subrc NE 0.
        MESSAGE e001(319) WITH 'Plant does not Exist!'.
      ENDIF.
      SELECT SINGLE * FROM makt WHERE matnr IN s_matnr.
      IF sy-subrc <> 0.
        MESSAGE e001(319) WITH 'Material does not Exist!'.
      ENDIF.
    START-OF-SELECTION.
      BREAK-POINT.
      PERFORM get_data.
    PERFORM field_catalog.
    PERFORM display_data.
    END-OF-SELECTION.
    *FORM GET_DATA.
    FORM get_data.
      DATA: l_index LIKE sy-tabix.
    *To Fetch Data From Makt.
      SELECT b~werks a~matnr a~maktx
      INTO CORRESPONDING FIELDS OF TABLE int_out
      FROM makt AS a INNER JOIN marc AS b ON a~matnr = b~matnr
      WHERE a~matnr IN s_matnr
      AND b~werks IN s_werks.
      LOOP AT int_out.
        l_index = sy-tabix.
    read table int_out_new with key matnr = int_out-matnr.
        int_out_new-werks = int_out-werks.
        int_out_new-matnr = int_out-matnr.
        int_out_new-maktx = int_out-maktx.
        thread-tdname = int_out-matnr.
        CALL FUNCTION 'READ_TEXT'
          EXPORTING
            client                  = sy-mandt
            id                      = 'BEST'
            language                = sy-langu
            name                    = thread-tdname
            object                  = 'MATERIAL'
          TABLES
            lines                   = it_tlines
          EXCEPTIONS
            id                      = 1
            language                = 2
            name                    = 3
            not_found               = 4
            object                  = 5
            reference_check         = 6
            wrong_access_to_archive = 7
            OTHERS                  = 8.
    *Loop on it_tlines where long text is coming .
        LOOP AT it_tlines.
          IF sy-subrc = 0.
            p_index = sy-tabix.
            IF p_index = 1.
              int_out_new-tdline1 = it_tlines-tdline.
            ELSEIF p_index = 2.
              int_out_new-tdline2 = it_tlines-tdline.
            ELSEIF p_index = 3.
              int_out_new-tdline3 = it_tlines-tdline.
            ELSEIF p_index = 4.
              int_out_new-tdline4 = it_tlines-tdline.
            ELSEIF p_index = 5.
              int_out_new-tdline5 = it_tlines-tdline.
            ELSEIF p_index = 6.
              int_out_new-tdline6 = it_tlines-tdline.
            ELSEIF p_index = 7.
              int_out_new-tdline7 = it_tlines-tdline.
            ELSEIF p_index = 8.
              int_out_new-tdline8 = it_tlines-tdline.
            ELSEIF p_index = 9.
              int_out_new-tdline9 = it_tlines-tdline.
            ELSEIF p_index GE 10.
              int_out_new-tdline10 = it_tlines-tdline.
            ENDIF.
          ENDIF.
        ENDLOOP.
        DELETE ADJACENT DUPLICATES FROM int_out .
        APPEND int_out_new.
        CLEAR int_out_new.
      ENDLOOP.
    Field Catalog
    ***MATERIAL NO no
      int_fcat-tabname = 'INT_OUT_NEW'.
      int_fcat-fieldname = 'WERKS'.
      int_fcat-reptext_ddic = 'Plant'.
      APPEND int_fcat .
    ***MATERIAL NO no
      int_fcat-tabname = 'INT_OUT_NEW'.
      int_fcat-fieldname = 'MATNR'.
      int_fcat-reptext_ddic = 'Material N0'.
      APPEND int_fcat .
    *material Short Description
      int_fcat-tabname = 'INT_OUT_NEW'.
      int_fcat-fieldname = 'MAKTX'.
      int_fcat-reptext_ddic = 'Material Short Description'.
      int_fcat-datatype = 'CHAR'.
      int_fcat-outputlen = '45'.
      APPEND int_fcat .
    Material Long Description1
      int_fcat-tabname = 'INT_OUT_NEW'.
      int_fcat-fieldname = 'TDLINE1'.
      int_fcat-reptext_ddic = 'Material Long Description1'.
      int_fcat-datatype = 'CHAR'.
      int_fcat-outputlen = '75'.
      APPEND int_fcat .
    Material Long Description2
      int_fcat-tabname = 'INT_OUT_NEW'.
      int_fcat-fieldname = 'TDLINE2'.
      int_fcat-reptext_ddic = 'Material Long Description2'.
      int_fcat-datatype = 'CHAR'.
      int_fcat-outputlen = '75'.
      APPEND int_fcat .
    Material Long Description3
      int_fcat-tabname = 'INT_OUT_NEW'.
      int_fcat-fieldname = 'TDLINE3'.
      int_fcat-reptext_ddic = 'Material Long Description3'.
      int_fcat-datatype = 'CHAR'.
      int_fcat-outputlen = '75'.
      APPEND int_fcat .
    Material Long Description4
      int_fcat-tabname = 'INT_OUT_NEW'.
      int_fcat-fieldname = 'TDLINE4'.
      int_fcat-reptext_ddic = 'Material Long Description4'.
      int_fcat-datatype = 'CHAR'.
      int_fcat-outputlen = '75'.
      APPEND int_fcat .
    Material Long Description5
      int_fcat-tabname = 'INT_OUT_NEW'.
      int_fcat-fieldname = 'TDLINE5'.
      int_fcat-reptext_ddic = 'Material Long Description5'.
      int_fcat-datatype = 'CHAR'.
      int_fcat-outputlen = '75'.
      APPEND int_fcat .
    Material Long Description5
      int_fcat-tabname = 'INT_OUT_NEW'.
      int_fcat-fieldname = 'TDLINE5'.
      int_fcat-reptext_ddic = 'Material Long Description5'.
      int_fcat-datatype = 'CHAR'.
      int_fcat-outputlen = '75'.
      APPEND int_fcat .
    Material Long Description5
      int_fcat-tabname = 'INT_OUT_NEW'.
      int_fcat-fieldname = 'TDLINE5'.
      int_fcat-reptext_ddic = 'Material Long Description5'.
      int_fcat-datatype = 'CHAR'.
      int_fcat-outputlen = '75'.
      APPEND int_fcat .
    Material Long Description6
      int_fcat-tabname = 'INT_OUT_NEW'.
      int_fcat-fieldname = 'TDLINE6'.
      int_fcat-reptext_ddic = 'Material Long Description6'.
      int_fcat-datatype = 'CHAR'.
      int_fcat-outputlen = '75'.
      APPEND int_fcat .
    Material Long Description7
      int_fcat-tabname = 'INT_OUT_NEW'.
      int_fcat-fieldname = 'TDLINE7'.
      int_fcat-reptext_ddic = 'Material Long Description7'.
      int_fcat-datatype = 'CHAR'.
      int_fcat-outputlen = '75'.
      APPEND int_fcat .
    Material Long Description8
      int_fcat-tabname = 'INT_OUT_NEW'.
      int_fcat-fieldname = 'TDLINE8'.
      int_fcat-reptext_ddic = 'Material Long Description8'.
      int_fcat-datatype = 'CHAR'.
      int_fcat-outputlen = '75'.
      APPEND int_fcat .
    Material Long Description9
      int_fcat-tabname = 'INT_OUT_NEW'.
      int_fcat-fieldname = 'TDLINE9'.
      int_fcat-reptext_ddic = 'Material Long Description9'.
      int_fcat-datatype = 'CHAR'.
      int_fcat-outputlen = '75'.
      APPEND int_fcat .
    Material Long Description10
      int_fcat-tabname = 'INT_OUT_NEW'.
      int_fcat-fieldname = 'TDLINE10'.
      int_fcat-reptext_ddic = 'Material Long Description10'.
      int_fcat-datatype = 'CHAR'.
    int_fcat-outputlen = '75'.
      APPEND int_fcat .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program = sy-repid
          it_fieldcat        = int_fcat[]
        TABLES
          t_outtab           = int_out_new
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
    ENDFORM. "display_data
    Regards
    Nik.

    Nikhil,
    Instead of declaring 10 lines, please declare a variable of type STRING.
    Then append each line of your material text and concatenate it into the string.
    Then you can comfartably have one long text and have it displayed to the user.
    Please let us know if any further information is required.
    Thanks
    Ganesh.S

  • How can i create an dynamic report in Java

    hello everybody,
    I want to make dynamic reports in Java. Report contain data and images with good layout.. such as crystal reports presentation..
    Reports fields decided at run time or we can say that it is generated according to user requirement...
    can it is possible in Java. If it is then which tool is better for it..
    please suggest me.. this is very urgent requirement for me...

    i don't know what types of tools are avaiable in market... Tools for what? You still didn't tell us what exactly you want to do.
    i just imagin that
    "An user create a database dynamically on server
    databaseNobody "dynamically creates a database".
    and he decide reports desgin according to
    his requirement..... we provide an control for this
    type possibilities....."
    so this is question is build in my mind.. so i
    forward this question to this forums..
    I am just going to check the physibility of my mind
    imagination...Feasibility you mean. IMHO, the feasibility of creating that stuff yourself is very low. Reinventing the wheel usually doesn't make it better, and it's likely to be more expensive to pay you for creating an inferior solution (not because of lack of skills, but simply because the available products had a few years time to grow, feature-wise) than to simply buy the licenses. Look at Crystal Reports or JFreeChart or Jasper Reports. Or use Google to look up J2EE-based reporting libraries. There might be more.
    Which of these is best, I don't know, I never used any of those. Also, the definition of "best" changes with the requirements. What's better, a Ferrari or a truck?

  • Dynamic reporting in Crystal Reports XI

    Hi,
    Need to know about dynamic reporting feature using Crystal Reports XI.
    Is Business View helpful for dynamic reporting?
    Any link to get some material on dynamic reporting/ business views?
    appricate your comments.
    Thanks,
    Cherry

    In the SAP Service Marketplace, go to http://help.sap.com .  Under the Business Objects tab you can select Business Objects Enterprise, and in there is a Business Views Administrator Guide.  That should provide you all of the basic information on Business Views, how they work and how to use them.
    Business Views can be helpful to you depending on what you are looking to do with your data.

  • Financial Reporting making of Dynamic Reports v 11.1.1.2

    Hi,
    I have recently going through designing of a dynamic report in Financial Reporting which consists of financial representation as follows:
    There are some data which is there in the Schedules of accounts.
    Now the user wants to a make a drill down of all the account codes there in the schedule like
    schedule 13 other income.
    All the account codes in Schedule should bw drill down which I am able to make.
    Now for each account codes they want a sorting in descending order to find out which entity is contributing to how much revenue for the oraganistion or
    similarly for the cost which are in other schedules like 14,15,16 tc.
    After that they want a insertion of cell text function for each cell having a combination of account codes and entity which is having a adverse variance and analsis
    for the same.
    If someone can throw a light on this about how to do this.

    I think you have already posted this problem on another post, I said it is possible it could be a ports issue.
    Have a look at the following http://www.oracle.com/technetwork/middleware/bi-foundation/epm-component-communications-11121-354680.xls
    Select FR studio as the client and it should give indication to the ports that need to be opened.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to use both Static and dynamic Reports in WAD using a single template.

    Hi,
    I have 2 reports - Report1 & Report2. Report1 is a static report with 3 column in it. In WAD user does not want to see the third series in the chart so I have made series3 invisible in the chart.
    I am calling the Report2 via 'SET_DATA_PROVIDER_PARAMETERS' in the button option.
    Now the issue is that, Report2 is a dynamic report which is using a calyear vaiable range. As Report2 is using the template of Report1, Series3 of Report2 also gets hidden.
    Any solution for this?
    Thanks
    Nisha

    Hi Nisha,
    After setting the Report 2 DP thru SET_DATA_PROVIDER_PARAMETERS, you can use one more command SET_ITEM_PARAMETERS on the Chart webitem & edit the Series to make it visible. If there is a way to reset the DP back to Report 1, then you must once again use SET_ITEM_PARAMETERS to hide the Series.
    Or you can use another Chart webitem for Report 2 DP & make the Chart webitem for Report 1 hidden & the Chart webitem for Report 2 visible using SET_ITEM_PARAMETERS after setting Report 2 DP using SET_DATA_PROVIDER_PARAMETERS.
    --Priya

  • Dynamic Reports in java application

    Hi,
    I want to create dynamic reports in an java standalone application, I have downloaded the Jfreereport <http://sourceforge.net/projects/jfreereport>
    I'm not sure, whether it could get data from a JDBC source. (or is there anyother solution to generate dynamic reports in a java application?).
    Thanks in advance,
    Payam

    I generate reports from a webserver ( Tomcat ) in PDF using iText ( www.lowagie.com/iText ). It works great. JFreereport is also using this iText and you shouldn't have any problems using JDBC. Try to read the tutorial first about iText first. This will give you an idea how JFreereport works.
    - Dieter

  • Dynamic report output in a webdynpro alv

    Hi,
    I have created a dynamic report in the R/3 system . In this report, i am creating a report program within the report and subsequently executing this dynamically created report and displaying in the ALV..
    Is it possible to handle such a scenario in a webdynpro ALV. One option is to use ITS and display the report in the portal but is there some other way so that i can directly view this report in an alv grid in a view.
    all help appreciated!!
    regards,
    Priyank

    Hi Priyank,
    This could be one of the solution:
    1] Run the report in background mode (using submit statement, dn't forget to give printer as LOCL), get the spool id programatically. Use the FM's CONVERT_OTFSPOOLJOB_2_PDF or CONVERT_ABAPSPOOLJOB_2_PDF.
    Which returns the ouput of table tline, convert this to xtring and bind it to xtring attribute.
    In view add a interactive form and bind the xstring attribute to the Interactive form.
    By following the above steps, we can display the result in the PDF in WD ABAP.
    2] The report result is ALV and in most of the cases we generally do not have function modules or any other easy way to get the output.
    In such cases the best approach which we follow is, to run this in background mode and generate the spool and display the ouput in PDF.
    3] But if intertactive form is not present in your requirement then we need to debug the logic of the report (if no FM or class present) and get the results and display it in the View.
    You can create a service which takes the parameters of the report, submits it and
    transfers the result to HTML. In a view you use an IFRame which takes the URL of the service and shows the result HTML.
    just additionally read this thread,
    Display simple ABAPLIST
    Here an IFrame is used to display HTML output of report. But as IFRame gets obsolete the Suresh's solution seems to be pretty cool.
    Hope this will help you!
    Cheers,
    Darshna.

  • Create a dynamic report

    Hi,
    I would like to create a dynamic report in crystal report.
    put data fields, text fields, criteria parameters on report in run time.
    I will appreciate if you can send me an example code in java that creates and shows the report.
    Thanks,
    Anat

    So find the appropriate website and forum and ask there.

  • Financial Reporting Studio: Formula for percentages in Dynamic report

    Hi,
    I have a formula problem in Financial Reporting Studio vers. 9.20.582. I created a dynamic report with four columns:
    1. Column: Entities
    Entity A, Entity B
    2. Column: Accounts
    Account A, Account B, Account C
    3. Column A: Accounts
    Data for a selected period
    4. Column B: Formula
    Percentage Account B to Account A and Account C to Account A per each Entity
    My question is: Could I create a formula in 4th column that shows a percentage of Account B in comparison to Account A for each Entity (everything in one cell)?
    Because when I use for example the Formula Percentoftotal([a], [a,1(1)]) it shows for second entity B the wrong percentages.
    I hope this was understandable.
    Thank you very much for your help.
    Chris
    Edited by: user8009251 on 14.04.2010 00:45
    Edited by: user8009251 on 14.04.2010 00:46

    Hi
    Good question? I think, there is a solution.
    You can use the concept of multiple grid here.
    Please keep the referred grid at one place and use another grid where you want the formulas.
    Please mail me for further info: [email protected]

Maybe you are looking for

  • AD External Authentication Plug-In verification issue

    We are working on a Proof of Concept instance to integrate MS AD with OID for the first time for E-Biz 11i. 1) I completed the bulk load of all the existing users from AD to OID successfully 2) completed enabling the syncrhonization profile 3) Ran th

  • Report To spool

    hi all i am writing a report in which at the end i get a internal table as a output. i have to send this table output as a work item to agent. now the question is even though the report will be running as a batch process. i have to send this output t

  • Extremely High Temperatures

    I have a new 2011 Macbook Pro 17". With the i7-2760QM processor. Anyway my CPU idle temp sits at around 65C, to me this is crazy.  No idea why it should be this high. In addition while gaming I am seeing temps as high as 100C.  What can I do to decre

  • Can I use my German Iphone in the USA?

    In October I am going to stay for 15 months in New York! My Iphone 4s is at the Moment tweo weeks old, so of course I want to take it with me. Can I use my German Iphone in America? And what do I need? A new contract? Thanks for your help

  • Long sms 6310i

    At this moment i have a Nokia 6310i but it seems not possible to write a long sms. Also when receiving a longer sms this text is split and is received in several short (160) sms. Is ther any setting I can change to resolve this problem? Thx