Error PDE-PPU017: "The program unit source must define a Subprogram Body or Package."

Hi,
Wonder what the error means? I've tried to add package specs and body but still can't resolve.
Any help will be great!
THANX
irene

VANPERSIE,
It looks like you are mixing sytax. Some of the Syntax used in a Database trigger (such as Before Insert, After Insert, etc) is specific to database triggers. Referring to :NEW and :OLD are specific to database triggers and can't be used as you are using them, unless you have data blocks names NEW and OLD. Also, when you refer to a item in a block, you must prefix the block or item name with the colon ":". Also, as aweiden points out, you define your return data type as "TRIGGER". The return type of a Function must be a valid Oracle data type. Therefore, your function should return a BOOLEAN, NUMBER, VARCHAR, or even a Ref Cursor, just to name a few. From the looks of your code, your function would simply return a value to indicate that the INSERT was successful. Therefore, you could rewrite your function something like:
CREATE OR REPLACE FUNCTION TESTTRIG_BODY() RETURNS BOOLEAN AS
BEGIN
   /* This example assumes you have data blocks in your form called:  NEW_BLOCK and OLD_BLOCK. */
   INSERT INTO REPORT_TABLE
      (NUM_COL, OLD_VAL, NEW_VAL)
   VALUES
      (:NEW_BLOCK.NUM_COL, :OLD_BLOCK.CHAR_COL, :NEW_BLOCK.CHAR_COL);
   RETURN TRUE;
EXCEPTION
   WHEN OTHERS THEN
      RETURN FALSE;
END;Also, is there a particular reason you are manually INSERTing a record versus letting Oracle Forms handle this for you?
Hope this helps.
Craig...
-- If my response or the response of another is helpful or answers your question please mark the response accordingly. Thanks!

