How to display the multiple lines text in a single - String, StringBuffer

Hi,
I have a textarea field named Decription which contains more than one line seperated by new line.I need to display those five lines in a single text without breaking. Is it possible? I am getting ArrayIndexOutOfBoundsException while i reached to the end of the line. Plz help me how to align the below code so that i can display the lines as a single line in my excel sheet.
                    if(op.getDescription()!=null)
                        String[] oppDescs = op.getDescription().split("\n");
                        StringBuffer sb = new StringBuffer();
                        for(int i1=0; i<=oppDescs.length-1;++i1)
                            *writeFile(sb.append(oppDescs[i1]), valueWriter);*
                     } else {
                        writeFile(op.getDescription(), valueWriter);
private void writeFile(java.lang.Object value,PrintWriter valueWriter)
        if(value!=null)
            valueWriter.print(value);   
    }Thanks and Regards

previous was java1.5
heres a 1.1 - 1.4 version
String[] oppDescs = op.getDescription().split("\n");
StringBuffer sb = new StringBuffer();
for(int i = 0; i < oppDescs.length : i++){
  sb.append(oppDescs);
sb.append( '\t' );
writeFile(sb.toString(), valueWriter );Edited by: simon_orange on 31-Oct-2008 13:02                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • How to handle the multiple line items in the Inbound idoc FM

    Hi ,
    Can any body give me how to handle the multiple line item in the idoc when we reprocessing it from workitem....
    Thanks in Advance,,,,
    Regards,
    Bharani

    Hi ,
    Can any body give me how to handle the multiple line item in the idoc when we reprocessing it from workitem....
    Thanks in Advance,,,,
    Regards,
    Bharani

  • How to do the multiple-line String at JList?

    hey everyone,
    i want to create a JList have to display multiple-line string.
    i have use String a="text1"+"\n"+"text2" inside my JList...
    the "\n" change to a sequare box...
    how cum like that.................??
    i need ur kindly helping...

    Because the default renderer for a JList element is a
    JLabel, and that is how JLabel behaves. The question
    "how to do a multiple-line JLabel" has been asked
    hundreds of times in this forum, search for that.i have search for it already but i no get it..anything!
    so, can u give me the url for me? thank you!

  • How to display the blank lines in between the message using SO_NEW_DOCUMENT

    Hi,
    I want to display the blank lines in between the paragarph of message using the function module  SO_NEW_DOCUMENT_ATT_SEND_API1.
    Regards
    Nagendra

    Hi Rajesh,
    Try using this code:
    CLASS: cl_abap_char_utilities DEFINITION LOAD.
    data: lf TYPE C VALUE cl_abap_char_utilities=>CR_LF.
    move lf to wa_lines.
    append wa_lines to li_lines.
    Hope this helps!
    Regards,
    Saumya

  • How to get the multiple  lines on the header part in ALV

    HI all,
    In my program i am using the ALV- Grid functionality through methods. I have 2 different layouts in the same screen , for this i have 2 containers and i am displaying the title through the gird title now i need to add the few more lines under the title .
    Please suggest me, how can i proceede now.
    Thanks
    Giridhar

    Hi,
    check this sample code, i did it using splitter container. check it, it is weel documented to know what are required ....
    REPORT  ZTEST_ALV_TOP    MESSAGE-ID ZZ                           .
    DATA: G_GRID TYPE REF TO CL_GUI_ALV_GRID.
    DATA: L_VALID TYPE C,
          V_FLAG,
          V_DATA_CHANGE,
          V_ROW TYPE LVC_S_ROW,
          V_COLUMN TYPE LVC_S_COL,
          V_ROW_NUM TYPE LVC_S_ROID.
    DATA: IT_ROW_NO TYPE LVC_T_ROID,
          X_ROW_NO TYPE LVC_S_ROID.
    DATA:BEGIN OF  ITAB OCCURS 0,
         VBELN LIKE LIKP-VBELN,
         POSNR LIKE LIPS-POSNR,
         CELLCOLOR TYPE LVC_T_SCOL, "required for color
         DROP(10),
         END OF ITAB.
    "The Below Definitions Must.....
    DATA:
    * Reference to document
           DG_DYNDOC_ID       TYPE REF TO CL_DD_DOCUMENT,
    * Reference to split container
           DG_SPLITTER          TYPE REF TO CL_GUI_SPLITTER_CONTAINER,
    * Reference to grid container
           DG_PARENT_GRID     TYPE REF TO CL_GUI_CONTAINER,
    * Reference to html container
           DG_HTML_CNTRL        TYPE REF TO CL_GUI_HTML_VIEWER,
    * Reference to html container
           DG_PARENT_HTML     TYPE REF TO CL_GUI_CONTAINER.
    "up to here
    *       CLASS lcl_event_handler DEFINITION
    CLASS LCL_EVENT_HANDLER DEFINITION .
      PUBLIC SECTION .
        METHODS:
    **Hot spot Handler
        HANDLE_HOTSPOT_CLICK FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
                          IMPORTING E_ROW_ID E_COLUMN_ID ES_ROW_NO,
    **Double Click Handler
        HANDLE_DOUBLE_CLICK FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
                                         IMPORTING E_ROW E_COLUMN ES_ROW_NO,
        TOP_OF_PAGE FOR EVENT TOP_OF_PAGE              "event handler
                             OF CL_GUI_ALV_GRID
                             IMPORTING E_DYNDOC_ID.
    *        END_OF_LIST FOR EVENT end_of_list              "event handler
    *                         OF CL_GUI_ALV_GRID
    *                         IMPORTING E_DYNDOC_ID.
    ENDCLASS.                    "lcl_event_handler DEFINITION
    *       CLASS lcl_event_handler IMPLEMENTATION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
    *Handle Hotspot Click
      METHOD HANDLE_HOTSPOT_CLICK .
        CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
        V_ROW  = E_ROW_ID.
        V_COLUMN = E_COLUMN_ID.
        V_ROW_NUM = ES_ROW_NO.
    *    MESSAGE I000 WITH V_ROW 'clicked'.
        CLEAR IT_ROW_NO[].
        X_ROW_NO-ROW_ID = V_ROW.
        APPEND X_ROW_NO TO IT_ROW_NO .
        CALL METHOD G_GRID->SET_SELECTED_ROWS
          EXPORTING
            IT_ROW_NO = IT_ROW_NO.
      ENDMETHOD.                    "lcl_event_handler
    *Handle Double Click
      METHOD  HANDLE_DOUBLE_CLICK.
        CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
        V_ROW  = E_ROW.
        V_COLUMN = E_COLUMN.
        V_ROW_NUM = ES_ROW_NO.
        IF E_COLUMN = 'VBELN'.
          SET PARAMETER ID 'VL' FIELD ITAB-VBELN.
          CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
        ENDIF.
        IF E_COLUMN = 'POSNR'.
          SET PARAMETER ID 'VL' FIELD ITAB-VBELN.
          CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN."
        ENDIF.
      ENDMETHOD.                    "handle_double_click
    *  METHOD END_OF_LIST.                   "implementation
    ** Top-of-page event
    *    PERFORM EVENT_TOP_OF_PAGE USING DG_DYNDOC_ID.
    *  ENDMETHOD.                            "top_of_page
        METHOD TOP_OF_PAGE.                   "implementation
    * Top-of-page event
        PERFORM EVENT_TOP_OF_PAGE USING DG_DYNDOC_ID.
      ENDMETHOD.                            "top_of_page
    ENDCLASS.                    "LCL_EVENT_HANDLER IMPLEMENTATION
    *&             Global Definitions
    DATA:      G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,"Container1
                G_HANDLER TYPE REF TO LCL_EVENT_HANDLER. "handler
    DATA: OK_CODE LIKE SY-UCOMM,
          SAVE_OK LIKE SY-UCOMM,
          G_CONTAINER1 TYPE SCRFNAME VALUE 'TEST',
          GS_LAYOUT TYPE LVC_S_LAYO.
    data: v_lines type i.
    data: v_line(3) type c.
    *- Fieldcatalog for First and second Report
    DATA: IT_FIELDCAT  TYPE  LVC_T_FCAT,
          X_FIELDCAT TYPE LVC_S_FCAT,
          LS_VARI  TYPE DISVARIANT.
    *                START-OF_SELECTION
    START-OF-SELECTION.
      SELECT VBELN
             POSNR
             FROM LIPS
             UP TO 20 ROWS
             INTO CORRESPONDING FIELDS OF TABLE ITAB.
    describe table itab lines v_lines.
    END-OF-SELECTION.
      IF NOT ITAB[] IS INITIAL.
        CALL SCREEN 100.
      ELSE.
        MESSAGE I002 WITH 'NO DATA FOR THE SELECTION'(004).
      ENDIF.
    *&      Form  CREATE_AND_INIT_ALV
    *       text
    FORM CREATE_AND_INIT_ALV .
      DATA: LT_EXCLUDE TYPE UI_FUNCTIONS.
      "attention.....from here
      "split your container here...into two parts
      "create the container
      CREATE OBJECT G_CUSTOM_CONTAINER
               EXPORTING CONTAINER_NAME = G_CONTAINER1.
      "this is for top of page
    * Create TOP-Document
      CREATE OBJECT DG_DYNDOC_ID
                       EXPORTING STYLE = 'ALV_GRID'.
    * Create Splitter for custom_container
      CREATE OBJECT DG_SPLITTER
                 EXPORTING PARENT  = G_CUSTOM_CONTAINER
                           ROWS    = 2
                           COLUMNS = 1.
    * Split the custom_container to two containers and move the reference
    * to receiving containers g_parent_html and g_parent_grid
      "i am allocating the space for grid and top of page
      CALL METHOD DG_SPLITTER->GET_CONTAINER
        EXPORTING
          ROW       = 1
          COLUMN    = 1
        RECEIVING
          CONTAINER = DG_PARENT_HTML.
      CALL METHOD DG_SPLITTER->GET_CONTAINER
        EXPORTING
          ROW       = 2
          COLUMN    = 1
        RECEIVING
          CONTAINER = DG_PARENT_GRID.
    *  CALL METHOD DG_SPLITTER->GET_CONTAINER
    *    EXPORTING
    *      ROW       = 2
    *      COLUMN    = 1
    *    RECEIVING
    *      CONTAINER = DG_PARENT_HTML.
    *  CALL METHOD DG_SPLITTER->GET_CONTAINER
    *    EXPORTING
    *      ROW       = 1
    *      COLUMN    = 1
    *    RECEIVING
    *      CONTAINER = DG_PARENT_GRID.
      "you can set the height of it
    * Set height for g_parent_html
      CALL METHOD DG_SPLITTER->SET_ROW_HEIGHT
        EXPORTING
          ID     = 1
          HEIGHT = 5.
      "from here as usual..you need to specify parent as splitter part
      "which we alloted for grid
      CREATE OBJECT G_GRID
             EXPORTING I_PARENT = DG_PARENT_GRID.
    * Set a titlebar for the grid control
      CLEAR GS_LAYOUT.
      GS_LAYOUT-GRID_TITLE = TEXT-003.
      GS_LAYOUT-ZEBRA = SPACE.
      GS_LAYOUT-CWIDTH_OPT = 'X'.
      GS_LAYOUT-NO_ROWMARK = 'X'.
      GS_LAYOUT-CTAB_FNAME = 'CELLCOLOR'.
      CALL METHOD G_GRID->REGISTER_EDIT_EVENT
        EXPORTING
          I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER.
      CREATE OBJECT G_HANDLER.
      SET HANDLER G_HANDLER->HANDLE_DOUBLE_CLICK FOR G_GRID.
      SET HANDLER G_HANDLER->HANDLE_HOTSPOT_CLICK FOR G_GRID.
    *  SET HANDLER G_HANDLER->END_OF_LIST FOR G_GRID.
      SET HANDLER G_HANDLER->TOP_OF_PAGE FOR G_GRID.
      DATA: LS_CELLCOLOR TYPE LVC_S_SCOL. "required for color
      DATA: L_INDEX TYPE SY-TABIX.
      "Here i am changing the color of line 1,5,10...
      "so you can change the color of font conditionally
      LOOP AT ITAB.
        L_INDEX = SY-TABIX.
        IF L_INDEX = 1 OR L_INDEX = 5 OR L_INDEX = 10.
          LS_CELLCOLOR-FNAME = 'VBELN'.
          LS_CELLCOLOR-COLOR-COL = '6'.
          LS_CELLCOLOR-COLOR-INT = '0'.
          LS_CELLCOLOR-COLOR-INV = '1'.
          APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
          MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
          LS_CELLCOLOR-FNAME = 'POSNR'.
          LS_CELLCOLOR-COLOR-COL = '6'.
          LS_CELLCOLOR-COLOR-INT = '0'.
          LS_CELLCOLOR-COLOR-INV = '1'.
          APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
          MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
        ENDIF.
      ENDLOOP.
    * setting focus for created grid control
      CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
        EXPORTING
          CONTROL = G_GRID.
    * Build fieldcat and set editable for date and reason code
    * edit enabled. Assign a handle for the dropdown listbox.
      PERFORM BUILD_FIELDCAT.
      PERFORM  SET_DRDN_TABLE.
    * Optionally restrict generic functions to 'change only'.
    *   (The user shall not be able to add new lines).
      PERFORM EXCLUDE_TB_FUNCTIONS CHANGING LT_EXCLUDE.
    **Vaiant to save the layout
      LS_VARI-REPORT      = SY-REPID.
      LS_VARI-HANDLE      = SPACE.
      LS_VARI-LOG_GROUP   = SPACE.
      LS_VARI-USERNAME    = SPACE.
      LS_VARI-VARIANT     = SPACE.
      LS_VARI-TEXT        = SPACE.
      LS_VARI-DEPENDVARS  = SPACE.
    **Calling the Method for ALV output
      CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
          IS_VARIANT           = LS_VARI
          IS_LAYOUT            = GS_LAYOUT
          I_SAVE               = 'A'
        CHANGING
          IT_FIELDCATALOG      = IT_FIELDCAT
          IT_OUTTAB            = ITAB[].
      "do these..{
    * Initializing document
      CALL METHOD DG_DYNDOC_ID->INITIALIZE_DOCUMENT.
    * Processing events
      CALL METHOD G_GRID->LIST_PROCESSING_EVENTS
        EXPORTING
          I_EVENT_NAME = 'TOP_OF_PAGE'
          I_DYNDOC_ID  = DG_DYNDOC_ID.
      "end }
    * 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.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_CUT.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE_NEW_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_UNDO.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
    ENDFORM.                               " EXCLUDE_TB_FUNCTIONS
    *&      Form  build_fieldcat
    *       Fieldcatalog
    FORM BUILD_FIELDCAT .
      DATA: L_POS TYPE I.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Delivery'(024).
      X_FIELDCAT-FIELDNAME = 'VBELN'.
      X_FIELDCAT-TABNAME = 'IT_FINAL'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-NO_ZERO    = 'X'.
      X_FIELDCAT-OUTPUTLEN = '10'.
      X_FIELDCAT-HOTSPOT = 'X'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Item'(025).
      X_FIELDCAT-FIELDNAME = 'POSNR'.
      X_FIELDCAT-TABNAME = 'IT_FINAL'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-OUTPUTLEN = '5'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Drop'(025).
      X_FIELDCAT-FIELDNAME = 'DROP'.
      X_FIELDCAT-TABNAME = 'IT_FINAL'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-OUTPUTLEN = '5'.
      X_FIELDCAT-EDIT = 'X'.
      X_FIELDCAT-DRDN_HNDL = '1'.
      X_FIELDCAT-DRDN_ALIAS = 'X'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
    ENDFORM.                    " build_fieldcat
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'MAIN100'.
      SET TITLEBAR 'MAIN100'.
      IF G_CUSTOM_CONTAINER IS INITIAL.
    **Initializing the grid and calling the fm to Display the O/P
        PERFORM CREATE_AND_INIT_ALV.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  SET_DRDN_TABLE
    *       text
    FORM SET_DRDN_TABLE.
      DATA:LT_DRAL TYPE LVC_T_DRAL,
            LS_DRAL TYPE LVC_S_DRAL.
      LOOP AT ITAB .
    * First listbox (handle '1').
        IF SY-INDEX = 1.
          LS_DRAL-HANDLE = '1'.
          LS_DRAL-VALUE =  ' '.
          LS_DRAL-INT_VALUE =  ' '.
        ELSE.
          LS_DRAL-HANDLE = '1'.
          LS_DRAL-VALUE =  ITAB-POSNR.
          LS_DRAL-INT_VALUE =  ITAB-POSNR.
        ENDIF.
        APPEND LS_DRAL TO LT_DRAL.
      ENDLOOP.
    **Setting the Drop down table for Reason Code
      CALL METHOD G_GRID->SET_DROP_DOWN_TABLE
        EXPORTING
          IT_DROP_DOWN_ALIAS = LT_DRAL.
    ENDFORM.                               " set_drdn_table
    *&      Form  EVENT_TOP_OF_PAGE
    *       text
    *      -->DG_DYNDOC_ID  text
    FORM EVENT_TOP_OF_PAGE USING   DG_DYNDOC_ID TYPE REF TO CL_DD_DOCUMENT.
      "this is more clear.....check it
      "first add text, then pass it to comentry write fm
      DATA : DL_TEXT(255) TYPE C.  "Text
    * Populating header to top-of-page
      CALL METHOD DG_DYNDOC_ID->ADD_TEXT
        EXPORTING
          TEXT      = 'Test Report'
          SAP_STYLE = CL_DD_AREA=>HEADING.
    * Add new-line
      CALL METHOD DG_DYNDOC_ID->NEW_LINE.
      CLEAR : DL_TEXT.
    * Move program ID
      CONCATENATE 'Program Name :' SY-REPID
             INTO DL_TEXT SEPARATED BY SPACE.
    * Add Program Name to Document
      PERFORM ADD_TEXT USING DL_TEXT.
    * Add new-line
      CALL METHOD DG_DYNDOC_ID->NEW_LINE.
      CLEAR : DL_TEXT.
    * Move User ID
      CONCATENATE 'User ID :' SY-UNAME INTO DL_TEXT SEPARATED BY SPACE
    * Add User ID to Document
      PERFORM ADD_TEXT USING DL_TEXT.
    * Add new-line
      CALL METHOD DG_DYNDOC_ID->NEW_LINE.
      CLEAR : DL_TEXT.
    * Move count (no of records).
      move v_lines to v_line.
      CONCATENATE 'No of records :' v_line INTO DL_TEXT SEPARATED BY SPACE.
    * Add Client to Document
      PERFORM ADD_TEXT USING DL_TEXT.
    * Add new-line
      CALL METHOD DG_DYNDOC_ID->NEW_LINE.
      CLEAR : DL_TEXT.
    * Move date
      WRITE SY-DATUM TO DL_TEXT.
      CONCATENATE 'Date :' DL_TEXT INTO DL_TEXT SEPARATED BY SPACE.
    * Add Date to Document
      PERFORM ADD_TEXT USING DL_TEXT.
    * Add new-line
      CALL METHOD DG_DYNDOC_ID->NEW_LINE.
      CLEAR : DL_TEXT.
    * Move time
      WRITE SY-UZEIT TO DL_TEXT.
      CONCATENATE 'Time :' DL_TEXT INTO DL_TEXT SEPARATED BY SPACE.
    * Add Time to Document
      PERFORM ADD_TEXT USING DL_TEXT.
    * Add new-line
      CALL METHOD DG_DYNDOC_ID->NEW_LINE.
    * Populating data to html control
      PERFORM HTML.
    ENDFORM.                    " EVENT_TOP_OF_PAGE
    *&      Form  ADD_TEXT
    *       To add Text
    FORM ADD_TEXT USING P_TEXT TYPE SDYDO_TEXT_ELEMENT.
    * Adding text
      CALL METHOD DG_DYNDOC_ID->ADD_TEXT
        EXPORTING
          TEXT         = P_TEXT
          SAP_EMPHASIS = CL_DD_AREA=>HEADING.
    ENDFORM.                    " ADD_TEXT
    *&      Form  HTML
    *       text
    FORM HTML.
      DATA : DL_LENGTH  TYPE I,                           " Length
             DL_BACKGROUND_ID TYPE SDYDO_KEY VALUE SPACE. " Background_id
    * Creating html control
      IF DG_HTML_CNTRL IS INITIAL.
        CREATE OBJECT DG_HTML_CNTRL
             EXPORTING
                  PARENT    = DG_PARENT_HTML.
      ENDIF.
    * Reuse_alv_grid_commentary_set
      CALL FUNCTION 'REUSE_ALV_GRID_COMMENTARY_SET'
        EXPORTING
          DOCUMENT = DG_DYNDOC_ID
          BOTTOM   = SPACE
        IMPORTING
          LENGTH   = DL_LENGTH.
    * Get TOP->HTML_TABLE ready
      CALL METHOD DG_DYNDOC_ID->MERGE_DOCUMENT.
    * Set wallpaper
      CALL METHOD DG_DYNDOC_ID->SET_DOCUMENT_BACKGROUND
        EXPORTING
          PICTURE_ID = DL_BACKGROUND_ID.
    * Connect TOP document to HTML-Control
      DG_DYNDOC_ID->HTML_CONTROL = DG_HTML_CNTRL.
    * Display TOP document
      CALL METHOD DG_DYNDOC_ID->DISPLAY_DOCUMENT
        EXPORTING
          REUSE_CONTROL      = 'X'
          PARENT             = DG_PARENT_HTML
        EXCEPTIONS
          HTML_DISPLAY_ERROR = 1.
      IF SY-SUBRC NE 0.
        MESSAGE I999 WITH 'Error in displaying top-of-page'(036).
      ENDIF.
    ENDFORM.                    " HTML
    Regards
    vijay

  • How to do the multiple-line String at JList? help!

    i need some code to multiple-line String at JList.
    i know that it is can be done by html code.
    example:
    <p>line1</p><p>line2</p>
    but if i use that html code...
    i face another problem to my JList..
    it cannot set the font use the ListCellRenderer..
    like:
    public Component getListCellRendererComponent(
    JList list,
    Object value,
    int index,
    boolean isSelected,
    boolean cellHasFocus)
    Color newColor = new Color(230, 230, 230);
    setIcon(((DisplayItem)value).getIcon());
    setText(((DisplayItem)value).getChat());
    setFont(((DisplayItem)value).getFont());
    setBackground(isSelected ? newColor : Color.white);
    setForeground(isSelected ? Color.black : Color.black);
    if (isSelected) {
    setBorder(
    BorderFactory.createLineBorder(
    Color.red, 2));
    } else {
    setBorder(
    BorderFactory.createLineBorder(
    list.getBackground(), 2));
    return this;
    all my JList will be html type...
    i don't want that happen..can be another method to do that multiple-line String in JList??
    i also need to set a icon image between string in the JList. anyone get idea??
    i need ur help!
    thank you.

    I think you should create/override several methods like setText(String), setIcons(Icon[]), paintComponent(Graphics), getMinimumSize(), getPreferredSize(), etc.
    I would like to code like below...:class MultilineLabel extends JLabel {
        private String[] text = null;
        private ImageIcon[] icons = null;
        public void setText( String newText ) {
            // It overrides JLabel.setText( String )
            // Tokenize newText with line-separator
            // and put each text into the 'text' array.
        public void setIcons( Icon[] newIcon ) {
            // It is similar to JLabel.setIcon( Icon ) method,
            // but it receives an array of Icon-s. Set these icons to 'icons' variable.
        public void paintComponent( Graphics g ) {
            // It overrides JComponent.paintComponent( Graphics ) method.
            super.paintComponent( g );
            if ( text != null && icons != null ) {
                int icon_x = 0;
                int text_x = 0;
                int y = 0;
                // draw customized content..
                for ( int i=0; i<text.length; i++ ) {
                    // compute x and y locations
                    // icon_x = ...
                    // text_x = ...
                    // y = ...
                    // and draw it!
                    g.drawString( text[ i ], text_x, y );
                    icon[ i ].paintIcon( this, g, icon_x, y );
        public Dimension getMinimumSize() {
            int width = super.getMinimumSize().width;
            int height = ... // I think you must compute it with 'text' and 'icons'' arrays.
            return new Dimension( width, height );
        public Dimension getPreferredSize() {
            int width = super.getPreferredSize().width;
            int height = ...
            return new Dimension( width, height );
    }I think that code-structure above is the minimum to implement your requirements. (Of course if you want to implement it :)
    Good luck and let me know it works or not. :)

  • How to display the some extra text in footer last page of each department

    Hello Experts,
    I need help in generating RTF template to generate sum of salary for each department in the footer of the last page of each department name As shown below.
    Total salary of <DEPARTMENT_NAME>=<Sum of salary>.
    Someone plese help me.
    For example:
    If my output is displaying in multiple pages for each department I want the output should be as follows in the footer of last page of current group
    *Total Salary of Accounting = _20300_*
    My xml file is as follows*
    <?xml version="1.0" standalone="yes"?>
    <ROWSET>
    <ROW>
    <DEPARTMENT_NAME>Purchasing</DEPARTMENT_NAME>
    <FIRST_NAME>Den</FIRST_NAME>
    <JOB_ID>PU_MAN</JOB_ID>
    <SALARY>11000</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Purchasing</DEPARTMENT_NAME>
    <FIRST_NAME>Alexander</FIRST_NAME>
    <JOB_ID>PU_CLERK</JOB_ID>
    <SALARY>3100</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Purchasing</DEPARTMENT_NAME>
    <FIRST_NAME>Shelli</FIRST_NAME>
    <JOB_ID>PU_CLERK</JOB_ID>
    <SALARY>2900</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Purchasing</DEPARTMENT_NAME>
    <FIRST_NAME>Sigal</FIRST_NAME>
    <JOB_ID>PU_CLERK</JOB_ID>
    <SALARY>2800</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Purchasing</DEPARTMENT_NAME>
    <FIRST_NAME>Guy</FIRST_NAME>
    <JOB_ID>PU_CLERK</JOB_ID>
    <SALARY>2600</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Purchasing</DEPARTMENT_NAME>
    <FIRST_NAME>Karen</FIRST_NAME>
    <JOB_ID>PU_CLERK</JOB_ID>
    <SALARY>2500</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Finance</DEPARTMENT_NAME>
    <FIRST_NAME>Nancy</FIRST_NAME>
    <JOB_ID>FI_MGR</JOB_ID>
    <SALARY>12000</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Finance</DEPARTMENT_NAME>
    <FIRST_NAME>Daniel</FIRST_NAME>
    <JOB_ID>FI_ACCOUNT</JOB_ID>
    <SALARY>9000</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Finance</DEPARTMENT_NAME>
    <FIRST_NAME>John</FIRST_NAME>
    <JOB_ID>FI_ACCOUNT</JOB_ID>
    <SALARY>8200</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Finance</DEPARTMENT_NAME>
    <FIRST_NAME>Ismael</FIRST_NAME>
    <JOB_ID>FI_ACCOUNT</JOB_ID>
    <SALARY>7700</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Finance</DEPARTMENT_NAME>
    <FIRST_NAME>Jose Manuel</FIRST_NAME>
    <JOB_ID>FI_ACCOUNT</JOB_ID>
    <SALARY>7800</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Finance</DEPARTMENT_NAME>
    <FIRST_NAME>Luis</FIRST_NAME>
    <JOB_ID>FI_ACCOUNT</JOB_ID>
    <SALARY>6900</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Accounting</DEPARTMENT_NAME>
    <FIRST_NAME>Shelley</FIRST_NAME>
    <JOB_ID>AC_MGR</JOB_ID>
    <SALARY>12000</SALARY>
    </ROW>
    <ROW>
    <DEPARTMENT_NAME>Accounting</DEPARTMENT_NAME>
    <FIRST_NAME>William</FIRST_NAME>
    <JOB_ID>AC_ACCOUNT</JOB_ID>
    <SALARY>8300</SALARY>
    </ROW>
    </ROWSET>

    Hi,
    This a good document to look at. Search for the words "Running Totals" and "Regrouping the XML Data" on the page.
    Oracle Fusion Middleware Report Designer's Guide for Oracle Business Intelligence Publisher
    http://docs.oracle.com/cd/E21043_01/bi.1111/e13881/T421739T481157.htm
    I hope it helps.
    Sinan

  • How to create the multiple spool requests for a single report.

    Hi gurus,
                     I have one requirement to be completed , i need to send the out put of the report via mail in pdf format. for that what i did was, iam executing report in background and creating spool request and converting it to pdf and sending the file.
    now the problem is, its a customer ledger report, for each customer i need to create a new spool request and send mail to that particular customer, now my dought is how to create multiple spool requests for a single pro and how i need to go about it.
    And one more question is can we create a spool request for a report which is running in online.
    waiting for inputs frm gurus.

    Hello,
    As per my knowledge for creating new spool id you will have to set
    output_options-tdnewid = 'X'.
    and then using
    job_output_info-spoolids
    create a pdf using
    call function 'CONVERT_OTFSPOOLJOB_2_PDF'
    Rachana.

  • How to display the multiple rows in a single column ?

    Hi,
    I have the Query like this :
    SELECT MS.SUBJECT, MS.MESSAGEDESC, MS.MSGDATE, MAT.ATTACHMENT
    FROM MESSAGES MS, MSESAGEATTACHEMTASSO MAA, (select pga.programid,
    act.accountname,
    row_number() over(partition by pga.programid order by act.accountname) rn
    from accounttypes act, programpursesasso pga
    where act.accounttypeid = pga.accounttypeid ) MSGATTACHMENTS
    WHERE MS.MESSAGEID = MAA.MESSAGEID
    AND MAA.MSGATTACHMENTID = MAT.MSGATTACHMENTID
    AND MS.MESSAGEID = 1;
    If i have multiple messageAttachments for single message ., i want to display them in a single row.,
    like :
    subject messagedesc msgdate attachment1 attachment2 .....attachmentn
    test test 10/10/2007 test test test
    can any one help me out ., how can i do this using simple sql query ?

    Hi,
    Thanks for the Reply .,
    I have the 2 table like :
    DESC MESSAGES;
    Name Type Nullable Default Comments
    MESSAGEID NUMBER(16)
    EMAILFROM VARCHAR2(50) Y
    EMAILTO VARCHAR2(50) Y
    SUBJECT VARCHAR2(500) Y
    MESSAGEDESC VARCHAR2(2000) Y
    MSGDATE DATE Y
    MSGSTATUS NUMBER(1) Y
    MSGDELETESTATUS NUMBER(1) Y
    SQL> DESC MESSAGES;
    Name Type Nullable Default Comments
    MESSAGEID NUMBER(16)
    EMAILFROM VARCHAR2(50) Y
    EMAILTO VARCHAR2(50) Y
    SUBJECT VARCHAR2(500) Y
    MESSAGEDESC VARCHAR2(2000) Y
    MSGDATE DATE Y
    MSGSTATUS NUMBER(1) Y
    MSGDELETESTATUS NUMBER(1) Y
    SQL> DESC MSGATTACHMENTS;
    Name Type Nullable Default Comments
    MSGATTACHMENTID NUMBER(16)
    ATTACHMENT CLOB
    ATTACHMENTDATE DATE Y
    SQL> DESC MSESAGEATTACHEMTASSO;
    Name Type Nullable Default Comments
    MSGATTCHID NUMBER(16)
    MESSAGEID NUMBER(16) Y
    MSGATTACHMENTID NUMBER(16) Y
    What I need Is :
    If One Msg is having multiple attachement , then i want to display all the attachment in a single row along with MsgSubject, MsgDate, MsgDesc like
    I want to dipaly the MsgSubject, MsgDesc, MsgDate, Attachment1
    MsgSubject MsgDate Msgdesc Attachment1 Attachment2 Attachment3 ...etc

  • How to display the vertical coloumns(records)  in a single row?

    Hi all,
    I need a requirement in SAP where in the internal table records are in vertical placement as follows:
    1 2 3 4 5 | a1 b1 c1 d1 e1
    1 2 3 4 5 | a2 b2 c2 d2 e2
    1 2 3 4 5 | a3 b3 c3 d3 e3
    and so on..........
    now as per the requirement I need all the records to be displayed in a single row in the output as follows:
    1 2 3 4 5 | a1 b1 c1 d1 e1 | a2 b2 c2 d2 e2 | a3 b3 c3 d3 e3 |.....so on
    Any pointers on this would be of great help.
    thanks in advance,
    Vamsee.

    Loop at itab.
    at new f1.
      write : itab-f1.   <--- here don't give '/' .. which will write in new line ...
    endif.
      write : itab-f2,    <--- here don't give '/' .. which will write in new line ...
                itab-f3,
                itab-f4,
                itab-f5,
                itab-f6.
      at end of f1.
         write :/ ''.
      endat.
    endloop.

  • How to display multple line text in a single cell in ALV?

    Hi all,
    I have 'Material Detailed Description' field in my ALV report, and it's taken from a multiple line text table. Is there any way so I can get this whole text to fit in a single ALV cell (not in single, but multiple line, as in original text data)?
    Thank you.

    Hi
    If you want you can display this long text field in ALV but the allignment of the ALV not looks good. so generally we won't display them in the output,
    instead, in the interactive list write the code to call that MM03 transaction, and the user can see that text in the transaction when ever double clicked on that MATERIAL field.
    Reward points for useful Answers
    Regards
    Anji

  • How to display the Form output in multiple languages ? ------ Urgent

    How to display the Form output in multiple languages ? -
    Urgent

    Hi,
    Do u mean the Form output in 2-3 languages ...like form output will be having english russian etc...
    for the above case , what u have to do ...
    first have to get the transalations for all the fields
    say for example : if the english word is PO Number , then u have to get the transalation text for PO Number :
    after this , what u have to is ,,, Log on to SAP with russian language ,  then in the form o/p u have to paste that russian test ( translation text ) ...
    do like this for all the components in the form .
    Reward Points if it is Useful.
    Thanks,
    Manjunath MS

  • How to display the the tablix column lines upto footer in rdlc report

    How  to display the the column lines upto footer in rdlc report.If data are less it should go upto bottom (footer) based on data.
    For Example.I have 2 items.it should display 2 items and lines should continue upto footer.
         | S.No| Name      |    Qty   |    Active   |  UNIT  | Amount |
         |   1   |  A            |     1      |       4       |   34    |   43       |
         |   2   |  B            |     6      |       3       |   23    |   45       |
         |        |                |             |                |           |    
             |
         |        |                |             |                |           |    
             | 
         |        |                |             |                |           |    
             |  
         |        |                |             |                |           |    
             |
                                   Footer                 
    If I have 5 items.it should display 5 items and lines should continue upto footer.
         | S.No| Name      |    Qty   |    Active   |  UNIT  | Amount |
         |   1   |  A            |     1      |       4       |   34    |   43       |
         |   2   |  B            |     6      |       3       |   23    |   45       |
         |   3   |  C            |             |       4       |   47    |   56       |
         |   4   |  D            |     3      |                |   56    |   47       |  
         |   5   |  E            |     4      |       4       |   45    |   45       |
         |        |                |             |                |           |    
             |
         |        |                |             |                |           |    
             |
                                   Footer                 
    like that it should be adjust based on data length.
    please help me how to do it in RDLC (asp.net and c#).....
    Your help would be highly appreciated!
    Thank you very much in advance!

    Hi M.S.GopalKrish,
    According to your description, it seems that you want to make the tablix rows to fill page size? We can configure the text box height size to work around the issue.
    Use this method, we need to calculate the average height size of the text box in the tablix. For more details, please see:
    We can use
    RowNumber() function to calculate the row number of the tablix.
    Calculate the page height size of the tablix in Property windows.
    Use the page height size divided by row number. We can get the average height size of the text box.
    Hope this helps.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to display the selection screen with icons as well as with text element

    How to display the selection screen with icons as well as with texts (written in text elements) for PlantDate, OrderType,WareHouse..

    Report zex33.
    type-pools: icon.
    selection-screen begin of line.
    selection-screen comment 1(20) text_001.
    parameters: p_werks type marc-werks.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(20) text_002.
    parameters: p_whouse(10).
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(20) text_003.
    parameters: p_auart like vbak-auart.
    selection-screen end of line.
    initialization.
      write ICON_PLANT  as icon to text_001.
    concatenate text_001 text-001 into text_001 separated by space.
      write ICON_WAREHOUSE  as icon to text_002.
    concatenate text_002 text-002 into text_002 separated by space.
      write ICON_ORDER  as icon to text_003.
    concatenate text_003 text-003 into text_003 separated by space.

  • How will i display the multiple select ids in the dashboard ?

    I have a form where there is a multiple select. When the form is submit, the ids for the multiple select is stored in the database as concatenate. For example, multiple select : 3,9,5,1.
    The ids of the multiple select is found in a table TABLE1 and the insertion is done in another table TABLE2.
    Now I have to display them in a dashboard.
    My question is how will i display the multiple select ids in the dashboard ?
    I have to do an innerjoin with TABLE1 to retrieve the names of the multiple select ids. I don't know how to do it because the column name for multiple select in TABLE2 is of type text and the column id in TABLE1 is of type int.
    Please help me solve this problem.
    Thanks in advance

    One general advice is, never store comma-delimited lists in the database. In fact, the reason is to avoid problems like the one you now face.
    The major suggestion here is to re-design your database. Make sure each selected item (for example 3, 9, 5 or 1) is stored in its own row.
    To solve the problem as it now stands, you could do something like
    <cfquery>
    select myItems
    from table2
    where id in (select id from table 1 where ...etc.)
    </cfquery>
    Then use ColdFusion's list functions to do what your dashboard requires you to do.

Maybe you are looking for

  • Feature request: Remove/hide small apps

    Hi, hopefully there's some way to forward this along to the xperia android dev team!  I'm sure that some people find the small apps feature useful, but I do find it to be in the way, especially since the lollipop update, where the app cards have beco

  • R6950 Display Twin Froz II OC 2 GB flickers with multiple displays

    Hi guys, This is my situation, I have a 3 monitor setup (27" SA850 PLS) not running on Eyefinity, simply using extended desktop and playing only on one monitor. 2 of the monitors are connected to the card using Display Port and another one using the

  • Selection-screen differ from developement to quality

    Hi All, I made one standard report as Z report.In this they used Logical databases.I made the changes in selection-screen by selecting some of the fields as invisible,and i created the request number for the report and i moved it to quality,But there

  • Upgraded to new software, Now I have 39gig worth on my itunes, not 8gig

    I deleted my old itunes software and quicktime and installed the new stuff. Now it is saying I have 39 gigs of music with the same amount of songs(1900). I actually only have 8 gigs of music. Anyway to fix this. I have a 30gig ipod. thanks Wes

  • How to create shortcut to turn on/off Wifi in Snow Leopard

    I want to use the F5 key on my MBP to turn on Wifi with a single hit on the keyboard and turn it off again with a single hit using F6. Is this possible? I've tried to do it under Preferences/Keyboard/Keyboard Shortcuts but I can't add F5 (not by typi