How to group data and assign cell names using Excel templates

Hi all,
reading the article "Real Excel Templates 1.5" on the Tim Dexter's Blog, I found that I need hierarchical data for Excel templates. So only in this way I can group my data.
My hierarchy is composed by 3 levels:
lev 1 DESTINATION: is the higher level that groups SERVICES and COUNTRY
lev 2 SERVICES: is the level that groups the countries
lev 3 COUNTRY: is the lowest level with the COUNTRY, CALLS and CALLS_MINUTES details
An example of my hierarchy is this:
lev 1 INTERNATIONAL
lev 2 INTERNATIONAL FIXED
lev 3 Albania 90 438,15
lev 3 Armenia 1 16,95
lev 2 INTERNATIONAL MOBILE
lev 3 Albania Mobile 161 603,35
lev 3 Australia Mobile 6 34,38
lev 1 NATIONAL
lev 2 HELLAS LOCAL
lev 3 Hellas Local 186,369 707940,6
lev 2 HELLAS MOBILE
lev 3 Hellas Mobile Cosmote 31,33 43856,97
lev 3 Hellas Mobile Q-Telecom 2,398 4343,78
lev 2 HELLAS NATIONAL
lev 3 Hellas Long Distance 649 1499,55
lev 1 INTERNET
lev 2 INTERNET CALLS
lev 3 Cosmoline @Free 79 2871,3
So, my data template is the following (with exactly the hierarchy I want for my data):
<dataTemplate name="emp" description="destinations" dataSourceRef="GINO_DB">
     <dataQuery>
          <sqlStatement name="Q1">
               <![CDATA[SELECT 1 TOTAL_CALLS, 2 TOTAL_CALLS_MIN from dual ]]>
          </sqlStatement>
          <sqlStatement name="Q2">
               <![CDATA[SELECT dest.ID_DESTINATION, dest.DESC_DEST from ale.AAA_DESTINATION dest order by dest.ID_DESTINATION ]]>
          </sqlStatement>
          <sqlStatement name="Q3">
               <![CDATA[SELECT ser.ID_SERVICE,
ser.ID_DEST,
ser.DESC_SERVICE,
count.ID_COUNTRY,
count.ID_SERV,
count.COUNTRY,
count.CALLS,
count.CALLS_MIN
from ale.AAA_SERVICE ser, ale.AAA_COUNTRY count
where ser.ID_SERVICE= count.ID_SERV
and ID_DEST = :ID_DESTINATION
order by ser.ID_SERVICE ]]>
          </sqlStatement>
     </dataQuery>
     <dataStructure>
          <group name="G_TOT" source="Q1">
               <element name="TOTAL_CALLS" value="G_COUNTRY.CALLS" function="SUM()"/>
               <element name="TOTAL_CALLS_MIN" value="G_COUNTRY.CALLS_MIN" function="SUM()"/>
               <group name="G_DEST" source="Q2">
                    <element name="DESC_DEST" value="DESC_DEST"/>
                    <element name="DEST_CALLS_SUBTOTAL" value="G_COUNTRY.CALLS" function="SUM()"/>
                    <element name="DEST_CALLS_MIN_SUBTOTAL" value="G_COUNTRY.CALLS_MIN" function="SUM()"/>
                    <group name="G_SERV" source="Q3">
                         <element name="DESC_SERVICE" value="DESC_SERVICE"/>
                         <element name="SERV_CALLS_SUBTOTAL" value="G_COUNTRY.CALLS" function="SUM()"/>
                         <element name="SERV_CALLS_MIN_SUBTOTAL" value="G_COUNTRY.CALLS_MIN" function="SUM()"/>
                         <group name="G_COUNTRY" source="Q3">
                              <element name="COUNTRY" value="COUNTRY"/>
                              <element name="CALLS" value="CALLS"/>
                              <element name="CALLS_MIN" value="CALLS_MIN"/>
                         </group>
                    </group>
               </group>
          </group>
     </dataStructure>
