'expression is of wrong type' - but which and where..?

hello.
Hopefully this will be clear as day to someone.. Please could someone tell me why I'm getting the following error message..
[061010_042222995][][EXCEPTION] SQLException encounter while executing data trigger....
java.sql.SQLException: ORA-06550: line 4, column 20:
PLS-00382: expression is of wrong type
ORA-06550: line 4, column 1:
PL/SQL: Statement ignoreddata template where trigger is called..
  <?xml version="1.0" encoding="utf-8" ?>
- <dataTemplate name="UofS_OutstandngExpenses_Report" defaultPackage="SUBIXCLT" dataSourceRef="FINDEV" version="1.0">
- <properties>
  <property name="xml_tag_case" value="upper" />
  <property name="include_parameters" value="true" />
  <property name="debug_mode" value="on" />
  </properties>
- <parameters>
  <parameter name="p_claimant" dataType="character" defaultValue="" />
  <parameter name="p_expense_date_from" dataType="date" defaultValue="" />
  <parameter name="p_expense_date_to" dataType="date" defaultValue="" />
  <parameter name="p_raisedby" dataType="character" defaultValue="" />
  <parameter name="p_status" dataType="character" defaultValue="" />
  <parameter name="p_ordered_by" dataType="varchar2" defaultValue="" />
  </parameters>
- <dataQuery>
- <sqlStatement name="Q1">
- <![CDATA[
SELECT DISTINCT
erh.invoice_num,
pap.full_name EMP_CLAIMING,
DECODE(NVL(erh.expense_status_code, 'Not yet Submitted (NULL)'), 'CANCELLED', 'CANCELLED',
     'EMPAPPR', 'Pending Individuals Approval',      'ERROR', 'Pending System Administrator Action',
     'HOLD_PENDING_RECEIPTS     ', 'Hold Pending Receipts', 'INPROGRESS', 'In Progress', 'INVOICED', 'Ready for Payment',
     'MGRAPPR', 'Pending Payables Approval', 'MGRPAYAPPR', 'Ready for Invoicing', 'PAID', 'Paid',
     'PARPAID', 'Partially Paid',     'PAYAPPR', 'Payables Approved',     'PENDMGR', 'Pending Manager Approval',
     'PEND_HOLDS_CLEARANCE', 'Pending Payment Verification',     'REJECTED', 'Rejected',     'RESOLUTN',     'Pending Your Resolution',
     'RETURNED',     'Returned',     'SAVED',     'Saved',     'SUBMITTED',     'Submitted',     'UNUSED',     'UNUSED',
     'WITHDRAWN','Withdrawn',     'Not yet Submitted (NULL)') "EXPENSE_STATUS" ,
NVL(TO_CHAR(erh.report_submitted_date,'dd-MON-yyyy'),'NULL') SUBMIT_DATE,
NVL(TO_CHAR(erh.expense_last_status_date,'dd-MON-yyyy'),'NULL') LAST_UPDATE,
erh.override_approver_name ER_Approver,
fu.description EXP_ADMIN,
erh.total,
erh.description 
FROM
AP_EXPENSE_REPORT_HEADERS_all erh,
per_all_people_f pap, fnd_user fu
WHERE erh.employee_id = pap.person_id
AND fu.user_id = erh.created_by
AND NVL(erh.expense_status_code, 'Not yet Submitted') NOT IN  ('MGRAPPR', 'INVOICED', 'PAID', 'PARPAID')
AND pap.full_name = NVL(:p_claimant, pap.full_name)
AND TRUNC(erh.report_submitted_date) BETWEEN NVL(:p_expense_date_from, '01-JAN-1999') AND NVL(:p_expense_date_to,'31-DEC-2299')
AND fu.description = NVL(:p_raisedby,fu.description)
AND erh.expense_status_code = NVL(:p_status,erh.expense_status_code) &L_ORDERED_BY
  ]]>
  </sqlStatement>
  </dataQuery>
  <dataTrigger name="beforeReport" source="SUBIXCLT.beforeReportTrigger" />
- <dataStructure>
- <group name="G_XP_CLM_TRACKNG" source="Q1">
  <element name="INVOICE_NUM" value="INVOICE_NUM" />
  <element name="EMP_CLAIMING" value="EMP_CLAIMING" />
  <element name="EXPENSE_STATUS" value="EXPENSE_STATUS" />
  <element name="SUBMIT_DATE" value="SUBMIT_DATE" />
  <element name="LAST_UPDATE" value="LAST_UPDATE" />
  </group>
  </dataStructure>
  </dataTemplate>and the package spec & body..
