How to implement Table with Common Cell Section

Hi,
I have requirement of displaying mulltiple rows in single column cell for certain columns in each row of Table.
This has to be a read only table, with alternate design support in 7.02
The Data Source contains all the elements to display in table as seperate columns (Data1..Data7).
I have checked at Grouped Column design, its bit different from grouped column.
Header1     |  Header2 | Header 3  | Header 5 | Header 7
                                 | Header 4  | Header 6 |
Row-Data1 |     Data 2 | Data3      | Data 5     | Data 7
                                 | Data4      |  Data 6    |
Row-Data2 |    Data22 | Data33     | Data55    | Data77   
                                    Data 44   |  Data 66  |
Please let me know, if you have any idea of achieving this form of table in WD Java..

Hi,
I don't know how to do this with WD Java Table UI element, and you could build simple html table using webwidget UI element but that is not available on 702 as far as I know, plus this case the filtering, sorting and other features have to be done also manually using your own algorithm.
Here is what I just built on 730 using WebWidgets:
I checked also the grouped column, but that worked only for the header of the column, and behaved like colspan, while what you need is probably rather like rowspan.
I know it is not a big help, maybe someone else knows how to do this with Table UI (if it is even possible).
Still, perhaps someone else is interested who is using a higher release like 730.
I created a webwidget UI element and bound to its "html" property a string context element that I called "widgethtml".
After this I added this code to the wdDoModifyView() hook method:
StringBuilder sb = new StringBuilder();
sb.append("<html><head>")
  .append("<style type=\"text/css\">")
  .append(".AlternateTable{width:100%; border-collapse:collapse;}")
  .append(".AlternateTable td ,th{padding:7px; border:black 1px solid;}")
  .append(".AlternateTable tr:nth-child(n){ background: #9BBB58;}")
  .append(".AlternateTable tr:nth-child(n+3){ background: #E9EEF4;}")
  .append(".AlternateTable tr:nth-child(n+5){ background: #558ED5;}")
  .append("</style>")
  .append("</head>")
  .append("<body>")
  .append("<table class=\"AlternateTable\">")
  .append("<tr>")
  .append("<th rowspan=\"2\">Header1</th>")
  .append("<th rowspan=\"2\">Header2</th>")
  .append("<th>Header3</th>")
  .append("<th rowspan=\"2\">Header5</th>")
  .append("</tr>")
  .append("<tr>")
  .append("<th>Header4</th>")
  .append("</tr>")
  .append("<tr>")
  .append("<td rowspan=\"2\">Data1</td>")
  .append("<td rowspan=\"2\">Data2</td>")
  .append("<td>Data3</td>")
  .append("<td rowspan=\"2\">Data5</td>")
  .append("</tr>")
  .append("<tr>")
  .append("<td>Data4</td>")
  .append("</tr>")
  .append("<tr>")
  .append("<td rowspan=\"2\">Data11</td>")
  .append("<td rowspan=\"2\">Data22</td>")
  .append("<td>Data33</td>")
  .append("<td rowspan=\"2\">Data55</td>")
  .append("</tr>")
  .append("<tr>")
  .append("<td>Data44</td>")
  .append("</tr>")
  .append("</table>")
  .append("</body></html>");
  wdContext.currentContextElement().setWidgethtml(sb.toString());
Cheers,
Ervin

