Insert records in PD infotypes  programatically

Hi,
I'm new to HR abap and my requirement is to update , modify or delete a custom infotype programatically. Please let me know if there are any class,mehods or fucntion modules available for this. Any sample coding will really be very helpful.
Thanks.

Hi
use the fun module
HR_INFOTYPE_OPERATION
try to make use of FM
'HR_INFOTYPE_OPERATION'
and see the sample code:-
https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action&pageid=13160
REPORT YBDC_NEW_586
no standard page heading line-size 255.
data: begin of i_upload occurs 0,
pernr like pa0586-pernr,
bedda(10) type c,
ebdda(10) type c,
pin01 like pa0586-pin01,
pin02 like pa0586-pin01,
pin03 like pa0586-pin01,
pin04 like pa0586-pin01,
pin05 like pa0586-pin01,
pin06 like pa0586-pin01,
pin07 like pa0586-pin01,
pin08 like pa0586-pin01,
pin09 like pa0586-pin01,
pin11 like pa0586-pin01,
pin12 like pa0586-pin01,
pin13 like pa0586-pin01,
pin14 like pa0586-pin01,
pin16 like pa0586-pin01,
pin17 like pa0586-pin01,
pin18 like pa0586-pin01,
pin19 like pa0586-pin01,
pin20 like pa0586-pin01,
pin21 like pa0586-pin01,
pin22 like pa0586-pin01,
pin23 like pa0586-pin01,
pin24 like pa0586-pin01,
pin25 like pa0586-pin01,
ain01 like pa0586-ain01,
ain02 like pa0586-ain01,
ain03 like pa0586-ain01,
ain04 like pa0586-ain01,
ain05 like pa0586-ain01,
ain06 like pa0586-ain01,
ain07 like pa0586-ain01,
ain08 like pa0586-ain01,
ain09 like pa0586-ain01,
ain11 like pa0586-ain01,
ain12 like pa0586-ain01,
ain13 like pa0586-ain01,
ain14 like pa0586-ain01,
ain16 like pa0586-ain01,
ain17 like pa0586-ain01,
ain18 like pa0586-ain01,
ain19 like pa0586-ain01,
ain20 like pa0586-ain01,
ain21 like pa0586-ain01,
ain22 like pa0586-ain01,
ain23 like pa0586-ain01,
ain24 like pa0586-ain01,
ain25 like pa0586-ain01,
end of i_upload.
data: begin of p586 occurs 0,
icode like pa0586-itc01,
pinvt like pa0586-pin01,
ainvt like pa0586-ain01,
end of p586.
data: p0586 like p0586 ,
ia586 like pa0586 occurs 0 with header line,
return like bapireturn1,
pin_ainvt type pin_ainvt.
S E L E C T I O N - S C R E E N D E F I N I T I O N *
selection-screen begin of block b1 with frame title text-001.
parameters: p_file like rlgrap-filename obligatory,
p_begda like pa0586-begda obligatory,
p_endda like pa0586-endda obligatory.
selection-screen end of block b1.
E V E N T H A N D L I N G - B E G I N *
at selection-screen on value-request for p_file.
perform get_file using p_file.
START OF SELECTION - B E G I N *
start-of-selection.
data: lines like sy-index.
*Getting the file data.
perform upload using p_file.
loop at i_upload.
ia586-pernr = i_upload-pernr.
ia586-endda = p_endda.
ia586-begda = p_begda.
perform col_row.
perform do.
append ia586.
clear : ia586,p586.
refresh : p586.
endloop.
loop at ia586.
move-corresponding ia586 to p0586.
CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
EXPORTING
NUMBER = p0586-pernr.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0586'
NUMBER = p0586-pernr
LOCKINDICATOR = ''
VALIDITYEND = p0586-endda
VALIDITYBEGIN = p0586-begda
RECORD = p0586
OPERATION = 'INS' or MOD or DEL
NOCOMMIT = ''
tclas = 'A'
IMPORTING
RETURN = RETURN
EXCEPTIONS
OTHERS = 0.
CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
EXPORTING
NUMBER = p0586-pernr.
clear : p0586.
endloop.
*& Form GET_FILE
Show "Open File" dialog box on F4
-->P_W_FILE Name of the file selected by the user
form get_file using p_w_file.
call function 'KD_GET_FILENAME_ON_F4'
CHANGING
file_name = p_w_file
EXCEPTIONS
mask_too_long = 1
others = 2.
if sy-subrc ne 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endform. "GET_FILE
*& Form UPLOAD
Upload the file into the internal table for processing
-->P_LOADFILE Name of file to upload
form upload using p_loadfile.
Read the file into the Internal Table
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = p_loadfile
filetype = 'DAT'
TABLES
data_tab = i_upload.
if sy-subrc ne 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endform. "UPLOAD
FORM col_row .
if i_upload-ain01 is not initial or i_upload-pin01 is not initial.
p586-icode = '01'.
p586-pinvt = i_upload-pin01.
p586-ainvt = i_upload-ain01.
append p586.
clear p586.
endif.
if i_upload-ain02 is not initial or i_upload-pin02 is not initial.
p586-icode = '02'.
p586-pinvt = i_upload-pin02.
p586-ainvt = i_upload-ain02.
append p586.
clear p586.
endif.
if i_upload-ain03 is not initial or i_upload-pin03 is not initial.
p586-icode = '03'.
p586-pinvt = i_upload-pin03.
Reward points if useful
Regards
Anji

