Stuck with a problem while inserting a record into infotype

Hi Gurus,
I have to insert all active record into 378 infotype. At particular pernr hr_operation_infotype is throughing with an error stating 'E00                  058Entry    does not exist - check your entry' . How to rectify it.
Ravi

error message is 'E00                  058Entry    does not exist - check your entry            '
My code is as follows
  INFOTYPES : 0378.
  DATA: BEGIN OF abc1 OCCURS 0,
              pernr   TYPE pa0000-pernr,
              stat2   TYPE pa0000-stat2,
              begda   TYPE pa0000-begda,
        END OF abc1.
  DATA lt_pernr_pa0000 LIKE TABLE OF abc1.
  DATA ls_pernr_pa0000 LIKE  abc1.
  DATA l_subrc LIKE sy-subrc.
  DATA l_return LIKE bapireturn1 VALUE ' '.
DATA begda LIKE sy-datum.
  DATA endda LIKE sy-datum.
  CLEAR: ls_pernr_pa0000, lt_pernr_pa0000.
  SELECT  pernr stat2 begda
    INTO  CORRESPONDING FIELDS OF TABLE lt_pernr_pa0000
    FROM pa0000
    WHERE  stat2 = '3' AND endda = '99991231'  and pernr = 198.
  LOOP AT lt_pernr_pa0000 INTO ls_pernr_pa0000.
    REFRESH p0378.
    CALL FUNCTION 'HR_READ_INFOTYPE'
         EXPORTING
              pernr           = ls_pernr_pa0000-pernr
              infty           = '0378'
              endda           = '99991231'
         IMPORTING
              subrc           = l_subrc
         TABLES
              infty_tab       = p0378
         EXCEPTIONS
              infty_not_found = 1
              OTHERS          = 2.
    IF l_subrc = 0.
      IF p0378-event = 'open' AND p0378-subty = 'open' AND
                    p0378-pernr = ls_pernr_pa0000-pernr.
        EXIT.
      ENDIF.
    ELSE.
locking the pernr ********************
      CALL FUNCTION 'BAPI_EMPLOYEET_ENQUEUE'
           EXPORTING
                number        = ls_pernr_pa0000-pernr
                validitybegin = ls_pernr_pa0000-begda
           IMPORTING
                return        = l_return.
change the end date to 12/31/2007*************
      IF l_return-number IS INITIAL.
        p0378-pernr = ls_pernr_pa0000-pernr.
        p0378-endda = '99991231'.
        p0378-begda = '20070909'.
        p0378-subty = 'OPEN'.
        p0378-event = 'OPEN'.
        p0378-barea = 'US'.
        MODIFY p0378 INDEX 1  TRANSPORTING pernr endda begda subty event
            barea.
        CALL FUNCTION 'HR_INFOTYPE_OPERATION'
             EXPORTING
                  infty         = '0378'
                  number        = ls_pernr_pa0000-pernr
                  record        = p0378
                  operation     = 'INS'
             IMPORTING
                  return        = l_return.
      ENDIF.
unlocking the pernr ********************
      IF l_return-number IS INITIAL.
        COMMIT WORK AND WAIT.
      ELSE.
        ROLLBACK WORK.
        EXIT.
      ENDIF.
      CALL FUNCTION 'BAPI_EMPLOYEET_DEQUEUE'
           EXPORTING
                number        = ls_pernr_pa0000-pernr
                validitybegin = ls_pernr_pa0000-begda
           IMPORTING
                return        = l_return.
    ENDIF.
  ENDLOOP.
ENDFUNCTION.