Similar Messages

  • Pd0-ppu017 program unit source must define a  subprogram body  or package

    Hi
    Iam new to oracle l and trying to teach myself
    my problem is when I compile any function in program units of forms ,
    the following error message obtained:-
    pd0-ppu017 program unit source must define a subprogram body or package.
    for example this ready function that I have just copied ,pasted
    CREATE OR REPLACE FUNCTION TestTrig_body() RETURNS TRIGGER AS $$
    DECLARE
    v_TempRec temp_table%ROWTYPE;
    BEGIN
         INSERT INTO report_table(num_col, old_val, new_val)
              VALUES (NEW.num_col, OLD.char_col, NEW.char_col);
         RETURN NEW;
    END;
    what is the reason please?
    Windows OS
    Oracle 10g database
    oracle 6i developer
    regards

    VANPERSIE,
    It looks like you are mixing sytax. Some of the Syntax used in a Database trigger (such as Before Insert, After Insert, etc) is specific to database triggers. Referring to :NEW and :OLD are specific to database triggers and can't be used as you are using them, unless you have data blocks names NEW and OLD. Also, when you refer to a item in a block, you must prefix the block or item name with the colon ":". Also, as aweiden points out, you define your return data type as "TRIGGER". The return type of a Function must be a valid Oracle data type. Therefore, your function should return a BOOLEAN, NUMBER, VARCHAR, or even a Ref Cursor, just to name a few. From the looks of your code, your function would simply return a value to indicate that the INSERT was successful. Therefore, you could rewrite your function something like:
    CREATE OR REPLACE FUNCTION TESTTRIG_BODY() RETURNS BOOLEAN AS
    BEGIN
       /* This example assumes you have data blocks in your form called:  NEW_BLOCK and OLD_BLOCK. */
       INSERT INTO REPORT_TABLE
          (NUM_COL, OLD_VAL, NEW_VAL)
       VALUES
          (:NEW_BLOCK.NUM_COL, :OLD_BLOCK.CHAR_COL, :NEW_BLOCK.CHAR_COL);
       RETURN TRUE;
    EXCEPTION
       WHEN OTHERS THEN
          RETURN FALSE;
    END;Also, is there a particular reason you are manually INSERTing a record versus letting Oracle Forms handle this for you?
    Hope this helps.
    Craig...
    -- If my response or the response of another is helpful or answers your question please mark the response accordingly. Thanks!

  • ERROR - PDE-PEP006 ENCODED PROGRAM UNIT HAS A UNKNOWN FORMAT

    I am learning Developer 2000. After attaching talbotstandar.pll library, when I try to expenad Set_Up_List procedre, I am getting this error "ERROR - PDE-PEP006 ENCODED PROGRAM UNIT HAS A UNKNOWN FORMAT". Because of this I am not able to proceed, please give me soution to get rid of this problem as soon as possible.
    My email is [email protected]

    ERROR - PDE-PEP006 ENCODED PROGRAM UNIT HAS A UNKNOWN FORMAT
    Hai friends
    i have a form developed in forms 10g and reports 10g.
    the same form when i when iam trying to open in forms 6i/reports6i,everything is getting(layout) but when i am trying to see code it was blank. why.
    can anybody help to solve this problem or can any body give me the solutions to my email
    thanks
    vas
    E-mail :[email protected]

  • PDE-PEP006 Encoded Program unit has an unknown format.

    Hi All:
    I am using Form builder [32 Bit] Version 6.0.8.23.2 with Oracle 10g.
    I tried to open a form in form builder which is also created in Form 6i, system return following error:
    PDE-PEP006 Encoded Program unit has an unknown format.
    and form opened, but the coding of all triggers, and program units was not there, although the triggers and program units exists and can be seen but without coding.
    Please also tell me can I convert the form into text format thru command prompt?
    What could be the reason?
    Thanks
    Hassan

    Francois
    The only way to get the "new" pl/sql code is to open
    the new version and copy the code, then paste it in
    the old version's builder.
    You mean to say that open the new version form in new version builder? or in old version?
    Thanks
    Hassan

  • PDE-PEP006 encoded program unit has an unknowen fromat error

    hi
    i have an old project made by developer 10g suit , now i work with latest release of developer 10g suit and i want to compile this project on it to run.
    i have PDE-PEP006 error when i just load the forms of the project and no code is shown , i search in many sits and this community but i could`t get out the solution .
    please what can i do in few steps to recompile the project in my new developer 10g suit, avoid losing this project and don`t Chang the release of my developer 10g suit witch i work with now , my career depends on that
    thank you

    Hi,
    As i mentioned in my previous reply,
    1. If you have minimum forms, you can open them in the previous version, delete the program units and copy paste from the latest version.Do the following steps.
    1. Take a backup of your forms.
    2. Open one set of the form in 10g.
    3. Open another set of form in 9i.
    4. Delete the trigger / program unit (not the code, delete the trigger itself, by selecting it in the object navigator and press the X icon) in the form opened in 9i builder
    5. Create the trigger manually , copy paste the code from the form opened in 10g builder.
    HTH.
    -Arun

  • InfoSet Query: Syntax Error while generating the program.

    Dear All,
    I have a Query in CRM system which contains an Infoset based on LDB.
    The InfoSet Query throws up a Syntax error while generating the program.
    So, we are not able to change the Infoset using the Infoset Query through SQ01.
    The error is as follows:-
    Syntax error in program "AQZZ==/SAPQUERY/CRM_ACTMON1 ".
    Error in the ABAP Application Program
    The current ABAP program "CL_QUERY_OUTPUT_DEFINITION====CP" had to be
    terminated because it has
    come across a statement that unfortunately cannot be executed.
    The following syntax error occurred in program "AQZZ==/SAPQUERY/CRM_ACTMON1 "
    in include "AQZZ==/SAPQUERY/CRM_ACTMON1 " in
    line 28:
    ""CRMT_REPORT_LOCATORLIST" must be a flat structure. You cannot use int"
    "ernal tables, strings, references, or structures as components. -"
    Please help me arrive at an solution, so that we are able to change the Infoset through the InfoSet Query.
    Awaiting your reply as soon as possible.
    Thanks and Regards,
    Pankaj.

    There is an error in your query, specifically in the definition of CRMT_REPORT_LOCATORLIST. In the short dump (transaction ST22) you will see more details and the exact location of an error if you just scroll down.
    I can't tell more because this problem is specific to your system, to which I have no access. Read the whole dump and look at all the objects mentioned there.

  • All of a sudden my iTunes stopped working, and I get the following error messages:   1. the program can't start because MSVCR80.dll is missing from your computer. Try reinstalling the program to fix this problem   and   2. iTunes was not installed correct

    All of a sudden my iTunes stopped working, and I get the following error messages:
    1. the program can't start because MSVCR80.dll is missing from your computer. Try reinstalling the program to fix this problem
    and
    2. iTunes was not installed correctly. Please reinstall iTunes. Error 7 (Windows error 126).
    Now I've checked the forums and followed the advice of uninstalling all Apple applications, rebooting, and reinstalling iTunes.
    This is not working. I've tried installing as Administrator but doesn't make any difference at all.
    There must be a way to fix this? I'm not a tech geek but I want to avoid having to take my laptop back to factory settings to sort this out.
    Thanks

    Click here and follow the instructions. You may need to completely remove and reinstall iTunes and all related components, or run the process multiple times; this won't normally affect its library, but that should be backed up anyway.
    (99192)

  • Error when Generating the Program

    Recently there was an SP upgrade and my Planning Book started giving me this error message (SCM version =5.0 and SP = 7)
    "Error when generating the program" Message no. /SAPAPO/TSM141
    Diagnosis: Generated programs are programs that are generated based on individual data objects, such as planning object structure, planning areas and Infocubes. These programs are then executed in the transaction. An error occured during the generation of such a program
    Possible causes:
    1. The template has been corrupted
    2. The object that the template uses to generate the program contains inconsistencies; for instance an Infocube has not been activated
    This error occurs when I try to open the my planning book/creating the selection profile. I've re-activated the Infocube and later deactivate and active my POS and tried to do the same for the Planning Area....but the error still persists. I tried to create a new planning area and tried it again but the error still persists. I've tried to fix any inconsistencies in the planning area time series objects by running the consistency check....however the same error pops up during the consistency check....
    Anyone encountered this error message and any possible solutions to this issue.
    Thanks
    Surender

    I did find an ABAP Dump when looking at ST22.  The short message is as follows:
    Runtime Errors         GEN_BRANCHOFFSET_LIMIT_REACHED
    Date and Time          05/14/2007 19:33:54
    Short text
         Jump distance is too large and cannot be generated.
    What happened?
         A jump distance is too large and cannot be generated.
         A control structure or a routine with "CHECK" or "EXIT" contains
         too many ABAP statements.
         Error in the ABAP Application Program
         The current ABAP program "GP_MET_PSTRU_BASIC_FORMS" had to be terminate
          because it has
         come across a statement that unfortunately cannot be executed.
    What can you do?
         Note down which actions and inputs caused the error.
         To process the problem further, contact you SAP system
         administrator.
         Using Transaction ST22 for ABAP Dump Analysis, you can look
         at and manage termination messages, and you can also
         keep them for a long time.
    Error analysis
         During the generation of program "GP_MET_PSTRU_BASIC_FORMS", the system
          determined that
         within an ABAP event a control structure (for example, IF..ENDIF
         or LOOP..ENDLOOP) or a routine (for example, FORM routine) has
         become too large. The resulting jump distance is too large so that
        it could no longer be generated.
        With the internal load format, the jump distance must not be
        greater than 32768 (this is the size of approximately 10.000
        ABAP statements).
        The jump distance that is to be generated, however, is 50885.
    How to correct the error
       The ABAP application program must be changed.

  • How Do I Make Updated Procedure in the Program Unit of the Form to Work?

    I have updated a procedure in the Program Unit of the Form that I modified. I am not sure what are the proper ways to compile or load the changed procedure in my form to make sure the changes work. Please help me with the following questions:
    Do I have to use Oracle Procedure Builder to compile the updated procedure in order to have the form work properly? If so, how do I make the list of procedures in the program unit of my form to come up after I have the Oracle Procedure Builder opened and connected to our database?
    Couldn't I just compile the form after the changes are made to the procedure (Body) in the Program Unit of the form in the Forms Builder?
    Any thoughts and/or suggestions on this are welcome.
    FYI, we are in Oracle Forms 6.i with Oracle database version 10.2.0.2.
    Thanks.

    There was no errors what so ever, no triggers and other module errors, when I compiled and created an executable for my form.
    If the database is not connected, Forms Builder would not allow me to compile/execute any forms so I am pretty sure that the database was connected when I did 'CTRL' + 't' to create an executable.
    FYI, the following is an excerpt from Oracle Procedure Builder Help:
    A procedure is a subprogram that performs a specific action. ...
    A procedure has two parts:
    *     specification (spec for short)
    *     the body
    Specification
    The procedure spec begins with the keyword PROCEDURE and ends with the procedure name or a parameter list. Parameter declarations are optional. Procedures that take no parameters are written without parentheses. For example, the specification of procedure proc1 is displayed below:
    PROCEDURE proc1 (param CHAR);
    Body
    The procedure body begins with the keyword IS and ends with the keyword END followed by an optional procedure name. The procedure body has three parts: a declarative part, an executable part, and an optional exception-handling part.
    and all of other procedures, that do not have an '*' next to the procedure name in the Program Units of my form, contain both Spec and Body.
    p.s. I remember the '*' next to the procedure name means the procedure has been changed, and ... (sorry, I don't remember the rest...)
    Thanks.

  • All of a sudden I'm getting a 'itunes.exe - system error  It says the program can't start because MSVCR80.dll is missing from your computer.  Try reinstalling the program to fix this problem.  I have tried to reinstall and still can't open itunes.  help!

    all of a sudden I'm getting a 'itunes.exe - system error  It says the program can't start because MSVCR80.dll is missing from your computer.  Try reinstalling the program to fix this problem.  I have tried to reinstall and still can't open itunes.  help!

    Try the following user tip:
    Troubleshooting issues with iTunes for Windows updates

  • Error while running the program of deferred Tax ( New)Program Name RFUMSV50

    Hi
    I am getting the error while running the program of deferred Tax ( New)
    Following is the detailed error :
    Enter rate / INR rate type M for 00.00.0000 in the system settings
    Message no. SG105
    Diagnosis
    For the conversion of an amount into another currency, an entry is missing in the currency conversion table.
    Procedure
    Add the missing entry in the currency conversion table.
    Execute function
    You can then continue to process the commercial transaction.
    Thanks & Regards,
    PM

    Check the following notes:-
    1)  Note 46582 - 2.2->3.0: error SG105 for exchange rate M w. inv.
    2)  Note 165645 - SG105:Enter rate & / & rate type & for 00.00.0000..
    3)  Note 483542 - F110: SG105 in maintenance of proposal run with wthhldng tax
    4)  Note 975657 - SG 105: FI-Enjoy with foreign currency and calculate tax
    thanks
    G. Lakshmipathi

  • Error When Opening the Setup/Transactions/ Sources Window

    Hi All,
    in Oracle E-Business Suite R12 Version
    Error When Opening the Setup/Transactions/ Sources Window
    APP-FND-01388: Cannot read value for profile option FND_DEVELOPER_MODE in routine &ROUTINE.
    ORA-01403: no data found
    FRM-40735: WHEN-CREATE-RECORD trigger raised unhandled exception ORA-06502.

    Amr,
    Please see the suggested solutions in these docs.
    App-Fnd-01388: Cannot Read Value For Profile Option Fnd_developer_mode In Routine [ID 563884.1]
    R12: How To Avoid The Error Message APP-FND-01388 On Drilldown [ID 556668.1]
    R12 APXINWKB Error APP-FND-01388 When Trying To Query Invoice [ID 864195.1]
    APP-FND-01388 Cannot Read Profile Option FND_DEVELOPER_MODE In Benefits Service Center Form [ID 422182.1]
    Thanks,
    Hussein

  • Error in executing the program,what can be the error

    Error in executing the program.
    What can be the error ,if the error shown is PROGRAM ABC DOE! after entering the values in selection screen?

    Hi,
    Use find to search globally for message in the program.
    Check the message that is handled in the program in the selection screen validations.Double click and find out the message.Then you can easily trace why it's happening.

  • A conversion error occurred while the program -- display data on the screen

    HI all,
    Iam getting a dump error described below:
    A conversion error occurred while the program was trying to
    display data on the screen.
    The ABAP output field and the screen field may not have the
    same format.
    Some field types require more characters on the screen than
    in the ABAP program. For example, a date field on a screen needs
    two characters more than it would in the program. When attempting to
    display the date on the screen, an error will occur that triggers the
    error message.
                  Screen name.............. " Ztable_MM_MRQ "
                  Screen number............ 0100
                  Screen field............. "WA_PO_ITEMS-MENGE"
                  Error text............... "FX015: Sign lost."
    Further data:
    Give us step by step procedure to rectify the same with T.codes
    Thanks
    Regards
    Siraj

    Raymond
    please give details in se51 where i have to put a "V"  to allow negative amounts
    whether it is in Text or I/O templates
    name                                     type of screen element         Text or I/O field
    WA_PO_ITEMS-MENGE     Text                           PO_quantity__     
    regards

  • Error while compiling the ejb java source files.................

    hi,
    i am new to ejb.......
    i have got error while compiling the ejb java source files............
    while compiling..........of this three i ahve got err in ejb home interface....
    ejb remote interface - succeded
    ejb bean class - succeded
    ejb home interface - error
    the error..............is in the return type of the ejb create() method in ejb home interface(which is the type of remote interface).
    the error message is cannot resolve symbol

    Hi,
    thanks for ur reply .....
    i have done enough searching in all sites including sun forum but in vain
    i have pasted my error below...
    can u plz predict anything from it
    D:\>path=%path%;c:\j2sdk1.4.2_12\bin;
    D:\>set classpath=%classpath%;d:\Sun\AppServer\lib\j2ee.jar;
    D:\>javac d:\Librarys\Library.java
    D:\>javac d:\Librarys\LibraryBean.java
    D:\>javac d:\Librarys\LibraryHome.java
    d:\Librarys\LibraryHome.java:8: cannot resolve symbol
    symbol : class Library
    location: interface Librarys.LibraryHome
    public Library create(String id, String name, String address, String phoneNo
    ) throws RemoteException, CreateException;
    ^
    d:\Librarys\LibraryHome.java:9: cannot resolve symbol
    symbol : class Library
    location: interface Librarys.LibraryHome
    public Library findByPrimaryKey(String id) throws FinderException, RemoteExc
    eption;
    ^
    2 errors
    thanks in advance...

Maybe you are looking for