How to make crosstab dynamic?

I have this crosstab query by using DECODE function:
select engid,
max(decode(srv_period, '2012-1', Q1_Percentage, 0)) as "2012-1",
max(decode(srv_period, '2012-2', Q1_Percentage, 0)) as "2012-2"
from
+(+
select a.srv_year || '-' || a.srv_month as srv_period, trim(b.engid) as engid,
round((count(case when left(a.Q1_Product,1) in ('4', '5') then 1 else null end) * 100 / count(case when left(a.Q1_Product,1) in ('1', '2', '3', '4', '5') then 1 else null end)),2) as q1_percentage
from srv_main a,
biw_hda_event b
where a.evtnum = b.eveid
group by a.srv_year || '-' || a.srv_month, b.engid
+) group by engid+
How can I make the srv_period dynamic? The value of it comes from srv_main. srv_period fields.
Thanks in advance.

Hi,
See thris thread:
Help for a query to add columns

Similar Messages

  • How to make a dynamic text  be SMS by fl2.1

    Now ,I know use " getURL("sms:"+telnumber) "to send sms to a
    specified no.,but how to make a dynamic text be the sms content.?
    Many thx!:

    Ciao,
    this should work:
    smstxt = "ciao, happy holidays";
    telnum = "1234567890";
    getURL("sms:"+telnum+"?body="+smstext);
    body is a keyword.
    Alessandro

  • HOW TO MAKE WORKFLOW DYNAMIC..???

    HI,
    i am working on a workflow in which i have to assign users to a certain role but the problem which i am facing is that firslt all these roles were static i.e. they were hard coded earlier so the new roles which i am making,they are not reflecting in the workflow.
    So can anyone help me as to how to make it dynamic so that the new rles which i am maiking should also start reflecting..

    Calculated field should help -
    see here for more information on this topic,
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/400cc218-ea7f-4f9d-a3eb-c5289bdc05c4/sharepoint-designer-workflow-custom-subject-lines
    http://sharepoint.stackexchange.com/questions/43301/how-to-set-the-subject-of-the-email-to-have-a-combination-of-static-words-and-fi
    http://blog.henryong.com/2008/01/07/custom-sharepoint-designer-subject-lines-with-calculated-fields/
    If the subject is predefined in list, you could try to populate the data from the list using string builder.
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if my reply helps you

  • How to make my dynamic form pages flow correctly?

    I have created a dynamic form which has multiple questions with expandable text fields that will take multiple pages once completed.  I do not know how to make the form flow correctly past the first page.  I can attach the form if I knew how to do that.

    Thank you Paul.  Your editing assistance was greatly appreciated. I think I now understand that there should be only one page subform that is flowed, regardless of how many text box objects I have in my questionnaire. This did the trick.

  • How to make crosstab report in crystal report

    Hi all ,
    I want to make a crosstab report in crystal report
    my query is like this
    select YearDate.year ,
    (currentasset.currentaset / currentliability.currentliability  ) as CurrentRatio
    ,(currentasset.currentaset - Inventory.Inventoryaset / currentliability.currentliability ) as QuickRatio
    from
    select distinct YEAR(JDT1.RefDate) as year from JDT1
    )YearDate left join
    select YEAR(JDT1.RefDate) as year,sum(JDT1.Debit - JDT1.Credit ) as currentaset from JDT1,OACT
    where JDT1.Account = OACT.AcctCode
    and OACT.AcctCode = '11'
    group by YEAR(JDT1.RefDate)
    )currentasset on YearDate.year = currentasset.year left join
    select YEAR(JDT1.RefDate) as year,sum(JDT1.Debit - JDT1.Credit ) as Inventoryaset from JDT1,OACT
    where JDT1.Account = OACT.AcctCode
    and OACT.AcctCode = '11.05'
    group by YEAR(JDT1.RefDate)
    )Inventory on YearDate.year = Inventory.year left join
    select YEAR(JDT1.RefDate) as year,sum(JDT1.Debit - JDT1.Credit ) as currentliability from JDT1,OACT
    where JDT1.Account = OACT.AcctCode
    and OACT.AcctCode = '21'
    group by YEAR(JDT1.RefDate)
    )currentliability on YearDate.year = currentliability.year  left join
    order by YearDate.year
    So if i view the data in sql server it should be like this
    Year   CurrentRatio   quickRatio
    2006               501                 100
    2007              600                  200
    2008             700                   300
    2009             900                   400
    I want to make a crosstab with the column is year . the Year is dynamic according to the selection
    So if i select the year from  2007 to 2009
    It should be like this in report
    2007                2008              2009
    CurrentRatio                 600                  700                  900
    QuickRatio                    200                   300                 400
    How can i make it in Crystal report ?
    I have use the template in crosstab crystal report, but there is not suitable.
    Can i make manually. ?
    Thanks in advance
    Regards
    KK

    Hi kevin,
    thanks for your respond . Actually, it's work.
    But i have some issue again.
    How can i make a grouping
    So the grouping per Item
    For example                                                                               
                                                          2006                 2007                 2008
    Group 1               Item A                5                        6                       7
                                Item B                7                        8                       9
    Group 2              Item C                  9                       0                      0
                               Item D                 8                        8                      9
    And another question, Is there always have row summary ? It seems that after the 2008 column, there is a total column, Can I remove this ?
    Thanks in advance
    regards
    KK
    Edited by: kah kian on Jun 2, 2011 4:17 PM

  • How to make crosstab cell value become hot link which can link to other?

    Dear Gurus:
    I am using Bi beans in a project, i create a crosstab in one .jsp file,the crosstable can display data correctly,but i want to make every cell value become hot link which point to a url,this url contains measure info and all dimension info,how can i do? Thanks a lot!

    Hi Tomsong,
    We will post a BI Beans Sample that does that to OTN next week.
    In the mean time, look at the following BI Beans Help topic (under Jdeveloper BI Beans Help)
    Handling Drill-Out Events in HTML-Client Applications
    Hope this helps
    Katia

  • How to make a dynamic proxy client in Java ME?

    Hi guys!
    I have an existing static stub web service client to WCF made by generating client stub feature of the Netbeans. How do I make this into a dynamic proxy?

    tsubaki.pw wrote:
    I have an existing static stub web service client to WCF. How do I make this into a dynamic proxy?What is the WCF?

  • How to make a Dynamic Link starting in After Effects to Premier (not other way around)

    I have seen a ton of tutorials how to Dynamic Link from Premier to After Effects. (but not the other way around. )
    I need instructions/video how to link starting in After Effect to Premier.
    For example if I make a title in After Effects and then want to dynamic Link it into Premier how is this done?
    Thanks!!

    I've looked at this too. When I first started using DL, I thought that it was basically a two way street between applications. But that analogy doesn't work very well. DL is PPro-centric. Like PPro is the hub, DL the spokes, and the other Abobe applications are on the rim. And this makes a fair amount of sense. The central feature of an editing suite is the editor, and that would be PPro.
    Another way to look at it is that you can push from PPro to AE, and PPro can pull from AE, but AE can not push to PPro. So the direct answer to "I need instructions/video how to link starting in After Effect to Premier"  is, you can't. What you can do is make your title composition in AE, import that AE project into PPro, and use the composition as you would any other asset in PPro. Then when you change your title in AE, you'll see the change in PPro almost immediately without you having to do anything.
    When I'm making motion lower thirds, for example, I now make them in AE. I let the AE project reside in the directory with the PPro project that I made the lower thirds for. Then when I want the lower thirds in PPro, I just import the AE lower thirds into the PPro project. There's a few ways to do this. One is to use the Media Browser. The MB will open up the AE project for you and let you select which composition you want to import. Another way is to File...Adobe Dynamic Link...Import AE composition which does more or less the same thing. There may be other ways as well, IDK.

  • How to make a dynamic function call from within a package procedure

    Hi:
    I need to call a function dynamically (name and parameters determined at run time, but return value is known:always an integer). I can build the call and place it in a dynamic sql using dbms_sql. But the function is inside a package and is not public.
    So, if I issue:
    dbms_sql.parse( cur,'SELECT '||call||' FROM dual', dbms_sql.v7 )
    where call is "DOS(234,'V')"
    I get:
    ORA-00904: "DOS": invalid identifier
    If I make the function ("DOS") public and "call" equals "pack.DOS(234,'V')", it works fine, but I don't want to make it public.
    Is there a solution?
    Thanks in advance
    RuBeck

    Hi, Kamal:
    Calling from outside of the owner package is not possible if it is not public.The calls are from inside the package. It looks like the dynamic select is executed "outside" the package, so the private function is unknown
    Make it available in the package headerLooks like it's the only solution
    How often this will be executed?This is a library for loading files into tables and executing dynamic validation procedures.
    Here's an example of the mechanics:
    create or replace package mypack as
         function one return number ; -- public function
         procedure execute_it( p_name VARCHAR2 ) ;
    end ;
    create or replace package body mypack as
    function one return number is
    begin
    return 1 ;
    end ;
    function two( i number, s varchar2 ) return number is -- private function
    begin
    return 2 ;
    end ;
    procedure execute_it( p_name VARCHAR2 ) is
    select_str VARCHAR2( 1000 ) ;
    v_num NUMBER ;
    cur NUMBER ;
    nf NUMBER ;
    begin
    select_str := 'SELECT '||p_name||' FROM dual' ;
    cur := dbms_sql.open_cursor ;
    dbms_sql.parse( cur,select_str,dbms_sql.v7 ) ;
    dbms_sql.define_column( cur,1, v_num ) ;
    nf := dbms_sql.execute( cur ) ;
    IF dbms_sql.fetch_rows( cur ) = 0 THEN
    RAISE no_data_found ;
    END IF ;
    dbms_sql.column_value( cur, 1, v_numero ) ;
    dbms_output.put_line( p_name||' returns '||v_num ) ;
    dbms_sql.close_cursor( cur ) ;
    end ;
    end ;
    begin
    mypack.execute_it( 'mypack.one' ) ; -- Call public function: Works fine
    mypack.execute_it( 'two(234,''v'')' ) ; -- Call private function: error 0904
    end ;
    Thanks for your hints
    RuBeck
    PS: The indentation is lost when I post the message! I wrote it indented!

  • How to make a dynamic selection screen

    Hi
    I have been searching the SDN for long time, but couldn't find the answer, so therefor a new post.
    I have an internal table with following values:
    VBKD-BSARK_E
    TVKO-VKORG
    By these values I would like to make a new selection-screen whith following:
    Parameters: FIELD1 like VBKD-BSARK_E.
    Parameters: FIELD2 like TVKO-VKORG.
    Next time the internal table can contain
    MARA-MATNR
    TVKO-VKORG
    VBAK-BSTZD
    And the parameters should then be:
    Parameters: FIELD1 like MARA-MATNR.
    Parameters: FIELD2 like TVKO-VKORG.
    Parameters: FIELD3 like VBAK-BSTZD.
    How do I do that -any suggestions?

    Hi,
    This piece of code will design selection screen based on radio button selection:
        SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001 .
        SELECT-OPTIONS :  s_date  FOR  pnpbegps DEFAULT sy-datum  .   
        SELECTION-SCREEN: END OF BLOCK b1.
        SELECTION-SCREEN : BEGIN OF  BLOCK b2 WITH FRAME TITLE text-002.
        PARAMETERS:rb1 RADIOBUTTON GROUP rbf DEFAULT 'X'.
        PARAMETERS:rb2 RADIOBUTTON GROUP rbf .
        SELECTION-SCREEN: END OF BLOCK b2.
        SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003 .
        SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN COMMENT 1(25) text-006 FOR FIELD px_pdf.
        PARAMETERS:  px_pdf AS CHECKBOX USER-COMMAND xxx  .      
        SELECTION-SCREEN END OF LINE.
        SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN COMMENT 1(15) text-004 FOR FIELD rb_app.
        PARAMETERS:rb_app RADIOBUTTON GROUP gbf DEFAULT 'X' USER-COMMAND uc01.
        PARAMETERS: p_file(128) MODIF ID 001.           " application server
        SELECTION-SCREEN END OF LINE.
    Thanks,
    Krishna..

  • How to make a dynamic wwi template?

    Hello,
    I have to develop a wwi template for a label product. In this template I have 3 boxes to put SAP phrases in 3 different languages.
    Depending of the material for which I want to print my label, the 3 languages to print are not the same.
    My idea is to create a specific table in SAP, and depending of the material, the template will get, with a modul function for example, languages to use.
    Ex:
    material1 EN
    material1 FR
    material1 IT
    material2 DE
    material2 PT
    material2 ES
    If I want to print a label for material2, the template will find languages DE, PT and ES and used it to put phrases in boxes of my wwi template (1 boxe = 1 language).
    Do you think it possible?
    Do you have other solutions to meet my need?
    Thank in advance for your help.
    Best regards,
    /Ludovic

    Hello Ludovic
    luckily you created two "subthreads". Therefore I try to answer per thread:
    Thread 1: answer:
    1.) a WWI report of any kind (MSDS, Label SOP etc.) does always ! have one "leading validity area" and one ! leading language
    This is an very important aspect in label determination !
    Therefore you do not ! realize in using cg54/cg50 on first glance by SAP standard that a combination of genvar with leading languages (released) contains languages
    1.)  FR, IT, ES as in your first example or
    2.) EN, IR, DA in your second example
    and this is one of the reasons why label determation is quite tricky and very hard to find "solutions".
    Now if we still discuss the "label to stock" topic and if you carefully read
    http://help.sap.com/erp2005_ehp_05/helpdata/en/a7/288aa30a6c11d28a220000e829fbbd/frameset.htm
    you will realize that there is the option to perform "Additional user entries" which in my opinion could be used to "change" the label determination process so that the system will find "automaticaly" the "correct" label (e.g customer is in italy !)
    In any case: I hope you realized that it is "not" easy to find the right label. In  my opion it is not "allowed" to have an overlap.
    That means the G groups must be designed in such a way that they "contain" always three different languages (or you would need more logic etc.)
    Coming back to your example:
    Assuming that you have used genvar1 to create the label you "must" define the "leading" languages. Normally only the e.g. "R phrases" etc. must be printed on the label in more than one language. Therefore the "rest" of the template can be described by using one language (keep in mind that you need often "phrases" to be printed on the document. E.g. Phrases which could contain information like the word: "company" which is once again language dependent). Therefore as europe is quite complex you need a lot of labels (I believe we have 25 and more languages in EU). Now it is very important to define based on thje leading languages which "sublanguages" should show up in the document.
    May be this gives your further hints in finding options/solutions
    Thread 2 answer:
    Once again back to the topic "validity area" in general. I am sorry. I can not provide you a "specific" answer to your question
    The validity area "aims" as the linkt between "country" and content of WWI document (in some sense).
    From the point of report at least the "released" WWI report (or the report which is generated on the fly) is of interest. Normally as in the SAP standard there is a "link" between plant (make to stock scenario) and legislation which an help. It is clear that a label regarding a plant in europe should have R/S sentences (or H/P) as a content. Now on the "top" (to make it more complex) you have different sizes of packaging of materials (drum, ...); therefore you need "sizes" (like A4) to descirbe the "max" size of label there "all" informaiotn should be placed on.
    The "label view" as well the "label stock" topic (to my understanding) aims as a "further" help to find the right label (right size, right validity area, right content etc.)
    May be you "misunderstood one WWI topic (or I misinterpret you)
    - in label printing transaction: change countries: IT
    Normally this does not change the language of the label (if we are talking about released reports).
    The "G group" is expanded during "raw report" generation. Only the "mat name" and other information is expanded later.
    Regarding GLM: this is from my point of view a "comlex" submodule of EH&S and you need very ! good business concepts and set up to get the desired result (in label determination etc.).
    So im sorry: I can not provide to you a final answer.
    With best regards
    C.B.
    Edited by: Christoph Bergemann on Sep 14, 2011 2:21 PM
    Edited by: Christoph Bergemann on Sep 14, 2011 2:23 PM
    Edited by: Christoph Bergemann on Sep 14, 2011 2:35 PM
    Edited by: Christoph Bergemann on Sep 14, 2011 2:36 PM
    Edited by: Christoph Bergemann on Sep 14, 2011 2:37 PM
    Edited by: Christoph Bergemann on Sep 14, 2011 2:37 PM
    Edited by: Christoph Bergemann on Sep 14, 2011 2:39 PM
    Edited by: Christoph Bergemann on Sep 14, 2011 2:40 PM
    Edited by: Christoph Bergemann on Sep 14, 2011 2:41 PM

  • How to make a dynamic table in front panel to show the result?

    Hi,
    Dear friends!It was a long time that I can't visit here.It is labview that brings me good luck. I will never forget all friends who answer me in time. Thank you all.Let's keep contact with each other without breaking. I have no question Today.I think I will not enter this zone if I do not attach a question.So please do not answer this question.If u want to make a big project,Labview is your best choice.
    yours sincerely,Dilly

    See answer
    Christian Loew, CLA
    Principal Systems Engineer, National Instruments
    Please tip your answer providers with kudos.
    Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
    or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
    to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense

  • How to make a dynamic textbox scroll down/up for devices like iPhone/Android/iPad etc?

    Problem: When doing anAPP to test it out in my smartphone devices. I tested it on my computer and it works fine. But in devices, im not able to scroll the textbox down/up because my devices dont have a scroll wheel to scroll up/down.
    Assuming that im looking for something like this:
    When I use my fingers to touch on the textbox and slide it upwards, the textbox will scroll down..
    Thank you for your help.

    Hi, thanks for your reply.
    By using touchevents, how do I...
    1) know that if my fingers is sliding up or down?
    2) scroll the textbox up/down?
    import flash.events.TouchEvent;
    Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
    this.addEventListener(TouchEvent.TOUCH_BEGIN, touchBeginHandler);
    this.addEventListener(TouchEvent.TOUCH_END, touchEndHandler);
    function  touchBeginHandler(event:TouchEvent):void
    function  touchEndHandler(event:TouchEvent):void

  • How to Make a dynamic screen show after Logging Into Windows

    I have been asked if it possible to get a Screen (Web page?) to show after people log in and before it takes you to the desktop?
    what the requestor wants is basically, you log in onto your laptop, and then a screen will appear with several choices for you to choose from and you can click the item you want and then it will open...
    the thing is the requestor wants to have the company logo and specifc items in the screen...yes, I realize this sounds like the tiles that Windows 8 has).... but it also is similar to a web page...
    the person mocked up what they want in Access...
    is there a way I can do this with a .bat or group policy....

    Hi,
    What you have described looks like some kind of software management system.
    According to my knowledge, we could configure group policies/scripts to run programs at start up or user logon, but this won't offer a list for the current user to choose, or might we consider to create a software list program which will be triggered
    by a logon script, after the selection then make a call to the wanted program?
    Best regards
    Michael Shao
    TechNet Community Support

  • In HTTP receiver, how to make a dynamic query string in URL

    Hi,
       I have a scenario where after a map we get an XML output as shown below
    <FUNLOC>000010038</FUNLOC>
    <SECONDARY_KEY>0000010038</SECONDARY_KEY>
    <SOURCE>SAP customer</SOURCE>
    <NAME>NAME NAME12 NAME13</NAME>.
    Now what i need that my HTTP receiver URL should add these tags as
    FUNLOC=000010038&SECONDARY_KEY=0000010038&SOURCE=SAP customer&NAME=NAME NAME12 NAME13.
    Can any one help me out in step by step process to archive this.
    This will be a great help from you.
    Thanks in advance,
    Smita

    Hi Smita,
    Check these threads You can find the solution there.
    https://forums.sdn.sap.com/click.jspa?searchID=5694804&messageID=3189288
    https://forums.sdn.sap.com/click.jspa?searchID=5694804&messageID=3717577
    Regards,
    Sreenivas

