Procedure Based Forms( a little !)

Freinds!
I have mada a form based on a package:
======================================
Create or Replace Package vchrpro AS
TYPE glrec is RECORD (company_code varchar2(4),
voucher_type varchar2(4),
voucher_seq varchar2(6),
user_code varchar2(8)
TYPE glcur is REF CURSOR RETURN glrec;
PROCEDURE glquery(resultset IN OUT glcur,
v_company_code in varchar2, v_voucher_type in varchar2);
END vchrpro;
show errors;
Create or Replace Package Body vchrpro AS
PROCEDURE glquery(resultset IN OUT glcur,
v_company_code in varchar2, v_voucher_type in varchar2) IS
BEGIN
OPEN resultset FOR
SELECT a.company_code, a.voucher_type, a.voucher_seq, a.user_code
FROM gl_voucher a,gl_voucher_type b
WHERE a.company_code=b.company_code and
a.voucher_type=b.voucher_type and
a.user_code=b.user_code and
a.company_code=v_company_code and
a.voucher_type=v_voucher_type
ORDER BY a.voucher_type;
CLOSE resultset;
END glquery;
END vchrpro;
show errors
========================================
the package is succesfully created and also
the form.But the prob. is that i am not sure
about the "Query Data Source Arguments" of
a form's block property. i.e what i will
give "Type Name" and "Value" to my procedure's parameter "resultset" (i have given nothing)AND when i run the form and
execute the query error says:
FRM-40505 Oracle error: unable to perform
query.
Kindly help me it is very important & urgent!
also let me know if i have conveyed properly.
Many thaks!
null

Take a look at
"Forms and Reports Feature/Benefit Demos"
that you can also get from: http://technet.oracle.com/sample_code/products/forms/content.html
There is a sample of a procedure based form there.

Similar Messages

  • Error Handling on procedure based forms

    Hi all,
    I have seen examples of error handling on table based forms like
    the following:
    begin
    doInsert;
    exception
    when others then
    --redirect to some error page
    I have tried the same with a procedure based form by wrapping
    the doSubmit procedure, but when the procedure returns an
    exception, it doesn't execute my exception handling code.
    Any ideas on why this is happening or at least how I can catch
    these exceptions with my own exception handler?
    Thanks,
    Curt

    Chetan, Antonio,
    I opened a TAR on this issue with Oravle and they got the same
    results. Thay suggested a work around of creating an error table
    that gets written to and then dispaly and new page to retrieve
    the error from the table.
    What I ended up doing is creating a dummy procedure that does
    nothing (NULL). The form based on the dummy procedure allows me
    to get the values I need from the user.
    The procedure always returns succesful since it doesn't do
    anything. So in the form success code area I call the real
    procedure, check the return value, and now I can redirect back
    to the orignal form on error, or direct to another paqe on
    success.
    Not the most elegant solution, but it is working for now.
    Curt

  • Insert into a clob field in a procedure based form

    Hi,
    I have a table with a clob field. I wrote a procedure to insert into this table. Then I built a form based on this procedure. Here is my code:
    drop table clob_test;
    create table clob_test(id NUMBER, note CLOB);
    insert into clob_test values(10,empty_clob());
    Create or Replace PROCEDURE PROJECTS.SET_CLOB
    ( p_id IN CLOB_TEST.id%TYPE,
    p_note IN VARCHAR2 default null)
    as
    v_loc CLOB;
    v_amt binary_integer;
    v_pos integer :=1;
    v_clob varchar2(32000);
    Begin
    insert into clob_test values(p_id,empty_clob());
    v_clob := p_note;
    v_amt := LENGTH(v_clob);
    select note into v_loc from clob_test where id = p_id;
    DBMS_LOB.WRITE(v_loc,v_amt,v_pos,v_clob);
    End;
    When I try to insert into note field more than 4000 charaters. I got this error:
    An unexpected error occurred: ORA-06502: PL/SQL: numeric or value error: character string buffer too small (WWV-16016)
    Why this happens? I know portal form doesn't support clob, but this procedure deal directly with database. Can anyone from Oracle give me help? Thanks in advance!

    I use a dynamic page instead of a form on the procedure. It's working.
    Apparently Oracle is not supporting a varchar2 more than 4000 in any form format, even using textarea for p_note.

  • Procedure Based Form with master details Relationships

    Helo All
    Here i m having some problem in making one form which is having 2 tables one is master and other is detail table and i already made relationship between them but still i make both forms at that moment form didn't make the auto relationship.even after taht when at the form level i made the relationship between 2 tables it made but at teh compilation time it gives error.
    Actually one table was there at that time it worked but with relation it creates problem.
    Can anybody give me any idea how to sort out this problem.

    Helo Frankin
    Actualy the error came when i made the master detail relation manualy.but as per me if both tables have relationship with each other then no need to create it manualy isn't it?
    even after that i created teh relation manaualy but at the on clear block details trigger it showed compile time error.
    If possible can u give me any live example for this
    TQ
    Vivek

  • Procedure based blocks - error using Forms 6/8i/NT

    A simple form with a procedure-based block fails with the Lock procedure, giving an ORA-03114 error. I believe there is some known bug with procedure-based blocks using Forms 6 and Oracle 8i over NT. The Query procedure (based on a ref cursor) works fine, but the Lock, Insert and Delete triggers (and presumably the Update trigger too - without a Lock I can't get that far) return the error (these are based on a table).
    Does anyone know if this is a known bug? The same form has run successfully using Forms 6/Oracle 7.3/VMS.

    It's a known bug and the patch is available through MetaLink.

  • Batch procedure in Forms 10g, calling rdf and send by mail

    Hi all,
    I need your advice regarding my task: i have a table with invoices of some clients. I have created a report in Oracle Reports 10g R2, so to have a pdf with all the data from this table.
    I have created a form in Forms 10g R2, displaying in a screen one field, where the user can choose the date of invoice. Then i will query by that date all my invoices in that table, and then i want to create a procedure in Forms, so that for every line in that table with the invoice date just chosen i will run HOST(rwrun ... all my parameters).
    My questions:
    1. I need to read some more about how to create a custom xml so to pass to my rwrun, and depending on the records fetched in my cursors in Forms 10g, i will pass a xml variable to my reports, so i will get the data from Forms 10g in the report created in Oracle Reports 10g. Is there any way that i can grep the errors? I need to create some insertions based on succes on failure, how can i accomplish this?
    2. Is the above described scenario way to complicated to loop throuh a cursor, create a pdf, and mail the pdf until the cursor is totally fetched? Do you recommend me a simpler way to accomplish this task?
    Thank you so much,
    Michael.

    Hello,
    I have a report with all my clients, with their email addresses in the same report. Each client as unique account number or invoice number.
    So i want to burst and distribute each invoice to the corresponding client:
    1. I have set REPEAT ON: INVOICE in oracle reports.
    2. From Oracle Reports, i click on Distribution list, and in the DESNAME i type email_address (which is the column from the table with the invoices).
    3. Then, File >> Distribute. Says: distribution completed succesfully, but nothing happens.
    Question:
    1. Where am i mistaking?
    2. Is there any log activity file that i could see what the application is doing, step by step?
    Thank you,
    Michael

  • PDF-based forms

    needed help..........
    how to create PDF-based forms

    Hi,
    1. Why do you go for PDF Based Forms when you have SAP Scripts/Smart Forms?
    In US and Europe under section 508 each and every business document should be accessible for impaired people.
    Communication is possible using XML.
    We can work off line (when SAP system is down).
    2. The Settings involved in SAP Scripts/Smart Forms.
        All Fonts, output type, Driver programs and printer details.
    Myriad Pro (some font name like that) is not available in PDF form. For other fonts no extra setting is required
    Changes in Driver Program
    Driver program
    •     Get name of the generated function module
         CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
    •     Print job needs to be opened exclusively for forms of new interface
         CALL FUNCTION 'FP_JOB_OPEN'
    •     Now call the generated function module
    … After PDF form is created it will generated FM
      CALL FUNCTION gv_fm_name
    •     Close spool job
           CALL FUNCTION 'FP_JOB_CLOSE'
    3. Does the same font/printer is supported when converted to PDF Based forms?
                Yes
    4. What difficulties are faced when conversion? Limitations in PDF Based Forms which cannot be done when trying to convert Smart forms/Sap Scripts?
         Certain conditions are there in Sap Scripts and Smart forms that can not be handled in PDF, there is something called as Scripting in PDF. Using that we can handle such kind of exceptions .But according to Good Programming technique we should rarely use it, because it affects the performance of the form.
    5. Limitations of PDF Based Forms as such?
       There is a concept called as nested tables, from Accessibility point of view there is problem.
         Headers on different pages. This is again an accessibility problem.
         Preprinted forms.
    6. Procedure Assigning output types for PDF Based forms and testing them?
        Some Basis Problem is there, that’s why I am not able to view the layout
    7. Printer configurations in PDF Based forms and the Paper size?
    •     Default printer should be Local 
    •     Page Scaling should be  None
    •     Chose paper source by PDF Page size.
    points plz (if this information is usefull for U ).
    Regard's
    Raghunath.S

  • Join relation with two sotred procedure based blocks

    Hi,
    I am working on a form with two DB stored procedure based blocks.
    It is like:
    BLOCK1: based on blk1_select(id1) (master)
    BLOCK2: based on blk2_select(id1) (details)
    The join condition is:
    BLOCK2.id1 = BLOCK1.id1 and BLOCK2.id2 = BLOCK1.id2
    here id1 is the parameter and id2 is the cursor item.
    The behavior that I expect is that when I do next_record in BLOCK1, the BLOCK2 with move to next record corresponding to id2, but this time BLOCK2 records stay as the same.
    The behavior is good for regular table base blocks and there must be something that I am not aware of.
    This FORM does query only, no insert, update and delete.
    Please help. Any suggestions are greatly appreciated.
    Thank.
    Jimmy
    Edited by: WJH on Feb 25, 2010 3:28 PM
    Edited by: WJH on Feb 25, 2010 3:44 PM
    Edited by: WJH on Feb 25, 2010 4:08 PM
    This FORM does query only, no insert, update and delete.

    If you have access to Metalink check out Document ID: 124650.1 (Master/Detail Relationship based on Stored Procedures).
    Hope this helps.
    Craig...
    If a response is helpful or correct, please mark it accordingly

  • How to pass multiple parameters while calling a pl/sql procedure based serv

    Hi,
    I have a pl/sql procedure based service that needs to be invoked from the bpel console for testing purpose. This procedure accepts multiple input values which are of varchar2,boolean and datetime data types. How can I get the bpel console to throw a UI where I can enter these values --in other words where(which file and where) can I specify that these are the input parameters that need to be entered along with their types.
    Thanks for yr help!

    Change the payload of the request 'Process WSDL' message type. Change the element of the payload for the RequestMessage to be 'InputParameters' from the XSD generated by the DB Adapter wizard.
    Edit the payload (Element) - Choose 'Project Schema Files'. Select 'InputParameters' from the XSD.
    You can also change the ResponseMessage by doing the same thing, except that you select 'OutputParameters' from the XSD.

  • Error in generating PDF Based form - SUI Report

    Hi,
    We are running Quarterly reports for Unemployment reporting at USA using tax reporter.
    We are not able to see the complete spool output for the Wage Type Listings but only just 1 page. In the tax reporter log we get the error "Error in generating PDF Based form HR_F_WLIST_CA" for respective states.
    Any idea how to resolve this.
    We are on ERP 6.04.
    Thanks,

    Hi,
    I think its  Basis problem.Ask basis gyus to repair the connection and try again.
    Regards,
    Manoj.

  • Approval procedure based on item category

    Dear All,
    I have a scenario where all my sales items will be categorized under two broad heads: Bulk & Non Bulk. So there will be a UDF where every item will be mapped to one of these values. I want to apply an approval procedure where I am able to raise an approval to different set of people for Bulk Items and different set of people in case of Non Bulk items. Kindly help me how I can do the same.
    Regards
    Kapil Kapoor

    Hi,
    It's not possible to create approval procedure based on item level. So if in a single document you have different types of (bulk/non-bulk) items you can't trigger different approval procedures.
    In case you select the item type in a UDF in header level of a document, then it will be possible to send approval to different users based on the UDF value selected bulk/non-bulk.
    Regards
    Sibasish S.

  • Pricing Procedure Based on Ship to Party

    Hi Guys,
    During creation of sales order I want the pricing procedure to be picked up based on ship to party.
    Ex: Sold -to -Party: Delhi ; Pricing procedure: 1
          Ship-to-Party: Mumbai; Pricing procedure: 2
    And if I run a sales order with SH -Mumbai, then the pricing procedure should be "2".
    If the SH is Delhi then the pricing procedure should be "1"
    Is this possible?
    Regards
    Ayyallas

    Hi  Ayyallas
    When you create the sales order , the pricing procedure is picked up based on the sales area + Cupp + Dupp. . So it is not possible to pick the pricing procedure based on the ship to party when you create the sales order.
    Regards
    Srinath

  • How to run procedure in forms

    hi to all
    How to run the database procedure in Forms while the program Unit in forms is also having the same name of the database procedure.

    Please address this question to the Portal Applications Forum at http://forums.oracle.com/forums/forum.jsp?forum=7

  • Creating layout in PDF Based Form to print table content.

    Hi ,
        I am facing problem in creating the layout of PDF Based Form . I do not need any interactive text but only active table in my context whose data i need to print . What i did was drag the table from data view into  the body page and activate . When i run it i only get a table structure but without any data .
    Can any one help me or give a pointer to any tutorial for this ?. I have checked in SAPnet for PDF Based Print Form but it somehow skips how to create layout.
    With regards,
    Saurabh Kumar Pandey

    Have a look at help.sap.com:
    <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/b7/64348655fb46149098d95bdca103d0/content.htm">Interactive Forms based on Adobe Software</a>
    <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/4c/9cc19e5c874091a99790e540b06f3a/content.htm">Inserting a Table or Loop</a>

  • How to active a PDF Based Form in ERP System

    Hi ,
    One of user facing problem "When I try to active a PDF Based Form in ERD, I got the following error: u201CINVALID http CONNECTION : ADSu201D
    Please can anyone help me in this ,what should i do and how to proceed it slove this issue.
    Thanks and Regards
    Brijesh Prasad

    You need
    - an application server JAVA with Adobe Document Service installed
    - you need to configure the connection between that Java instance and your ERP system
    https://www.sdn.sap.com/irj/sdn/adobe
    Markus

Maybe you are looking for

  • Serious Firewire Meltdown

    I'm working on a film right now, with four different drives - two Lacie D2s, and two Western Digital MyBooks. A couple of weeks ago, something very strange started happening - the firewire cards on every computer we use stop working. It's not just th

  • Transfer Quantity from Project to another

    Hello Dears, My Scanairo is : allocate the quantities on the project in the inventory by Move order , if i used some quantities and want to transfer the other to another project or return to the inventory. how can i do this? thanks

  • Problem with synonyms in SQLConnections.

    Hello, i`m using Oracle (R) BPM Studio Version: 10.3.2, and got some problem with SQLConnections and synonyms. Is it possible to import synonyms table to BPM? What i did wrong? 1) create or replace synonym x.users for y.users@TEST -> definition in Or

  • Inforecord in mandatory in scheduling agreement

    Coul some tel me how to make the inforecord mandatory in scheduling agreement . though i have controlled or made the inforecor fiels as required in field selection it is not asking for inforecord while creating scheduling agreemnt could some one tel

  • Where do downloads go?

    I thought I had to download DoubleTwist to my Pre, so I tried that.  I have no idea if it downloaded because I cannot find WHERE on the phone it would have landed. I now realize I don't need that on the phone itself.  I was able to successufully get