--THE SPEC...
CREATE OR REPLACE PACKAGE Subixclt IS
FUNCTION beforeReportTrigger RETURN VARCHAR2;
p_order_by VARCHAR2(50);
l_ordered_by VARCHAR2(350);
p_claimant  VARCHAR2(80);
expense_date_from DATE;
expense_date_to DATE;
p_raisedby   VARCHAR2(80);
p_status   VARCHAR2(80);
p_ordered_by   VARCHAR2(80);
--RETURN VARCHAR2;
END;
--THE BODY...
REATE OR REPLACE PACKAGE BODY Subixclt IS
FUNCTION BeforeReportTrigger RETURN VARCHAR2 IS
BEGIN
Fnd_File.PUT_LINE(Fnd_File.LOG,'L_ORDERED_by'||L_ORDERED_BY);
DECLARE
L_ORDERED_BY VARCHAR2(50);
P_ORDERED_BY  VARCHAR2(50);
P_RAISEDBY VARCHAR2(50);
P_STATUS VARCHAR2(50);
P_CLAIMANT VARCHAR2(100);
P_EXPENSE_DATE_FROM DATE;
--P_EXPENSE_DATE_FROM  VARCHAR2(50);
--P_EXPENSE_DATE_TO  VARCHAR2(50);
P_EXPENSE_DATE_TO DATE;
BEGIN
IF (P_ORDERED_BY='Expense Report Number') THEN
     L_ORDERED_BY :='order by 1 asc;';
  ELSIF (P_ORDERED_BY='Person Claiming') THEN
     L_ORDERED_BY :='order by 2 asc;';
  ELSIF (P_ORDERED_BY='Submit Date') THEN
  L_ORDERED_BY :='order by 4 asc;';
  END IF;
RETURN(L_ORDERED_BY);
--RETURN NULL;
END;
END;
END;Many thanks for looking..
D

Thanks for the suggestion. I initially didnt have the RETURN TRUE after every IF statement and have since removed the 'WHEN OTHERS' section but I'm still getting the same error message. If its to be believed, doesn't it sound like its not finding any of the 3 possible parameter entries available? This can't be so, I've checked the ConC Program parameter name is correct, and the value set linked to it only has available the 3 options where I make the choice..
Body now reads:
CREATE OR REPLACE PACKAGE BODY Subixclt
AS
FUNCTION BEFOREREP (P_ORDERED_BY IN VARCHAR2)RETURN BOOLEAN IS
BEGIN
--FND_FILE.PUT_LINE(FND_FILE.LOG,'L_ORDERED_by'||L_ORDERED_BY);
DECLARE
L_ORDERED_BY VARCHAR2(50);
--P_RAISEDBY VARCHAR2(50);
--P_STATUS VARCHAR2(50);
--P_CLAIMANT VARCHAR2(100);
--P_EXPENSE_DATE_FROM DATE;
--P_EXPENSE_DATE_TO DATE;
BEGIN
IF (P_ORDERED_BY='Expense Report Number') THEN
     L_ORDERED_BY :='order by 1 asc;';
  ELSIF (P_ORDERED_BY='Person Claiming') THEN
     L_ORDERED_BY :='order by 2 asc;';
  ELSIF (P_ORDERED_BY='Submit Date') THEN
  L_ORDERED_BY :='order by 4 asc;';
  RETURN TRUE;
  END IF;
