Sapscript calling forms from program

Hi experts
I need to write a form in a program to get values.
Here is my code. But i cant seem to succesfully compile it. Need help. I want to take
ernam from sapscript and send name and lastname back. Can u please fill the function.
Also i have an error says  itcyy is not a structure ?
thanks.
REPORT  ZME23N_SAPSCR_FM.
tables : user_Addr.
form get_Values TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
*READ TABLE IN_PAR WITH KEY 'ERNAM'.
*data firstname like user_addr-name_first.
*select single * from user_Addr
*where bname = ernam.
*firstname = user_Addr-name_first.
*lastname = user_addr-name_last.
endform.

You can use the PERFORM command to call an ABAP subroutine
(form) from
any program, subject to the normal ABAP runtime
authorization
checking. You can use such calls to subroutines for
carrying out
calculations, for obtaining data from the database that is
needed at
display or print time, for formatting data, and so on.
PERFORM commands, like all control commands, are executed
when a
document is formatted for display or printing.
Communication between a
subroutine that you call and the document is by way of
symbols whose
values are set in the subroutine.
The system does not execute the PERFORM command within
SAPscript
replace modules, such as TEXT_SYMBOL_REPLACE or
TEXT_INCLUDE_REPLACE.
The replace modules can only replace symbol values or
resolve include
texts, but not interpret SAPscript control commands.
Syntax in a form window:
/: PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
/: ENDPERFORM
INVAR1 and INVAR2 are variable symbols and may be of any of
the four
SAPscript symbol types.
OUTVAR1 and OUTVAR2 are local text symbols and must
therefore be
character strings.
The ABAP subroutine called via the command line stated
above must be
defined in the ABAP report prog as follows:
FORM <form> TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
ENDFORM.
The values of the SAPscript symbols passed with /: USING...
are now
stored in the internal table IN_TAB . Note that the system
passes the
values as character string to the subroutine, since the
field Feld
VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR
80). See the
example below on how to access the variables.
The internal table OUT_TAB contains names and values of the
CHANGING
parameters in the PERFORM statement. These parameters are
local text
symbols, that is, character fields. See the example below
on how to
return the variables within the subroutine.
From within a SAPscript form, a subroutine GET_BARCODE in
the ABAP
program QCJPERFO is called. Then the simple barcode
contained there
('First page', 'Next page', 'Last page') is printed as
local variable
symbol.
Definition in the SAPscript form:
/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
/: USING &PAGE&
/: USING &NEXTPAGE&
/: CHANGING &BARCODE&
/: ENDPERFORM
/ &BARCODE&
Coding of the calling ABAP program:
REPORT QCJPERFO.
FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA: PAGNUM LIKE SY-TABIX, "page number
NEXTPAGE LIKE SY-TABIX. "number of next page
READ TABLE IN_PAR WITH KEY 'PAGE'.
CHECK SY-SUBRC = 0.
PAGNUM = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY 'NEXTPAGE'.
CHECK SY-SUBRC = 0.
NEXTPAGE = IN_PAR-VALUE.
READ TABLE OUT_PAR WITH KEY 'BARCODE'.
CHECK SY-SUBRC = 0.
IF PAGNUM = 1.
OUT_PAR-VALUE = '|'. "First page
ELSE.
OUT_PAR-VALUE = '||'. "Next page
ENDIF.
IF NEXTPAGE = 0.
OUT_PAR-VALUE+2 = 'L'. "Flag: last page
ENDIF.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.