Similar Messages

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

  • Urgent - pls help - Problem while inserting binary file into Oracle DB

    Hi,
    I am trying to insert binary files into a Blob column in a Oracle 10G table.
    The binary files would be uploaded by the web users and hence come as multipart request. I use apache commons upload streaming API to handle it. Finally i am getting a input stream of the uploaded file.
    The JDBC code is
    PreparedStatement ps=conn.prepareStatement("insert into bincontent_table values(?)");
    ps.setBinaryStream(1,inStream,length);
    My problem starts when i try to find the length of the stream. available() method of inputstream does not return the full length of the stream. so i put a loop to read thru the stream and find the length as shown below
    int length=0;
    while((v=inStream.read())!=-1)
    length++;
    Now, though i got the length, my stream pointer has reached the end and i cant reset it(it throws an error if i try).
    So i copied the stream content to a byte array and created an ByteArrayInputStream like this.
    tempByteArray=new byte[length];
    stream.read(tempByteArray,0,length);
    ByteArrayInputStream bais=new ByteArrayInputStream(tempByteArray);
    Now if i pass this bytearray input stream instead of the normal input stream to the prepared statement's setBinaryStream() method it throws an error as
    "ORA-01460: unimplemented or unreasonable conversion requested".
    Now how to solve this?
    My doubts are ,
    1) preparedStatement.setBinaryStream(int parameterIndex, InputStream x, int length) expects an inputstream and its length. if i have the stream how to find its length with out reading the stream?
    2) Also as the length parameter is a integer, what if i have a large binary file whose length runs more than the capacity of integer
    3) Alternatively there is a setBlob(int i, Blob x) in prepared statement. But how to instantiate a Blob object and set it here
    4) Is there any better way to do this.
    Thanks in advance

    "ORA-01460: unimplemented or unreasonable conversion
    requested".When the setBinaryStream method is used, the driver may have to do extra work to determine whether the parameter data should be sent to the server as a LONGVARBINARY or a BLOB (reference: javadoc)
    1) preparedStatement.setBinaryStream(int parameterIndex,
    InputStream x, int length) expects an inputstream and its length. if i
    have the stream how to find its length with out reading the stream?no. stream may have no specified length. i think you have wrong understanding about stream.
    2) Also as the length parameter is a integer, what if i have a large
    binary file whose length runs more than the capacity of integer
    3) Alternatively there is a setBlob(int i, Blob x) in prepared statement.
    But how to instantiate a Blob object and set it here
    4) Is there any better way to do this.use ps.setBlob(1, instream) instead

  • Problem while inserting into a table which has ManyToOne relation

    Problem while inserting into a table *(Files)* which has ManyToOne relation with another table *(Folder)* involving a attribute both in primary key as well as in foreign key in JPA 1.0.
    Relevent Code
    Entities:
    public class Files implements Serializable {
    @EmbeddedId
    protected FilesPK filesPK;
    private String filename;
    @JoinColumns({
    @JoinColumn(name = "folder_id", referencedColumnName = "folder_id"),
    @JoinColumn(name = "uid", referencedColumnName = "uid", insertable = false, updatable = false)})
    @ManyToOne(optional = false)
    private Folders folders;
    public class FilesPK implements Serializable {
    private int fileId;
    private int uid;
    public class Folders implements Serializable {
    @EmbeddedId
    protected FoldersPK foldersPK;
    private String folderName;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "folders")
    private Collection<Files> filesCollection;
    @JoinColumn(name = "uid", referencedColumnName = "uid", insertable = false, updatable = false)
    @ManyToOne(optional = false)
    private Users users;
    public class FoldersPK implements Serializable {
    private int folderId;
    private int uid;
    public class Users implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer uid;
    private String username;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "users")
    private Collection<Folders> foldersCollection;
    I left out @Basic & @Column annotations for sake of less code.
    EJB method
    public void insertFile(String fileName, int folderID, int uid){
    FilesPK pk = new FilesPK();
    pk.setUid(uid);
    Files file = new Files();
    file.setFilename(fileName);
    file.setFilesPK(pk);
    FoldersPK folderPk = new FoldersPK(folderID, uid);
         // My understanding that it should automatically handle folderId in files table,
    // but it is not…
    file.setFolders(em.find(Folders.class, folderPk));
    em.persist(file);
    It is giving error:
    Internal Exception: java.sql.SQLException: Field 'folderid' doesn't have a default value_
    Error Code: 1364
    Call: INSERT INTO files (filename, uid, fileid) VALUES (?, ?, ?)_
    _       bind => [hello.txt, 1, 0]_
    It is not even considering folderId while inserting into db.
    However it works fine when I add folderId variable in Files entity and changed insertFile like this:
    public void insertFile(String fileName, int folderID, int uid){
    FilesPK pk = new FilesPK();
    pk.setUid(uid);
    Files file = new Files();
    file.setFilename(fileName);
    file.setFilesPK(pk);
    file.setFolderId(folderId) // added line
    FoldersPK folderPk = new FoldersPK(folderID, uid);
    file.setFolders(em.find(Folders.class, folderPk));
    em.persist(file);
    My question is that is this behavior expected or it is a bug.
    Is it required to add "column_name" variable separately even when an entity has reference to ManyToOne mapping foreign Entity ?
    I used Mysql 5.1 for database, then generate entities using toplink, JPA 1.0, glassfish v2.1.
    I've also tested this using eclipselink and got same error.
    Please provide some pointers.
    Thanks

    Hello,
    What version of EclipseLink did you try? This looks like bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=280436 that was fixed in EclipseLink 2.0, so please try a later version.
    You can also try working around the problem by making both fields writable through the reference mapping.
    Best Regards,
    Chris

  • Problem while inserting new Column in JTable

    Hi,
    I am facing Problem while inserting new Column in JTable.
    I have a JTable with one inherited ColumnModel class.
    When I am adding the column and moving towards the corresponding location, it moves successfully.
    but if I am adding another column or making any changes to table column structure the table retains the defualtcolumn structure.
    please help me to solve this..
    Regards
    Ranjith.........

    Maybe this example will help:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=579527

  • ASR Hyper-v (VMM) to Azure and we are stuck with this error while preparing the VMM Server

    We are stuck with this error while installing ASR provider and registering with Azure Vault, can i get some help on this
    Error:
    NO Vaults could be retried for the registration key. Please ensure that
    1, your registration key has not expired.You can re-downloading registration key from Azure site Recovery portal
    2, Your system clock is not out of sync with the selected system time zone
    System Clock is set to IST and Azure to southeastasia

    Hi,
    Could you please ensure that you have downloaded the latest registration key from the portal?
    Also ensure that the machine from where you are accessing the portal and the VMM server has the right time according to your time zone.
    Thank you,
    Ruturaj

  • Row Level Locking while inserting a record.

    It is a good practice to lock the whole table or do the row level locking while performing any DELETE / UPDATE / MODIFY actions on a database table. Is it necessary to do the same thing while inserting a record via INSERT statement?
    One point may arise if two  users are inserting same records at a same time....
    Well i am little bit confused here bcos if a record doen't exist in a table what is the point of locking it.
    Please help me.

    create a lock object using SE11 for that perticular table and include field names in Lock parameters. Then it will generate two FMs one for locking and another for unlocking.
    Call the lock FM before updating the table and pass that row key value(For fields which taken in lock parameters for creating lock objects) to the exporting parameters.
    Then do the updation.
    Reward if useful...................

  • Inserting a record into an Excel

    Hello! Everyone, I am now trying to use Excel as a database, however, I could not insert any records into a spreadsheet but I could read the data from it. Please help...here is the code..
    import java.io.*;
    import java.net.*;
    import java.sql.*;
    import java.util.*;
    public class InteractWithExcel {
         static final String DRIVER_NAME = "sun.jdbc.odbc.JdbcOdbcDriver";
         static final String DATABASE_URL = "jdbc:odbc:EXCELJDBCTest; READONLY=0";
         public static void main(String[] args) {
              try {
                   Class.forName(DRIVER_NAME);
                   Connection conn = null;
                   conn = DriverManager.getConnection(DATABASE_URL);
                   Statement stmt = conn.createStatement();
                   stmt.executeUpdate("insert into [Sheet1$] values ('ABC', 68)");
                   ResultSet rs = /*stmt.executeQuery("select sum(Population) from [Sheet1$]");
                        stmt.executeQuery("select State,Population from [Sheet1$]");
                   while (rs.next()) {
                        String state = rs.getString(1);
                        int population = rs.getInt(2);
                        System.out.println(state + " - " + population);
                   rs.close();
                   stmt.close();
              } catch (ClassNotFoundException cnfe) {
                   System.err.println("ClassNotFoundException Was Thrown");
                   cnfe.printStackTrace();
              } catch (SQLException sqle) {
                   System.err.println("SQLException Was Thrown");
                   sqle.printStackTrace();
    }

    The code is somehow workable....
    The problem is that...
    1) a record could only be added only if I open the corresponding excel file
    2) the record is added to the end of the spreadsheet...
    e.g. there three records in the spreadsheet, namely 1, 2, 3,
    if I open the file and then run the java programme, the new record will be added to 4...
    then I deleted record 4 manually by opening the excel file and then delete,
    now, if I run the java programme again, the new record will be added to 5....but not the empty space 4...
    how come???
    Please help!

  • Insert multiple records into a table(Oracle 9i) from a single PHP statement

    How can I insert multiple records into a table(Oracle 9i) from a single PHP statement?
    From what all I've found, the statement below would work if I were using MySQL:
         insert into scen
         (indx,share,expire,pitch,curve,surface,call)
         values
         (81202, 28, 171, .27, 0, 0, 'C' ),
         (81204, 28, 501, .25, 0, 0, 'C' ),
         (81203, 17, 35, .222, 0, 0, 'C' ),
         (81202, 28, 171, .27, 2, 0, 'C' ),
         (81204, 28, 501, .20, 0, 1, 'C' ),
         (81203, 28, 135, .22, 1, 0, 'C' )
    The amount of records varies into the multiple-dozens. My aim is to utilize the power of Oracle while avoiding the i/o of dozens of single-record inserts.
    Thank you,
    Will

    You could look at the INSERT ALL statement found in the documentation here:
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_913a.htm#2133161
    My personal opinion is that you probably won't see any benefit because under the hood I think Oracle will still be doing single row inserts. I could be wrong though.
    The only way to confirm was if you did a test of multiple inserts vs an INSERT ALL, that is if the INSERT ALL met your requirements.
    HTH.

  • Hello i am rajesh i am having problem while conveting other files into pdf format please help me

    i am rajesh i am having problem while converting other files into acrobat format please help me

    Hello Rajesh,
    I'm sorry to hear you're having trouble. Are you using Acrobat.com to convert your files to PDF? Please let me know where you are having trouble and I will do my best to help you convert your files. For your reference, here is a list of filetypes that can be converted to PDF online with Acrobat.com:
    http://kb2.adobe.com/cps/524/cpsid_52456.html#Create%20PDF
    Best,
    Rebecca

  • Different methods involved in insertion of records into the table

    hi all,
    i am using Forms [32 Bit] Version 6.0.8.24.1 (Production)
    Oracle Database 10g Release 10.2.0.1.0 - Production
    i have parameters like emp_code(optional) and year(mandatory field-four digit year).
    Based on the parameter i have to get the details from one table and those records should be inserted into other table along with additions columns(by hardcoding the additional columns).
    To acheive this i am planning to get a cursor by selecting the necessay fields from the table passing the parameters in the where clause of the cursor.
    by looping through the cursor i will insert the records into the other table.
    here the thing is the data is going to be huge (since year is the parameter).
    so is my approach leads to the performance issue.
    i heard that there are different method of insetions,
    can anybody suggest me the better way(peformance wise) other than what i have mentioned (if you are aware of)..
    Thanks..

    This is not really a Forms issue, so you'd better go to the sql and pl/sql forum. Here, this question has been asked many times: how do I insert large volumes of data in a table?
    insert into ...
    select ....
    or CTAS (create table as select ....)
    by looping through the cursor i will insert the records into the other table.That is really the worst idea. If you can do it in sql (insert into ... select ...) DON'T do it in pl/sql.

  • Problem while import u201CSAPKU60003 & SAPKNA7013u201D into SAP CRM 2007

    Gentlemen,
    I have a problem while import u201CSAPKU60003 & SAPKNA7013u201D into SAP CRM 2007,
    My current Support Package Level is:
    SAP_ABA       700     0015
    SAP_BASIS     700     0015
    PI_BASIS      2006_1_700     0006
    ST-PI     2005_1_700     0006
    CRMUIF         600     0003
    SAP_BW       700     0017
    SAP_AP                700     0012
    BBPCRM                600     0002
    First I had the following error:
       Syslog: k CQ3 : UMGSETTING&                                          rscpexcc 12
       GetDBMigrateCodePagesLangs uses TCP0D, TCPDB, TCP0C.
         0 entries from FUNCT (%/SAPCND/CNF_GET_RECORD_FROM_DB%) deleted.
         0 d /   0 i /   0 u /   6 = 100% ucf FUPARAREF
         6 entries for FUPARAREF imported (/SAPCND/CNF_GET_RECORD_FROM_DBA*).
         0 entries from RODIR (FUNC/SAPCND/CNF_GET_RECORD_FROM_DB) deleted.
         0 entries from RODIR (FUNC/SAPCND/CNF_GET_RECORD_FROM_DB) deleted.
         0 d /   0 i /   0 u /   1 = 100% ucf TFTIT
         1 entry for TFTIT imported (D/SAPCND/CNF_GET_RECORD_FROM_DB*).
       successfully set a temporary lock on table REPOSRC
       REPOS /SAPCND/LDETERMINATION$14                A replaced.
       REPOS /SAPCND/LDETERMINATIONU14                A replaced.
        [dev trc     ,00000]  Wed Nov 26 16:33:14 2008                         1315447  8.171484
        [dbdsoci.    ,00000]  *** ERROR => invalid offset 0 for placeholder 16
                                                                                    71  8.171555
       unsuccessful statement: EXEC SQL: SELECT ID,OBJECT,LANGU,TYP,VERSION FROM DOKIL WHERE (LANGU IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,
       dsql_open returned with unexpected error code 2
       Please contact the SAP support.
       End of Transport (0016).
       date&time: 26.11.2008 - 16:33:14
       5 warnings occured.
       3 errors occured.
       Main import
       End date and time : 20081126163314
       Ended with return code:  ===> 16 <===
    After I got this error I upgraded the Kernel from patch level 159 to 179,
    After that I restarted the update again but the system is still running on u201CIMPORT_PROPERu201D and dose not given any update,
    From Import logs of the queue I can see the following,
       Summary:
        24 DOCUT imported.
        16 DYNPS imported.
        30 DYNPT imported.
       387 REPOS imported.
        43 REPOT imported.
       Totally 505 Objects imported.
       Totally 3636 tabentries deleted.
       Totally 14 objects activated.
       Totally 12229 tabentries imported.
       62066888 bytes modified in database.
        [dev trc     ,00000]  Wed Nov 26 18:14:19 2008                         20996974  40.917838
        [dev trc     ,00000]  Disconnecting from ALL connections:                   30  40.917868
        [dev trc     ,00000]  Disconnecting from connection 0 ...                  287  40.918155
        [dev trc     ,00000]  Closing user session (con_hdl=0,svchp=00000000003005B8,usrhp=00000000002FB748)
                                                                                  5759  40.923914
        [dev trc     ,00000]  Detaching from DB Server (con_hdl=0,svchp=00000000003005B8,srvhp=00000000061530E8)
                                                                                    921  40.924835
        [dev trc     ,00000]  Now I'm disconnected from ORACLE                    8230  40.933065
        [dev trc     ,00000]  Disconnected from connection 0                        90  40.933155
        [dev trc     ,00000]  statistics db_con_commit (com_total=527, com_tx=307)
                                                                                    59  40.933214
        [dev trc     ,00000]  statistics db_con_rollback (roll_total=0, roll_tx=0)
                                                                                    52  40.933266
       Disconnected from database.
       End of Transport (0004).
       date&time: 26.11.2008 - 18:14:19
       2 warnings occured.
       Main import
       End date and time : 20081126181419
       Ended with return code:  ===> 4 <===
    Please advice me.
    Regards,
    Ahmed

    I have similar problem while updating support packages in SAP R/3 4.6C environment. 
    000 unsuccessful statement: EXEC SQL: SELECT ID,OBJECT,LANGU,TYP,VERSION FROM DOKIL WHERE (LANGU IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,
    000 dsql_open returned with unexpected error code 1                                                                             
    000 unsuccessful statement: EXEC SQL: SELECT ID,OBJECT,LANGU,TYP,VERSION FROM DOKIL WHERE (LANGU IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,
    000 dsql_open returned with unexpected error code 1                                                                             
    Here is an outline of series of events that happened:-
    We are applying in support packages in SAP R/3 4.6C HR Development
    (TFI) environment. We planned with installing all the SP stacks
    starting from 1 to 9.
    -Updated kernel, tp , r3trans and SPAM level to latest level.
    We received the following error in Import_Proper step of Support
    package upgrade. Though the step has been repeated after making sure
    that we have all the required files at OS level, we go this error
    repeatedly.
    Main import
    Transport request___: SAPKB46C52
    System______________: TFI
    tp path : tp
    Version and Release: 305.13.25 46D
    check-sum error in datafile after 9374854 bytes.
    Main import
    End date and time : 20081205192603
    Ended with return code: ===> 16 <===
    When we renamed Co-File & data_file at OS level to see if the files are
    created again and reran we got the following error.
    Main import
    Transport request___: SAPKB46C52
    System______________: TFI
    tp path : tp
    Version and Release: 305.13.24 46D
    Main import
    End date and time : 20081205185117
    Ended with return code: ===> 12 <===
    We tried importing the individual support package SAPKB46C52 from STMS
    and the transport cancelled at an earlier step with the same error.
    Dictionary import
    Transport request___: SAPKB46C52
    System______________: TFI
    tp path : tp
    Version and Release: 305.13.25 46D
    check-sum error in datafile after 9374854 bytes.
    Dictionary import
    End date and time : 20081205195929
    Ended with return code: ===> 16 <===
    While playing around I have deleted the transport from the tp buffer
    and added manually, before doing so I made a backup of tp buffer at OS
    level and I got following error though I reverted back to backed-up
    copy.
    - Error in phase: IMPORT_PROPER
    - Reason for error: TP_BUFFER_INCONSISTENCY
    - Return code: 0008
    - Error message: Wrong sequence of Packages in the tp buffer (e.g.
    SAPKB46C52 )
    I then tried to disassemble the package separately and reran the
    import queue. Now I have RC 8 on that support package.
    When I did R3trans -l on the datafile it completed successfully.
    D:\>R3trans -l \usr\sap\trans\data\RB46C52.SAP
    This is R3trans version 6.05 (release 46D - 27.10.08 - 16:32:00).
    R3trans finished (0000).
    I verified the size of file "CSR0120031469_0023301.PAT" and it is the
    same as mentioned in SSP.
    Let us know is there is a workaround.

  • Inserting new records into database table at runtime

    Hi all ,
    How to insert new records into database table at runtime on click update?
    Thanks.

    Hi Sasikala,
    Just for your understanding am giving a sample code snippet which you can use to read the contents of your Table UI element & save the data on to your database. Suppose you have a button up on pressing which you want to read the data from your screens table & save on to the database then you can proceed as shown below:
    1) Obtain the reference of your context node.
    2) Fetch all the data present in your table into an internal table using methods of if_wd_context_node
    3) Use your normal ABAP logic to update the database table with the data from your internal table
    In my example I have a node by name SFLIGHT_NODE and under this I have the desired attributes from SFLIGHT. Am displaying these in an editable table & the user would press up on a push button after making the necessary changes to the tables data. I would then need to obtain the tables information & save on to the database.
    data: node_sflight           type ref to if_wd_context_node,
            elem_sflight           type ref to if_wd_context_element,
            lt_elements            type WDR_CONTEXT_ELEMENT_SET,
           stru_sflight           type if_main=>element_sflight_node,
           it_flights             type if_main=>elements_sflight_node.
    "   navigate from <CONTEXT> to <SFLIGHT_NODE> via lead selection
        node_sflight_node = wd_context->get_child_node( name = 'SFLIGHT_NODE'  ).
       lt_elements = node_sflight->get_elements( ).
    "   Get all the rows from the table for saving on to the database
        loop at lt_elements into elem_sflight.
          elem_sflight->get_static_attributes( importing static_attributes = stru_sflight ).
          append stru_sflight to it_flights.
        endloop.
    " Finally save the entries on to the database
        modify ZSFLIGHT99 from table it_flights.
        if sy-subrc eq 0.
    endif.
    However a word of caution here.... SAP doesn't ever recommend directly modifying the database through an SQL query. You would preferably make use of a BAPI for the same. Try go through Thomas Jung's comments in [here|modify the data base table which is comming dynamiclly;.
    Regards,
    Uday

  • Insert multiple records into Oracle using Java

    Hi,
    Has anyone tried to insert multiple records into an Oracle table from Java? I have my data in a Java collection.Can I send a Java Collection to an Oracle Package as a PL/SQL Table Type? My problem is I dont want to instantiate a CallableStatement object everytime I do an insert. Instead I want to do that only once and then insert multiple records in one operation.
    Any suggestions will be appreciated,
    Thanks,
    Alex

    Hi Mensa,
    I went thru the code example in your book in chapter 8 (downloaded it from OTN). It looks like the java code for "public class myPLSQLIndexTab" might be a java stored procedure stored in the oracle database?
    Pardon my ignorance because I've never worked on java code in the oracle database itself but how would I call such a program outside the oracle database? For example say I have a batch job that downloads data from a webservice and that batch job is written in java and its sitting on a batch server somewhere on the network. But the java program that inserts data into the database is sitting in the oracle database (also somewhere in the same network). How can the java code sitting on the batch server talk to the java code sitting on the oracle server? Is it the same as calling a pl/sql package using CallableStatement?
    Thanks
    Alex

  • Inserting a record into an array

    I have an applet that pops up different frames when you click on a menu item. On my add a record frame I have a number of textfields and an add button. When the button is clicked it is supposed to insert the record into my array of objects that only can have 3 records. When the button is clicked however I get a null pointer exception. I want to add the record in order based on the employee number, so first I want to check to see if the first spot of the array is null and add the record in the first spot if it is. If it isn't I want to check the employee numbers and insert the the record in the correct place and make sure the array isn't full. Can someone help me out 1. Why the nullpointer exception. 2. I am not sure if my logic is correct. Below is the Code. Thanks!!
    public void insertRecord()
    if (MyEmpArray[0] == null )
    addRec(0);
    else
    for(int index =0; index <3; index++)
    if(intEmpNumber < MyEmpArray[index].intEmpNumber && MyEmpArray[3] != null )
    addRec(index);
    else
    lblErrorMessage.setText("Array is full");
    public void addRec(int index)
    MyEmpArray[index].setValues(intEmpNumber, strFirstName, strLastName, strHomePhone,
    strStreet, strCity, strState, strZip, strCountry, strWorkStreet,
    strWorkCity, strWorkState, strWorkZip, strWorkCountry, strWorkPhoneNum,
    fltNumHours, fltHourlyWage, intI, intJ, intK);
    lblErrorMessage.setText("");
    txaReport.setText("");
    ClearFields();
    }

    for(int index =0; index <3; index++)
    An array with an index from 0 to 3, contains 4 records: you should replace it with
    for(int index =0; index <2; index++)
    The check-logic is good enough, but there are two minor "bugs":
    1) even If the array is full, the for cycle will uselessly check all the records
    2) if a the employee number of intEmpNumber is > thanMyEmpArray[index].intEmpNumber the program will show up "Array is full" even if the array isn't full.
    So, I suggest to add more code to make distinction between the two cases:
    for(int index =0; index <3; index++)
    if(MyEmpArray[3] != null ) // check if there is space to add a record
    if (intEmpNumber < MyEmpArray[index].intEmpNumber) //check if the position is right
    addRec(index);
    else
    lblErrorMessage.setText("Array is full");
    break; // exit the for cicle as the array is full
    I don't know what you are programming, but I ask you: "If the new intEmpNumber is < than the intEmpNumber of an already-full-array shouldn't be the new record inserted, discarding the last one?"
    I don't know if addRec works, I'm don't know applets, buttons..:)
    Sorry for my bad english...I hope this post will help you anyway :)

Maybe you are looking for

  • Error when trying to create Dimensions

    Hi, We just installed BPC 5.1. However we are facing issues. As soon as I login and try to create new dimensions I get the following error message: 'Admin Load failed: Exception of type System. OutOfMemoryException was thrown' Any ideas as how to fix

  • T530 won't upgrade video driver

    I have been trying to upgrade the Intel video driver on my T530 but I keep getting an error message saying that I don't meet the minimum requirements. I have win7 pro 64 and the update package is g1d624ww which is dated Sept. 14, 2012 (this is the on

  • Search logic in servlete programming

    Hi i hae a search text box in jsp.. in the servlet i need write logic for retrieving the values n diaplsyiing...could ne1 tell me how to do it?thank yu

  • Unable to view any videos.  Constantly buffering

    How can I stop the buffering ,  unable to watch any videos.  Please help. 

  • CS4 Media Encoder - 7Mbps and 5.1 audio too much?

    I recently re-encoded an SD DVD with a higher bitrate after initially using the "high quality" preset.  I did the calcs and the 1 hour 15 minute video with 5.1 DD audio worked out to a 7MPBS CBR and fit on one single layer DVD. The picture quality is