-- EXCEPTION WHEN OTHERS THEN RETURN FALSE;
--RETURN(L_ORDERED_BY);
END;
END;
END;error log reads:
XDO Data Engine Version No: 5.6.3
Resp: 20707
Org ID : 102
Request ID: 2484872
All Parameters: p_raisedby=SUSAN HOLLIDAY:p_status=:p_claimant=:p_expense_date_from=:p_expense_date_to=:P_ORDERED_BY=Person Claiming
Data Template Code: SUBIXCLT
Data Template Application Short Name: PO
Debug Flag: N
{p_claimant=, p_expense_date_to=, p_status=, p_raisedby=SUSAN HOLLIDAY, p_expense_date_from=, P_ORDERED_BY=Person Claiming}
Calling XDO Data Engine...
[061110_114425280][][STATEMENT] Start process Data
[061110_114425282][][STATEMENT] Process Data ...
[061110_114425284][][STATEMENT] Executing data triggers...
[061110_114425284][][STATEMENT] BEGIN
SUBIXCLT.p_claimant := :p_claimant ;
SUBIXCLT.p_expense_date_from := :p_expense_date_from ;
SUBIXCLT.p_expense_date_to := :p_expense_date_to ;
SUBIXCLT.p_raisedby := :p_raisedby ;
SUBIXCLT.p_status := :p_status ;
SUBIXCLT.p_ordered_by := :p_ordered_by ;
:XDO_OUT_PARAMETER := 1;
END;
[061110_114425287][][STATEMENT] 1: :
[061110_114425287][][STATEMENT] 2:null :
[061110_114425287][][STATEMENT] 3:null :
[061110_114425288][][STATEMENT] 4:SUSAN HOLLIDAY :
[061110_114425288][][STATEMENT] 5: :
[061110_114425288][][STATEMENT] 6:null :
[061110_114425291][][STATEMENT] Executing data triggers...
[061110_114425292][][STATEMENT] Declare
l_flag Boolean;
BEGIN
l_flag := SUBIXCLT.beforerep(:p_ordered_by) ;
if (l_flag) then
:XDO_OUT_PARAMETER := 1;
end if;
end;
[061110_114425293][][STATEMENT] 1:null :
[061110_114425302][][EXCEPTION] SQLException encounter while executing data trigger....
java.sql.SQLException: ORA-06503: PL/SQL: Function returned without value
ORA-06512: at "APPS.SUBIXCLT", line 27
ORA-06512: at line 4Many thanks for staying with this..
S

