How to write Form - Endform in between Function - Endfunction

Hi Experts,
I need to write some code in between form & endform in an Include(User-exit)
This form ---endform doesnot have perform [ Perform is inside a standard Code ] . I tried using Generate pool subroutine. It is also not helping.
The call for this perform is inside Standard Code.Pls tell how to write Form-Endform between Function -
Endfunction.
thanks
surbhi

No no no. You're committing after each row! soany
other session running the same query will see the
changes you're making. Your session will equallysee
changes caused by running this query in those
sessions.Other session, yes, but current session will only see
the changes once it has completed the current
statement. Otherwise my "rn" column would not have
gone up sequentially in the above example. it would
have gone
1st row rn = 1 (all rows get updated by 1:-
2,3,4,5,6,7,8,9,10,11)
2nd row rn = 3 (all rows get update by 1:-
3,4,5,6,7,8,9,10,11,12)
3rd row rn = 5 (all rows get update by 1:-
4,5,6,7,8,9,10,11,12,13)
4th row rn = 7 (all rows get update by 1:-
5,6,7,8,9,10,11,12,13,14)
5th row rn = 9 (all rows get update by 1:-
6,7,8,9,10,11,12,13,14,15)
6th row rn = 11 (all rows get update by 1:-
7,8,9,10,11,12,13,14,15,16)
7th row rn = 13 (all rows get update by 1:-
8,9,10,11,12,13,14,15,16,17)
8th row rn = 15 (all rows get update by 1:-
9,10,11,12,13,14,15,16,17,18)
9th row rn = 17 (all rows get update by 1:-
10,11,12,13,14,15,16,17,18,19)
10th row rn = 19 (all rows get update by 1:-
11,12,13,14,15,16,17,18,19,20)
So the fact the commit happens each time the rows get
updated, isn't effecting the currently running select
statement.
No, actually you DO see the other session changes. This is because it is AUTONOMOUS transaction, and this a function.
Test by adding:
create or replace function incvals return number as
pragma autonomous_transaction;
v_val number;
begin
update t set rn = rn + 1;
select max(rn) into v_val from t;
dbms_lock.sleep(1); --add this line
commit;
return v_val;
end;
And test in two sessions.
You will NOT get sequential ascending.
>
Think about the effect of two parallel sessionsboth
running this query at the same time, and ask isthis
sensible?Gawd, no, of course not. Like I said, I'd never use
this sort of thing myself. I'm just wondering what
on earth the OP is trying to achieve.
:)Glad to hear it.

