'Order by' in a parameter - in AfterPForm trigger..? in a Data template..?

Arrrfternoon all.
As title confusingly asks.. Has anybody put an 'order by' parameter into their data template either by the use of a trigger or by some other way..?
As one or two have may have guessed by now, I'm a newbie to BIP with no training but am learning fast..
In ORACLE Reports 6i I'd stick the order by in the select statement, named it in the Conc Program 'token' and have the details that the user can choose from (if...then...else'd..) in the AfterpForm section.
If the above still applies (and from the example data templates I've seen - it does) then all I do is call the AfterPForm trigger in the data template BUT, where do I write and place the actual PForm trigger (that includes the if orderby = 'empname' ...then..)..?
thanks for reading..
Steven

OK, I've now created my data template that includes a reference to the trigger.
I've also created my package Header and Body - but the question still remains.. How do I now include the Package Header & Body when the Data Template is being run..? How is it referenced? If I just run this data template in my BIP'd Concurrent Program surely it'll just say 'whats the trigger you've mentioned - where is it..?'
Basically, I don't how this hangs together at all. Can someone please help me out here?
Many Thanks for looking..
Steven

Similar Messages

  • Report Trigger Code in Data Template

    Hello all,
    I've inserted a report trigger into a data template and created the required function in my database. Everything works as expected.
    My question is, is there any way to write the report trigger within the data template? Given the choice, I'd rather have the trigger code embedded within the data template itself rather than existing in a separate package.
    I've found no examples of this, but I just wanted to confirm that it can't be done.
    Thanks.
    Edited by: jasonr on May 17, 2011 7:39 AM

    No,
    The code to be executed by trigger will be a PL/SQL package, and it will reside in DB only.

  • Pass parameter to DB trigger

    Hi All
    I wanted to pass a parameter to DB trigger via forms 6i. Please explain me how to do it.
    Thanking You
    Regards
    Lakmal

    Lakmal, Forms does not 'talk' to DB triggers. It all depends on what you are trying to achieve.
    A database trigger does not accept parameters - other than the :OLD and :NEW values of the table/view to which it is attached.
    If you want to influence the behavior of a trigger you will need a some kind of DB function in your trigger.
    As an example, we use a function to determine if the trigger should fire.
    if pkg.fire_db_trigger(:new.column_x)
    then
    do the DB trigger code
    end if;
    John

  • Return what ? IS IF UPDATE (Column_name) parameter in a trigger definition will return TRUE ?

    The IF UPDATE (Column_name) parameter in a trigger definition will return TRUE in case of an INSERT statement being executed on the triggered table: 
    Which option is correct ?
    a. YES
    b. NO
    c. It returns TRUE only if an UPDATE query is executed
    d. Both b and c

    See MSDN: UPDATE() (Transact-SQL)
    "Returns a Boolean value that indicates whether an INSERT or UPDATE
    attempt was made on a specified column .."
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Date Parameter : Unable to retrieve data thru data template

    I have a data template with a date parameter. I used it in a query to extract records for a specific date. No matter which format I use in the query, the query returns a null although there are records. Please advise. I need this as soon as possible.
    <parameter name="PD" dataType="date" />SELECT to_char(run_date,'DD-MON-YYYY') C_RUN_DATE ,cust_action ACTION,count(1) ACTION_COUNT from CDL hdrlog where
    last_run_status='A' and to_char(run_date,'DD-MON-YYYY') = :PD group by to_char(run_date,'DD-MON-YYYY'),cust_action
    order by c_run_date
    I tried with to_char, to_date etc... nothing works.
    thanks
    J

    See example below for date,note the format we supported as state in the doc.
    If you would like to set as character then change type to character and use to_char around the bind var.
    <?xml version="1.0" encoding="WINDOWS-1252" ?>
    <dataTemplate name="dataTemplateName" description="Template description" version="1.0">
    <parameters>
    <parameter name="p_hiredate" dataType="date">1980-12-17</parameter>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[SELECT d.DEPTNO,d.DNAME,d.LOC,
                         EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,nvl(COMM,0) from dept d, emp e
                          where hiredate=:p_hiredate]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_DEPT" source="Q1">
    <element name="DEPT_NUMBER" value="DEPTNO" />
    <element name="DEPT_NAME" value="DNAME"/>
    <element name="DEPTSAL" value="G_EMP.SALARY" function="SUM()"/>
    <element name="LOCATION" value="LOC" />
    <group name="G_EMP" source="Q1">
    <element name="EMPLOYEE_NUMBER" value="EMPNO" />
    <element name="NAME" value="ENAME"/>
    <element name="JOB" value="JOB" />
    <element name="MANAGER" value="MGR"/>
    <element name= "HIREDATE" value="HIREDATE"/>
    <element name="SALARY" value="SAL"/>
    </group>     
    </group>
    </dataStructure>
    </dataTemplate>

  • EBS: Email XML publisher output, from After Report Trigger in Data Template

    Here is what I'm trying to do:
    -- In EBS (11.5.10 CU2), I'm using XML publisher (5.6.2) data template and layout template to generate Output files (PDF, EXCEL etc)
    --In the Data Template's AfterReport Trigger, I'm using the Concurrent Request Id to locate the Output file name and trying to Email that output file.
    Problem:
    -- When the AfterReport trigger code is executed, the code is NOT seeing the output file and hence the file is NOT emailed.
    Observations/Questions:
    -- From what I observe, the Output Post Processor ( that generates the Excel / PDF files) is running AFTER the code in AfterReport trigger... and hence the AfterReport trigger is Not quite seeing / able to access the output file.
    So, the sequence of execution seems to be:
    -- Before Report Trigger
    -- Data Query (SQL statement)
    -- After Report Trigger
    -- Output Post Processor
    Because the AfterReport Trigger is running before the Output Post Processor, it is Not able to see the output file. Is that a True statement?
    If Yes, how else can the DataTemplate access the Output file?
    If No, what could cause the AfterReport trigger to not see the output file?

    Because the AfterReport Trigger is running before the Output Post Processor, it is Not able to see the output file. Is that a True statement?
    I believe so, as the OPP works on the output of the Report after the Report has completed execution.
    You could use the same approach as we do for bursting the report to different users. Write a Java Concurrent program based on "oracle.apps.xdo.oa.cp. XMLPReportBurst" with delivery channel Email to send the email output. You would need to add code to launch the Concurrent child request in your AfterReport Trigger:
    function AfterReport return boolean is
    jreq_id number;
    begin
    srw.message (100, 'DEBUG: AfterReport_Trigger +');
    jreq_id:= FND_REQUEST.SUBMIT_REQUEST ('XDO','XDOBURST','','',FALSE,:P_CONC_REQUEST_ID,'Y',chr(0),
    If (jreq_id=0)
    then
    srw.message (100,'Request id is zero');
    end if;

  • Pass request id as parameter to XMLP data template?

    I want to be able to use the request_id of the concurrent job in the sql of a data template.
    I have tried adding a parameter:
    <parameter name="P_CONC_REQUEST_ID" dataType = "number" defaultValue="0" />
    so I can then do:
    <sqlStatement name="Q1" dataSourceRef=""><![CDATA[select 'Hello '||:XX_NAME||' '||to_char(:P_CONC_REQUEST_ID) WELCOME from dual]]></sqlStatement> for example.
    In reports6i this parameter gets populated automatically at runtime. Do I have to do anything extra to get this to work with XDODTEXE?
    thanks for your help
    Graham

    Hi Dave,
    Thanks for your suggestion, that worked a treat.
    cheers
    Graham

  • How to pass the parameter in "Data Template"

    Hi,
    Can any one please help me out to sort the problem, "Passing Parameter and checking condition for the parameters in the "data template".
    And also please tell me how to link the multiple query in "Data template", as per the user guide i have it says to use link tag. But its not working with my "Data template".
    Please check the data template given below and help me out to sort the problem.
    And one more thing is in table the data type for number and name is varchar. I dono weather i can use that data type in "Data template", please let me know if i can.
    <?xml version="1.0"?>
    <dataTemplate name="VENODR_DETAILS">
    <parameters>
    <parameter name="VENDOR_NUM" dataType="number"/>
    <parameter name="VENDOR_NAME" dataType="char"/>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[SELECT pv.segment1 ven_num,
              pv.vendor_name vname,
                          pvs.vendor_site_code VEN_SIT_CODE,
              pvs.purchasing_site_flag PURCH_SIT_FLG,
              pvs.pay_site_flag PAY_SIT_FLG,
              pv.vendor_name VENDOR_ADDR_NAME,
              pvs.address_line1 VENDOR_ADDR1,
              pvs.address_line2 VENDOR_ADDR2,
              pvs.city VENDOR_CITY,
              pvs.state VENDOR_STATE,
              pvs.zip VENDOR_ZIP
    FROM vendors pv,supplier_info pvi,vendor_sites_all pvs
    where pv.segment1 = pvi.vendor_id(+)
    and pv.vendor_id = pvs.vendor_id
    and (pv.segment1=:VENDOR_NUM or pv.vendor_name=:VENDOR_NAME)
    ]]>
    </sqlStatement>
    <sqlStatement name="Q2">
    <![CDATA[select pvc.area_code||'-'||pvc.phone Contact_Phone,
    pvc.last_name||' '||pvc.first_name||' '||pvc.middle_name cname
    from vendor_contacts pvc,vendor_sites_all pvs,vendors pv
    where pvs.vendor_site_id = pvc.vendor_site_id
    and pv.vendor_id = pvs.vendor_id
    and pv.segment1=(pv.segment1=:VENDOR_NUM or pv.vendor_name=:VENDOR_NAME)
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="VENDOR" source="Q1">
    <element name="VENDOR_NUMBER" value="ven_num"/>
    <element name="VENDOR_NAME" value="vname"/>
    <element name="CATEGORY" value="VENDOR_CAT"/>
    <element name="UPDATE_DATE" value="UPDATE_DT"/>
         <group name="VENDOR_SITE" source="Q1">
         <element name="VEN_SIT_CODE" value="VEN_SIT_CODE"/>
         <element name="PURCH_SIT_FLG" value="PURCH_SIT_FLG"/>
         <element name="PAY_SIT_FLG" value="PAY_SIT_FLG"/>
         <element name="VENDOR_ADDR1" value="VENDOR_ADDR1"/>
         <element name="VENDOR_ADDR2" value="VENDOR_ADDR2"/>
         <element name="VENDOR_CITY" value="VENDOR_CITY"/>
         <element name="VENDOR_STATE" value="VENDOR_STATE"/>
         <element name="VENDOR_ZIP" value="VENDOR_ZIP"/>
         </group>
    </group>
    <group name="VENDOR_CONTACT" source="Q2">
    <element name="Contact_Phone" value="Contact_Phone"/>
    <element name="cname" value="cname"/>
    </group>
    </dataStructure>
    </dataTemplate>
    Thanks in advance.
    Regards,
    SP

    Hi Rani,
    I see one issue in the Q2 with the where statement:
    and pv.segment1=(pv.segment1=:VENDOR_NUM or pv.vendor_name=:VENDOR_NAME)
    the right one should be
    and pv.vendor_id = :VEN_VENDOR_ID
    the variable VEN_VENDOR_ID you have to select from the first query Q1. Add here after select
    pv.vendor_id VEN_VENDOR_ID,
    Regarding the other question about the data types, well, number and varchar2 is fine, perhaps char also, but go with varchar2 instead.
    One last note: you should not mix uppercase and lowercase, keep it clear and structured, check your element names and values.
    Best Regards
    Volker

  • How to pass simple parameter to XSLT from BPM 11g Data Association

    Is it possible to pass a simple parameter to an XSLT from a BPM 11g Data Association (11.1.1.6.0)?  Here is why I asked.  I have a transform that I want to reuse across two service activities in the same process.  The only difference is one integer ID value between the two activities.  (Happens to be running an IPM saved search, each with a different ID.)
    I tried mapping the ID value in the Data Association dialog, in addition to the XSLT mapping, but didn't work.  Or is there another method I could use to reuse this transform (besides just copying it as I've done for now)?  Thanks.

    If I understood your scenario, the point is: you always have to pass the same dataObjects as parameters to the XSL, but you can change the values of them in an association step before the transformation.
    Lets see if the following can fit your needs:
    1) your project has three BusinessObjects: "SearchParam", "CommonData" and "Result"; and five process dataObjects:
    - "search1", "search2" and "search" of type "SearchParam";
    - "commonData" of type "CommonData";
    - "result" of type "Result"
    2) your XSL has "result" as target and two sources: "search" and "commonData"
    3) In some part of the process flow you have a scriptTask with:
    - a data association from "search1" to "search";
    - a transformation with "search" and "commonData" as parameters
    4) In other part of the process flow you can use the same transformation, but using the data from "search2" as parameter, adding a scriptTask with:
    - a data association from "search2" to "search";
    - the same transformation with "search" and "commonData" as parameters
    In this scenario you are reusing the same XSL file only changing the values for one parameter.

  • I've just imported photos that are misdated and appear out of order in my events. How can I correct the dates on these events so they appear properly?

    I've just imported photos that are misdated and appear out of order in my events. How can I correct the dates on these events so they appear properly?

    The one iin the Photos ➙ Adjust Date and Time menu option:
    checkbox below:

  • How can I view photos on the iPad in order of the name of the photo instead of the date the photo has been taken

    On the PC I edited the "file"names of photos in a photo-album, so that the photos are in a logical order after the file names. When I synchronise this photos with the iPad, they are shown on the iPad in the chronological order when the photo has been taken.
    How can I pursue the iPad to show the photos in the order of the "file"names of the photos instead of the order after the date of the photo?

    hello Allan
    Thanks for the answer. Wouldn't it be a nice feature on the iPad if you can choose on the iPad itself in which order the photos should be sorted -> for instance after capture date, after filename or after sorting in iPhoto
    Maybe this will be a feature for the next iOS release
    Urs

  • DefaultValue in BIP data template's parameter is not working

    Hi,
    I have given the below in BIP data template and submit the concurrent program(in R12 ) without parameter. But the below given default value has not been taken by the program.
    <parameter name="P1" dataType="character" defaultValue="abc"/>
    How to pass the default value in BIP data template.
    Regards,
    P.Kalidoss

    Hi,
    The data type is optional... so perhaps try
    <parameter name="P1" defaultValue="abc"/>
    Alternatively, 'parameters data types' can only be String, Integer, Boolean, Date or Float so perhaps try something like this...
    <parameter name="P1" dataType="String" defaultValue="abc"/>
    Hope this helps
    Regards,
    Daniel

  • How to use Report Parameter  on Data Template

    Hello All ,
    I 've tried to create a Report using Data template and Report Parameter. I create a report using data template and I also created a parameter (P_company_name).
    Data Template :
    <dataTemplate name="test_Data_template" description="test" dataSourceRef="test">
    <parameters>
    <parameter name="company_name" dataType="character" include_in_output="false" defaultValue= *** HOW TO DEFINE THE REPORT PARAMETER (P_Company_name) HERE ** />
    </parameters>
    <dataQuery><sqlStatement name="Q1"> <![CDATA[SELECT customer_no,Company_name, from customers where acquisition_id = :company_name  ]]>
    </sqlStatement>
    Report Parameter
    Identifier : P_Company_name
    Data Type : String
    Default Value : Test
    Parameter Type : Text
    When the endusers run the Report they will provide the Company name through the report parameter.
    I have tried to use the same approach that I used to pass the Parameter to SqlQuery on data Template but it is not working . XML Publisher cannot define the parameter.
    How can I do that ?
    If you have any suggestion or document I will really appreciate.
    Thanks,
    Robson

    use this <parameter name="P_Company_name" dataType="character" include_in_output="false" defaultValue= 'Test Value' />and in the querySELECT customer_no,Company_name, from customers where acquisition_id = :P_Company_namehttp://download.oracle.com/docs/cd/E12844_01/doc/bip.1013/e12187/T421739T434255.htm
    Just keep the parameter name in datatemplate and the definition same.

  • What Are The Minimum Permissions In Order An User To Be Able To Access User Profile Data With JavaScript And REST API

    The question says it all:
    What Are The Minimum Permissions In Order An User To Be Able To Access User Profile Data With JavaScript And REST API.?
    In the User Profile -> Permissions there is only the option for "Full Control".

    Hi Nikolay,
    Thanks for posting your issue, you need to set permissions on User Profiles = Read. Kindly find the below mentioned URLs to get the code and more details on this.
    http://www.vrdmn.com/2013/02/sharepoint-2013-working-with-user.html
    http://www.vrdmn.com/2013/07/sharepoint-2013-get-userprofile.html
    http://sharepoint.stackexchange.com/questions/61714/sharepoint-2013-call-the-rest-api-from-sharepoint-hosted-app
    http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/04/09/how-to-query-sharepoint-2013-using-rest-and-javascript.aspx
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • Trans. PR05: Automatic trigger the "Add Data Maintain:Status" upon SAVE

    Hi ABAO Gurus,
    Good day.
    The "Add Data Maintain: Status" Screen can be manually accessed by clicking the "Trip Status" Button in PR05.
    Can you kindly confirm if it's possible to automatically trigger the "Add Data Maintain:Status" Screen via code dev when clicking the save button in Transaction PR05 - Travel Expense Manager?   Can you please provide steps on how to do this?
    Can exits EXIT_SAPMP56T_002 or EXIT_SAPMP56T_003 be used for this?
    Thank you very much.
    Best regards.
    Rainnier

    this will be done via config

Maybe you are looking for

  • IDOC  related question

    Hi, How to extract the content from IDOCs.e.g mautiple idocs are comming.we need to retrive the company ID from all the IDOC.So Please tell me how to  extract. Regards, Suchitra

  • How to create different log files for different users in log4j

    I want to create different logs for different users, using different appenders for each user so that logs are created in his file only. Confusion:How to direct them to different files in my logger class

  • Error in dns client setup

    Hi everyone, after setting the /etc/resolv.conf file, i tried to nslookup command and the following error came: can'f find server name for address 203.88.240.88 (this address is given by isp): no response from server ok what should i do next? Chees!

  • Eyedropper picked up RGB. How to flag this?

    I'm running ID CS4 and working on a print design. I was recently using a consistent grey color on a design (C-0 M-0 Y-0 K-79). At some point I inadvertantly placed a PSD in to the design that used an RGB colorspace, in Photoshop I had colored the bac

  • Code Went Wonky

    I would appreciate another set of eyes looking at my code. Somehow, I have made my Content div come up into my header. The whole thing should actually be center aligned on the screen. I just can't seem to figure where I have gone wrong as I did ahve