Similar Messages

  • Calling Form from Another program

    All.
    I have program A and program B. While executing Program A i need to call a perform (form) from Program B and result out this needs to flow into program A
    Like Program B having a form f_select_data
    form f_select_data.
    select * from mara into table it_mara
         where matnr  in s_matnr
    endform.
    I need to call this from program A and results back to A

    Try this:.
    In Z_PROGRAM use function
    ..PERFORM get_data_from_z_program in Y_PROGRAM.
    In Y_PROGRAM write:
    FIELD-SYMBOLS: <qals>. (example for qals table)
    * inspection lot data
    DATA: t_qals LIKE qals OCCURS 0 WITH HEADER LINE.
    DATA: wa_qals LIKE LINE OF t_qals.
       ASSIGN ('(Z_PROGRAM)QALS[]') TO <qals>.
       IF NOT ( <qals> IS INITIAL ) .
         t_qals[] = <qals>.
         READ TABLE t_qals INTO wa_qals INDEX 1.
         IF sy-subrc = 0.
           qals = wa_qals.
         ENDIF.
       ENDIF.
    hope helps..

  • Call Form from Form

    Hi All:
    Any one can tell me the basic steps for how to call Form from form through push button.
    I am using forms& reports6i

    You can use open_form/call_from but when one form invokes another form by executing open_form the first form remains displayed, and operators can navigate between the forms as desired. when one form invokes another form by executing call_form, the called form is modal with respect to the calling form. That is, any windows that belong to the calling form are disabled, and operators cannot navigate to them until they first exit the called form.
    -

  • Calling Forms from Reports

    Hi...
    We can call Reports from Forms using RUN_REPORT_OBJECT or RUN_PRODUCT. Can we call Forms or any other product from Reports? If so, how can we do it? If anyone can help me in this...

    Hi Gayathri
    As such there is no product integration for calling Forms from Report. You can call 6i graphics from Reports 9i if you are running a 6i rdf file with OGD object in it and if you have a 6i home set in the same machine where Report s9i is running. For Form, if you wish to run it as an independent request, in Reports 9i, you can always import a java class in Reports and then call that class method in any of the triggers which in turn send out a Forms request to Forms servlet.
    Thanks
    Rohit

  • Calling form from web application

    i use the below url for calling form from web application.
    http://host51.yan.com/forms/frmservlet?form=test&width=700
    i would like to know about "frmservlet"
    if it's a servlet file then
    where its located in application server10g

    The servlet is part of the forms-installation on the application-server, on the local OC4J this is located in $ORACLE_HOME/forms/j2ee/formsapp.ear
    What exactly do you want to know about the servlet?

  • How can i disable/hide the calling form from fnd_function.execute

    Hi,
    How can i disable/hide the calling form from fnd_function.execute.If so can any one give the syntax.
    thanks

    Hi Francesco,
    Are you talking about that ??? )) It will explain you about to get the name of the web page when you are executing an abap function for determining the values of variables...
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/biw/g-i/how%20to%20make%20a%20variable%20even%20more%20flexible%20in%20bw-bps.pdf">How to make a variable even more flexible in BW-BPS?</a>
    This is weird: I wrote that document a few weeks ago, it is theorically published on SDN but this is not possible to find it by using the research tool... Maybe because it applies only to BPS in 3.5. I did not have enough time to migrate that solution to BI-IP 7.0.
    Regards
    Laurent

  • Calling form from layout.

    In a layout, I have the following perform statement :
    PERFORM CONVERT_CURRENCY IN PROGRAM Z_SCRIPT_INVOICE
    USING &ZRATE&
    USING &ZKBETR&
    USING &ZKWERT&
    USING &ZCURRENCY&
    USING &VBDKR-WAERK&
    USING &VBDKR-BUKRS&
    USING &KOMVD-KAWRT&
    USING &VBDKR-VKORG&
    USING &VBDKR-LAND1&
    CHANGING &ZPRICE&
    CHANGING &ZAMOUNT&
    ENDPERFORM.
    But form statement is as follows:
    FORM convert_currency TABLES input_tab STRUCTURE itcsy
                                             output_tab STRUCTURE itcsy.
    ENDFORM.
          - Plz explain how the parameter is matched between form & perform?

    Hi
    The program Name in the PERFORM is Z_SCRIPT_INVOICE
    So in SE38 You will create this program and in that you will write the FORM..ENDFORM.
    So when the PERFORM is executed it calls the PROGRAM in SE38 and the form is called.
    In form you write READ Table IN_PAR with key 'ZRATE'.
    See the sample code
    How to call a subroutine form SAPscripts
    The Form :
    /:PERFORM CDE_CENT IN PROGRAM ZKRPMM_PERFORM_Z1MEDRUCK
    /:USING &EKKO-EBELN&
    /:CHANGING &CDECENT&
    /:ENDPERFORM
    The report :
    REPORT zkrpmm_perform_z1medruck .
    DATA : BEGIN OF it_input_table OCCURS 10.
    INCLUDE STRUCTURE itcsy.
    DATA : END OF it_input_table.
    déclaration de la table output_table contenant les
    variables exportées
    DATA : BEGIN OF it_output_table OCCURS 0.
    INCLUDE STRUCTURE itcsy.
    DATA : END OF it_output_table.
    DATA : w_ebeln LIKE ekko-ebeln,
    w_vbeln LIKE vbak-vbeln,
    w_zcdffa LIKE vbak-zcdffa.
    FORM CDE_CENT
    FORM cde_cent TABLES input output.
    it_input_table[] = input[].
    it_output_table[] = output[].
    READ TABLE it_input_table INDEX 1.
    MOVE it_input_table-value TO w_ebeln.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = w_ebeln
    IMPORTING
    output = w_ebeln.
    SELECT SINGLE zcdffa FROM ekko
    INTO w_zcdffa
    WHERE ebeln = w_ebeln.
    it_output_table-name = 'CDECENT'.
    MOVE w_zcdffa TO it_output_table-value.
    MODIFY it_output_table INDEX 1.
    output[] = it_output_table[].
    ENDFORM.
    /: PERFORM
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
    OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
    Example:
    In script form
    /: PERFORM READ_TEXTS IN PROGRAM 'Z08M1_FORM_EKFORM1'
    /: USING &EKKO-EKORG&
    /: USING &EKPO-WERKS&
    /: USING &EKKO-EKGRP&
    /: USING &EKKO-BSTYP&
    /: CHANGING &COMPNAME&
    /: CHANGING &SENDADR&
    /: CHANGING &INVCADR&
    /: CHANGING &COMPADR&
    /: CHANGING &COVERLTR&
    /: CHANGING &SHIPADR&
    /: CHANGING &REMINDER&
    /: CHANGING &REJECTION&
    /: CHANGING &POSTADR&
    /: CHANGING &LOGO&
    /: ENDPERFORM
    In program
    FORM Read_texts - To extract the standard texts from the table *
    FORM READ_TEXTS TABLES IN_PAR STRUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA : L_EKORG TYPE EKORG,
    L_WERKS TYPE WERKS_D,
    L_BSTYP TYPE BSTYP,
    L_EKGRP TYPE BKGRP.
    READ TABLE IN_PAR WITH KEY 'EKKO-EKORG' .
    CHECK SY-SUBRC = 0.
    L_EKORG = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY 'EKPO-WERKS' .
    CHECK SY-SUBRC = 0.
    L_WERKS = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY 'EKKO-EKGRP' .
    CHECK SY-SUBRC = 0.
    L_EKGRP = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY 'EKKO-BSTYP' .
    CHECK SY-SUBRC = 0.
    L_BSTYP = IN_PAR-VALUE.
    CLEAR Z08M1_ORG_TEXTS.
    SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
    AND WERKS = L_WERKS
    AND EKGRP = L_EKGRP
    AND BSTYP = L_BSTYP.
    IF SY-SUBRC NE 0.
    SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
    AND WERKS = L_WERKS
    AND EKGRP = L_EKGRP
    AND BSTYP = SPACE.
    ENDIF.
    READ TABLE OUT_PAR WITH KEY 'COMPNAME'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COMP.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'SENDADR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_ADRS.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'INVCADR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_INVC.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'COMPADR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_CPAD.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'COVERLTR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COVR.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'SHIPADR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_SHIP.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'REMINDER'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RMDR.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'REJECTION'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RJCT.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'POSTADR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_POST.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'LOGO'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_LOGO.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    REPORT ZMPO1 .
    form get_freight tables in_par structure itcsy out_par structure itcsy.
    tables: ekko,konv,t685t.
    data: begin of itab occurs 0,
             ebeln like ekko-ebeln,
             knumv like ekko-knumv,
           end of itab.
    data: begin of itab1 occurs 0,
             knumv like konv-knumv,
             kposn like konv-kposn,
             kschl like konv-kschl,
             kbetr like konv-kbetr,
             waers like konv-waers,
             kwert like konv-kwert,
           end of itab1.
    data: begin of iout occurs 0,
             kschl like konv-kschl,
             vtext like t685t-vtext,
             kbetr like konv-kbetr,
             kwert like konv-kwert,
           end of iout.
    data v_po like ekko-ebeln.
    read table in_par with key 'EKKO-EBELN'.
    if sy-subrc = 0.
       v_po = in_par-value.
       select
         ebeln
         knumv
      from ekko
      into table itab
      where ebeln = v_po.
      if sy-subrc = 0.
        loop at itab.
          select
            knumv
            kposn
            kschl
            kbetr
            waers
            kwert
          into table itab1
          from konv
          where knumv = itab-knumv and
                kappl = 'M'.
        endloop.
        loop at itab1.
          if itab1-kposn <> 0.
            select single * from t685t
                              where kschl = itab1-kschl
                                and kappl = 'M'
                                and spras = 'EN'.
            iout-vtext = t685t-vtext.
            iout-kschl = itab1-kschl.
            iout-kbetr = itab1-kbetr.
            iout-kwert = itab1-kwert.
            append iout.
            clear iout.
          endif.
        endloop.
        sort itab1 by kposn.
        loop at iout.
          sort iout by kschl.
          if ( iout-kschl eq 'GSDC' OR
               iout-kschl eq 'GSFR' OR
               iout-kschl eq 'GSIR' ).
            at end of kschl.
              read table iout index sy-tabix.
              sum.
             write:/ iout-kschl,iout-vtext,iout-kwert.
          out_par-name = 'A1'.
          out_par-value = iout-vtext.
          append out_par.
          out_par-name = 'A2'.
          out_par-value = iout-kwert.
          append out_par.
              endat.
            endif.
          endloop.
        endif.
      endif.
    endform.
    IN THE FORM I AM WRITING THIS CODE.
    /:DEFINE &A1& = ' '
    /:DEFINE &A2& = ' '
    /:PERFORM GET_FREIGHT IN PROGRAM ZMFORM_PO1
    /:USING &EKKO-EBELN&
    /:CHANGING &A1&
    /:CHANGING &A2&
    /:ENDPERFORM
    &A1&
    &A2&
    This Code is to be written in the PO form under ADDRESS window.
    /:DEFINE &A1& = ' '
    /:DEFINE &A2& = ' '
    /:DEFINE &A3& = ' '
    /:DEFINE &A4& = ' '
    /:DEFINE &A5& = ' '
    /:DEFINE &A6& = ' '
    /:PERFORM GET_VENDOR IN PROGRAM ZMFORM_PO
    /:USING &EKKO-EBELN&
    /:CHANGING &A1&
    /:CHANGING &A2&
    /:CHANGING &A3&
    /:CHANGING &A4&
    /:CHANGING &A5&
    /:CHANGING &A6&
    /:ENDPERFORM
    &A1&
    &A2&
    &A3&
    &A4&
    &A5&
    &A6&
    Regards
    Anji

  • How can I store a form name with path and then call form from a table

    Is it possible that any form that I built I store that form in some table in DB and then call that form from table, if yes, then how can i get this functionality. I am not very experience in form and do not know if it can be done because i think if it is possible then this can be a good security for application and easy to handle as well.
    Thanks in advance
    Maz

    If you have a Forms block based on this table:
    declare
      module varchar2(100);
    begin
      module := :block.column;
      call_form ( module ) ;
    end;If you don't have any blok based on that table
    declare
      module varchar2(100);
    begin
      select  module_name
      into module
      from ...
      where ...
      call_form ( module ) ;
    end;Francois

  • Calling forms from OAS10g on Linux

    We are deploying all forms and reports10g from Windows to Redhat Linux based OAS10g Server.
    Since directory structure / definition is changed in Linux environment and we use "/" in place of "\" <back slash), we have to change path of the call forms according to linux directory structure.
    Because this change need to apply in more than 2000 forms, Is there any way
    to change the directory path in one shot. Is there any utility available in OAS10g or Forms/reports10g builder or in RHEL 4.0-AS ?
    Please help.

    If oyu use CALL_FORM, all called forms-modules are "stacked" above each other, so you can only return to a previous instance using EXIT_FORM.
    You can either use NEW_FORM or OPEN_FORM, both have pro's and con's.

  • Calling form from report urgent please

    hi every body
    i am using form and report 6i
    i create a report and in report i create buttons front of all records
    i want to call a from from that button related to that record show in report
    can i do this if yes how can i do this
    thanks in advance khuda hafiz

    any body tell me about my problum
    thanks

  • Calling forms from sub-directories

    Greetings,
    I have 19 different apps that are on a Solaris Application server in separate directories. I do have the FORMS_PATH set to the "root" but I was wondering if it is possible to call forms in one of the sub-directories without having to add that sub-directory to the FORMS_PATH.
    So far have tried CALL_FORM('ats/ats_ro_2') and CALL_FORM('/ats/ats_ro_2')
    Regards,
    Bill Chadbourne

    It may be possible, but i would not recommend to do so. What happens if you at some point decide to restructure your applicarion? You would have to adjust all your calls.
    if you really want to go that way and you have only one path in your FORMS_PATH, you could read the FORMS_PATH using TOOLENV.GETVAR and then use the full qualified path to call your forms.

  • Calling Form from Report

    Hi all,
    Please help me out, I need to call Form6i form Report6i.
    Thanks in advance

    Hi all,
    the below mentioned documents will help u.
    Under Developer 2000 (Release 1.2) on Windows, there exists a pl/sql library
    which can be used to invoke excutables residing on the PC. The library
    (D2KWEXEC.PLL, located in the FORMS45/DEMO/REUSE directory) is attached to
    the Report in the following manner:
    1) Modify the D2KWEXEC.PLL to change any references to the Forms built-in
    MESSAGE to the Reports built-in SRW.MESSAGE.
    2) Choose the 'Attached Libraries' section for your report and select the
    'Navigator/Create' menu option - this will cause the 'Attached Library'
    dialog to be displayed.
    3) Use the 'Find' button to locate the library file (D2KWEXEC.PLL) and then
    attached it to the report using the 'Attach' button. A warning is
    displayed you that a hard coded path name is being used and gives the
    option of removing it. If the full path is removed, then the
    FORMS45_PATH variable will be used subsequently to locate the library.
    The directory in which the library is located must be part of
    FORMS45_PATH.
    Then select the appropriate trigger from where Oracle Forms should be invoked
    from. In that trigger reproduce the following code:
    function return boolean is
    command_string VARCHAR2 (100);
    BEGIN
    command_string := 'c:\orawin\bin\f45run.exe';
    RETURN d2k_winexec.execute (command_string);
    END;
    Note: 'command_string' contains the full path of the Oracle Forms
    Runtime executable.
    When the trigger fires, the Forms Runtime Executable is invoked
    automatically.
    Regards
    Gopinath M

  • Call Transaction from Program by Skipping Initial Screen & Pass the Value

    Hi All,
    Can anybody help me to call a transaction from my program. I do not want to display the initial screen of the transaction but that TCODE should get opened by passing the values to the parameter of the initial screen.
    For Example, in my program I want to call 'SE38' and in that, my Program of Name 'ZTEST' should get opened. So I need to call Transaction SE38, but I donot want to display initial screen of that. Instead of that, I want to put the value of Program 'ZTEST' and thus my program should get opened.
    Sandip

    Hello Sandip,
    Since you have not made any references to Batch Processing, I shall tell you the normal way to do it. First look at the code below and execute it.
    set parameter id 'DTB' field 'VBAK'.
    call transaction 'SE16' and skip first screen.
    There are a few things that you need to keep in mind before you use this statement:
    1. All mandatory input fields of the initial dynpro must be filled completely and with the correct values by the SPA/GPA parameters.
    2. For the initial dynpro, in the Screen Painter the own dynpro number must not be specified as the next screen number. However, if the next screen can be reached from the first screen by just hitting the Enter key, this will work.
    The following will not work as you expect, because the next screen in the transaction cannot be reached by just hitting the Enter Key.
    set parameter id 'RID' field 'ZTEST'.
    call transaction 'SE38' and skip first screen.
    Regards,
    Anand Mandalika.
    Please reward points if this helps.

  • Calling StoredProcedure from program!!

    Hello all,
    I have a stored proc. in my Oracle8i and when I try accessing it from my EJB, I get the foll. error:
    javax.transaction.TransactionRolledbackException: EJB Exception:: javax.ejb.EJBE
    xception: Error executing STORED PROC INS_EXPENSE java.sql.SQLException: ORA-01747
    : invalid user.table.column, table.column, or column specification
    ORA-06512: at "DBS1.INS_EXPENSE", line 20
    ORA-06512: at line 1
    I have some doubt with my call to the stored proc..
    statement = connection.prepareCall("{CALL INS_EXPENSE(?,?,?,?,?,?,?,?,?,?,?,?,?)}");
    statement.setString(1, expenseType);
    statement.setString(2, partyPayedTo);
    statement.setBigDecimal(3, expenseAmount);
    statement.setDate(4, billDate);
    statement.setDate(5, bookedDate);
    statement.setString(6, payedFromAcc);
    statement.setString(7, payedToAcc);
    statement.setString(8, paymentMode);
    statement.setString(9, status);
    statement.setString(10, comment);
    statement.setString(11, entryUserid);
    statement.setString(12, lastChangeUserid);
    statement.registerOutParameter(13,java.sql.Types.BIGINT);
    ResultSet rs2 = statement.executeQuery();
    and this is my stored proc. definition::
    Argument Name Type In/Out Default?
    EXPENSE_TYPE -- VARCHAR2 -- IN
    PARTY_PAYED_TO -- VARCHAR2 -- IN
    EXPENSE_AMOUNT -- NUMBER -- IN
    BILL_DATE -- DATE -- IN
    BOOKED_DATE -- DATE -- IN
    PAYED_FROM_ACC -- VARCHAR2 -- IN
    PAYED_TO_ACC -- VARCHAR2 -- IN
    PAYMENT_MODE -- VARCHAR2 -- IN
    STATUS -- VARCHAR2 -- IN
    COMMENT -- VARCHAR2 -- IN
    ENTRY_USERID -- VARCHAR2 -- IN
    LAST_CHG_USERID -- VARCHAR2 -- IN
    EXPENSE_NO -- NUMBER -- OUT
    Is there something wrong with Java to Oracle datatype mapping ?..
    Any help would be appreciated.
    TIA

    Hi,
    Thanks for the info..But I can't seem to figure out what wrong in my SP.
    This is my stored proc. and line no.20 pointing to ORA-06152 is the insert statement..
    Can someone help me out please!!
    CREATE OR REPLACE PROCEDURE "DBS1"."INS_EXPENSE"
    ( expense_type in VARCHAR2
    , party_payed_to in VARCHAR2
    , expense_amount in NUMBER
    , bill_date in DATE
    , booked_date in DATE
    , payed_from_acc in VARCHAR2
    , payed_to_acc in VARCHAR2
    , payment_mode in VARCHAR2
    , status in VARCHAR2
    , comment in VARCHAR2
    , entry_userid in VARCHAR2
    , last_chg_userid in VARCHAR2
    , expense_no out NUMBER
    IS
    BEGIN
    select max(EXPENSE_NO) into expense_no from DBS1.EXPENSE;
    expense_no := expense_no + 1;
    insert into DBS1.EXPENSE (EXPENSE_NO,EXPENSE_TYPE,PARTY_PAYED_TO
    ,EXPENSE_AMOUNT,BILL_DATE,BOOKED_DATE,PAYED_FROM_ACC,PAYED_TO_ACC
    ,PAYMENT_MODE,STATUS,COMMENT,ENTRY_TIMESTAMP,ENTRY_USERID
    ,LAST_CHANGE_TIMESTAMP,LAST_CHANGE_USERID) VALUES
    (expense_no,expense_type,party_payed_to,expense_amount,TO_DATE(bill_date,'yyyy-mm-dd')
    ,TO_DATE(booked_date,'yyyy-mm-dd'),payed_from_acc,payed_to_acc,payment_mode,status
    ,comment,SYSDATE,entry_userid,SYSDATE,last_chg_userid);
    END INS_EXPENSE;
    TIA

  • Problem call forms from a form in 'create' mode of a new records

    Hello,
    I'll try to explain myself well, i have one form and now i am in 'create' mode , no value exist meanwhile in the primary key of the table behind, the problem is that in the same form i have some buttons that calls another form in wich i must provide the value of the primary key, let's think of an example of cities & streets tables.
    If i'll be in the form of cities in 'create a new record' mode, i can't let the end-user click on the button for the streets of that 'new' city becouse of the non-existing yet for the primary key of cities. I know how to 'dissapear' the button of streets in this create new record mode but i am not convinced that this is the best way to do it.
    I'll be glad to hear about some sollutions for that kind of problem, i am sure that i am not the only one who must think of this kind of problem.
    Best regards,
    Victor

    Hiding the button is straightforward. You simply need to add a condition on to the button to ensure that the primary key value is not null.
    The way how I've acheived master/detail data entry pages before has been a bit hacky, so I'll wait for someone else to come along with the 'right' way to do it!
    Ben

Maybe you are looking for