Similar Messages

  • Hi guys n girls. How do you copy a whole table to create a new table with all cell sizes in tact? Thanks for your help. Jason.

    Hi guys n girls. How do you copy a whole table to create a new table with all cell sizes in tact? Thanks for your help. Jason.
    when you copy n paste into a new table, all the cell sizes are changed.
    is there a way to put in a new table from your templates into an existing file, different to the standard very basic ones in insert table.
    I look forward to your answers.  Your help is very much appreciated.
    Also how do you search for question answers already written in this support area please.

    Hi Jason,
    In Numbers 3, you can select a whole table by clicking once in the table to make it active, then click once on the "bull's eye" at the top left.
    Now copy and paste. All formatting (and any cell content) is pasted intact. In Numbers 2.3 (Numbers '09) it is a little different for selecting a whole table. But I won't go into that unless you are using Numbers '09. Please reply.
    I don't like the look of the tables in Insert Table. I keep custom tables in My Templates. I have set Numbers > Preferences > General > For New Documents > Use template: (name of my favourite custom template)
    That opens when I launch Numbers, or ask for a new document (command n). Note that if you follow this preference setting, then Menu > File > New From Template Chooser (for another template) requires you to hold down the option key in that menu.
    Regards,
    Ian.
    Message was edited by: Yellowbox. All formatting (and any cell content) is pasted intact.

  • How to implement classes with alv's

    hi
    how to implement classes with alv's

    Hi Jyotsna,
    check this example codes.
    *"Table declarations...................................................
    TABLES:
    EKKO, " Purchasing Document Header
    CDHDR, " Change document header
    SSCRFIELDS. " Fields on selection screens
    *"Selection screen elements............................................
    SELECT-OPTIONS:
    S_EBELN FOR EKKO-EBELN, " Purchasing Document Number
    S_LIFNR FOR EKKO-LIFNR, " Vendor's account number
    S_EKGRP FOR EKKO-EKGRP, " Purchasing group
    S_BEDAT FOR EKKO-BEDAT, " Purchasing Document Date
    S_UDATE FOR CDHDR-UDATE. " Creation date of the change
    " document
    *" Data declarations...................................................
    Field String to hold Purchase Document Number *
    DATA:
    BEGIN OF FS_EBELN,
    EBELN(90) TYPE C, " Purchase Document Number
    ERNAM TYPE EKKO-ERNAM, " Name of Person who Created
    " the Object
    LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    EKGRP TYPE EKKO-EKGRP, " Purchasing group
    BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
    END OF FS_EBELN,
    Field String to hold Purchase Document Header *
    BEGIN OF FS_EKKO,
    EBELN TYPE EKKO-EBELN, " Purchasing Document Number
    ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
    " Object
    LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    EKGRP TYPE EKKO-EKGRP, " Purchasing group
    BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
    END OF FS_EKKO,
    Field String to hold Account Number and name of the Vendor *
    BEGIN OF FS_LFA1,
    LIFNR TYPE LFA1-LIFNR, " Account Number of Vendor
    NAME1 TYPE LFA1-NAME1, " Name1
    END OF FS_LFA1,
    Field String to hold Change date and the name of the user *
    BEGIN OF FS_CDHDR,
    OBJECTCLAS TYPE CDHDR-OBJECTCLAS, " Object Class
    OBJECTID TYPE CDHDR-OBJECTID, " Object value
    CHANGENR TYPE CDHDR-CHANGENR, " Document change number
    USERNAME TYPE CDHDR-USERNAME, " User name
    UDATE TYPE CDHDR-UDATE, " Creation date of the change
    " document
    END OF FS_CDHDR,
    Field String to hold Change document items *
    BEGIN OF FS_CDPOS,
    OBJECTCLAS TYPE CDPOS-OBJECTCLAS," Object class
    OBJECTID(10) TYPE C, " Object Value
    CHANGENR TYPE CDPOS-CHANGENR, " Document change number
    TABNAME TYPE CDPOS-TABNAME, " Table Name
    FNAME TYPE CDPOS-FNAME, " Field Name
    VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
    VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
    END OF FS_CDPOS,
    Field String to hold Date Element Name *
    BEGIN OF FS_DATAELE,
    TABNAME TYPE DD03L-TABNAME, " Table Name
    FIELDNAME TYPE DD03L-FIELDNAME, " Field Name
    ROLLNAME TYPE DD03L-ROLLNAME, " Data element (semantic domain)
    END OF FS_DATAELE,
    Field String to hold Short Text of the Date Element *
    BEGIN OF FS_TEXT,
    ROLLNAME TYPE DD04T-ROLLNAME, " Data element (semantic domain)
    DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
    " Repository Objects
    END OF FS_TEXT,
    Field String to hold data to be displayed on the ALV grid *
    BEGIN OF FS_OUTTAB,
    EBELN TYPE EKKO-EBELN, " Purchasing Document Number
    ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
    " Object
    LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    EKGRP TYPE EKKO-EKGRP, " Purchasing group
    BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
    WERKS TYPE LFA1-WERKS, " Plant
    NAME1 TYPE LFA1-NAME1, " Name1
    USERNAME TYPE CDHDR-USERNAME, " User name
    UDATE TYPE CDHDR-UDATE, " Creation date of the change
    " document
    DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
    " Repository Objects
    VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
    VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
    END OF FS_OUTTAB,
    Internal table to hold Purchase Document Number *
    T_EBELN LIKE STANDARD TABLE
    OF FS_EBELN,
    Internal table to hold Purchase Document Header *
    T_EKKO LIKE STANDARD TABLE
    OF FS_EKKO,
    Temp Internal table to hold Purchase Document Header *
    T_EKKO_TEMP LIKE STANDARD TABLE
    OF FS_EKKO,
    Internal table to hold Account number and Name of the Vendor *
    T_LFA1 LIKE STANDARD TABLE
    OF FS_LFA1,
    Internal Table to hold Change date and the name of the user *
    T_CDHDR LIKE STANDARD TABLE
    OF FS_CDHDR,
    Internal Table to hold Change document items *
    T_CDPOS LIKE STANDARD TABLE
    OF FS_CDPOS,
    Temp. Internal Table to hold Change document items *
    T_CDPOS_TEMP LIKE STANDARD TABLE
    OF FS_CDPOS,
    Internal Table to hold Data Element Name *
    T_DATAELE LIKE STANDARD TABLE
    OF FS_DATAELE,
    Temp. Internal Table to hold Data Element Name *
    T_DATAELE_TEMP LIKE STANDARD TABLE
    OF FS_DATAELE,
    Internal Table to hold Short Text of the Date Element *
    T_TEXT LIKE STANDARD TABLE
    OF FS_TEXT,
    Internal Table to hold data to be displayed on the ALV grid *
    T_OUTTAB LIKE STANDARD TABLE
    OF FS_OUTTAB.
    C L A S S D E F I N I T I O N *
    CLASS LCL_EVENT_HANDLER DEFINITION DEFERRED.
    *" Data declarations...................................................
    Work variables *
    DATA:
    W_EBELN TYPE EKKO-EBELN, " Purchasing Document Number
    W_LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    W_EKGRP TYPE EKKO-EKGRP, " Purchasing group
    W_VALUE TYPE EKKO-EBELN, " Reflected Value
    W_SPACE VALUE ' ', " Space
    W_FLAG TYPE I, " Flag Variable
    W_VARIANT TYPE DISVARIANT, " Variant
    ALV Grid
    W_GRID TYPE REF TO CL_GUI_ALV_GRID,
    Event Handler
    W_EVENT_CLICK TYPE REF TO LCL_EVENT_HANDLER,
    Field catalog table
    T_FIELDCAT TYPE LVC_T_FCAT.
    AT SELECTION-SCREEN EVENT *
    AT SELECTION-SCREEN ON S_EBELN.
    Subroutine to validate Purchase Document Number.
    PERFORM VALIDATE_PD_NUM.
    AT SELECTION-SCREEN ON S_LIFNR.
    Subroutine to validate Vendor Number.
    PERFORM VALIDATE_VEN_NUM.
    AT SELECTION-SCREEN ON S_EKGRP.
    Subroutine to validate Purchase Group.
    PERFORM VALIDATE_PUR_GRP.
    START-OF-SELECTION EVENT *
    START-OF-SELECTION.
    Subroutine to select all Purchase orders.
    PERFORM SELECT_PO.
    CHECK W_FLAG EQ 0.
    Subroutine to select Object values.
    PERFORM SELECT_OBJ_ID.
    CHECK W_FLAG EQ 0.
    Subroutine to select Changed values.
    PERFORM SELECT_CHANGED_VALUE.
    CHECK W_FLAG EQ 0.
    Subroutine to Select Purchase Orders.
    PERFORM SELECT_PUR_DOC.
    Subroutine to select Vendor Details.
    PERFORM SELECT_VENDOR.
    Subroutine to select Text for the Changed values.
    PERFORM DESCRIPTION.
    END-OF-SELECTION EVENT *
    END-OF-SELECTION.
    IF NOT T_EKKO IS INITIAL.
    Subroutine to populate the Output Table.
    PERFORM FILL_OUTTAB.
    Subroutine to build Field Catalog.
    PERFORM PREPARE_FIELD_CATALOG CHANGING T_FIELDCAT.
    CALL SCREEN 100.
    ENDIF. " IF NOT T_EKKO...
    CLASS LCL_EVENT_HANDLER DEFINITION
    Defining Class which handles events
    CLASS LCL_EVENT_HANDLER DEFINITION .
    PUBLIC SECTION .
    METHODS:
    HANDLE_HOTSPOT_CLICK
    FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
    IMPORTING E_ROW_ID E_COLUMN_ID.
    ENDCLASS. " LCL_EVENT_HANDLER DEFINITION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION
    Implementing the Class which can handle events
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
    *---Handle Double Click
    METHOD HANDLE_HOTSPOT_CLICK .
    Subroutine to get the HotSpot Cell information.
    PERFORM GET_CELL_INFO.
    SET PARAMETER ID 'BES' FIELD W_VALUE.
    CALL TRANSACTION 'ME23N'.
    ENDMETHOD. " HANDLE_HOTSPOT_CLICK
    ENDCLASS. " LCL_EVENT_HANDLER
    *& Module STATUS_0100 OUTPUT
    PBO Event
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'OOPS'.
    SET TITLEBAR 'TIT'.
    Subroutine to fill the Variant Structure
    PERFORM FILL_VARIANT.
    IF W_GRID IS INITIAL.
    CREATE OBJECT W_GRID
    EXPORTING
    I_SHELLSTYLE = 0
    I_LIFETIME =
    I_PARENT = CL_GUI_CONTAINER=>SCREEN0
    I_APPL_EVENTS =
    I_PARENTDBG =
    I_APPLOGPARENT =
    I_GRAPHICSPARENT =
    I_NAME =
    I_FCAT_COMPLETE = SPACE
    EXCEPTIONS
    ERROR_CNTL_CREATE = 1
    ERROR_CNTL_INIT = 2
    ERROR_CNTL_LINK = 3
    ERROR_DP_CREATE = 4
    OTHERS = 5.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF. " IF SY-SUBRC 0
    CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME =
    IS_VARIANT = W_VARIANT
    I_SAVE = 'A'
    I_DEFAULT = 'X'
    IS_LAYOUT =
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    IT_TOOLBAR_EXCLUDING =
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    IR_SALV_ADAPTER =
    CHANGING
    IT_OUTTAB = T_OUTTAB
    IT_FIELDCATALOG = T_FIELDCAT
    IT_SORT =
    IT_FILTER =
    EXCEPTIONS
    INVALID_PARAMETER_COMBINATION = 1
    PROGRAM_ERROR = 2
    TOO_MANY_LINES = 3
    OTHERS = 4
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF. " IF SY-SUBRC 0.
    ENDIF. " IF W_GRID IS INITIAL
    CREATE OBJECT W_EVENT_CLICK.
    SET HANDLER W_EVENT_CLICK->HANDLE_HOTSPOT_CLICK FOR W_GRID.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    PAI Event
    MODULE USER_COMMAND_0100 INPUT.
    CASE SY-UCOMM.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    WHEN 'CANCEL'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Form PREPARE_FIELD_CATALOG
    Subroutine to build the Field catalog
    <--P_T_FIELDCAT Field Catalog Table
    FORM PREPARE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
    DATA LS_FCAT TYPE LVC_S_FCAT.
    Purchasing group...
    LS_FCAT-FIELDNAME = 'EKGRP'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Purchasing Document Number...
    LS_FCAT-FIELDNAME = 'EBELN'.
    LS_FCAT-REF_TABLE = 'EKKO' .
    LS_FCAT-EMPHASIZE = 'C411'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-HOTSPOT = 'X'.
    APPEND LS_FCAT TO PT_FIELDCAT .
    CLEAR LS_FCAT .
    Name of Person who Created the Object...
    LS_FCAT-FIELDNAME = 'ERNAM'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-OUTPUTLEN = '15' .
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Purchasing Document Date...
    LS_FCAT-FIELDNAME = 'BEDAT'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Vendor's account number...
    LS_FCAT-FIELDNAME = 'LIFNR'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Account Number of Vendor or Creditor...
    LS_FCAT-FIELDNAME = 'NAME1'.
    LS_FCAT-REF_TABLE = 'LFA1'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-COLTEXT = 'Vendor Name'(001).
    LS_FCAT-SELTEXT = 'Vendor Name'(001).
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Creation date of the change document...
    LS_FCAT-FIELDNAME = 'UDATE'.
    LS_FCAT-REF_TABLE = 'CDHDR'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-COLTEXT = 'Change Date'(002).
    LS_FCAT-SELTEXT = 'Change Date'(002).
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    User name of the person responsible in change document...
    LS_FCAT-FIELDNAME = 'USERNAME'.
    LS_FCAT-REF_TABLE = 'CDHDR'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-COLTEXT = 'Modified by'(003).
    LS_FCAT-SELTEXT = 'Modified by'(003).
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Short Text Describing R/3 Repository Objects...
    LS_FCAT-FIELDNAME = 'DDTEXT'.
    LS_FCAT-REF_TABLE = 'DD04T'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '15'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Old contents of changed field...
    LS_FCAT-FIELDNAME = 'VALUE_OLD'.
    LS_FCAT-REF_TABLE = 'CDPOS'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '12'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    New contents of changed field...
    LS_FCAT-FIELDNAME = 'VALUE_NEW'.
    LS_FCAT-REF_TABLE = 'CDPOS'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '12'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    ENDFORM. " PREPARE_FIELD_CATALOG
    *& Form SELECT_PO
    Subroutine to select all the Purchase Orders
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_PO .
    SELECT EBELN " Purchasing Document Number
    ERNAM " Name of Person who Created
    " the Object
    LIFNR " Vendor's account number
    EKGRP " Purchasing group
    BEDAT " Purchasing Document Date
    FROM EKKO
    PACKAGE SIZE 10000
    APPENDING TABLE T_EBELN
    WHERE EBELN IN S_EBELN
    AND BEDAT IN S_BEDAT.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    W_FLAG = 1.
    MESSAGE S401(M8).
    ENDIF. " IF SY-SUBRC NE 0
    ENDFORM. " SELECT_PO
    *& Form SELECT_OBJ_ID
    Subroutine to select Object ID
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_OBJ_ID .
    IF NOT T_EBELN IS INITIAL.
    SELECT OBJECTCLAS " Object Class
    OBJECTID " Object value
    CHANGENR " Document change number
    USERNAME " User name
    UDATE " Creation date
    FROM CDHDR
    INTO TABLE T_CDHDR
    FOR ALL ENTRIES IN T_EBELN
    WHERE OBJECTID EQ T_EBELN-EBELN
    AND UDATE IN S_UDATE
    AND TCODE IN ('ME21N','ME22N','ME23N').
    ENDSELECT.
    IF SY-SUBRC NE 0.
    W_FLAG = 1.
    MESSAGE S833(M8) WITH 'Header Not Found'(031).
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_EBELN IS INITIAL
    ENDFORM. " SELECT_OBJ_ID
    *& Form SELECT_CHANGED_VALUE
    Subroutine to select Changed Values
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_CHANGED_VALUE .
    IF NOT T_CDHDR IS INITIAL.
    SELECT OBJECTCLAS " Object class
    OBJECTID " Object value
    CHANGENR " Document change number
    TABNAME " Table Name
    FNAME " Field Name
    VALUE_NEW " New contents of changed field
    VALUE_OLD " Old contents of changed field
    FROM CDPOS
    PACKAGE SIZE 10000
    APPENDING TABLE T_CDPOS
    FOR ALL ENTRIES IN T_CDHDR
    WHERE OBJECTCLAS EQ T_CDHDR-OBJECTCLAS
    AND OBJECTID EQ T_CDHDR-OBJECTID
    AND CHANGENR EQ T_CDHDR-CHANGENR.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    W_FLAG = 1.
    MESSAGE S833(M8) WITH 'Item Not Found'(032).
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_CDHDR IS INITIAL
    T_CDPOS_TEMP] = T_CDPOS[.
    ENDFORM. " SELECT_CHANGED_VALUE
    *& Form SELECT_PUR_DOC
    Subroutine to select Purchase Order Details
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_PUR_DOC .
    IF NOT T_CDPOS IS INITIAL.
    SORT T_EBELN BY EBELN.
    LOOP AT T_CDPOS INTO FS_CDPOS.
    READ TABLE T_EBELN INTO FS_EBELN WITH KEY EBELN =
    FS_CDPOS-OBJECTID BINARY SEARCH.
    IF SY-SUBRC NE 0.
    DELETE TABLE T_EBELN FROM FS_EBELN.
    ENDIF. " IF SY-SUBRC NE 0.
    ENDLOOP. " LOOP AT T_CDPOS...
    LOOP AT T_EBELN INTO FS_EBELN.
    MOVE FS_EBELN-EBELN TO FS_EKKO-EBELN.
    MOVE FS_EBELN-ERNAM TO FS_EKKO-ERNAM.
    MOVE FS_EBELN-LIFNR TO FS_EKKO-LIFNR.
    MOVE FS_EBELN-EKGRP TO FS_EKKO-EKGRP.
    MOVE FS_EBELN-BEDAT TO FS_EKKO-BEDAT.
    APPEND FS_EKKO TO T_EKKO.
    ENDLOOP. " LOOP AT T_EBELN...
    T_EKKO_TEMP] = T_EKKO[.
    ENDIF. " IF NOT T_CDPOS IS INITIAL
    ENDFORM. " SELECT_PUR_DOC
    *& Form SELECT_VENDOR
    Subroutine to select Vendor details
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_VENDOR .
    IF NOT T_EKKO IS INITIAL.
    SORT T_EKKO_TEMP BY LIFNR.
    DELETE ADJACENT DUPLICATES FROM T_EKKO_TEMP COMPARING LIFNR.
    SELECT LIFNR " Account Number of Vendor or
    " Creditor
    NAME1 " Name 1
    FROM LFA1
    INTO TABLE T_LFA1
    FOR ALL ENTRIES IN T_EKKO_TEMP
    WHERE LIFNR EQ T_EKKO_TEMP-LIFNR.
    IF SY-SUBRC NE 0.
    MESSAGE S002(M8) WITH 'Master Details'(033).
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_EKKO IS INITIAL
    ENDFORM. " SELECT_VENDOR
    *& Form DESCRIPTION
    Subroutine to get the description
    There are no interface parameters to be passed to this subroutine.
    FORM DESCRIPTION .
    IF NOT T_CDPOS IS INITIAL.
    SORT T_CDPOS_TEMP BY TABNAME FNAME.
    DELETE ADJACENT DUPLICATES FROM T_CDPOS_TEMP COMPARING TABNAME FNAME
    SELECT TABNAME " Table Name
    FIELDNAME " Field Name
    ROLLNAME " Data element
    FROM DD03L
    INTO TABLE T_DATAELE
    FOR ALL ENTRIES IN T_CDPOS_TEMP
    WHERE TABNAME EQ T_CDPOS_TEMP-TABNAME
    AND FIELDNAME EQ T_CDPOS_TEMP-FNAME.
    IF NOT T_DATAELE IS INITIAL.
    T_DATAELE_TEMP] = T_DATAELE[.
    SORT T_DATAELE_TEMP BY ROLLNAME.
    DELETE ADJACENT DUPLICATES FROM T_DATAELE_TEMP COMPARING ROLLNAME.
    SELECT ROLLNAME " Data element
    DDTEXT " Short Text Describing R/3
    " Repository Objects
    FROM DD04T
    INTO TABLE T_TEXT
    FOR ALL ENTRIES IN T_DATAELE_TEMP
    WHERE ROLLNAME EQ T_DATAELE_TEMP-ROLLNAME
    AND DDLANGUAGE EQ SY-LANGU.
    IF SY-SUBRC NE 0.
    EXIT.
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_DATAELE IS INITIAL.
    ENDIF. " IF NOT T_CDPOS IS INITIAL.
    ENDFORM. " DESCRIPTION
    *& Form FILL_OUTTAB
    Subroutine to populate the Outtab
    There are no interface parameters to be passed to this subroutine.
    FORM FILL_OUTTAB .
    SORT T_CDHDR BY OBJECTCLAS OBJECTID CHANGENR.
    SORT T_EKKO BY EBELN.
    SORT T_LFA1 BY LIFNR.
    SORT T_DATAELE BY TABNAME FIELDNAME.
    SORT T_TEXT BY ROLLNAME.
    LOOP AT T_CDPOS INTO FS_CDPOS.
    READ TABLE T_CDHDR INTO FS_CDHDR WITH KEY
    OBJECTCLAS = FS_CDPOS-OBJECTCLAS
    OBJECTID = FS_CDPOS-OBJECTID
    CHANGENR = FS_CDPOS-CHANGENR
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_CDHDR-USERNAME TO FS_OUTTAB-USERNAME.
    MOVE FS_CDHDR-UDATE TO FS_OUTTAB-UDATE.
    READ TABLE T_EKKO INTO FS_EKKO WITH KEY
    EBELN = FS_CDHDR-OBJECTID
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_EKKO-EBELN TO FS_OUTTAB-EBELN.
    MOVE FS_EKKO-ERNAM TO FS_OUTTAB-ERNAM.
    MOVE FS_EKKO-LIFNR TO FS_OUTTAB-LIFNR.
    MOVE FS_EKKO-EKGRP TO FS_OUTTAB-EKGRP.
    MOVE FS_EKKO-BEDAT TO FS_OUTTAB-BEDAT.
    READ TABLE T_LFA1 INTO FS_LFA1 WITH KEY
    LIFNR = FS_EKKO-LIFNR
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_LFA1-NAME1 TO FS_OUTTAB-NAME1.
    ENDIF. " IF SY-SUBRC EQ 0.
    ENDIF. " IF SY-SUBRC EQ 0.
    ENDIF. " IF SY-SUBRC EQ 0.
    MOVE FS_CDPOS-VALUE_NEW TO FS_OUTTAB-VALUE_NEW.
    MOVE FS_CDPOS-VALUE_OLD TO FS_OUTTAB-VALUE_OLD.
    READ TABLE T_DATAELE INTO FS_DATAELE WITH KEY
    TABNAME = FS_CDPOS-TABNAME
    FIELDNAME = FS_CDPOS-FNAME
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    READ TABLE T_TEXT INTO FS_TEXT WITH KEY
    ROLLNAME = FS_DATAELE-ROLLNAME
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_TEXT-DDTEXT TO FS_OUTTAB-DDTEXT.
    ENDIF. " IF SY-SUBRC EQ 0.
    ENDIF. " IF SY-SUBRC EQ 0.
    APPEND FS_OUTTAB TO T_OUTTAB.
    CLEAR FS_OUTTAB.
    ENDLOOP.
    ENDFORM. " FILL_OUTTAB
    *& Form GET_CELL_INFO
    Subroutine to get the Cell Information
    --> W_VALUE Holds the value of Hotspot clicked
    FORM GET_CELL_INFO .
    CALL METHOD W_GRID->GET_CURRENT_CELL
    IMPORTING
    E_ROW =
    E_VALUE = W_VALUE
    E_COL =
    ES_ROW_ID =
    ES_COL_ID =
    ES_ROW_NO =
    ENDFORM. " GET_CELL_INFO
    *& Form VALIDATE_PD_NUM
    Subroutine to validate Purchase Document Number
    There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_PD_NUM .
    IF NOT S_EBELN[] IS INITIAL.
    SELECT EBELN " Purchase Document Number
    FROM EKKO
    INTO W_EBELN
    UP TO 1 ROWS
    WHERE EBELN IN S_EBELN.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    CLEAR SSCRFIELDS-UCOMM.
    MESSAGE E717(M8).
    ENDIF. " IF SY-SUBRC NE 0
    ENDIF. " IF NOT S_EBELN[]...
    ENDFORM. " VALIDATE_PD_NUM
    *& Form VALIDATE_VEN_NUM
    Subroutine to validate Vendor Number
    There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_VEN_NUM .
    IF NOT S_LIFNR[] IS INITIAL.
    SELECT LIFNR " Vendor Number
    FROM LFA1
    INTO W_LIFNR
    UP TO 1 ROWS
    WHERE LIFNR IN S_LIFNR.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    CLEAR SSCRFIELDS-UCOMM.
    MESSAGE E002(M8) WITH W_SPACE.
    ENDIF. " IF SY-SUBRC NE 0
    ENDIF. " IF NOT S_LIFNR[]...
    ENDFORM. " VALIDATE_VEN_NUM
    *& Form VALIDATE_PUR_GRP
    Subroutine to validate the Purchase Group
    There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_PUR_GRP .
    IF NOT S_EKGRP[] IS INITIAL.
    SELECT EKGRP " Purchase Group
    FROM T024
    INTO W_EKGRP
    UP TO 1 ROWS
    WHERE EKGRP IN S_EKGRP.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    CLEAR SSCRFIELDS-UCOMM.
    MESSAGE E622(M8) WITH W_SPACE.
    ENDIF. " IF SY-SUBRC NE 0
    ENDIF. " IF NOT S_EKFRP[]...
    ENDFORM. " VALIDATE_PUR_GRP
    *& Form FILL_VARIANT
    Subroutine to fill the Variant Structure
    There are no interface parameters to be passed to this subroutine
    FORM FILL_VARIANT .
    Filling the Variant structure
    W_VARIANT-REPORT = SY-REPID.
    W_VARIANT-USERNAME = SY-UNAME.
    ENDFORM. " FILL_VARIANT
    REPORT YMS_HIERSEQLISTDISPLAY .
    Program with FM REUSE_ALV_HIERSEQ_LIST_DISPLAY *
    Author : Michel PIOUD *
    Email : mpioudyahoo.fr HomePage : http://www.geocities.com/mpioud *
    TYPE-POOLS: slis. " ALV Global types
    CONSTANTS :
    c_x VALUE 'X',
    c_gt_vbap TYPE SLIS_TABNAME VALUE 'GT_VBAP',
    c_gt_vbak TYPE SLIS_TABNAME VALUE 'GT_VBAK'.
    SELECTION-SCREEN :
    SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max. "#EC NEEDED
    PARAMETERS p_max(02) TYPE n DEFAULT '10' OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN :
    SKIP, BEGIN OF LINE,COMMENT 5(27) v_2 FOR FIELD p_expand. "#EC NEEDED
    PARAMETERS p_expand AS CHECKBOX DEFAULT c_x.
    SELECTION-SCREEN END OF LINE.
    TYPES :
    1st Table
    BEGIN OF ty_vbak,
    vbeln TYPE vbak-vbeln, " Sales document
    kunnr TYPE vbak-kunnr, " Sold-to party
    netwr TYPE vbak-netwr, " Net Value of the Sales Order
    erdat TYPE vbak-erdat, " Creation date
    waerk TYPE vbak-waerk, " SD document currency
    expand TYPE xfeld,
    END OF ty_vbak,
    2nd Table
    BEGIN OF ty_vbap,
    vbeln TYPE vbap-vbeln, " Sales document
    posnr TYPE vbap-posnr, " Sales document
    matnr TYPE vbap-matnr, " Material number
    netwr TYPE vbap-netwr, " Net Value of the Sales Order
    waerk TYPE vbap-waerk, " SD document currency
    END OF ty_vbap.
    DATA :
    1st Table
    gt_vbak TYPE TABLE OF ty_vbak,
    2nd Table
    gt_vbap TYPE TABLE OF ty_vbap.
    INITIALIZATION.
    v_1 = 'Maximum of records to read'.
    v_2 = 'With ''EXPAND'' field'.
    START-OF-SELECTION.
    Read Sales Document: Header Data
    SELECT vbeln kunnr netwr waerk erdat
    FROM vbak
    UP TO p_max ROWS
    INTO CORRESPONDING FIELDS OF TABLE gt_vbak.
    IF NOT gt_vbak[] IS INITIAL.
    Read Sales Document: Item Data
    SELECT vbeln posnr matnr netwr waerk
    FROM vbap
    INTO CORRESPONDING FIELDS OF TABLE gt_vbap
    FOR ALL ENTRIES IN gt_vbak
    WHERE vbeln = gt_vbak-vbeln.
    ENDIF.
    PERFORM f_display.
    Form F_DISPLAY
    FORM f_display.
    Macro definition
    DEFINE m_fieldcat.
    ls_fieldcat-tabname = &1.
    ls_fieldcat-fieldname = &2.
    ls_fieldcat-ref_tabname = &3.
    ls_fieldcat-cfieldname = &4. " Field with currency unit
    append ls_fieldcat to lt_fieldcat.
    END-OF-DEFINITION.
    DEFINE m_sort.
    ls_sort-tabname = &1.
    ls_sort-fieldname = &2.
    ls_sort-up = c_x.
    append ls_sort to lt_sort.
    END-OF-DEFINITION.
    DATA:
    ls_layout TYPE slis_layout_alv,
    ls_keyinfo TYPE slis_keyinfo_alv,
    ls_sort TYPE slis_sortinfo_alv,
    lt_sort TYPE slis_t_sortinfo_alv," Sort table
    ls_fieldcat TYPE slis_fieldcat_alv,
    lt_fieldcat TYPE slis_t_fieldcat_alv." Field catalog
    ls_layout-group_change_edit = c_x.
    ls_layout-colwidth_optimize = c_x.
    ls_layout-zebra = c_x.
    ls_layout-detail_popup = c_x.
    ls_layout-get_selinfos = c_x.
    IF p_expand = c_x.
    ls_layout-expand_fieldname = 'EXPAND'.
    ENDIF.
    Build field catalog and sort table
    m_fieldcat c_gt_vbak 'VBELN' 'VBAK' ''.
    m_fieldcat c_gt_vbak 'KUNNR' 'VBAK' ''.
    m_fieldcat c_gt_vbak 'NETWR' 'VBAK' 'WAERK'.
    m_fieldcat c_gt_vbak 'WAERK' 'VBAK' ''.
    m_fieldcat c_gt_vbak 'ERDAT' 'VBAK' ''.
    m_fieldcat c_gt_vbap 'POSNR' 'VBAP' ''.
    m_fieldcat c_gt_vbap 'MATNR' 'VBAP' ''.
    m_fieldcat c_gt_vbap 'NETWR' 'VBAP' 'WAERK'.
    m_fieldcat c_gt_vbap 'WAERK' 'VBAP' ''.
    m_sort c_gt_vbak 'KUNNR'.
    m_sort c_gt_vbap 'NETWR'.
    ls_keyinfo-header01 = 'VBELN'.
    ls_keyinfo-item01 = 'VBELN'.
    ls_keyinfo-item02 = 'POSNR'.
    Dipslay Hierarchical list
    CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
    EXPORTING
    i_callback_program = sy-cprog
    i_callback_user_command = 'USER_COMMAND'
    is_layout = ls_layout
    it_fieldcat = lt_fieldcat
    it_sort = lt_sort
    i_tabname_header = c_gt_vbak
    i_tabname_item = c_gt_vbap
    is_keyinfo = ls_keyinfo
    TABLES
    t_outtab_header = gt_vbak
    t_outtab_item = gt_vbap
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDFORM. " F_LIST_DISPLAY
    Form USER_COMMAND *
    FORM user_command USING i_ucomm TYPE sy-ucomm
    is_selfield TYPE slis_selfield. "#EC CALLED
    DATA ls_vbak TYPE ty_vbak.
    CASE i_ucomm.
    WHEN '&IC1'. " Pick
    CASE is_selfield-tabname.
    WHEN c_gt_vbap.
    WHEN c_gt_vbak.
    READ TABLE gt_vbak INDEX is_selfield-tabindex INTO ls_vbak.
    IF sy-subrc EQ 0.
    Sales order number
    SET PARAMETER ID 'AUN' FIELD ls_vbak-vbeln.
    Display Sales Order
    CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
    ENDIF.
    ENDCASE.
    ENDCASE.
    ENDFORM. " USER_COMMAND
    Kindly Reward Points If You Found The Reply Helpful,
    Cheers,
    Chaitanya.

  • How to implement table in applet

    hi friends
    i have no idea ,how to implement tables in awt for applet can u suggest way to solve my problem.im using jcreator to implement my project.

    Crosspost: http://forum.java.sun.com/thread.jspa?threadID=783376
    You already got plenty of answers. Why do you ask again? Didn't you like the answers?

  • How to Implement SSL with Oracle Applications R12 without using Load Balanc

    How to Implement SSL with Oracle Applications R12.1.3 without using Load Balancer

    Please refer to (Enabling SSL in Release 12 [ID 376700.1]).
    Thanks,
    Hussein

  • How to create table with row type in smart forms

    How to create table with row type in smart forms with out line type
    please explain me the procedure

    HI,
    A table type describes the structure and functional attributes of an internal table in ABAP. In ABAP programs you can reference a table type TTYP defined in the ABAP Dictionary with the command DATA <inttab> TYPE TTYP. An internal table <inttab> is created in the program with the attributes defined for TTYP in the ABAP Dictionary.
    A table type is defined by:
    its line type, that defines the structure and data type attributes of a line of the internal table
    the options for managing and accessing the data ( access mode) in the internal table
    the key ( key definition and key category) of the internal table
    The row type is defined by directly entering the data type, length and number of decimal places or by referencing a data element, structured type ( structure, table or view) or other table type. Or the row type can be a reference type.
    <b>for more info :</b> http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm
    Internal table
    Regards
    Sudheer

  • How to create table with resizable row ?

    how to create table with resizable row ?

    I'd suggest you start here:
    http://java.sun.com/docs/books/tutorial/uiswing/components/table.html

  • How to shift content with in cell in xml rules table

    Hi all scripters,
    I've created a table using xml rules with 3 nos of cells where first cell contain some data and so on but in next row first cell may of may not contain any data so in that row second cell data shifted to first cell and thired row data shifted to second cell which is very anxious for me since second cell data in each row should be in second cell only.
    For Instance-: Required output
    Title
    PageNo
    Subject
    Title
    46
    The Subject
    50
    Another Subject
    54
    Subject
    Title
    60
    Another Subject
    64
    The subject
    The out put I am getting by script-:
    Title
    PageNo
    Subject
    Title
    46
    The Subject
    50
    Another Subject
    54
    Subject
    Title
    60
    Another Subject
    64
    The subject
    myRuleSet = new Array ( new ProcessSec,
               new ProcessPara,
               new ProcessSecHead,
               new ProcessArt,
               new ProcessPG,
    with(myDocument){
        var elements = xmlElements;
         __processRuleSet(elements.item(0), myRuleSet);
    function ProcessSecHead(myXPath){
        this.name = "ProcessSecHead";
        this.xpath = myXPath;
        this.apply = function(myElement, myRuleProcessor){
       with(myElement){
                __skipChildren(myRuleProcessor);
                  var myNewElement = myContainerElement.xmlElements.item(-1).xmlElements.add(app.documents.item(0).xmlTags.item("Cell"));
         myElement.move(LocationOptions.atBeginning, myContainerElement.xmlElements.item(-1).xmlElements.item(-1));
        return true;
    function ProcessPara(){
        this.name = "ProcessPara";
        this.xpath = "//para";
        this.apply = function(myElement, myRuleProcessor){
                var myNewElement = myContainerElement.xmlElements.add(app.documents.item(0).xmlTags.item("Row"));
            return true;
    function ProcessArt(){
        this.name = "ProcessArt";
        this.xpath = "//para/aug";
        this.apply = function(myElement, myRuleProcessor){
            with(myElement){
                __processChildren(myRuleProcessor);
                var myNewElement = myContainerElement.xmlElements.item(-1).xmlElements.add(app.documents.item(0).xmlTags.item("Cell"));
                myElement.move(LocationOptions.atBeginning, myNewElement);  
            return true;
    function ProcessPG(myXPath){
        this.name = "ProcessPG";
        this.xpath = myXPath;
        this.apply = function(myElement, myRuleProcessor){
            with(myElement){
                __skipChildren(myRuleProcessor);
                var myNewElement = myContainerElement.xmlElements.item(-1).xmlElements.add(app.documents.item(0).xmlTags.item("Cell"));
                myElement.move(LocationOptions.atBeginning, myNewElement);
            return true;
    Any would be greatly appreciated
    Mac

    Wow, sorry for the delay.
    This paradigm is difficult enough to deal with, but Adobe's example code really does not encourage you to handle this reasonably at all.
    I've basically rewritten the entire process, and I've introduced a new paradigm for creating rules that I think is a lot more readable and flexible and allows for parametrization. Anyhow, here you go. Any questions?
    /*jslint undef: true, newcap: true, nomen: false, regexp: true,
            bitwise: true, onevar: true, indent: 4, white: false */
    /*global File, LocationOptions, PageSideOptions,
      UserInteractionLevels,
      __processChildren, __processRuleSet, alert, app */
    #include "glue code.jsx";
    // handy debugging function; e.g.: $.writeln(dumplist(x.xmlElements));
    function dumplist(l) {
        var i, rv = [];
        rv.push("has "+l.length+" elements:");
        for (i=0; i<l.length; i++) {
            rv.push("  "+i+"\t"+l[i].toSpecifier()+
                        "\t"+l[i].markupTag.name);
        return rv.join("\n");
    // Initialize a tags object to map strings to tags.
    function initTags(doc, tagnames) {
        var i, t, tags = {};
        for (i=0; i<tagnames.length; i++) {
            try {
                t = doc.xmlTags.add(tagnames[i]);
            } catch (e0) {}
            tags[tagnames[i]] = doc.xmlTags.itemByName(tagnames[i]);
         return tags;
    // Handy subtree functions
    function firstChildTag(node, tag) {
        var i, e = node.xmlElements;
        for (i=0; i<e.length; i++) {
            if (e[i].markupTag === tag) {
                return e[i];
        return node;
    function lastChildTag(node, tag) {
        var i, e = node.xmlElements;
        for (i=e.length-1; i>=0; i--) {
            if (e[i].markupTag === tag) {
                return e[i];
        return node;
    //// XML rule functions
    // Adobe's sample for how to define these is HORRIBLE.
    // Let's fix several of these problems.
    // First, a handy object to make clearer the return values
    // of XML rules:
    var XMLmm = { stopProcessing: true, continueProcessing: false};
    // Adobe suggest defining rules constructors like this:
    //   function RuleName() {
    //       this.name = "RuleNameAsString";
    //       this.xpath = "ValidXPathSpecifier";
    //       this.apply = function (element, ruleSet, ruleProcessor){
    //       //Do something here.
    //       //Return true to stop further processing of the XML element
    //       return true;
    //       }; // end of Apply function
    // And then creating a ruleset like this:
    //   var myRuleSet = new Array (new RuleName, new anotherRuleName);
    // That syntax is ugly and, and is especially bad if
    // you need to parametrize the rule parameters, which is the only
    // reasonable approach to writing reasonable rules. Such as:
    //   function addNode(xpath, parent, tag) {
    //       this.name = "addNode";
    //       this.xpath = xpath;
    //       this.apply = function (element, ruleProcessor) {
    //           parent.xmlElements.add(tag);
    //           return XMLmm.stopProcessing;
    // and then creating a ruleset like:
    //   rule = new Array (new addNode("//p", someTag));
    // So instead we introduce a makeRule function, that
    // allows us to leave behind all the crud. So then we can write:
    // addNode = makeRule("addNode",
    // function(element, ruleProcessor, parent, tag) {
    //     parent.xmlElements.add(tag);
    //     return XMLmm.stopProcessing;
    // and use:
    // rule = [ addNode("//p", someTag ];
    function makeRule(name, f) {
        return function(xpath) {
            var
                //xpath=arguments[0],
                   // "arguments" isn't a real array, but we can use
                   // Array.prototype.slice on it instead...
                   args=Array.prototype.slice.apply(arguments, [1]);
            return {
                name: name,
                xpath: xpath,
                apply: function(element, ruleProcessor) {
                        // Slice is necessary to make a copy so we don't
                        // affect future calls.
                    var moreargs = args.slice(0);
                    moreargs.splice(0, 0, element, ruleProcessor);
                    return f.apply(f,moreargs);
    // Create a new node at parent. Doesn't do
    // anything with the XPath context node.
    var addNode = makeRule("addNode",
    function(element, ruleProcessor, parent, tag) {
        parent.xmlElements.add(tag);
        return XMLmm.stopProcessing;
    // Create a cell for a table, adding a node to
    // the last node of the last node of the
    // table. Duplicate the context
    // node as a child of that cell.
    var makeCell = makeRule("makeCell",
    function(element, rp, table, outertag, innertag) {
        var
            cell = table.xmlElements[-1].xmlElements.add(outertag),
            copy = element.duplicate();          
        copy.markupTag = innertag;
        copy.move(LocationOptions.AT_BEGINNING, cell);
        return XMLmm.stopProcessing;
    // Apply from() to the context node to get
    // a source node. Copy that source node
    // to be the first child of the context node.
    var copyFromToChild = makeRule("copyFromToChild",
    function(element, ruleProcessor, from) {
        var copy = from(element).duplicate();       
        copy.move(LocationOptions.BEFORE,
          element.xmlElements[0]);   
        // __skipChildren(ruleProcessor);
        return XMLmm.continueProcessing;
    // We don't actually use this, but it was useful
    // in debugging. Essentially "rename" a node.
    // Set the tag of the context node to the
    // specified tag.
    var setTag = makeRule("setTag",
    function(element, ruleProcessor, newtag) {
        element.markupTag = newtag;
        return XMLmm.stopProcessing;
    // Apply from() to the context node to get
    // a source node. Apply to() to the
    // context node to get a destination node.
    // Move the source node in the specified
    // location (how) to the destination node.
    var moveFromTo = makeRule("moveFromTo",
    function (element, ruleProcessor, from, how, to) {
        __processChildren(ruleProcessor);
        var src = from(element);
        src.move(how, to(element));
        return XMLmm.continueProcessing;
    // end rule functions
    // It's just not worth rewriting some of Adobe's ugly functions...
    // but at least fix it up so it JSLints.
    function myGetBounds(myDocument, myPage){
        var
            myPageWidth = myDocument.documentPreferences.pageWidth,
            myPageHeight = myDocument.documentPreferences.pageHeight,
            myX1, myX2, myY1, myY2;
        if(myPage.side === PageSideOptions.leftHand){
            myX2 = myPage.marginPreferences.left;
            myX1 = myPage.marginPreferences.right;
        else{
            myX1 = myPage.marginPreferences.left;
            myX2 = myPage.marginPreferences.right;
        myY1 = myPage.marginPreferences.top;
        myX2 = myPageWidth - myX2;
        myY2 = myPageHeight - myPage.marginPreferences.bottom;
        return [myY1, myX1, myY2, myX2];
    function myGetScriptPath() {
        try {
            return app.activeScript;
        catch(myError){
            return new File(myError.fileName);
    // OK, the actual program.
    function main() {
        var
            doc = app.activeDocument,
            page = doc.pages[0],
            root = doc.xmlElements[0],
            //inputFile = new File(myGetScriptPath().path+ "/mac.xml"),
            inputFile = File.openDialog(),
            tags = {},
            p, table;
        if (app.documents.length<1) {
           alert ("Open a document and run the Script");
           return false;
         // Let's not use a seperate variable for each tag. Instead,
         // we'll keep an Object that maps strings to tags.
        tags = initTags(doc,
                             ["table", "para", "article",
                              "section", "section-head", "tr", "td", "p"]);
        doc.xmlImportPreferences.allowTransform = false;
        doc.xmlImportPreferences.ignoreWhitespace = true;
        app.scriptPreferences.userInteractionLevel =
              UserInteractionLevels.NEVER_INTERACT;
        doc.importXML(inputFile);
        app.scriptPreferences.userInteractionLevel =
              UserInteractionLevels.INTERACT_WITH_ALL;
        // For each <para>, copy the parent's <section-head> inside.
        // Next, move each <article> node to the end of the <para>,
        // placing it after the <page> node.
        __processRuleSet(root, [
            copyFromToChild(
                "//para",
                function(n) {
                        return firstChildTag(n.parent,tags["section-head"]);
            moveFromTo(
                "//para",
                function(n) { return firstChildTag(n, tags.article); },
                LocationOptions.AT_END,
                // This is more general than we need to be; we're moving
                // to "the end", but the end of WHAT? It need not be the
                // <para>, it could be some other node.
                function(n) { return n; })
        // Add a <p> node to hold the table we're about to create.  It's
         // not super-clear from the documentation, but
         // convertElementToTable creates a text node of the table in the
         // XLM structure. In order to then place that into a frame, there
         // has to be an enclosing XML node to do so. We choose <p> for
         // lack of a better tag.
        p = root.xmlElements.add(tags.p);
        table = p.xmlElements.add(tags.table);
        // For each para node, add a <tr> to the table.  For each
        // <section-head>, <page>, or <article>, add a <td> to the last
        // <tr> of the table
        __processRuleSet(root, [
            addNode("//para", table, tags.tr),
            makeCell("//para/section-head", table, tags.td, tags.p),
            makeCell("//para/page", table, tags.td, tags.p),
            makeCell("//para/article", table, tags.td, tags.p)
         // Make it a table and GO!
        table.convertElementToTable(tags.tr, tags.td);
        p.placeIntoFrame(page, myGetBounds(doc, page));
    main();
    I also tried to format this to 72 columns so that it doesn't scroll on the forums. Let's see if that works...Nope, not quite. Oh well. Close enough.

  • How to display data in table with dynamic rows, section wise in a page.

    Hello all,
    I work on report creation in BI Publisher where I need to display data from xml in a table in pdf format.The output page is divided into two vertical sections , containing tables, with exactly same columns on left and right sections. The number of rows in table depends on the output of the fetching query. The page is to be populated in such a way that, at first, the left table is populated, then the next rows fill up the table on the right section of the page, if more rows are left, they fill up the tables on next page[first the left table, and then the right one, in a similar fashion as in page 1]
    On a bird's eye view, the data needs to be simply mapped to a table, with dynamic number of rows, and so can span number of pages depending on size of data. On a implementation level, I am stuck in getting the left section of the page populated first, then the right section[in place of the right page], and then the next page.
    Please guide me if someone has any idea in getting this achieved.
    Thanks in advance.

    Thanks for the response...
    I am able to get the desired functionality. I just need the tables to be inside a bigger table, that also has a dividing line between the two columns. This is was is intended in the req. provided to me. The column formatting option provides me a line ,but that is not further modifiable .Please help me in getting a perpendicular line between the two columns, which I need to be of a specified width and color.

  • How to hide rows with merged cells?

    I would like to know how to hide rows on numbers with merged cells, could do it normally at excel but I am not being able to do it at Numbers.
    thanks!

    Felipe,
    To hide a row with Merged Cells, Un-Merge first, then Hide. Select the Merged Cells and Table > Unmerge.
    Note that this is only a problem with vertically merged cells when you want to Hide a Row.
    If you want to Hide a Column, you can't have a Horizontal Merge that involves that Column.
    Jerry

  • Fact tables with common and uncommon dimensions

    Hi -
    I have 2 facts:
    F1 with Dimensions D1, D2, D3, D4
    F2 with dimensions D1, D2, D5, D6
    If I create a report with F1, F2, D1, D2 then 2 queries are created and the report is correct. Why am I not able to create a report with F1, F2, D1, D2, D3?
    Thanks !

    Hi Veeravalli -
    I found this blog helpful as it details out how to establish the relation. http://108obiee.blogspot.ca/2009/08/joining-two-fact-tables-with-different.html
    I had a little difficulty in understanding what you wanted to say or implement. Now, after reading it 3-4 times I figured out that you mean 1. what the blog says 2. possibility of combining the facts as different source.
    As a newbie it was difficult to understand it clearly.
    Thanks !

  • How To Create Table with Static Data

    JDEV 10.1.3
    ADF BC
    ADF Faces
    I am trying to make some simple screen/screenflow diagrams to help flesh out some requirements. To do that, I need to make a table with static data that is not hooked up to a data source (because the data model has not yet been clearly defined, and I'm using the diagrams to help iterate the requirements).
    Is it possible to create a table that shows static data (i.e. a set of rows that does not come from a model data source, but rather is hardcoded.)
    If not, how does one create mock ups without actually implementing the data model?
    Thank you.

    Deepak, what specifically in those 2 links from Amis are useful? Those 2 posts are about bind variables, not static list of values?
    In response to the original poster, I'll attempt to help a little more.
    In the 11g release you can create VOs based on a static list of values. However in your case on 10.1.3, the best method I've found is to create a VO based on a SELECT <columns> FROM DUAL statement. The columns then include your dummy data. If you need more than one row, simply UNION ALL a number of SELECT statements together.
    What I haven't checked, is when you eventually transform the VO based on the SELECT DUAL statement into a VO based on an EO drawing real data from the database, is it an easy process? I recommend you try this out before committing to the approach above. Let us know how you go.
    Regards,
    CM.

  • Select from 2 tables with common key and than left join(unique result)

    Hi,
    I have 2 tables that have a common id (Customer_id) and I have a third table which contain her key consist of 3 column ( Customer_id , rms_customer_id,billind_tree_id) and have the manager_name field
    I am using a left join because not all the customers have a manager.
    I need to take only the manager_name field from the left join but the problem is that I am not getting a unique name results because the customer_id is not the primary key(only part of )
    so I have use the following :
    left join
    ( select * from ACCOUNT_Manager am where
    rms_customer_id <= all (select rms_customer_id from ACCOUNT_Manager am2 where
    am2.customer_id = am.customer_id )) am
    on c.ID = am.CUSTOMER_ID (C is one of the first 2 tables with the ID as key)
    Is there anyway more efficient of doing it ?
    Thanks

    Please consider the following when you post a question. This would help us help you better
    1. New features keep coming in every oracle version so please provide Your Oracle DB Version to get the best possible answer.
    You can use the following query and do a copy past of the output.
    select * from v$version 2. This forum has a very good Search Feature. Please use that before posting your question. Because for most of the questions
    that are asked the answer is already there.
    3. We dont know your DB structure or How your Data is. So you need to let us know. The best way would be to give some sample data like this.
    I have the following table called sales
    with sales
    as
          select 1 sales_id, 1 prod_id, 1001 inv_num, 120 qty from dual
          union all
          select 2 sales_id, 1 prod_id, 1002 inv_num, 25 qty from dual
    select *
      from sales 4. Rather than telling what you want in words its more easier when you give your expected output.
    For example in the above sales table, I want to know the total quantity and number of invoice for each product.
    The output should look like this
    Prod_id   sum_qty   count_inv
    1         145       2 5. When ever you get an error message post the entire error message. With the Error Number, The message and the Line number.
    6. Next thing is a very important thing to remember. Please post only well formatted code. Unformatted code is very hard to read.
    Your code format gets lost when you post it in the Oracle Forum. So in order to preserve it you need to
    use the {noformat}{noformat} tags.
    The usage of the tag is like this.
    <place your code here>\
    7. If you are posting a *Performance Related Question*. Please read
       {thread:id=501834} and {thread:id=863295}.
       Following those guide will be very helpful.
    8. Please keep in mind that this is a public forum. Here No question is URGENT.
       So use of words like *URGENT* or *ASAP* (As Soon As Possible) are considered to be rude.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to Implement table view if I not know table columns ?

    I need to create table with WebDynPro IView, columns of which is defined by user input.
    I'm nivice.
    Better if you provide sample how to do it.
    Or, any detailed explanation is welcome.
    And, how to create Hierancical table - format of which depends from user input?
    Hierancical table - sectioned table made by 'group by' SQL operation.
    thanks

    thanks Pedro 
    but I did not understand one important thing, to some complete understanding:
    does a way to visualize SQL Select query - to define big? dynamically hand coded program?
    Or -does exist table controls that can show result of SQL query ?
    Does exist class structures that can own abstract Data from query,
    like result set which includes scheme of data, (collection of fields and types) ?
    does exist such a third-party libaries?
    evidently, such dynamic programming is used in almost every task ,
    using same and well known methods in pure programming languages (not WedDynPro)
    so  must they exist methods to automate such a big programming ?
    something useful
    Re: Table binding at runtime
    How to add columns in table at runtime?

  • How to find table with colum that not support by data pump network_link

    Hi Experts,
    We try to import a database to new DB by data pump network_link.
    as oracle statement, Tables with columns that are object types are not supported in a network export. An ORA-22804 error will be generated and the export will move on to the next table. To work around this restriction, you can manually create the dependent object types within the database from which the export is being run.
    My question, how to find these tables with colum that that are object types are not supported in a network export.
    We have LOB object and oracle spital SDO_GEOMETRY object type. our database size is about 300G. nornally exp will takes 30 hours.
    We try to use data pump with network_link to speed export process.
    How do we fix oracle spital users type SDO_GEOMETRY issue during data pump?
    our system is 32 bit window 2003 and 10GR2 database.
    Thanks
    Jim
    Edited by: user589812 on Nov 3, 2009 12:59 PM

    Hi,
    I remember there being issues with sdo_geometry and DataPump. You may want to contact oracle support with this issue.
    Dean

Maybe you are looking for

  • CREATE DATABASE cannot create a control file

    I know, it's not supported. Please refrain from reminding me. I am trying to install a second database on an Oracle 8i installation (8.1.7.4) on a Windows 2003 server. I cannot use DBCA because it doesn't work, so I create the databases manually usin

  • Windows 2003 64 bit and Oracle Client install issues

    A bit of background. We are a Microsoft shop using SQL Server 2005 / Windows 2003 64 bit servers. We need to have ODBC drivers and Oracle OLE provider to connect and transfer data vis SSIS. We have installed a package (ODAC10203x64.zip) for OADC 10.0

  • Problem in Translation Transport

    Hi, I have done the translation of the Text element using SE38. But my problem is that even i manually include the objects in the transport request. the translation is not reflecting in the target system. Thanks, Martin

  • Migrating Cognos Reports to Birt

    Hi, I am relatively less familiar with Cognos. What is the best way to migrate a bunch of Cognos Reports to Birt. I have the Cognos Report files and the query definition file from Cognos. Any help will be greatly appreciated.

  • Download dashboard reports to Excel

    Dose any body know how to let the user the possibility to Download a pivot table results from the dashboard to Excel Moshe