Similar Messages

  • " HOW TO WRITE FORM ROUTINES"

    Hi all ,
    I have a Query ..  I have Developed a Smart form ( Delivery Challan ) .. My Functional Consultant asked me , If he Execute the T-code ( VL02N ). He should get the Print Preview of the Layout ...
    I know it can be done through Form routines ..
    Can one Explain me how to write the form routines ...

    Hi ,
    Copy the print program to custom program . Remove the routine " entry " . Write a selction screen with document number . put the read number to nast-OBJKY , V2 to NAST-KAPPL , sy-langu to nast-SPRAS in start of selection .Copy paste the code under the Entry routine .
    hope it helps ...

  • How to write DML operation in a function

    Hi
    Its very urgent for me.
    I am writing DML operation directly in a function and is being called from select statement, it is getting error as "DML Operations cannot be performed inside a query".
    How to write a DML operation inside a function.
    My objective is to call that function from select statement.
    Please help me out.
    Thankd

    No no no. You're committing after each row! soany
    other session running the same query will see the
    changes you're making. Your session will equallysee
    changes caused by running this query in those
    sessions.Other session, yes, but current session will only see
    the changes once it has completed the current
    statement. Otherwise my "rn" column would not have
    gone up sequentially in the above example. it would
    have gone
    1st row rn = 1 (all rows get updated by 1:-
    2,3,4,5,6,7,8,9,10,11)
    2nd row rn = 3 (all rows get update by 1:-
    3,4,5,6,7,8,9,10,11,12)
    3rd row rn = 5 (all rows get update by 1:-
    4,5,6,7,8,9,10,11,12,13)
    4th row rn = 7 (all rows get update by 1:-
    5,6,7,8,9,10,11,12,13,14)
    5th row rn = 9 (all rows get update by 1:-
    6,7,8,9,10,11,12,13,14,15)
    6th row rn = 11 (all rows get update by 1:-
    7,8,9,10,11,12,13,14,15,16)
    7th row rn = 13 (all rows get update by 1:-
    8,9,10,11,12,13,14,15,16,17)
    8th row rn = 15 (all rows get update by 1:-
    9,10,11,12,13,14,15,16,17,18)
    9th row rn = 17 (all rows get update by 1:-
    10,11,12,13,14,15,16,17,18,19)
    10th row rn = 19 (all rows get update by 1:-
    11,12,13,14,15,16,17,18,19,20)
    So the fact the commit happens each time the rows get
    updated, isn't effecting the currently running select
    statement.
    No, actually you DO see the other session changes. This is because it is AUTONOMOUS transaction, and this a function.
    Test by adding:
    create or replace function incvals return number as
    pragma autonomous_transaction;
    v_val number;
    begin
    update t set rn = rn + 1;
    select max(rn) into v_val from t;
    dbms_lock.sleep(1); --add this line
    commit;
    return v_val;
    end;
    And test in two sessions.
    You will NOT get sequential ascending.
    >
    Think about the effect of two parallel sessionsboth
    running this query at the same time, and ask isthis
    sensible?Gawd, no, of course not. Like I said, I'd never use
    this sort of thing myself. I'm just wondering what
    on earth the OP is trying to achieve.
    :)Glad to hear it.

  • How to write a query use between two months

    Hello,
    I have two views v1 and v2. Both have two columns c1 and c2: c1 with mon-yyyy format, c2 is a number. I am writing a query like this;
    select v1.c2, v2.c2 from v1, v2
    where v1.c1 = v2.c1 and v1.c1 between to_date('Jan-2011','mon-yyyy')
    and to_date('Dec-2011','mon-yyyy')
    i got: ORA-01858: a non-numeric character was found where a numeric was expected
    V1 and V2 value are like these:
    Mon-2011 89
    Feb-2011 33
    Mar-2011 45
    Apr-2011 98
    How to make it work.
    Thanks for your help.
    Jen

    Hello Jen Hu,
    Try this:
    with t as ( select 'feb-2011' as c1, 33 as nr from dual union
    select 'mar-2011',45 from dual union
    select 'apr-2011',98 from dual union
    select 'jun-2011',86 from dual union
    select 'jul-2011',78 from dual union
    select 'aug-2011',87 from dual union
    select 'sep-2011',68 from dual union
    select 'oct-2011',56 from dual union
    select 'nov-2011',68 from dual union
    select 'dec-2011',55 from dual union
    select 'jan-2012',54 from dual
    ) SELECT * FROM T
    where to_date(c1,'mon-yyyy') between to_date('aug-2011','mon-yyyy') and to_date('dec-2011','mon-yyyy');@Tauceef:
    >
    Tauceef wrote:
    You have to store full date, the conversion you are doing to_date('jan-2011','mon-yyyy') is not at all accepted, this is where you are getting that error.
    >
    Why not? Have you tried:
    select to_date('jan-2011','mon-yyyy') from dual;Once you convert the character string into date it is easier to compare!
    I agree with @clcarter's point:
    >
    Firstly, if you want to compare dates, use a DATE datatype, not varchar2. If the varchar2 has invalid dates you'll have all sorts of trouble. 'Feb-31-2011' is a perfectly valid string. But its not a date.
    >
    But if you have better mechanism of valid string input as in here:
    http://apex-plugin.com/oracle-apex-plugins/item-plugin/month-picker_148.html
    then problems of invalid string input are minimized!
    Hope it helps!
    Regards,
    Kiran

  • How to write oracle output in XML

    can any one please let me know how to write or covert procedure or function output in XML?

    845470 wrote:
    can any one please let me know how to write or covert procedure or function output in XML?What is that asking?
    Are you wanting to take output from a procedure/function that is in XML format and then convert it to something else?
    Are you wanting to get the procedure/function to produce output in XML format?
    Are you wanting to take an existing procedure/function and convert it so the code is stored in some XML structure for some purpose?
    How is anybody supposed to know what you're talking about if you don't explain it?
    {message:id=9360002}

  • How to write the sql statement of my finder function in cmp?

    hi,
    I create a cmp ejb from table INFOCOLUMN,and I create a my finder function ,which sql statement is :
    select * from INFOCOLUMN WHERE employee_id=id
    employee_id is a column of the table,and id is the finder function parameter.
    The error is : invalid column name
    So,how to write the sql statement.
    Thanks .

    Mole-
    Bind variables are of the form $1, $2, etc., so your query stmt should look like:
    select * from INFOCOLUMN WHERE employee_id=$1
    -Jon

  • Hi, I've checked how to use kannada keyboard in Yosemite. But, there are some 'vattu forms' and other grammar in Kannada language that I don't know how to use it. For eg, Preetiya taatanige nimma muddu mommagalu maduva namaskara? How to write this?

    Hi, I've checked how to use Kannada keyboard in Yosemite. But, there are some 'vattu forms' and other grammar in Kannada language that I don't know how to use it. I know how to change between the keyboards and can also view keyboard. However, For eg, 'Preetiya taatanige nimma muddu mommagalu maduva namaskara' How to write this? If anybody can answer this, very much appreciated.
    Thanks in advance for your reply.

    In general, you need to use the "f" (kannada qwerty keyboard) or "d" key (kannada) between letters to make special forms.  Also you may need to adjust the typography settings of the font, which is done by doing Format > Font > Show Fonts > Gear Wheel > Typography as shown below.  If you can provide screenshots or more detailed info on things you cannot make, I can perhaps help.
    It is important to note that MS Word for Mac does not support Indic scripts -- any other app should work OK.

  • How to write source code in smart forms?

    hi friends,
    can anyone can help me in writing  sorcecode in smartforms r
    any materail link.
    if it is helpful points can b rewarded.Thanks in advance.

    Hi,
    Check this link for
    how to write source code in smart forms?
    http://****************/Tutorials/Smartforms/GettingStarted/SimpleText.htm
    You can write Source Code in smartforms By Choosing Program Lines.
    Check this link with Screen Shots
    http://****************/Tutorials/Smartforms/PO/page1.htm
    Reward All Helpfull Answers
    Regards
    Fareedas
    Edited by: Fareeda Tabassum S on May 21, 2008 3:09 PM

  • How to write a java function for use in where clause in SQL statement

    Hi,
    Does anyone know a good tutorial on how to write and include a Java class/function into Oracle.
    I'd like to write mathematical function to use in my queries, but the resources available in PL/SQL are very limited.
    Many thanx

    Pim,
    I see you got an answer in the PL/SQL forum.
    But in case you haven't seen it, perhaps this Web page will help:
    http://www.oracle.com/technology/tech/java/jsp/index.html
    Good Luck,
    Avi.

  • How to write the exceptions in function module

    dear all,
         how to write the exceptions in function modules with example.
    thanq
    jyothi

    Hi,
    Raising Exceptions
    There are two ABAP statements for raising exceptions. They can only be used in function modules:
    RAISE except.
    und
    MESSAGE.....RAISING except.
    The effect of these statements depends on whether the calling program handles the exception or not. The calling program handles an exception If the name of the except exception or OTHERS is specified after the EXCEPTION option of the CALL FUNCTION statement.
    If the calling program does not handle the exception
    · The RAISEstatement terminates the program and switches to debugging mode.
    · The MESSAGE..... RAISING statement displays the specified message. Processing is continued in relation to the message type.
    If the calling program handles the exception, both statements return control to the program. No values are transferred. The MESSAGE..... RAISING statement does not display a message. Instead, it fills the system fields sy-msgid, sy-msgty, sy-msgno , and SY-MSGV1 to SY-MSGV4.
    Source Code of READ_SPFLI_INTO_TABLE
    The entire source code of READ_SPFLI_INTO_TABLE looks like this:
    FUNCTION read_spfli_into_table.
    ""Local Interface:
    *" IMPORTING
    *" VALUE(ID) LIKE SPFLI-CARRID DEFAULT 'LH '
    *" EXPORTING
    *" VALUE(ITAB) TYPE SPFLI_TAB
    *" EXCEPTIONS
    *" NOT_FOUND
    SELECT * FROM spfli INTO TABLE itab WHERE carrid = id.
    IF sy-subrc NE 0.
    MESSAGE e007(at) RAISING not_found.
    ENDIF.
    ENDFUNCTION.
    The function module reads all of the data from the database table SPFLI where the key field CARRID is equal to the import parameter ID and places the entries that it finds into the internal table spfli_tab. If it cannot find any entries, the exception NOT_FOUND is triggered with MESSAGE ... RAISING. Otherwise, the table is passed to the caller as an exporting parameter.
    Calling READ_SPFLI_INTO_TABLE
    The following program calls the function module READ_SPFLI_INTO_TABLE:
    REPORT demo_mod_tech_fb_read_spfli.
    PARAMETERS carrier TYPE s_carr_id.
    DATA: jtab TYPE spfli_tab,
    wa LIKE LINE OF jtab.
    CALL FUNCTION 'READ_SPFLI_INTO_TABLE'
    EXPORTING
    id = carrier
    IMPORTING
    itab = jtab
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    CASE sy-subrc.
    WHEN 1.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno.
    WHEN 2.
    MESSAGE e702(at).
    ENDCASE.
    LOOP AT jtab INTO wa.
    WRITE: / wa-carrid, wa-connid, wa-cityfrom, wa-cityto.
    ENDLOOP.
    The actual parameters carrier and jtab have the same data types as their corresponding interface parameters in the function module. The exception NOT_FOUND is handled in the program. It displays the same message that the function module would have displayed had it handled the error.
    Or
    just have to decide what exceptions u want and under what conditions.
    then declarethese exeptions under the exceptions tab.
    in the source code of ur function module.
    if
    like this u can code .
    now when u call the function module in tme mainprogram.
    if some error occurs and u have declared a exception for this then it will set sy-subrc = value u give inthe call of this fm.
    in the fm u can program these sy-subrc values and trigger the code for ur exception.
    Please reward if useful
    Regards,
    Ravi
    Edited by: Ravikanth Alapati on Mar 27, 2008 9:36 AM

  • How to write a application using WDJ with the adobe form ?

    Hi, experts,
    I don't know how to write a application using !!webdynpro for java!! with the adobe form so that I can fill data to the adobe form and get data from the adobe form.
    Note: I have configed the ADS(adobe document services),and I can create a application with a interactiveform in webdynpro for abap and run it successfully, so that I can  fill data to the adobe form and get data from the adobe form.
    Do you give me some hint?
    Thanks a lot.
    Best regards,
    tao
    Edited by: wang tao on Sep 9, 2008 8:59 AM

    Hi,
    Refers the following links.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4fd2d690-0201-0010-de83-b4fa0c93e1a9
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5f27e290-0201-0010-ff82-c21557572da1
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70c9a954-aa20-2a10-64bb-ea0835204e03
    Thanks
    Abhilasha.

  • How can I change the space between a checkbox and text all at one time? I have a lot of checkboxes in my form.

    How can I change the space between a checkbox and text all at one time? I have a lot of checkboxes in my form.

    Okay, I haven't found a way to add an extra space using Find/replace, but you might be able to add some text wrap to the check boxes that will push the text away from them.
    Open Find/Replace and click the Object tab.
    Click the Specify attributes to find button to the right of the Find Object Format: field.
    Under Basic Attributes, choose Stroke and then the Black swatch (assuming the black swatch is applied to the strokes of your check boxes). If there are no other stand-alone objects in your form with a Black stroke, this should be all you need. (If there are Black strokes on your table cells, they will be ignored.)
    Click OK
    Click the Specify attributes to change button to the right of the Change Object Format: field.
    Under Basic Attributes, choose Text Wrap & Other > Text Wrap > Type: > Wrap around bounding box (2nd button from left)
    Under Offset, set a Right offset at the distance you'd like to add (I don't know what units you use, but the 3-5 points might work for your purposes...might take some trial-and-error to get it where you want)
    Click OK
    Click Change All

  • How to write a cursor for mutiple columns in forms urgent required.........

    i created one table rk with 8 columns and that i designed in forms.
    but i have another table grk with 4 columns.
    this grk contains data.
    this grk 4 columns data i have to retrive in rk table in froms by multiple records.
    the both column names are same in the both tables.
    because by seeing this 4 columns data i will insert remaining 4 column by entering in rk table in form.
    i known that i have to write cursor to retrive the 4 columns data for multiple record from grk table and in trigger i have to produce to rk table.
    i have worked but it is not working.
    can any body help me out how to write a cursor for 4 column to retrive multple records in form

    Hi,
    Try,
    DECLARE
            CURSOR Cur_Test IS SELECT <field_1>, <field_2>, <field_3>, ... <field_n> FROM <table_name> WHERE <condition>;
    BEGIN
            OPEN Cur_Test;
            LOOP
                    FETCH Cur_Test INTO <items_or_variables>;
                    EXIT WHEN Cur_Test%NOTFOUND;
            END LOOP;
            CLOSE Cur_Test;
    END;Regards,
    Manu.

  • How to write a function block?

    Hi There,
    Does anybody know how to write a function block with LabVIEW?  Something like those in Real-Time VIs>>Function Blocks>>.
    Thank you very much in advance?
    Solved!
    Go to Solution.

    I don't want to overwelm you but there is tons of free training material online.  One of these is the one already mentioned.
    NI Learning Center
    NI Getting Started
    -Hardware Basics
    -LabVEW Basics
    -DAQ Application Tutorials
    3 Hour LabVIEW Introduction
    6 Hour LabVIEW Introduction
    Self Paced training for students
    Self Paced training beginner to advanced, SSP Required
    LabVIEW Wiki on Training
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • How to write a function generator

    How to write a function generator from labview and using PCI-MIO-16

    Hallo, [email protected],
    Du (x) meintest am 27.07.01 zum Thema How to write a function generator:
    > How to write a function generator from labview and using PCI-MIO-16
    Look to the examples - there are many VIs with that function.
    Viele Gruesse!
    Helmut