</dataTemplate>
Not considering the CALLS and CALLS_MIN details (I focused only on the COUNTRY which is as the same level), with this data template, making tests on my excel template, I noticed that I can group ONLY two nested levels using the format XDO_GROUP_?group_name?
XDO_GROUP_?G_DEST?
XDO_GROUP_?G_SERV?
or
XDO_GROUP_?G_DEST?
XDO_GROUP_?G_COUNTRY?
or
XDO_GROUP_?G_SERV?
XDO_GROUP_?G_COUNTRY
If I try to group all the three level together in this order
XDO_GROUP_?G_DEST?
XDO_GROUP_?G_SERV?
XDO_GROUP_?G_COUNTRY
I don't have the output I would like to have.....
Practically, in my excel I have 3 rows with the following labels
DESTINATION (called XDO_?DESC_DEST? - =Sheet1!$A$3
SERVICE (called XDO_?DESC_SERVICE? - =Sheet1!$A$4
COUNTRY (called XDO_?COUNTRY? - =Sheet1!$A$5)
where
XDO_GROUP_?G_DEST? (=Sheet1!$A$3:$B$5)
XDO_GROUP_?G_SERV? (=Sheet1!$A$4:$B$5)
XDO_GROUP_?G_COUNTRY     (=Sheet1!$A$5:$B$5)
I noticed that if I don't use the last one (XDO_GROUP_?G_COUNTRY), my output is correct even if I don't have more than one country for each service....As soon as I put XDO_GROUP_?G_COUNTRY....I loose all the 2nd level and the most of times the 3rd level too....
So...I think that the problem is how I choose the excel cells when I assign the XDO_GROUP_?group_name?
Anybody had made some tests, or can help me ???? I'm becoming crazy.....
Any help will be appreciated
Thanks in advance
Alex

But how can I use tags XDO_GROUP_?? to group data correctly using hierarchial xml, I don't want to use flat XML.
Yep, I using Template Builder in Excel to run reports localy, and output is wrong
It's seems that groups couldn't define the level of nesting, I think...
How can I write it in XDO_METADATA sheet?
Though I have hierarchial XML and groups should define nesting level correctly.
I have no clue.....

Similar Messages

  • How to update data and create notification no using isr fm.

    Hi,
    Without creating the scenario in SFP, is it possible to update data directly in ISR_SPECIAL_DATA_SET,
    i want to use fm ISR_SPECIAL_DATA_GET in my program.
    i'm trying to achive same using ISR_NOTIFICATION_CREATE and built general, special table and long text to get a
    notification number. but  notification no is not creating ,  return msg is  ( E I 421   |Notification type  not defined ) even i'm passing currect notif type.                            
    Regards
    Ali

    Hi vijay,
    Nice to see your reply, I think, you are right...
    The Fm ISR_SPECIAL_DATA_GET already used in my various reports, Workflows etc.
    And I have a custom WebDynpro java based application which have similar data and have custom notification no. + (in this case probably i need to create new fm ZISR_SPECIAL_DATA_GET to use in above report and wf)+
    To avoid the rework and minimized the code Iu2019m trying to create notification no using standard fm and link custom WD data with ISR_SPECIAL_DATA_GET.
    Please let me know how to proceed with that
    Regards
    Raza

  • How to dowload data in particular cell of designed excel sheet

    hi everyone
    i want to dowload the data in a excel sheet, but this excel sheet is designed in such a format that i have download each field of internal table in a specified cell only , <b>gui_download</b> function module simply download the data in excel sheet by taking the first cell for first field but i dont want that

    Hi Neetu,
    you can use OLE in that case.
    REPORT  ZTEST_EXCEL             .
    INCLUDE ole2incl.
    DATA: application TYPE ole2_object,
           workbook TYPE ole2_object,
           sheet TYPE ole2_object,
           cells TYPE ole2_object.
    CONSTANTS: row_max TYPE i VALUE 256.
    DATA index TYPE i.
    DATA: BEGIN OF itab1 OCCURS 0,
    first_name(10),
    last_name(10),
    END OF itab1.
    START-OF-SELECTION.
    itab1-first_name = '123445'.
    itab1-last_name = 'tesst'.
    append itab1.
    clear itab1.
    itab1-first_name = '123446'.
    itab1-last_name = 'tesst'.
    append itab1.
    clear itab1.
      CREATE OBJECT application 'excel.application'.
      SET PROPERTY OF application 'visible' = 1.
      CALL METHOD OF application 'Workbooks' = workbook.
      CALL METHOD OF workbook 'Add'.
    * Create first Excel Sheet
      CALL METHOD OF application 'Worksheets' = sheet
                                   EXPORTING #1 = 1.
      CALL METHOD OF sheet 'Activate'.
      SET PROPERTY OF sheet 'Name' = 'Sheet1'.
      LOOP AT itab1.
        index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
        CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
        SET PROPERTY OF cells 'Value' = itab1-first_name.
            index = index + 1. " 1 - column name
        CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
        SET PROPERTY OF cells 'Value' = itab1-last_name.
      ENDLOOP.
    * Save excel speadsheet to particular filename
      CALL METHOD OF sheet 'SaveAs'
                     EXPORTING #1 = 'c:tempexceldoc1.xls'     "filename
                                #2 = 1.                          "fileFormat
    Regards
    vijay

  • Group Already Created (Assign Another Name)

    Hi SD Guru's
    I am getting this message "Group Already Created (Assign Another Name) " as soon as i enter my order type , sales org , dist chann , and division in VA01 and press Enter .
    Message No. is JVSD002
    What could be the possible reason for the same?
    How can it be resolved.
    Regards
    Ravi

    Hi SD Guru's
    I am getting this message "Group Already Created (Assign Another Name) " as soon as i enter my order type , sales org , dist chann , and division in VA01 and press Enter .
    Message No. is JVSD002
    What could be the possible reason for the same?
    How can it be resolved.
    Regards
    Ravi

  • PERWSHRG form - How to end/terminate and assignment with end dated entered by user Apps R12.1

    Hi All.
    How to end/terminate and assignment with end dated entered by user Apps R12.1?
    when i try to end or terminate and assignemnt the sysdate is begin registered for effective_end date.
    any help is reaaly greatly appriciated
    thanks and regards
    Soni

    Hi Soni,
    What is the end date you want to enter as. Are you talking about 31-Dec-4712. If not, please change the sytem effective date (calendar icon on the oracle menu) to the date you want to terminate and follow the termination process.
    Thanks,
    Avinash

  • How do you date and time stamp iCal entries?  We share an event calendar and need to know when a new event was entered into iCal.

    How do you date and time stamp iCal entries?  We share an event calendar and need to know when a new event was entered into iCal.

    BKBK,
    Thank you for your response. That does adequately cover the
    client-originated sessions, but still leaves the ability I am
    looking for unavailable.
    It did serve to definitively answer my most pressing
    question, however, with this statement:
    Note: ColdFusion cannot create a session if an initiator
    application uses a SendGatewayMessage method to start an
    interaction with a client, such as an SMS user. In this case, the
    sending code must keep track (for example, in a database) of the
    messages it sends and their destinations. When a response event
    arrives, it can look up the origniatorID to determine whether it
    was in response to an outgoing message.
    I will play around with the Application scope to see if there
    might be a workable solution there.
    RLS

  • How to group data from two tables ?

    Hello,
    I have two tables and i want to group data from them but two table not linked.
    Table TEXT_IN : ID_IN (primary_key), DATE_IN
    Table TEXT_OUT : ID_OUT(primary_key),DATE_OUT
    Example :
    Result :Group Date and Order by IN,OUT
    And It seems a bit
    confusing because we do not link
    .You can give me solutions.
    Thank you.

    SELECT MAX(CASE WHEN Rn = 1 THEN [IN] END) AS [IN1],
    MAX(CASE WHEN Rn = 1 THEN [OUT] END) AS [OUT1],
    MAX(CASE WHEN Rn = 2 THEN [IN] END) AS [IN2],
    MAX(CASE WHEN Rn = 2 THEN [OUT] END) AS [OUT2],
    MAX(CASE WHEN Rn = 3 THEN [IN] END) AS [IN3],
    MAX(CASE WHEN Rn = 3 THEN [OUT] END) AS [OUT3],
    MAX(CASE WHEN Rn = 4 THEN [IN] END) AS [IN4],
    MAX(CASE WHEN Rn = 4 THEN [OUT] END) AS [OUT4],
    MAX(CASE WHEN Rn = 5 THEN [IN] END) AS [IN5],
    MAX(CASE WHEN Rn = 5 THEN [OUT] END) AS [OUT5],
    FROM
    SELECT COALESCE(m.DATE_IN,n.DATE_IN) AS DATE_IN,
    COALESCE(m.Seq,n.Seq) AS Seq,
    ID_IN AS [IN],
    ID_OUT AS [OUT],
    ROW_NUMBER() OVER (PARTITION BY Seq ORDER BY COALESCE(m.DATE_IN,n.DATE_IN)) AS Rn
    FROM
    SELECT ROW_NUMBER() OVER (PARTITION BY DATE_IN ORDER BY DATE_IN) AS Seq,*
    FROM TEXT_IN
    )m
    FULL OUTER JOIN
    SELECT ROW_NUMBER() OVER (PARTITION BY DATE_IN ORDER BY DATE_IN) AS Seq,*
    FROM TEXT_OUT
    )n
    ON n.Seq = m.Seq
    AND n.DATE_IN = m.DATE_IN
    )t
    GROUP BY Seq
    to make it dynamic see
    http://sqlblogcasts.com/blogs/madhivanan/archive/2007/08/27/dynamic-crosstab-with-multiple-pivot-columns.aspx
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to compare date and time together

    Hi,
    How to compare Date and Time together?
    For example in a database table there are two fields rundate and runtime.  I want to compare these two with perticular date and time in the program.  Like, I want to pull all the records where the records's date and time are less than a perticular date and time in the program.
    Hope the question is clear...
    Thanks.
    Kavita

    Hi Kavita
    There is no as such Date and Time Comparision FM in Standard SAP  But You can define your own like this
    <b>FUNCTION ZAV4_COMPAREDATETIME.
    ""Lokale Schnittstelle:
    *"  IMPORTING
    *"     REFERENCE(DATE1) TYPE  DATS
    *"     REFERENCE(TIME1) TYPE  TIMS
    *"     REFERENCE(DATE2) TYPE  DATS
    *"     REFERENCE(TIME2) TYPE  TIMS
    *"  EXPORTING
    *"     VALUE(TWOISMORETOPICAL) TYPE  C
      twoismoretopical = ''.
      if date2 > date1.
        twoismoretopical = 'X'.
      else.
         if date2 = date1 and time2 > time1.
           twoismoretopical = 'X'.
         endif.
      endif.
    ENDFUNCTION.</b>
    Regards
    Mithlesh

  • How describe model data and  get select in DB throw topLink.

    Hello,
    I have table from code
    create table t_tree
    id int primary key,
    parent_id int,
    value varchar2(255)
    Alter table t_tree
    add constraint constr_id_parent foreign key (parent_id) references t_tree (id)
    I must get query
    select level as lv,lpad('-@-', (level-1)*2)||value as MMM, t.* from t_tree t
    connect by prior id=parent_id
    start with T.PARENT_ID is null
    How describe model data and get select in DB throw topLink.
    Dema.

    So you'll probably have to write a function which uses dynamic SQL to retrieve the desired message text, like this untested one:
    CREATE OR REPLACE FUNCTION get_msg(p_db IN VARCHAR2,
                                       p_id IN NUMBER)
       RETURN VARCHAR2
    IS
       msg_txt  VARCHAR2(4000);
    BEGIN
       -- make sure p_db is a valid database link ...
       EXECUTE IMMEDIATE 'SELECT d_msg FROM msg@' || p_db || ' WHERE t_id = :id' INTO msg_txt USING p_id;
       RETURN msg_txt;
    EXCEPTION
       WHEN NO_DATA_FOUND THEN
          RETURN NULL;
    END get_msg;
    /The you can update likeUPDATE mex
       SET t_msg = get_msg(db_id, t_id);Hth, Urs

  • How can i access and assign java xml Document variable in javascript block

    How can i access and assign org.w3c.dom.Document variable in javascript block
    I tried this xmlDoc = "<%=xmldoc%>";
    it is not working
    plz give me solution.
    thanx
    Vidya

    The solution would only work on MS IE browsers, as other browsers do not support an XML DOM.
    It can be done, but you would be stuck with using the Microsoft broswer. If that is acceptable, I have some example code, and a book recommendation.

  • How to display date and time on jsf page

    Hi,
    how to display date and time on jsf page
    we are using 11.2.0.0 jdeveloper on windows.
    thanks
    Edited by: user12187801 on 26-Jul-2012 01:42

    Your question is certainly lacking some information.
    If you want a constantly updating date/time - then JavaScript is your best bet, and Google would find you examples like [url http://www.webestools.com/scripts_tutorials-code-source-7-display-date-and-time-in-javascript-real-time-clock-javascript-date-time.html]this
    If you meant something else, then it's back to you to explain.

  • How to set date and time on apple tv

    how to set date and time on apple tv

    Assuming this is not the first time you have used your Apple TV
        1.    You might try restarting the Apple TV by removing ALL the cables for 30 seconds.
        2.    Also try restarting the router.
        3.    If the problem persists, try a restore, you may want to try the previous procedures several times before doing this.
    If this is a new Apple TV, it may also be that your network router is not allowing access to the timeserver, check that your router allows access over port 123.

  • How to find date and time on photo taken by iphone?, How to find date and time on photo taken by iphone?

    How to find date and time on iphone's photo taken?

    in iPhoto no matter the source of the photo you see the information about th ephoto by selecting the photo and showing info (the get info button may be in a different location depending on the version of iPhoto you have)
    If you are not aking an iPhoto question but are asking an iPhone question instead then repost in the iPhone forum - iPhoto has no association with the iPhone
    LN

  • I mac -- how do I transfer template date and logo to the other 9 template cards. I am new to this and need step by step.  I have the first template completed. Thanks

    I mac -- how do I transfer template date and logo to the other 9 template cards.
    I am new to this and need step by step.  I have the first template completed.
    Thanks

    Apps and media are forever tied to the AppleID used to download them.
    You cannot transfer from downloads from one AppleID to another, nor
    can you merge AppleIDs. If you wish to start using your own AppleID,
    you will have to redownload all the items you wish - paying again under your
    AppleIDfor anything requiring payment.
    Logout of iTunes under your old ID and login using the new ID.

  • How to Extract data and reports from the SAP BW warehouse

    Hi to All Guru's
    I am new to SAP BW. Can any one help me to know, How to Extract data and reports from SAP BW. Do we use any tools.  After Extracting the data from SAP BW how can we move all the data to Cognos.  It would be kind enough to provide me with any documentation or links.  Step by step procedure would be very much helpfull to me.
    Thanks
    Venu

    Hi Voodi
    Thanks for the quick response. I think Open hub is to extract the data from SAP BW, but what about sending this data into Cognos.  Can you please let me know in detail regarding answer. If possible send me any documentation or links regarding this.  Thanks for your concern.
    Venu

Maybe you are looking for