Similar Messages

  • Insert record in INFOTYPE

    I have not worked wiith infotypes...Please guide me...
    I have created Employee infotype with number 9035.
    I added that structure in the standard infotype table PA9035 (HR Master Record: Infotype 9035)
    in that standard infotype some other SAP includes are also there.
    I want to insert some records based on some logic in my include Infotype. How to insert records in that include...?
    since in the other include some P.K fields are there..But i dont have value for all the p.k's. I can pass only PERNR value(one of the P.k's).... so how can i insert a record in that infotype??
    Please help me..
    Regards,
    Thendral.

    Hello Elan
    It all depends on how you want to insert records to your infotype.
    Say if you want to insert data programmatically you can use the FM HR_INFOTYPE_OPERATION by passing the data in the infotype structure namely P9035 (...in your case)
    If you want to insert records through transaction then you can do it through tcode PA30, you have to enter the personnel number and the infotype 9035 in the field provided on screen. Then you can choose the Create button to insert the data.
    Regards
    ~ Ranganath

  • Dump when Inserting records in Info type Tables through PA30

    Hi Experts,
    I am facing a issue in the transaction PA30 where in any changes made and saved leads to Runtime error (Inserting records in Infotype tables ).
    Error Line : insert (dbname) from  <prel_db>
    The Structure is the same but the data mismatch with the data types like
    Field NUMC(4) is filled with 00 instead of 0000
    Field DATE and TIME are Blank instead of 00000000 or 000000.
    Similarly facing the same issue in few other fields.
    The issue is same as the below thread and tried the solution given by Taher kanchwala by changing the data in the debugger and it worked.
    DBIF_RSQL_INVALID_REQUEST error while inserting records in infotype tables
    BUT i am not sure about the changes that needs to be done for fixing this issue permanently as it is mentioned to change at the configuration level.
    Any suggestions or solutions to this issue??
    Regards,
    AyyamPerumal

    Hi Nabheet,
    Thanks for your time. No enhancements are done.
    The issue is in the below statement where dbname is PA2001 and the field symbol <prel_db> has the structure of PA2001.
    insert (dbname) from  <prel_db>
    But the data is not matching with the data types like NUMC, DATE, TIME..
    Even the DOCSY and DOCNR which should been generated at this point is also not generated.
    On correcting this and giving dummy doc values, records are inserted.
    Attaching screen shots for your reference. Any solutions to this??
    Thanks and regards,
    Ayyamperumal

  • Error while inserting records in sqlLite database

    Hi all
    I am building a hybrid web app in SMP using phonegap and html.
    I am trying to insert records in sql database but i get an error with an undefined error code
    Please see below :
    function openDatabaseFoo() {
      db = window.openDatabase(clientDBName, clientDBVersion, clientDBDisplayName, clientDBMaxSize);
    function createDBTables() {
      db.transaction(function(tx) {
      // Create mine table
      var fooCreate = 'CREATE TABLE IF NOT EXISTS ' + fooTable+ ' (empNo, empName)';
      tx.executeSql(fooCreate , [],
      function (tx, resultSet) {
                //success
      var msg = 'Sucessfully created';
      alert(msg);
      logSuccessMessage(msg);
                function (err) {
                //error code
                var msg = "Error creating table = " + err.code;
                alert(msg);
                logErrorMessage(msg);
    the creation of tables is happening properly because i am getting a success message in the alerts.
    I am getting the error when i am trying to insert records in the above table
    function insertDataTable(){
    db.transaction(function(tx) {
    var insertSql = 'INSERT INTO ' + fooTable + ' (empNo, empName) VALUES ("1603","baker")';
    tx.executeSql(insertSql, [],
      function (tx, resultSet) {
                //success
      var msg = 'Sucessful insertingdata.';
      alert(msg);
      logSuccessMessage(msg);
                function (err) {
                //error code
                var msg = "Error inserting data sql = " + insertSql + " Error code = " + err.code;
                alert(msg);
                logErrorMessage(msg);
    can some one please help.Also guide me where can i check the sqlLite database logs to see more about the error.
    I would really appreciate the help.I have been onto this since past few days now
    Regards
    Shweta

    What is err.code, or the value of msg when the error occurs?
    Thanks,
    Andrew.

  • XSQL error when trying to insert record

    hi,
    I encounter a problem using INSERT statement in xsql:query action. If I try to use INSERT statement in my xsql page like this:
    <xsql:ze_action bean="TaskentryIn">
    <xsql:query>
    INSERT
    Grundtab( Datum,Startzeit,Endzeit)
    VALUES
    ('{@date}',{'@begin}','{@ende}')
    </xsql:query>
    </xsql:ze_action>
    I always get this xsql-error:
    Statement.executeQuery - No result sets were produced by 'INSERT...'
    So far so good, I think this shouldn't be an error rather a warning.
    But this is not my primary problem.
    Anyway the record is inserted in the DB. But since I call the above <xsql:query>, from within my own action handler, I call a sendRedirect() to my next page after the <xsql:query> tag was processed.
    After sendRedirect(), when I am on my next page, I check the DB for the inserted records, and it shows up that the insert was made two times, so I have two identically records in my DB.
    If I am not sendRedirect() to the next xsql page, then the insert is only made once. So I assume that there is a problem if an xsql-error occurs and afterwards a sendRedirect().
    I am using the same way to make my SELECT statements and I dont have any trouble with them. Only when I use INSERT.
    Any adive or help is appreciated.
    Peter

    <xsql:query> is only for queries.
    Use <xsql:dml> for a DML statement.

  • [SOLVED] FRM-40508:ORACLE error: unable to INSERT record

    Hi all,
    I have migrated this form from 4.5 to 10g (Version 10.1.2.0.2 ). This form inserts a record into the database table when all the fields in the form are filled and a button Save is presed.
    At the time when I press the Save button, I get this error. FRM-40508:ORACLE error: unable to INSERT record
    So I went on to see the "Display Error" from help and found to be the database error, inserting into a table.
    The error message is ORA-00932: inconsistent datatypes: expected DATE got NUMBER
    The form where I press Save button has 3 date fields and I checked the properties of them and they are Date only.
    I also generated to object list report and tried to find some answer, but no use.
    Please help me in debugging this form.
    Edited by: Charan on Aug 18, 2011 4:05 PM

    I think you need to get a description of the table and compare all the "database" columns in the form with the ones in the database table to see that the types match. Somewhere there's a mismatch. Also check the block(s) "query data source columns" and see if there's any
    columns in there that the type does not match the table. (check the sizes of things too while you're at it.)

  • How can i display recent update/delete/insert records in form

    Hai !!!!
    i am new for forms,.......any body tell me, how can i display recent no of records updated or no of records deleted or no of records are inserted in a form. these records count are display in display items....give me detail explination......
    Subbu.....

    the easiest way is copy and paste the oracle-forms example from the OU.
    You need form-level-trigger ON-ERROR + ON-MESSAGE, POST-INSERT, POST-UPDATE, POST-DELETE, three global variables and a procedure:
    ON-ERROR
    handle_message( error_code, 'ERROR: ' || ERROR_TYPE || '-' || TO_CHAR(ERROR_CODE) ||': '|| ERROR_TEXT );
    ON-MESSAGE
    handle_message( message_code, MESSAGE_TYPE || '-' || TO_CHAR(MESSAGE_CODE) || ': ' || MESSAGE_TEXT );
    PROCEDURE handle_message( message_number IN NUMBER, message_line IN VARCHAR2 ) IS
    BEGIN
        IF message_number IN ( 40400, 40406, 40407 )
        THEN
          DEFAULT_VALUE( '0', 'GLOBAL.insert' );
          DEFAULT_VALUE( '0', 'GLOBAL.update' );
          DEFAULT_VALUE( '0', 'GLOBAL.delete' );
          MESSAGE('Save Ok: ' ||
            :GLOBAL.insert || ' records inserted, ' ||
           :GLOBAL.update || ' records updated, ' ||
           :GLOBAL.delete || ' records deleted !!!' );
          ERASE('GLOBAL.insert'); 
          ERASE('GLOBAL.update');
          ERASE('GLOBAL.delete');
        ELSE
             MESSAGE(message_line );
              END IF;
    END;
    POST-INSERT
    DEFAULT_VALUE('0', 'GLOBAL.insert');
    :GLOBAL.insert := TO_CHAR( TO_NUMBER( :GLOBAL.insert ) + 1 );
    POST-UPDATE
    DEFAULT_VALUE('0', 'GLOBAL.update');
    :GLOBAL.update := TO_CHAR( TO_NUMBER( :GLOBAL.update ) + 1 );
    POST-DELETE
    DEFAULT_VALUE('0', 'GLOBAL.delete');
    :GLOBAL.delete := TO_CHAR( TO_NUMBER( :GLOBAL.delete ) + 1 );try it
    Gerd

  • Inserting records into Table with check table logic in place

    I want to insert records into a table, and have the check table to not allow invalid entries.  Is there a function out there that will allow this?  I am currently using the insert statement and it is working except that it is not giving an error when the value does not exist in the check table for the particular fields.
    INSERT INTO ZSD_XREF VALUES WA_XREF.
    That is the basic statement I'm using ZSD_XREF has several fields one being the material number field tied to the check table which happens to be MAKT file.  The insert statement is not validating the material numbers using the check table, or at least it is not giving an error.  Any ideas?

    Paul,
    Unfortunately, open SQL statements such as INSERT, UPDATE do not go through the check table logic as they directly hit the database layer. Check table checks are performed only if you go through application layer that is when you enter the same data through a screen.
    You have to do the checks yourself.
    Happy checking!!!
    Srinivas

  • How to insert records in user defined tables through DI Server API

    Hi All,
    I have created a UDO using some userdefined tables .I am able to insert records in the user defined tables using DI API but problem is that now I want to insert records in those tables using DI Server API but I dont know how to do that please give me some way to do that
    Thanks and Regards
    Utpal

    The AddObject message is :
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
      <env:Header>
        <SessionID>...</SessionID>
      </env:Header>
      <env:Body>
        <dis:AddObject xmlns:dis="http://www.sap.com/SBO/DIS">
          <BOM>
            <BO>
              <AdmInfo>
                <Object>...</Object>
              </AdmInfo>
            </BO>
          </BOM>
        </dis:AddObject>
      </env:Body>
    </env:Envelope>
    How to use it with a user defined table ?

  • Insert record and email

    Hello
    How do I insert a record with the image filename into a database, then send the data just entered as an email?
    I was able to do this before but now this new CS3 seems so complicated!
    I am unable to just use an insert record behavior then add form fields and change the insert or update recored behavior like before.
    Please can I be shown some actual working tutorials on this?
    This search function on this forum does not work as I tried to search for this exact statement "insert record and email" and no records appear.
    Cheers

    Ok, here is the entire page:
    <br />
    <br /><?php require_once('Connections/cnreviva.php'); ?>
    <br /><?php<br />// Load the common classes<br />require_once('includes/common/KT_common.php');<br /><br />// Load the tNG classes<br />require_once('includes/tng/tNG.inc.php');<br /><br />// Make a transaction dispatcher instance<br />$tNGs = new tNG_dispatcher("");<br /><br />// Make unified connection variable<br />$conn_cnreviva = new KT_connection($cnreviva, $database_cnreviva);<br /><br />$editFormAction = $_SERVER['PHP_SELF'];<br />if (isset($_SERVER['QUERY_STRING'])) {<br />  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);<br />}<br /><br />// *** Mail form as Text format ***<br />if (isset($_POST["FX_sendForm"]) && $_POST["FX_sendForm"] == "frmupload") {<br />  $format = strtolower("Text");<br />  if ($format != "html") $format = "plain";<br />  $filefield = "uploadfile";<br />  $top = "\r\n";<br />  $body = "\r\n";<br />  $excludeArray = array("button","button_x","button_y","uploadfile","FX_sendForm","MM_insert","MM_update"); <br />  $i = 0;<br />  while ($i<sizeof($_POST)) {<br />    if (!in_array(key($_POST),$excludeArray)) {<br />      if (is_array(pos($_POST))) {<br />        $postVar = implode(", ", pos($_POST));<br />      } else {<br />        $postVar = pos($_POST);<br />      } <br />      $body .= strtoupper(key($_POST)) . ": " . stripslashes($postVar) . "\r\n";<br />    }<br />    $i++;<br />    Next($_POST);<br />  }  <br />  $bottom = "\r\n";<br />  $from = $_POST["email"];<br />  // set parameters<br />  $recipient = "[email protected]";<br />  $subject = "Test";<br />  $message = $top . $body . $bottom;<br />  // set extra parameters<br />  $headers = "From:" . $from . "\r\n";<br />  $headers .= "Cc:\r\n";<br />  $headers .= "Bcc:\r\n";<br />  require_once("FXInc/FX_mailForm_php.inc");<br />  // send all<br />  mail($recipient, $subject, $message, $headers);<br />  $body = urlencode(str_replace("\r\n", "<br>", $body));<br />  $redirect = "thankyou.php";<br />  if ($redirect) header("Location: " . $redirect);<br />}<br /><br />// Make an insert transaction instance<br />$ins_tblfeedback = new tNG_insert($conn_cnreviva);<br />$tNGs->addTransaction($ins_tblfeedback);<br />// Register triggers<br />$ins_tblfeedback->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1");<br />$ins_tblfeedback->registerTrigger("END", "Trigger_Default_Redirect", 99, "thankyou.php");<br />// Add columns<br />$ins_tblfeedback->setTable("tblfeedback");<br />$ins_tblfeedback->addColumn("name", "STRING_TYPE", "POST", "");<br />$ins_tblfeedback->addColumn("email", "STRING_TYPE", "POST", "");<br />$ins_tblfeedback->addColumn("city", "STRING_TYPE", "POST", "");<br />$ins_tblfeedback->addColumn("country", "STRING_TYPE", "POST", "");<br />$ins_tblfeedback->addColumn("shoe_size", "STRING_TYPE", "POST", "");<br />$ins_tblfeedback->addColumn("feedback", "STRING_TYPE", "POST", "");<br />$ins_tblfeedback->addColumn("activate", "STRING_TYPE", "POST", "", "N");<br />$ins_tblfeedback->addColumn("photo", "FILE_TYPE", "FILES", "uploadfile", "");<br />$ins_tblfeedback->setPrimaryKey("id", "NUMERIC_TYPE");<br /><br />// Execute all the registered transactions<br />$tNGs->executeTransactions();<br /><br />// Get the transaction recordset<br />$rstblfeedback = $tNGs->getRecordset("tblfeedback");<br />$row_rstblfeedback = mysql_fetch_assoc($rstblfeedback);<br />$totalRows_rstblfeedback = mysql_num_rows($rstblfeedback);<br />?>
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <script src="includes/common/js/base.js" type="text/javascript"></script>
    <br />
    <script src="includes/common/js/utility.js" type="text/javascript"></script>
    <br />
    <script src="includes/skins/style.js" type="text/javascript"></script>
    <br />
    <br />
    <br />
    <br />
    <form action="%3C?php%20echo%20$editFormAction;%20?%3E" method="post" name="frmupload" id="frmupload">
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <table width="300" border="0" cellspacing="0" cellpadding="5">
    <tr>
    <td>Name
    <br />
    <br />
    <input type="text" name="name" id="name" length="20" value="" /></td>
    </tr>
    <tr>
    <td>Email
    <br />
    <br />
    <input type="text" name="email" id="email" length="20" value="" /></td>
    </tr>
    <tr>
    <td>City
    <br />
    <br />
    <input type="text" name="city" id="city" length="20" value="" /></td>
    </tr>
    <tr>
    <td>Country
    <br />
    <br />
    <input type="text" name="country" id="country" length="20" value="" /></td>
    </tr>
    <tr>
    <td>Image
    <br />
    <br />
    <input name="uploadfile" type="file" id="uploadfile" /></td>
    </tr>
    <tr>
    <td>&#160;</td>
    </tr>
    <tr>
    <td>
    <?php<br /> echo $tNGs->getErrorMsg();<br />?>
    <input type="submit" name="button" id="button" value="Submit" />
    </td>
    </tr>
    </table>
    <br />
    <input type="hidden" name="FX_sendForm" value="frmupload" />
    <br /></form>
    <br />
    <p>&#160;</p>
    <br />
    <br />

  • Insert Record in Master-Detail block

    I am using JDev 10.1.2, Struts, ADF and JSP
    I have a Master-Detail relationship. As the master table(Course) is browsed , the details(Students) record keep changing. Now I want to insert records to the detail (Students) block alone. I am generating the Students id using Sequence, but I want use the Course Id that is being browsed for the new record inserted. How do I do this.
    I used the 'Read Only Dynamic Table' for the Details table and used the create button and forward it to create jsp. When I click on create button, it does go to the create jsp, but the the row is not blank. what do I have to do.
    Any help will be appreciated.

    Hi Shay,
    Thanks for the response. At least I'm getting some response after so long a time.
    I'm not sure what are you looking at. But this is what I have.
    I have a browseCourse.jsp that displays the courses in the master and students in the detail. I have a create button for the detail, and my code looks like this.
    public class BrowseCourseAction extends DataForwardAction
    public void onCreate (DataActionContext actionContext)
    actionContext.getHttpServletRequest().getSession().setAttribute("type", "create");
    if (actionContext.getEventActionBinding() != null)
    actionContext.getEventActionBinding().doIt();
    actionContext.setActionForward("createstudent");
    when the user click on create button it shows the createstudent.jsp. My question is how to set the course id for the new student that is about to be created.
    What do I have to do for this?

  • Insert record works for me, but not my client...

    This is odd - I basically have an ADDT insert record page to add a database record, which as far as I know worked just as it should.
    But my client is saying it doesn't work on her machine - apparently when she hits 'add record' instead of going to the page confirming the record has been added, its just reloading a blank form on the add record page.
    I've just double checked on my machine, and it definitely works for me.
    She's definitely using the correct the URL.
    Its just using mySQL / PHP / phpMyAdmin
    Is there any reason at all that this should be the case, or any ideas what is causing it and what a solution might be?
    Thanks.

    Well, apparently its working for her now in Firefox, so looks like it may have something to do with IE8. I noticed on her screenshot there was something called Internet | Protected Mode : On - so maybe that's being over zealous in some way.

  • Unable to insert record in table

    Hi,
    I want to insert record in database table, but when I execute insert command(at When List changed trigger) as select from query and issue commit, the form trying to insert record from datablock which is obviously having empty items, how can I commit at database level not at form level.
    *******************Below the SQL Statement issued by Form******************
    INSERT INTO BILL_OF_MATERIALS_TABLE(PROJECTNO,GROUP_,ITEM,STATUS,QUANTITY,UNIT_PRICE,REASON_FOR_CHANGE,REMARKS,AWARD_COPY,LOCKED,VO_COPY) VALUES (:1,:2,:3,:4,:5,:6,:7,EMPTY_CLOB(),:9,:10,:11) RETURNING ROWID,PROJECTNO,GROUP_,ITEM,STATUS,QUANTITY,UNIT_PRICE,REASON_FOR_CHANGE,REMARKS,AWARD_COPY,LOCKED,VO_COPY INTO :12,:13,:14,:15,:16,:17,:18,:19,:20,:21,:22,:23
    ***************Error Raised by Form********
    ORA-01400: cannot insert NULL into ("CAPEX"."BILL_OF_MATERIALS_TABLE"."ITEM")

    Remember that when you write "commit;" within your forms code then Forms interprets it as a commit_form statement. That's why the form-level commit is launched as you mentionned.
    So if you want to make a database commit then I think that you should create a stored procedure which makes the insert , and you call this stored procedure within your forms code.
    Try it.

  • Use session variable in Insert record

    Help, please!
    I need to add a record to a table; one of the fields in the
    table is the user_id. When I try to use the insert record server
    behavior, there is no way to select the user_id session variable!
    How is this done?

    .oO(Ted Dawson)
    >>>> to select the user_id session variable! How
    is this done?
    >>>
    >>>Use a hidden variable in the form, and assign it
    the value of the session.
    >>
    >> And what if the user manipulates that value? Hidden
    form fields _always_
    >> require a validation on the server. One purpose of a
    session is to avoid
    >> that sensitive data is sent to the client, where it
    can be manipulated.
    >
    >
    >Exactly how is the value of a SESSION VARIABLE
    manipulated by the client?
    It can be manipulated if it's put into a hidden form field.
    Micha

  • ORA-03113 error occurs when trying to insert record using procedure

    I have a Database Block whose DML Data Target Type is Procedure. I have given the Insert Procedure Name, Insert Procedure Arguments and Insert Procedure ResultSet Columns. The procedure which is used to insert record into the table, resides in the database. The procedure for insert takes Table of records as argument. I am getting FRM-40735: INSERT-PROCEDURE trigger raised unhandled exception ORA-03113).
    This exception does not occur if the Procedure is place under Program Units. But, I want the procedure to be under Database Block. I am working on Oracle Forms 6i.
    Please help me out in resolving this.

    Hello,
    I think you should call the support for this kind of error.
    Francois

Maybe you are looking for

  • Problem with thin driver connection from servlet

    i'm using a servlet and i'm trying to connect to Oracle using the syntax below. but i get an error. DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver()); Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@qit-uq-cbiw:15

  • Imossible to connect my wifi only ipad

    I live in a remote part of Cornwall, and am out of any wifi signals. I also only have a wireless dongle. Is there any way i can connect my wifi only ipad without having to walk half a mile? Any help much appreciated! Nikki

  • Help: Fix Note Velo and Length without Transform-Window

    gents, i've using the following procedure in logic 7 to fix the velocity (or length) of a bunch of notes (without opening the transform window): 1. select ALL the notes in the event-mixer 2. enter the value at one note (for example velocity 100) 3. a

  • Compressor 4 Extremely slow with "send to" option.

    I am running Compressor 4.0.1 on an Intel Core 2 Duo (2.66GHz) iMac with 2GB RAM. Compressor isn't always slow, it actually usually takes up the appropriate amount of time for encoding. The problem is when I use the "send to compressor" function in F

  • Average mode DSOX2002A

    Deseo obtener las formas de onda medidas en los 2 canales del osciloscopio DSOX2002A cuando configuro el mismo en modo de Acquire Average, pues utilizo el código de ejemplo: "Agilent 2000 3000 X-Series Acquire Waveform.vi" pero no obtengo las formas