Similar Messages

  • PLS-00382: expression is of wrong type

    Hi,
    oracle 9.2
    I have to write one simple procedure to retrieve some column records from the table.
    In the Begin... end block...I have written select statement
    Now, if i include all the columns in the select query then procedure gets compile without any error...but when I remove any one column or select specific columns in the select query of that procedure then I get below error..
    PLS-00382: expression is of wrong type
    can anybody explain ?
    Regards

    Hi,
    below has been defined in the declaration part and using the below defined cur3 for the OUT parameter.
         TYPE Rec3 IS RECORD
         col1          tab.col1%TYPE,
         col2          tab.col2%TYPE,
         col3          tab.col3%TYPE,
         col4          tab.col4%TYPE,
    TYPE Cur3 IS REF CURSOR RETURN Rec3 ;
    is it due to record type has been defined ?
    Regards

  • File Error: Wrong type

    Hi,
    I have been archiving some old finished videos (as self-contained QTs) on a server that is PC based. I have a feeling that this may be a problem. I'm right, right?
    On a related note, I now have some QTs that will not open, with error messages like
    'File Error: Wrong type.' (FCP)
    and
    'Error opening movie
    The movie could not be opened.' (QT)
    The fun part is that I cannot remember exactly which had been moved over there (I had a couple LaCies die on me and in a rush transfered a bunch of stuff back and forth trying to stay ahead of the crash), but now they're back on Mac based externals. But won't open.
    Any advice is tremendously appreciated.
    Thanks,
    Ariel.
    Dual 1.8 GHz PowerPC G5   Mac OS X (10.3.9)   1 LaCie Big Disk Extreme, 1 Maxtor 500Gb, FCPHD 4.5, QT Pro 7.1.3

    Okay, thanks for the help. I'm pretty swamped right now, but by next Monday I will have gone through all of them. I will post back then with any info that may be of interest.
    So, for the future, I should either stay away from non Mac OS formatted drives for my media, or zip them before sending them over. (by control clicking and archiving)
    (sigh) Thanks, guys. I'm still just trying to figure out the cheapest, quickest way to archive my old stuff. I guess tape is the best way to go.
    - Ariel.

  • What is a "FIN" file and where can I find it?

    When I try to open my project a message comes up saying that I need this "menu media-FIN-0000000f" file or the project cannot play properly. It will not even open all the way.
    What is this type of file and where can I find it?
    Thanks

    It is a render file. And what this means is that you exported a reference quicktime of a sequence instead of a self contained QT file, and one of the render files it references has been deleted or gone offline (this happens when a sequence no longer references the file). Only option is to delete the ref QT from your Browser and sequence.
    Shane

  • My iMessage won't activate my email but will with phone number. I type my password and it says it's wrong I change it and it still says its wrong. I even made a new account and it still says the password is wrong.

    My iMessage won't activate my email but will with phone number. I type my password and it says it's wrong I change it and it still says its wrong. I even made a new account and it still says the password is wrong.

    Hi hectorness12!
    Thanks for using the Apple Support Communities! I have found an article that can help you with troubleshooting your iMessage issue. The article can be found here:
    iOS: Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/ts4268
    Thanks,
    Braden

  • I need to connect to my work PC remotely from my macbook. I think I need the citrix software. But which version and what is the procedure?

    I need to connect to my work PC remotely from my macbook. I think I need the citrix software. But which version and what is the procedure?

    Probably don't need citrix software. Is you computer in the office on LAN? Also, is the office computer setup for remote access? If it's windows then its going to be running Remote Desktop Protocol (RDP) natively. If it is in fact RDP that your windows machine at work is using then you need to download RDC for mac. I use it to connect to my work computer using RDP (don't tell the "Info Tech" dude at my office) and if your not too tech savvy I would suggest trying GOTOMYPC. It's alot easier to setup. But if you have experience in setting up remote access and your Windows office machine is connected through LAN and your IT TECH has allowed port forwarding then you should be just fine with RDP and it's free!!! But are you logging onto your actual computer at work or logging into the "SERVER" through your work machine... believe me it's two completely different things.
    Basically, you'll need:
    1. Physichal IP address of work computer. (If office computer is on WIFI this won't work) use IPCONFIG commands in command prompt
    2. Port forwarding needs to be enabled by your IT Tech
    3. Remote Desktop settings will need to be enabled on the office computer
    4. Download RDC for mac (search google)
    5. Type the physical IP address into RDC and hit connect... type in credentials and your all done.
    We need lots more details though... there are many ways to connect remotely and if your office already has a system in place for remote access then any details would be helpful in determining which method will suit you best. If it's citrix just have your IT dude set it up. If you think you need citrix then good luck....

  • When capturing images from a Nikon D600, they show in Bridge, but when clicked to load into CS6,an error message says that it is the wrong type of document, even jpeg files. This is a NEW frustration.

    When capturing images from a Nikon D600, they show in Bridge, but when clicked to load into CS6,an error message says that it is the wrong type of document, evne jpeg files. This is a NEW frustration.

    Nikon raw files would open up in Adobe Camera Raw and so should jpegs.
    If you select one in Bridge and give the command "Ctrl r" (Windows), what happens?
    Also what is the version of ACR in the title bar?
    Gene
    Note: unmark your question as "answered". the green balloon next to the subject shows it as "solved".

  • HT5622 I sign-in with my Apple ID to update my apps. Asks for my password. Type it in and it just takes me right back to the update screen. What an I doing wrong?

    I sign-in with my Apple ID to update my apps. Asks for my password. Type it in and it just takes me right back to the update screen. What an I doing wrong?

    Try This...
    Close All Open Apps... Sign Out of your Account... Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and Hold the Sleep/Wake Button and the Home Button at the Same Time...
    Wait for the Apple logo to Appear...
    Usually takes about 15 - 20 Seconds... ( But can take Longer...)
    Release the Buttons...
    Note:
    Anything Downloaded with a Particular Apple ID is tied to that Apple ID and Cannot be Merged or Transferred to a Different Apple ID
    Apple ID FAQs  >  http://support.apple.com/kb/HT5622

  • Expression is wrong type

    Hi all
    Please find where i am wrong
    function F_4FormatTrigger return boolean is
         a varchar2(100);
         b varchar2(100);
    begin
         A:='On Hold';
         B:='Go Ahead';
      if :performa_type = 'N/A' then
           return(False);
      elsif
           :performa_type ='PERFORMA' THEN
           return('A');
      ELSIF
           :performa_type ='PERFORMA PAID' THEN
           return('B');
      ELSE
           return (TRUE);
      end if;
    end;ERROR 382 at line 11,column 10
    expression is wrong type
    WRROR 0 At line 11, column 4
    Statement Ignored
    ERROR 382 at line 14,column 10
    expression is wrong type
    WRROR 0 At line 14, column 4
    Statement Ignored
    Thanks And Regards
    Vikas Singhal

    hi,
    I saw u r coding.
    The format trigger only returning the boolean value true or false.
    so u have the remove declaration part and elsif condition statement of retur(A) and upto return(B) statement .
    function F_4FormatTrigger return boolean is
    begin
         if :performa_type = 'N/A' then
         return(False);
    ELSE
         return (TRUE);
    end if;
    end;
    otherwise if u want to print the value of A abd B u can write the same code in formula column.

  • Trying to sort bookmarks, but gets these errors: one or more of the included folders is in the wrong type. Sorting failed.

    I'm trying to sort my bookmarks, but I get the following to errors:
    one or more of the included folders is in the wrong type. Sorting failed.
    What can cause this?
    Firefox 4.0/W7 Home Premium

    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    A screen shot of your settings or of the image could be very helpful too,
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Anyone has an idea how to connect and configure my Airport express to an internet range extender which is plugged into mains

    Anyone has an idea how to connect and configure my Airport express to an internet range extender which is plugged into mains?
    Message was edited by: m. emin

    You can connect it but with ethernet cable. You can not connect it by wifi to extend the range a second time.
    BTW AE is rather sensitive to connect by wifi to non-apple wifi routers.

  • Someone put my iphone passcode in wrong to many times and now it says connect to itunes there is some stuff on my iphone which i havent backed up and i will loose if i restore my iphone what do i do?

    Someone put my iphone passcode in wrong to many times and now it says connect to itunes there is some stuff on my iphone which i havent backed up and i will loose if i restore my iphone what do i do?

    If the phone is disabled, you have no choice but to restore it. You will lose the data that was not backed up.
    the passcode did its job exactly as it was supposed to do.

  • Hi all, I upgraded my MBP to Lion , but on the screen where i need to type my password, click  on my photo and it does not appear the place for me to type my password and it stay stuck there. Can anyone solve this problem for me?

    Hi all, I upgraded my MBP to Lion , but on the screen where i need to type my password, click  on my photo and it does not appear the place for me to type my password and it stay stuck there. Can anyone solve this problem for me?

    Reboot the machine holding Command and r keys down, you'll boot into Lion Recovery Partition
    In there will be Disk Utility, use that to select your Lion OS X Partition and Repair Permissions.
    After that is done reboot the machine and see if you can log in.
    If not repeat the above steps to get into Lion Recovery, get online and reinstall Lion again, it will overwrite the installed version and hopefully after that it wil work.
    Reboot and try again.
    If not follow my steps to create a Snow Leopard Data Recovery drive, then option boot from it and grab a copy of your files off the machine.
    Then reinstall all your programs onto the external drive like setting up a new machine, then use Disk Utility to erase the entire internal boot drive (select the drive media on the far left, not the partiton slightly indented) format Option: GUID , 1 partition OS X Extended and then use Carbon Copy Cloner to clone the external to the newly formatted internal drive. Once that is finished reboot and disconnect the external drive.
    Once you go that, boot into Snow Leopard and update to 10.6.8, use the AppStore and option click on Purchases and download Lion again and install.
    Lots of work, but there is no Lion disks.
    https://discussions.apple.com/message/16276201#16276201

  • How do I change my user name in syn? I typed in the wrong email address. And I cancelled syn thinking this may work but no luck.

    How do I change my user name in syn? I typed in the wrong email address. And I cancelled syn thinking this may work but no luck.

    You have to clear saved password for this page:
    # Open you login page (where you have to enter username and password).
    # Right click on page and select '''Page Info''' form context menu.
    # On last tab ('''Security''') there is '''View saved passwords''' button, click it and delete all saved passwords for this page.
    # Also clear all related cookies (just in case) there is button for this next to first one.

  • Problem with Signing in itunes with my id. After signing in it does Not Show the Apple id and they are asking 3 Times if i wanna download Songs I have already bought but which are not on this iphone

    Dear community, I'm experiencing a problem since 2 days, that if I sign in in my iTunes account with my Apple ID on my iPhone it doesn't show at the end if scrolling down the ID details and credit anymore. If I try to download songs I bought once but which are not on this device anymore, it asks me 3 times for the ID and password. I fill it in but at the end nothing happens. I see only in the middle a moving symbol.
    What can I do? Apple ID and password are correct . I canceled all settings but same as before.
    Many thanks in advance.

    AJ Green wrote:
    My wifi only iPad 2 has GPS, and a compass/accelaerometer to determine which direction I am facing.  You need to enable location services.
    Your wifi-only iPad does not have GPS. Read the specs for your device.

Maybe you are looking for