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

Similar Messages

  • Insert record in infotype 0581 using function module

    Hello experts,
    I am using function module HR_INFOTYPE_OPERATION to insert a record in infotype 0581, but its giving exception CX_HRPA_INVALID_INFOTYPE. This infotype is time constraint 1.So how can i handle this.
    Reply will be really helpful <removed by moderator>.
    Edited by: S Harshit on Feb 17, 2012 6:49 AM
    Edited by: Thomas Zloch on Feb 17, 2012

    Hi Mallikarjuna,
    I am trying to pass the rent amount, but unable to, here is the code.
    TYPES: BEGIN OF IT_P0581.
    INCLUDE STRUCTURE P0581.
    TYPES END OF IT_P0581.
    DATA: INFTYKEY LIKE BAPIPAKEY,
    RETURN LIKE BAPIRETURN1.
    DATA: P0581_TAB TYPE TABLE OF IT_P0581 WITH HEADER LINE.
    P0581_TAB-PERNR = 01400038.
    P0581_TAB-INFTY = '0581'.
    P0581_TAB-BEGDA = '20111010'.
    P0581_TAB-ENDDA = '99991231'.
    P0581_TAB-RTAMT = 3000 .
    append P0581_TAB.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    EXPORTING
    INFTY = P0581_TAB-INFTY
    NUMBER = P0581_TAB-PERNR
    SUBTYPE = ''
    VALIDITYEND = P0581_TAB-ENDDA
    VALIDITYBEGIN = P0581_TAB-BEGDA
    RECORD = P0581_TAB
    OPERATION = 'INS'
    NOCOMMIT = ''
    RECORDNUMBER = '000'
    DIALOG_MODE = '2'
    IMPORTING
    RETURN = RETURN
    KEY = INFTYKEY
    EXCEPTIONS
    OTHERS = 0.

  • Issue adding records to Infotype 0002

    Hi All,
    I am trying to insert records into Infotype 0002. I am using HR_INFOTYPE_OPERATION to do this. It works fine for all the employees but fot the ones who have Reference Personnel numbers. The system lets me to add the record to those employees through PA30 online or through BDC program with a warning message "No record with the same key for personnel number xxxxxxx",  but if I use the FM HR_INFOTYPE_OPERATION or HR_MAINTAIN_MASTERDATA, it sometimes gives me hard error message " The Social Insurance number already assigned to another employee" in the foreground and when executed in background I get a short dump with exception " CX_HRPA_INVALID_BUFFER_ACCESS".
    I debuged the standard code and the exception occurs in Include UP50RU02 in method IF_HRPA_MASTERDATA_BUFFER~INSERT.
    Short dump:
    The exception 'CX_HRPA_INVALID_BUFFER_ACCESS' was raised, but it was not caught
      anywhere along
    the call hierarchy.
    Since exceptions represent error situations and this error was not
    adequately responded to, the running ABAP program
      'CL_HRPA_MASTERDATA_BUFFER=====CP' has to be
    terminated.
    Please let me know if I am doing something wrong.
    Thanks,
    Danny.

    Hi Daniel,
    I would not worry about using FM 'HR_INFOTYPE_OPERATION' or 'HR_MAINTAIN_MASTERDATA' for the purpose of inserting PA infotype records for employees. I had developed a generic module last year to insert any PA infotype record which will use the standard PA business logic framework i.e. include all standard checks and validation, calls all Exits/BAdIs before inserting the record as it would when you are saving the infotype record via PA30. I basically created a wrapper FM to simplify the calling of some other standard FMs. Use it if you like (and if it works in your system keeping in mind config is different in every system) but please do handle all the Exceptions after the call (by reading the Message Handler Interface IF_HRPA_MESSAGE_HANDLER) to confirm there was no data inconsistency or other problems at the time of the update. Below is the sample code:
    The generic customer Function Module
    FUNCTION zpa_insert_any_infty_record.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(IS_PNNNN) TYPE  ANY
    *"     REFERENCE(IT_TEXT_TAB) TYPE  HRPAD_TEXT_TAB OPTIONAL
    *"     REFERENCE(IV_NO_AUTH_CHECK) TYPE  BOOLE_D DEFAULT SPACE
    *"     REFERENCE(IV_LOCK) TYPE  SPRPS DEFAULT TRUE
    *"  EXPORTING
    *"     REFERENCE(EIF_MESSAGE_HANDLER) TYPE REF TO
    *"        IF_HRPA_MESSAGE_HANDLER
    *"     REFERENCE(EV_OK) TYPE  BOOLE_D
    *"  EXCEPTIONS
    *"      EX_PERNR_LOCKED
    * FUNCTION...... ZPA_INSERT_ANY_INFTY_RECORD                           *
    * FUNCTION GROUP.ZPA_FG_EMP_LEAVE_BOOKING                              *
    * TITLE......... Insert any PA infotype record for an employee         *
    * AUTHOR........ Sougata Chatterjee                                    *
    * DATE WRITTEN.. 23/08/2010                                            *
    * SAP RELEASE... ECC 6.0                                               *
    * SPECIFICATION. N/A - Reuseable Object                                *
    * =====================================================================*
    * DESCRIPTION... This function is a generic module that will insert    *
    *                a PA infotype record into the employee master data as *
    *                per the import structure IS_PNNNN. This module wil be *
    *                particularly useful when requirement is to create     *
    *                other infotype records for the same employee within a *
    *                User-Exit or a BAdI.                                  *
    * ASSUMPTIONS... Infotype record to be updated is a PA Infotype.       *
    * =====================================================================*
    * MODIFICATION HISTORY                                                 *
    * Date       Userid       Change No & Description                      *
      DATA:
        lif_msg_handler  TYPE REF TO if_hrpa_message_handler,
        lo_msg_handler   TYPE REF TO cl_hrpa_message_list.
    * instantiate the message handler object
      CREATE OBJECT lo_msg_handler.
    * assign a reference to a rereference variable using the CAST operation
      lif_msg_handler ?= lo_msg_handler.
    * insert the infotype record into the employee master data
      PERFORM insert_infotype USING    is_pnnnn
                                       it_text_tab
                                       iv_no_auth_check
                                       iv_lock
                                       lif_msg_handler
                              CHANGING ev_ok.
    * pass back the message handler to the calling program if it was requested
      CHECK eif_message_handler IS REQUESTED.
      eif_message_handler = lif_msg_handler.
    ENDFUNCTION.
    For some reason I couldn't format the subroutine code here in SDN as it is scrambling the whole page but you could use the link here to find the [subroutine code|http://www.mediafire.com/file/9923qui7dm4xqpg/Form%20Insert_Infotype.html] and an [example code|http://www.mediafire.com/file/ihg83agkf0mbc9k/z_calling_program.html] for the program calling this FM including exception handling etc.
    Let me know if the links are not working...I'm happy to email them to you if you want.
    Hope this helps.
    Cheers,
    Sougata.

  • 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

  • Runtime Error in Record INsertion to an Infotype

    Hi all,
    I have created an infotype PA9035.
    In that i want to insert records with value
    Data:  WA_PA9035 TYPE PA9035.
      WA_PA9035-PERNR  = P_PERNR.
      WA_PA9035-ZZKOKRS = V_KOKRS.
      WA_PA9035-ENDDA = '99991231'.
      WA_PA9035-BEGDA = SY-DATUM.
    I used the below funciton mod to insert data,
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
          EXPORTING
            INFTY                  = '9035'
            NUMBER                 = P_PERNR
          SUBTYPE                =
          OBJECTID               =
          LOCKINDICATOR          =
           VALIDITYEND            = '99991231'
           VALIDITYBEGIN          = SY-DATUM
          RECORDNUMBER           =
            RECORD                 = WA_PA9035
            OPERATION              = 'INS'.
          TCLAS                  = 'A'
          DIALOG_MODE            = '0'
          NOCOMMIT               =
          VIEW_IDENTIFIER        =
          SECONDARY_RECORD       =
        IMPORTING
          RETURN                 =
          KEY                    =
    I am getting RUNTIME ERROR in that..the error is....
    The source field is too short.
    In the running program "SAPLHRMM" a field should have been assigned to a field
    symbol, which is shorter than the type of the field symbol.
    This is not possible.
    It is a statement of the form ASSIGN f TO <fs> CASTING...
    or ASSIGN f TO <fs> with a field symbol that was created with the
    STRUCTURE addition.
    Please help me...
    Regards,
    Thendral.

    Hi all,
    I have created an infotype PA9035.
    In that i want to insert records with value
    Data:  WA_PA9035 TYPE PA9035.
      WA_PA9035-PERNR  = P_PERNR.
      WA_PA9035-ZZKOKRS = V_KOKRS.
      WA_PA9035-ENDDA = '99991231'.
      WA_PA9035-BEGDA = SY-DATUM.
    I used the below funciton mod to insert data,
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
          EXPORTING
            INFTY                  = '9035'
            NUMBER                 = P_PERNR
          SUBTYPE                =
          OBJECTID               =
          LOCKINDICATOR          =
           VALIDITYEND            = '99991231'
           VALIDITYBEGIN          = SY-DATUM
          RECORDNUMBER           =
            RECORD                 = WA_PA9035
            OPERATION              = 'INS'.
          TCLAS                  = 'A'
          DIALOG_MODE            = '0'
          NOCOMMIT               =
          VIEW_IDENTIFIER        =
          SECONDARY_RECORD       =
        IMPORTING
          RETURN                 =
          KEY                    =
    I am getting RUNTIME ERROR in that..the error is....
    The source field is too short.
    In the running program "SAPLHRMM" a field should have been assigned to a field
    symbol, which is shorter than the type of the field symbol.
    This is not possible.
    It is a statement of the form ASSIGN f TO <fs> CASTING...
    or ASSIGN f TO <fs> with a field symbol that was created with the
    STRUCTURE addition.
    Please help me...
    Regards,
    Thendral.

  • Problem while inserting a record to infotype 416

    Iam facing a problem while inserting a record to the infotype 416 for a personnel no using the FM 'HR_INFOTYPE_OPERATION'.I have created a FM to insert a record to the infotype 416.In that FM iam using the FM 'HR_INFOTYPE_OPERATION' to create a record for infotype 416.while executing  my FM the FM 'HR_INFOTYPE_OPERATION' is returning the return value 0.But when i check in PA30 for the infotype 416,there is no record created for that personnel no.Also in the table PA0416 the record is not get created.SO what might be the problem.can anyone please provide me help on this.
    I have attached the code of my FM for ur reference.
    FUNCTION Y_ESS_FL_ENCASH.
    DATA: G_COMPENSATION_AMOUNT LIKE PA0416-AMONT,
          G_RETURN TYPE BAPIRETURN1.
    DATA T_PA0416 LIKE P0416 OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'HR_READ_INFOTYPE'
        EXPORTING
           TCLAS                 = 'A'
           PERNR                 = '00000014'
           INFTY                 = '0416'
         BEGDA                 = sy-datum
         ENDDA                 =  sy-datum
           BYPASS_BUFFER         = 'X'
         LEGACY_MODE           = ' '
    IMPORTING
         SUBRC                 =
          TABLES
            INFTY_TAB             = T_PA0416
    EXCEPTIONS
      INFTY_NOT_FOUND       = 1
      OTHERS                = 2
        LOOP AT T_PA0416
        WHERE SUBTY = '1002'.
        ENDLOOP.
        IF SY-SUBRC <> 0.
          CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
            EXPORTING
               NUMBER = '00000014'
            IMPORTING
               RETURN = G_RETURN.
          IF SY-SUBRC <> 0.
             MESSAGE I016(RP) WITH ' RECORD IS ALREADY LOCKED'.
          ENDIF.
          T_PA0416-PERNR = '00000014'.
          T_PA0416-SUBTY = '1002'.
          T_PA0416-INFTY = '0416'.
          T_PA0416-OBJPS = ''.
          T_PA0416-SPRPS = ''.
          T_PA0416-SEQNR = ''.
          T_PA0416-AEDTM = SY-DATUM.
          T_PA0416-UNAME = SY-UNAME.
          T_PA0416-ENDDA = SY-DATUM.
          T_PA0416-BEGDA = SY-DATUM.
          T_PA0416-NUMBR = '10'.
          T_PA0416-WGTYP = '1530'.
          T_PA0416-AMONT = '15000'.
          T_PA0416-WAERS = 'INR'.
          T_PA0416-QUONR = '1'.
          APPEND T_PA0416.
          CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              INFTY                  = '0416'
              NUMBER                 = '00000014'
              SUBTYPE                = '1002'
      OBJECTID               =
      LOCKINDICATOR          =
             VALIDITYEND            = '31129999'
             VALIDITYBEGIN          = SY-DATUM
            RECORDNUMBER           = ''
              RECORD                 = T_PA0416
              OPERATION              = 'INS'
              TCLAS                  = 'A'
      DIALOG_MODE            = '0'
            NOCOMMIT               = 'X'
      VIEW_IDENTIFIER        =
      SECONDARY_RECORD       =
            IMPORTING
              RETURN                 = G_RETURN.
      KEY                    =
          IF G_RETURN+0(1) EQ 'E'.
                  MESSAGE I086(ZHR) WITH 'Record is not inserted in IT416'.
          ELSE.
              COMMIT WORK.
          ENDIF.
          CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
            EXPORTING
              NUMBER = '00000014'
            IMPORTING
              RETURN = G_RETURN.
        ENDIF.
    ENDFUNCTION.

    Hi Murthy
    With a first glance, I think you have given a wrong parameter value to "validityend". It should be '99991231' not '31129999' .
    If your problem still persists, try inserting the data online from PA30. If your input causes no errors, then please state what the return parameter contains.
    Regards
    *--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

  • Inserting records infotype PA0105

    Hi everyone:
    Someone knows a FM for insert into PA0105 infotype?
    Thanks
    Eduardo Campos.

    Hi Eduardo,
    You can use
    HR_INFOTYPE_OPERATION .
    This function module enables you to maintain master data for employees.
    Check also the following link....
    http://jnpassieux.chez.tiscali.fr/info/SAP_liste_tables.php
    Hope it helps .
    Regrds,
    J
    Do Award Points if this's helpful.
    Message was edited by: P079223

  • Insert Data Into Infotypes

    Hello!
    I am developing an inbound IDoc, during which i am suppose to insert respective segment structure into infotypes PA0000, PA0001, PA0002, PA0006 & PA0008 through Function Module RH_INSERT_INFTY, its throwing error sy-subrc 1, i can give sample code of it
    CALL FUNCTION 'RH_INSERT_INFTY'
    EXPORTING
    fcode = 'INSE'
    vtask = 'S'
    order_flg = 'X'
    commit_flg = 'X'
    repid = sy-repid
    TABLES
    innnn = innnn
    EXCEPTIONS
    no_authorization = 1
    error_during_insert = 2
    repid_form_initial = 3
    corr_exit = 4
    begda_greater_endda = 5
    OTHERS = 6.
    The internal table innnn has record of type as follows
    710 12080033 12/31/2006 12/27/2005 000 01/02/2006
    When Idoc is posted through We19 through 'RH_INSERT_INFTY', it throws Sy-Subrc 1.
    When the same record is input manually through SE37 into function Module 'RH_INSERT_INFTY', it throws error_during_insert,
    Can any guys suggest me to come out of this problem, if possible suggest any other standard Fuction Module to insert data into Infotypes,
    Thank You
    Regards
    Rajesh

    Hi Rajesh,
    The function module 'RH_INSERT_INFTY lets you insert multiple infotype records for OM objects into the Personnel Planning databases (HRPnnnn). ie the PD infotypes. For updating PA infotypes pl use 'HR_INFOTYPE_OPERATION' as suggested by others earlier.
    Regards,
    Suresh Datti

  • Creating new record in infotype during BADI

    Hi all,
    We want to use the BADI HRPAD00INFTY "Update / Infotype maintenance" for trigering an automatic creation of some infotype records using FM HR_INFOTYPE_OPERATION.
    The creation should only happen when a new record of infotype 2001 subtype GT01 is created.
    Every time when we try something we get an error on the first insert we do using the FM.
    The Enqueue goes fine (returns subrc = 0) but when doing the insert with the FM we get the error "EPG                  428A complex application error has occurred" in the return.
    We checked the data that we're passing thru the FM and there everything is fine.
    Is it possible that due to the lock of the original save is generating we can't insert anything else and how can we work around this problem?
    We also have this problem when using the user exit and we tried to do a submit to another report but there we can't even make the lock.
    Regards,
    Olivier

    Forum post in ABAP, General: Infotype reecord creation in a BAdI - Issue
    Infotype 0008 reecord creation in a BAdI - Issue
    Reward Points if useful.

  • 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 ?

Maybe you are looking for