Maybe you are looking for

  • How to move files from one folder to another folder in webdynpro java for sap portal

    Dear Experts, I wan to move files from one folder to another folder in SAP portal 7.3 programmatically in webdynpro java. My requirement is in my portal 1000 transport packages is their. Now i want to move 1 to 200 TP's into Archive folder. Can you p

  • Report painter variables in formula columns

    Hello, I need to insert variable in column formula to create  average month result. using syntax 'variable' or &variable is Incorrect formula component message . How can i enter variables in formula columns? Thanks , Ran

  • Radius server (not elektron!) interacting with mysql DB and LDAP

    I am installing a service that requires a radius server. I have tried to build and install freeradius from source, as well as used the installer packages that are out there. None of them include support for mysql. As soon as you turn on sql in the ra

  • Having issues deploying Windows updates

    System Center 2012 Config Manager  - 5.0.7804.1000 running on Win Server 2008 R2 SP1 Approx 75 servers (Mix of Server 2003, 08 and 12) and 60 workstations (All Win 7 x64) I took over managing my companys SCCM 2012 a few months ago.  I have System Cen

  • Page setup to print

    Hi and thanks for your help. I have opened my file.acsm, and it looks good.  I go to print it.  it seems to be cutting off part of each page.  I can see it fine in digital editions, but how do I change the printing so it prints the whole page.  it se