Inserting record twice, Pls help, urgent

i am using forms 6i. i have simple dept block in my form. if i try to insert by using insert button which i created, its inserting twice the same record.
If i am trying to insert in the table which has got primary key field, its is giving frm-40508 error.
PLEASE help me
Thanku in advance
regrads
nam
here is my code for ref:
under when button pressed trigger
begin
     add_newDept(:dept.deptno,:dept.dname,:dept.loc);
end;
PROCEDURE add_newDept(p_no dept.deptno%TYPE,p_name dept.dname%TYPE,p_loc dept.loc%TYPE) IS
BEGIN
insert into dept values(p_no,p_name,p_loc);
commit;
END;

You've probably got a base table block. That would handle the insert for you, without the need for you to code an insert statement.
If so, your insert statement is duplicating the default functioality of the form, and you can remove it.
The COMMIT statement will be interpreted as a COMMIT_FORM, and will apply the changes made to base table blocks to the database, and commit those changes.

Similar Messages

  • File to File Scenario with Secure Connection. Pls help urgent

    Hello All,
    I tried a lot to get a link/blog that expalin full scenario
    for File to File Scenario with Secure Connection
    Kindly let me know if somebody have link/doc for it
    that describe all the steps to do configuring this scenario.
    What is difference in simple words between
    FTPS and SFTP.
    Pls help it is urgent as I require for Project work urgently.
    Regards

    hi rich
    go through these links
    FTPs connection failed - error ".. certificate rejected by ChainVerifier"
    Re: What is SFTP, FTI channels
    http://help.sap.com/saphelp_erp2005/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm
    FTPS implementation question.
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/0e16bfd7b021aee10000000a1553f6/frameset.htm
    Server certificate rejected by ChainVerifier:FTPS server(Points Guaranteed)
    /people/krishna.moorthyp/blog/2007/07/31/sftp-vs-ftps-in-sap-pi
    File adapter
    thanks
    Kunaal

  • Javascript error with insert record. Please help!

    I  contacted Adobe  support today and they said to get on these forums as  they cant help  with coding errors.
    When i try to  insert a Record I  get the following error:
    while executing onLoad in  InsertRecord.htm, the  following JavaScript error(s) occurred:
    At  line 665 of file  "C:\Program Files\Adobe   DreamweaverCS4\Configaration\ServerBehaviours\PHP_MySQL\InsertRecord.js":
    name    has no properties
    Line 655
          if (columnName.toUpperCase() ==   name.toUpperCase())
    Im running Win 7 64bit
    I contacted  Adobe  support today and they said to get on these forums as they cant  help  with coding errors.
    I have formatted my Pc and reinstalled and the  same error  comes up. If I try to edit and existing insert record it  works fine,  when I create a new page and then try to add a new insert  recordset i  get this erro again.
    i have since reinstalled Windows & 32Bit  to see if  that helped, nope. I have installed no extensions its a  clean install.
    Any  help  after spending a small fortune on this software.

    I think you are trying to run the program but you don't have the required class POP3Session.class or it's .java file which you can compile.
    Another example for pop3 and smtp is on the following link..check if it helps you..
    http://www.cs.umu.se/~hed/java/ch11.htm

  • PSE12 recognises my scanner, however, asks to connect??!! Pls HELP urgently

    Hello
    I have win7pro and win 8.1. PSE12 recognises my scanner, however, after going through and pressing scan it comes up with a error to coonnect the device!! The printer scanner is a HP Officejet 6500a plus if this helps.
    Pls advise urgently.

    Download and install this: http://support.apple.com/kb/DL907
    Restart your Mac.
    Reset the printing system:
    - Go to System Preferences > Print & Scan
    - Right (or control) click in the rectangle listing your printers and select Reset Printing System.
    WARNING - this will delete ALL of your printers!
    - Select the plus sign to re-add a printer. Select the Defualt tab on the top of the window. Look for the printer, select it and then next to the "Use" pulldown, select the printer model (not AirPrint). Wait until the "Add" button becomes available. Click it.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • Issue when doing Delta loads from PSA to DSO using DTP - Pls help Urgent

    Hi All,
    I have done 3 data loads into PSA and from PSA, iam loading the data into DSO - by splitting that load into 3 using 3 DTPs. (Split that by Fiscal Period).
    2 of the DTP loads are extracting the data from 3 PSA requests.
    But, one of the DTP load is filtering on ONE PSA request.
    So, we are not getting the full data into DSO.
    Can some one pls help me why the DTP load is beheaving like this ???
    Even though i have not given any filters for Request id, still , for one load its picking up the data by filtering on One Req ID.
    Cheers,
    Nisha

    Hi Jr,
    Sorry for late reply.
    I think i found the solution, the diff between the DTP's is i ahve ticked " Get request one after another " .
    I have changed it now and its working fine.
    Thanks,
    Nisha

  • CALL Transaction in background not working pls help URGENT

    hi i have writtin a bdc program which uses CALL TRSANCTION everything is working in foreground.
    if i schedule the program in background the call transaction does not work. any idea why?????????
    pls help its urgent

    hi
    good
    have you checked in the debug mode, if you have checked in the debug mode check wheather it is giving any error before data is displaying in the screen, if any error is displaying as a message than check that error why it is coming there.
    If no error is coming than check your flow of the bdc screen in the debug mode , there must be some prob, so that it is not working in the background.
    thanks
    mrutyun^

  • Music wont download - pls help urgently

    i have tried 5 times to download an album from itunes and every time i have to re-renter my billing details and double check everything is correct but to no avail. after doing this, there's no downloaded music and i don't know if apple will charge me 5 times as well for trying (hopefully not!!). pls help me. thanks

    Yes, I have, i think it may have something to do when
    it says, "playlist selected for updating no longer
    exists"
    But making a new playlist didnt work
    Then you didn't name it exactly the same as the ones that were deleted. It WILL work. Been there, done that.
    Good luck!

  • Cannot use face time after upgrating to ios 6 .password is not recognisible.pls help urgently

    I cannot use face time after updating to IOS 6'password  is not recognisible here nor to imessage pls help urgently

    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime: Set-up, Use, and Troubleshooting Problems
    http://tinyurl.com/32drz3d
     Cheers, Tom

  • Pls help, urgent... I'm giving out all my duke dollars...

    Hi, thanks for reading...
    My problem is I need to assignment some value into an variable when the "main" program start and I want the data inside this variable visible to all the class to use (by using the getter methods to get the value),
    For example: From the code below (the clsMain), it is possible to get the same value assigned into the "strGrandChildName" variable in the "main" program inside the "clsChild" class? Any idea how to make this thing work? pls help me... with some sample code... i really appreciate any help you guys can give.
    Thank You,
    Best Regards.
    public class clsGrandChild {
    private String strGrandChildName = "";
    public void mtd_setGrandChildName(String strIn) {
    strGrandChildName = strIn;
    public String mtd_getGrandChildName() {
    return strGrandChildName;
    public class clsChild {
    private String strChildName = "";
    public void mtd_setChildName(String strIn) {
    strChildName = strIn;
    public String mtd_getChildName() {
    return strChildName;
    public String mtd_GrandChildName() {
    // can i get the same value of strGrandChildName assigned in the main frm here?
    public class clsMain extends clsGrandChild {
    public static void main(String[] args) {
    mtd_setGrandChildName("grand child name");
    clsChild objChild = new clsChild();
    objChild.mtd_GrandChildName();

    public class clsGrandChild {
    private String strGrandChildName = "";
    public void mtd_setGrandChildName(String strIn) {
    strGrandChildName = strIn;
    public String mtd_getGrandChildName() {
    return strGrandChildName;
    public class clsChild {
    private String strChildName = "";
    public void mtd_setChildName(String strIn) {
    strChildName = strIn;
    public String mtd_getChildName() {
    return strChildName;
    public String mtd_GrandChildName() {
    // can i get the same value of
    alue of strGrandChildName assigned in the main frm
    here?
    public class clsMain extends clsGrandChild {
    public static void main(String[] args) {
    mtd_setGrandChildName("grand child name");mtd_setGrandChildName("grand child name") shouldn't be called here, it should be called after the
    clsChild object has been created
    >
    clsChild objChild = new clsChild();objChild. mtd_setGrandChildName("grand child name");
    objChild.mtd_GrandChildName();
    If to access the variable strGrandChildName before the instanciation of clsChild object is what you needed, then you will need to set the string strGrandChildName as static and also setter method
    needs to be static too.
    private static String strChildName = "";
    public static void mtd_setGrandChildName(String strIn) {
    strGrandChildName = strIn;
    by doing it this way, the static variables will be created when main thread starts.

  • Error in generating the condition table.. pls help urgent

    Hi all,
    I have some condition tables to be generated in CRM from ECC.
    i am getting the following error for 2 tables : " Generation for application CRM, Usage PR and table CUS601 failed".
    But other tables data has been corectly downloaded from ECC to CRM.
    I m checking the status in SLG1. and i use tcode : CND_MAS_GEN_OBJECTS.
    Kindly help me this,
    its very very urgent.
    points will be rewarded.
    Robin

    thanks rajesh for ur reply.
    Basically the issue is like this now.
    Im trying to download the confition tables data from R3 to CRM. so in CRM...
    when i manually try to start initial download the object for a table by R3AS, tcode..
    the bdocs are been in intermeditate state in CRM. with yellow.
    when i try to reprocess it is throughing a short dump( reason telling : already a record is been availble in table : CNLCRMPRSCALEDIM, trying to insert again.
    So m not understanding what the issue would be..
    Could you please help me with this. im really in dead situation.
    it is working for other tables
    Robin

  • N96-phone recovery-PLS HELP--URGENT

    im geting the error in nokia software updater:-
    remove the battery and charger,
    insert battery and charger,
    click retry
    power on.
    what should i do?
    after trying this, i still get the error!
    help pls
    What's Worth Doing, Is Worth Doing Well!
    All "N-series" are incredible!

    You better keep truing as instructed. you you completely exit the update program you wont be able to recovr your nokia anymore.
    IVOR you shouldn't advise people who's update went wrong to disconnect it and reinstall the program! This way they will never be able to recover the Phone.
    I just updated my n96 and it went wrong too. the only thing the phone did when i turned it on was flashing with the back light and back off again and again. The only way you can fix your faulty update is to do exactly as told in the software.
    First put back in the USB cable then the battery and then the charger. then press the on/off button for 1 sec. then retry on the program
    If you do this right you wont see anything happen to your phone.. it stays black and wont start up. on your computer screen you wont see that the phone has been reconnected. But now the update bar of the nokia updater will go on. and finish the update and try to recover the phone. When its finished the phone will start up and go into test mode. after the test is complete it will startup.
    I once had the problem that the telephone hang on test mode and it still was after 10 minutes. if this happens pull out the usb cable and instantly put it back in. this way the usb will be reconnected to your computer and the phone will finish the test.
    NEVER I SAY NEVER ! force quit the update program when the phone is off and the update has failed. As the phone is still in the standby menu while updating then there is not much that can happen. for it has not began updating yet.

  • PRD Client L.ocked -   Pls Help Urgent.

    Hi Gurus,
      Yesterday i set remote copy for PRD To DEV in background job.  Now the Job is cancelled.  The PRD Client is locked.  If i login " The client is currently locked against logon"  - This is error message display all users.  Pls advise how to unlock the client.
    This is very urgent..
    Thanks
    Rajesh.

    Hi Rajesh,
    useful link
    http://www.sap-img.com/bc060.htm
    you can unlock client from if you have access to any of the client in that system
    We can lock a client using SCCR_LOCK_CLIENT and unlock SCCR_UNLOCK_CLIENT functions.
    even you can user tp command to unlock
    hope this helps,
    thanks
    kishore

  • CFloop in Javascript function...pls help urgent

    <script type="text/Javascript">
          function XYZ(group_id)
           switch(group_id)
            <cfloop query = "GetProgramAuthGrpRouting">
             case '#GetProgramAuthGrpRouting.group_id#':
              <cfset variables.user_names = "">
              <!--- Get all users belonging to the selected group id --->
              <cfquery name="GetGroupUsers" datasource="#request.db_instance#">
               select distinct employee_number from dbo.DIV_USER_GROUP_XREF where division =
                <cfqueryPARAM value = "#request.Pub.Project.division#"> and group_id =
                <cfqueryPARAM value = "#GetProgramAuthGrpRouting.group_id#">
              </cfquery>
              <!--- Getting the name of the user by passing the employee id to the GetUser custom tag  --->
              <cfif GetGroupUsers.RecordCount gt 0>
               <cfloop query = "GetGroupUsers">
                <CF_GetUser
                 query_name = "GetUser"
                 employee_number = "#GetGroupUsers.employee_number#">
                <cfset variables.user_names = variables.user_names&''&GetUser.employee_name&'\n'>
               </cfloop>
              <cfelse>
               <cfset variables.user_names = 'No users in this routing group\n'>
              </cfif>
                alert('#variables.user_names#');
                break;
              </cfloop>
         </script>
    Hi all I am new to this community and this is my first post here. So if this is the wrong place for these then pls let me know the right area. Thanks.I have looped over the result set using CFLOOP in  javascript function and it is working fine. But I want to know if this can be done since javascript is a client side scripting language and CF is a server side. Is this the right way of coding? Can i use cfloop in a javascript function? Please help me as this is urgent. Thanks in advance.

    You you can use CFML inside of a JavaScript <script..> block to dynamically build the JavaScript code to send to the client.  It is a very powerful technique for building highly interactive web sites.
    Just realize that all the JavaScript code is going to be completely built by the CFML and then sent to the browser client through the web server where the JavaScript is executed completely independent of anything that is running on the server.  The JavaScript can not read or write variables on the server or vice-a-versa.  But it is quite easy to export variable values from ColdFusion to JavaScript.  It is a bit more work to export variable values back requiring either the browser or JavaScript to make a new request of the server to send the data.  AJAX does allow this to happen behind the scenes making it look like the data is being shared.  But in reality it is being passed back and forth with independent HTTP requests and responses.
    A recent discussion on this topic:
    http://forums.adobe.com/message/1957350#1957350

  • RFC - XI - TCP/IP scenario. Pls help urgent

    Hi All,
    I have RFC -> XI -> TCP/IP scenario.
    My scenario is quite similar to scenario given in blog:
    /people/saravanakumar.kuppusamy2/blog/2005/12/15/socket-integration-with-xi
    Questions.
    1. Pls explain how Java Mapping is done in XI. ?
    2. In real scenario static void main (String[] args) method will
        not be there because request will come automatically from
        SAP source and response from tcp/ip system.
        Am I  corrcet?
    3. My response is not xml. Pls send me updated code that  
        can convert string array byte format to xml.
    Is there any simple way to do this scenario.
    Full points will be awarded.
    Thanks

    Hi Rider,
    You can implement mapping programs in Java. To process XML documents, use Java API for XML Processing (JAXP), for example. The JAXP supports the Document Object Model (DOM) and the Simple API for XML (SAX). This gives you great flexibility for mapping definitions with Java.
    The runtime environment for Java mappings has an mapping API. To use Java mapping, you must define a Java class that implements the Java interface com.sap.aii.mapping.api.StreamTransformation. This interface has two methods:
    &#9679;     public void execute(java.io.InputStream in, java.io.OutputStream out)
    At runtime, the Integration Engine calls this method to execute a mapping. This method contains an input stream for the source document and an output stream for the target document as parameters. These streams are usually XML documents. You can import the substructures to be converted from the input stream and output the converted target document in the output stream.
    &#9679;     public void setParameter(java.util.Map param)
    The Integration Engine transfers parameters to the mapping program with this method. It evaluates these parameters at runtime in the method execute(). This enables you to control the process flow of the mapping.
    The transferred object that implements the Java interface java.util.Map contains seven key/value pairs as parameters. These correspond to corresponding fields in the message header. Apart from the MAPPING_TRACE constant, the value objects are of type java.lang.String. The key objects are defined in the class com.sap.aii.mapping.api.StreamTransformationConstants:
    (plz check this in the link):
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
    For Key-Value Pairs, check out the link:
    http://help.sap.com/saphelp_nw04/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm
    Plz reward points if satisfied.
    Regards,
    Sushama

  • Pls Help urgent with DATE problem

    Dear Sir,
    I have to make a classified system using asp and its almost
    ready but.....,
    i really have a big hope that someone helps me here
    I have two columns to play with
    1. strDate
    2. StrDateDisplayAD
    Once the user submits his AD I want the date to be inserted
    into the date
    column strDate which is working perfectly well
    but at the same time I want the date to be added + 5 days and
    insert into
    the strDateDisplayAd column
    for Example,
    Lets say someone post his ad on 5th July, then the values in
    the column must
    be
    strDate | StrDateDisplayAD
    5/6/06 | 10/5/06
    Thanks in advance

    Use a hidden form element that has a value of 5 days added.
    In ASP VBScriptit would look like this:
    <input name="StrDateDisplayAD" type="hidden"
    id="StrDateDisplayAD"
    value="<%= FormatDateTime(DateAdd("d", 5, Now()),2)
    %>">
    Ken Ford
    Adobe Community Expert
    "Techy" <[email protected]> wrote in message
    news:e883h2$it2$[email protected]..
    > Dear Sir,
    >
    > I have to make a classified system using asp and its
    almost ready
    > but.....,
    > i really have a big hope that someone helps me here
    >
    > I have two columns to play with
    >
    > 1. strDate
    > 2. StrDateDisplayAD
    >
    > Once the user submits his AD I want the date to be
    inserted into the date
    > column strDate which is working perfectly well
    >
    > but at the same time I want the date to be added + 5
    days and insert into
    > the strDateDisplayAd column
    >
    > for Example,
    >
    > Lets say someone post his ad on 5th July, then the
    values in the column
    > must
    > be
    >
    > strDate | StrDateDisplayAD
    >
    > 5/6/06 | 10/5/06
    >
    >
    > Thanks in advance
    >
    >
    >

Maybe you are looking for

  • Exporting text in 16:9

    Have a problem thats puzzling me.....Im creating name strips and viewing them in the canvas using the correct aspect ratio setting then I'm exporting them using alpha lossless (animation codex) and importing them into FCP....all well and good....then

  • How do I make a "Title Menu Button" that is an Arrow?

    I am using DVD 08 with iMovie 06. I set my chapters using iMovie 06. When I shared with iDVD 08 everything looked OK. I normally do six scenes however this time I wanted eight. In the past when using iDVD 08 (or iDVD 06) there is always a blue arrow

  • After the latest update for Adobe Flash, I can't watch movies that require Flash.

    Movies from You Tube and others that require Flash will not run. When I right click on it, it says Movie Not Downloaded. I am running Windows 7 64 Bit. I had no problem before the update.

  • Two IS in one box

    Hi, This might be very weird question but we are trying to implements 2 IS in one box. These are IS-OIL & IS-CWM . We had IS-OIL and once we activated the IS-CWM, it looks like the enhancement of IS-OIL were removed( it is our assumption as before ac

  • SAP Screen

    Hi Can any one say how to clear the Command field or prompt in the SAP Screen ? Thanks in Advance. Regards shriraam