Maybe you are looking for

  • Keyboard sensor problem (windows 7, bootcamp)

    Hello! Macbook Air 13'' 2014 Primo, got windows 7 installed by bootcamp (updated), the keyboard sensor can't be shut down (when on windows), and the keyboard backlit become on randomly (when there is light, and F5, F6 doesn't work because it light! H

  • After Effects CC crashes on startup- No error message

    Recently installed After Effects CC, It will show the splash screen as it loads and then displays the interface for about 2 seconds before crashing. Leaves no error message. I have uninstalled and used the CC Cleaner tool, then re-installed numerous

  • A,B,C indicator Physical Inv report

    We have maintained the A,B,C indicator in MRP view for materials.and changed the description of A,B,C as per material category. When we post the physical inv. diffrenec, we need to have physivcal inventory report with last count date and with A,B,C i

  • Lightroom Plugins

    I have installed LR5. I have been using LR4.4. I have been using NIK Complete plugins.  Only NIK Color Efix is showing up in LR5. Don't know if this is an Adobe issue or a Google (NIK) issue.  I get no support from Google. Steve Roberson

  • Using generic drivers in 64-bit mode for eSATA card with Marvell 88sx7042

    Hello, all. I'm wondering if anyone knows of a way to plug the eSATA card's pnp info into, for example, one the plugins in the IOATAFamily kext so that it will mount in 64-bit mode. I've tried this, and simply inserting the supplied kext in the IOATA