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>
Similar Messages
-
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.
Ravierror 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. -
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.
ThanksHello,
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 -
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................... -
Problem with inserting new records in Oracle Forms
Hi Friends,
I am a new user to Oracle Forms and I need a help from you people. The problem is as follows:
I have a data block in which I can display a number of records. In this data block the user will be able to edit the fields if no child records are found in another table. I have used when-new-record-instance to attain this scenario. All are text items. One item licensee_id which is made invisible by setting the property in property palette and required=no ( as this is the primary key of the table). Also the audit columns are made invisible.
The code for it is as follows:
DECLARE
v_alert_button NUMBER;
v_cnt NUMBER;
BEGIN
SELECT COUNT (*)
INTO v_cnt
FROM id_rev_contracts
WHERE licensee_id = :ID_REV_LICENSEES.licensee_id;
IF v_cnt > 0 THEN
set_item_property('ID_REV_LICENSEES.LICENSEE_NAME', UPDATE_ALLOWED, PROPERTY_FALSE);
ELSE
set_item_property('ID_REV_LICENSEES.LICENSEE_NAME', UPDATE_ALLOWED, PROPERTY_TRUE);
-- set_item_property('ID_REV_LICENSEES.LICENSEE_NAME', INSERT_ALLOWED, PROPERTY_TRUE);
END IF;
END;
Now in this data block I should also be able to insert new records and for the same I have used PRE-INSERT trigger and the code for it is as follows:
DECLARE
v_alert_button NUMBER;
CURSOR v_licensee_id IS SELECT id_rev_licensees_s.NEXTVAL FROM dual;
BEGIN
OPEN v_licensee_id;
FETCH v_licensee_id INTO :id_rev_licensees.licensee_id;
CLOSE v_licensee_id;
IF :id_rev_licensees.licensee_id IS NULL THEN
Message('Error Generating Next v_licensee_id');
RAISE Form_Trigger_Failure;
END IF;
:ID_REV_LICENSEES.created_by := :GLOBAL.g_login_name;
:ID_REV_LICENSEES.last_updated_by := :GLOBAL.g_login_name;
:ID_REV_LICENSEES.create_date := SYSDATE;
:ID_REV_LICENSEES.last_update_date := SYSDATE;
EXCEPTION
WHEN form_trigger_failure
THEN
RAISE form_trigger_failure;
WHEN OTHERS
THEN
v_alert_button :=
msgbox ('ERROR in Pre-Insert - ' || SQLERRM, 'STOP', 'Contact IST');
RAISE form_trigger_failure;
END;
Every thing is compiling fine but at the run time when I am trying to insert a new record I am receiving the following error:
FRM-40508:ORACLE error:unable to insert record
I also think the pre-insert record is not firing at the time of inserting a new record and saving it. So I request you to please delve into this problem and suggest me how to overcome this problem. Code snippets would do more help for me. If you need any other things from me please let me know. I will see if I could be of any help in that concern because I may not be able to send the entire form as it is.
Thanks and regards,
Vamsi K Gummadi.first of all
pre-insert fires after the implicit/explicit commit/commit_form is issued and before the real insert is submitted to the db.
i would suggest to remove the error handling part for the moment
because i believe you might be getting "ora-xxxx cannot insert null"
and also make visible the primary column to check if the pre-insert is executed.
it would be better to make visible for a while the not null columns of the table/block
i suppose that the block is insert allowed and you are using table as the source of the block and not any procedures or something... -
LPX-00004 - Problems while inserting xml files in a xmltype column
I've faced two problems while trying to insert xml files into my table containing a xmltype column:
create table xml_test (id number(20),content xmltype)
I use following java code for writing xml docs into db:
conn.setAutoCommit(false);
OraclePreparedStatement stmt = (OraclePreparedStatement)
conn.prepareStatement("INSERT INTO xml_test (id,content) VALUES(?,?)");
File file = new File(file1);
InputStream in1 = new FileInputStream(file1);
Reader r1 = new BufferedReader(new InputStreamReader(in1, "UTF-8"));
int len = 0;
StringBuffer text = new StringBuffer();
while ((len = r1.read()) != -1) {
text.append((char) len);
in1.close();
r1.close();
XMLType poXML1 = XMLType.createXML(conn, text.toString());
for (int i = 1; i <= 1; i++) {
stmt.setInt(1, i);
stmt.setObject(2, poXML1);
stmt.execute();
conn.commit();
1. problem: occures only if a xml schema has been assoicated to the specific xmltype column. it seems that the length of a specific xml tag in the document is limited. but why?
java.sql.SQLException: ORA-22814: attribute or element value is larger than specified in type
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
at test.insertXML(test.java:84)
at test.main(test.java:261)
hier the xml-schema of the xmltype column "content":
<?xml version="1.0" encoding="UTF-8"?>
<!--W3C Schema generated by XML Spy v4.4 U (http://www.xmlspy.com)-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="AUTOR-ID" type="xs:string"/>
<xs:element name="BODY" type="xs:string"/>
<xs:element name="CONTENT">
<xs:complexType>
<xs:sequence>
<xs:element ref="METADATEN"/>
<xs:element ref="BODY"/>
</xs:sequence>
<xs:attribute name="content-id" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="DATUM" type="xs:string"/>
<xs:element name="KEYWORD" type="xs:string"/>
<xs:element name="METADATEN">
<xs:complexType>
<xs:sequence>
<xs:element ref="DATUM"/>
<xs:element ref="TITEL" maxOccurs="unbounded"/>
<xs:element ref="KEYWORD" maxOccurs="unbounded"/>
<xs:element ref="AUTOR-ID"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TITEL" type="xs:string"/>
</xs:schema>
2. problem: hier i have no idea what is happening ... please help
java.sql.SQLException: ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00004: internal error "MultiChar overflow"
Error at line 61
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
at test.insertXML(test.java:53)
at test.main(test.java:259)It's hard for me to tell you more without seeing your instance data, but for problem #1, if you look at the underlying SQL types being generated by your schema, you will see that the default SQL mapping for a "string" in your schema is a VARCHAR2(4000) (and I believe this would be only 2000 for a varying width character set like UTF8).
You can specify that you wish this column to be mapped as a CLOB in your schema if this is the problem. Also note that there is a 64K limit on the size of an individual node in XMLType. -
Problem while inserting Latin characters
Hi All,
Version details
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Solaris: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - ProductionLanguage :
SQL> show parameter nls_lang
NAME TYPE VALUE
nls_language string AMERICANCurrently,we are facing problem in inserting Latin characters such as 'ʬ '
We are receiving these characters from another DB via DB Link .What parameters should I change in my DB to accept those Latin characters.
Please suggest an approach or charset that'll allow my Db to accept both English and Latin characters.Sorry for not providing exact information.But please consider the example character that I've mentioned 'ʬ'.
While I'm trying to insert the above character in my Db with below nls_parameters
SQL> select parameter||'--> '||value from nls_database_parameters;
PARAMETER||'-->'||VALUE
NLS_LANGUAGE--> AMERICAN
NLS_TERRITORY--> AMERICA
NLS_CURRENCY--> $
NLS_ISO_CURRENCY--> AMERICA
NLS_NUMERIC_CHARACTERS--> .,
NLS_CHARACTERSET--> UTF8
NLS_CALENDAR--> GREGORIAN
NLS_DATE_FORMAT--> DD-MON-RR
NLS_DATE_LANGUAGE--> AMERICAN
NLS_SORT--> BINARY
NLS_TIME_FORMAT--> HH.MI.SSXFF AM
PARAMETER||'-->'||VALUE
NLS_TIMESTAMP_FORMAT--> DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT--> HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT--> DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY--> $
NLS_COMP--> BINARY
NLS_LENGTH_SEMANTICS--> BYTE
NLS_NCHAR_CONV_EXCP--> FALSE
NLS_NCHAR_CHARACTERSET--> AL16UTF16
NLS_RDBMS_VERSION--> 10.2.0.4.0
20 rows selected.My Table
create table r_dummy (a varchar2(4000))
/Insert Script
insert into r_dummy values('ʬ' )But after inserting
When I retrieve the inserted data
SQL> select *
2 from r_dummy;
A
?Please lemme know how to insert the above character. -
Getting Error While inserting a record in table PDSNR through Tcode PA30
Hi Experts,
Im doing a transaction in TCode PA30 by entering a pernr and infty as 14 and wage type.
My need is when im entering a particular wage type in PA30 with infotype 14 , for that particular wage type and infotype i need to assign a different cost centre. This requirement was doing now manually by changing the cost centre form EDIT - > Maintain Cost Assignment.
But my Client Needs to do it automatically. by comparing the wage type and infotype the cost centre needs to get automatically updated.
So i use the Enhancement EXIT_SAPFP50M_002 * INCLUDE ZXPADU02.* and wrote coding like below
CASE innnn-infty.
To check whether the record belong to pa0014
If so,check the wage type for the updation
If so update the values of cost center assignments in the table assob and asshe
when '0014'.
if innnn-subty eq '2211'.
Select the last updated sequence number in the table pdsnr
if sy-ucomm eq 'UPD' or sy-ucomm eq 'INS'.
select single * from pa0001 into wa_0001 where pernr eq INNNN-pernr and
endda eq '99991231'.
if sy-subrc = 0.
call function 'ENQUEUE_EPPRELE'
EXPORTING
MODE_PREL = 'E'
MANDT = SY-MANDT
PERNR = INNNN-pernr
INFTY = INNNN-INFTY
SUBTY = INNNN-SUBTY
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
CLEAR : lv_pdsnr.
select MAX( pdsnr ) from pdsnr into lv_pdsnr.
lv_pdsnr = lv_pdsnr + 1.
ls_assob-pdsnr = lv_pdsnr.
ls_assob-pernr = INNNN-pernr.
ls_assob-bukrs = wa_0001-bukrs. "'1001'.
ls_assob-gsber = wa_0001-gsber. "'0001'.
ls_assob-kokrs = wa_0001-kokrs. "'1000'.
ls_assob-kostl = '1-1361'.
ls_asshr-pdsnr = lv_pdsnr.
ls_asshr-pernr = INNNN-pernr.
ls_asshr-infty = innnn-infty.
ls_asshr-subty = innnn-subty.
ls_asshr-begda = sy-datum.
ls_asshr-endda = '99991231'.
ls_PDSNR-pdsnr = lv_pdsnr.
ls_PDSNR-PDGRP = '5B'.
insert into pdsnr values ls_pdsnr.
insert into asshr values ls_asshr.
insert into assob VALUES ls_assob.
call function 'DEQUEUE_EPPRELE'
EXPORTING
MODE_PREL = 'E'
MANDT = SY-MANDT
PERNR = INNNN-pernr
INFTY = INNNN-INFTY
SUBTY = INNNN-SUBTY.
ENDIF.
ENDIF.
ENDIF.
COMMIT WORK.
ENDCASE.
This is to update the three tables PDSNR, ASSOB,ASSHR.
Its getting Updated correctly, But when i goto EDIT - > Maintain Cost Assignment to do some changes and while saving the data i get the following Error Message :
You Cannot insert data in table : PDSNR.
Message no. P2715
Can Anyone please suggest me how to solve this issue.
Thanks,
Vijayan.RHi. Were you able to fix the error?
-
Getting error msg while inserting a record
HI
Am getting error msg while am inserting a new record. Am unable to view the data that i inserted in to database. If any one can help in sorting of the problem plz help. I used the following code in Application Module(AM) and Controller(CO)
processRequest()
-- am.invokeMethod("insertmethod");
processFormRequest()
-- if(pageContext.getParameter("Create")!=null)
-- am.invokeMethod("savemethod");
In AM Code
public void insertmethod()
EOVOImpl vo=getEOVO1();
if(!vo.isPreparedForExecution())
{ vo.executeQuery(); }
Row ro=vo.createRow();
vo.insertRow(ro);
ro.setNewRowState(Row.STATUS_INITIALIZED);
public void savemethod()
{ OADBTransaction oa=getOADBTransaction();
oa.commit(); }
Error
Attribute SummaryFlag in kiInsertAM.kiInsertEOVO1 is requiredHi,
Either on the form you don't have SummaryFlag field or you forgot to map VO attribute i.e. SummaryFlag to that field.
If you don't have SummaryFlag field on form then you need to set it programatically before committing record.
Please check and let us know.
Regards,
Mukesh Uchaniya -
DAC Error: Error while inserting a record!
Hi,
I want to create a new DAC on my system but I am getting below error while trying to create record or saving any records.
Can't create reference
MESSAGE:::INSERT INTO W_ETL_OBJ_REF(OBJ_WID, OBJ_REF_WID, OBJ_TYPE, OBJ_REF_TYPE_CD, APP_WID, LAST_UPD, SOFT_DEL_FLG, ROW_WID) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
Values :
KEY : 1
VALUE : 202CB962AC5975B964B7152D234B70
KEY : 2
VALUE : 202CB962AC5975B964B7152D234B70
KEY : 3
VALUE : W_ETL_SA
KEY : 4
VALUE : 1
KEY : 5
VALUE : null
KEY : 6
VALUE : 2011-10-12 15:17:11.586
KEY : 7
VALUE : N
KEY : 8
VALUE : 7716EB6EA78A5B2E2D3C2AE1CF204A2C
EXCEPTION CLASS::: com.siebel.etl.database.IllegalSQLQueryException
com.siebel.etl.database.DBUtils.batchUpdate(DBUtils.java:1946)
com.siebel.etl.gui.util.UncommitUpdateHelper.executeUpdate(UncommitUpdateHelper.java:84)
com.siebel.analytics.etl.client.data.dataobject.BaseDACObject.createReference(BaseDACObject.java:1362)
com.siebel.analytics.etl.client.data.dataobject.DACObject.createReference(DACObject.java:78)
com.siebel.analytics.etl.client.data.dataobject.BaseDACObject.createUpdateReference(BaseDACObject.java:1274)
com.siebel.analytics.etl.client.data.dataobject.BaseDACObject.createOwnedObject(BaseDACObject.java:565)
com.siebel.analytics.etl.client.data.dataobject.BaseDACObject.create(BaseDACObject.java:544)
com.siebel.analytics.etl.client.data.dataobject.UpdatableDataObject.createUpdate(UpdatableDataObject.java:210)
com.siebel.analytics.etl.client.data.dataobject.DACObject.createUpdate(DACObject.java:213)
com.siebel.analytics.etl.client.data.dataobject.UpdatableDataObject.createUpdate(UpdatableDataObject.java:198)
com.siebel.analytics.etl.client.data.model.ResultSetParser.insertNewRecord(ResultSetParser.java:226)
com.siebel.analytics.etl.client.data.model.UpdatableDataTableModel.insertNewRecord(UpdatableDataTableModel.java:122)
com.siebel.analytics.etl.client.data.model.DACTableModel.insertNewRecord(DACTableModel.java:335)
com.siebel.analytics.etl.client.data.model.DACTableModel.insertNewRecord(DACTableModel.java:320)
com.siebel.analytics.etl.client.data.model.UpdatableDataTableModel.updateRecord(UpdatableDataTableModel.java:76)
com.siebel.analytics.etl.client.view.edit.EditObject.save(EditObject.java:326)
com.siebel.analytics.etl.client.view.edit.EditObject.actionPerformed(EditObject.java:616)
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
java.awt.Component.processMouseEvent(Component.java:6041)
javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
java.awt.Component.processEvent(Component.java:5806)
java.awt.Container.processEvent(Container.java:2058)
java.awt.Component.dispatchEventImpl(Component.java:4413)
java.awt.Container.dispatchEventImpl(Container.java:2116)
java.awt.Component.dispatchEvent(Component.java:4243)
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
java.awt.Container.dispatchEventImpl(Container.java:2102)
java.awt.Window.dispatchEventImpl(Window.java:2440)
java.awt.Component.dispatchEvent(Component.java:4243)
java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
::: CAUSE :::
MESSAGE:::ORA-01400: cannot insert NULL into ("DW"."W_ETL_OBJ_REF"."APP_WID")
EXCEPTION CLASS::: java.sql.SQLIntegrityConstraintViolationException
oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:737)
oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:647)
oracle.jdbc.driver.T2CPreparedStatement.executeForDescribe(T2CPreparedStatement.java:530)
oracle.jdbc.driver.T2CPreparedStatement.executeForRows(T2CPreparedStatement.java:713)
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3449)
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3530)
oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)
com.siebel.etl.database.cancellable.CancellablePreparedStatement.executeUpdate(CancellablePreparedStatement.java:91)
com.siebel.etl.database.DBUtils.batchUpdate(DBUtils.java:1942)
com.siebel.etl.gui.util.UncommitUpdateHelper.executeUpdate(UncommitUpdateHelper.java:84)
com.siebel.analytics.etl.client.data.dataobject.BaseDACObject.createReference(BaseDACObject.java:1362)
com.siebel.analytics.etl.client.data.dataobject.DACObject.createReference(DACObject.java:78)
com.siebel.analytics.etl.client.data.dataobject.BaseDACObject.createUpdateReference(BaseDACObject.java:1274)
com.siebel.analytics.etl.client.data.dataobject.BaseDACObject.createOwnedObject(BaseDACObject.java:565)
com.siebel.analytics.etl.client.data.dataobject.BaseDACObject.create(BaseDACObject.java:544)
com.siebel.analytics.etl.client.data.dataobject.UpdatableDataObject.createUpdate(UpdatableDataObject.java:210)
com.siebel.analytics.etl.client.data.dataobject.DACObject.createUpdate(DACObject.java:213)
com.siebel.analytics.etl.client.data.dataobject.UpdatableDataObject.createUpdate(UpdatableDataObject.java:198)
com.siebel.analytics.etl.client.data.model.ResultSetParser.insertNewRecord(ResultSetParser.java:226)
com.siebel.analytics.etl.client.data.model.UpdatableDataTableModel.insertNewRecord(UpdatableDataTableModel.java:122)
com.siebel.analytics.etl.client.data.model.DACTableModel.insertNewRecord(DACTableModel.java:335)
com.siebel.analytics.etl.client.data.model.DACTableModel.insertNewRecord(DACTableModel.java:320)
com.siebel.analytics.etl.client.data.model.UpdatableDataTableModel.updateRecord(UpdatableDataTableModel.java:76)
com.siebel.analytics.etl.client.view.edit.EditObject.save(EditObject.java:326)
com.siebel.analytics.etl.client.view.edit.EditObject.actionPerformed(EditObject.java:616)
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
java.awt.Component.processMouseEvent(Component.java:6041)
javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
java.awt.Component.processEvent(Component.java:5806)
java.awt.Container.processEvent(Container.java:2058)
java.awt.Component.dispatchEventImpl(Component.java:4413)
java.awt.Container.dispatchEventImpl(Container.java:2116)
java.awt.Component.dispatchEvent(Component.java:4243)
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
java.awt.Container.dispatchEventImpl(Container.java:2102)
java.awt.Window.dispatchEventImpl(Window.java:2440)
java.awt.Component.dispatchEvent(Component.java:4243)
java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Why it happened and how to solve it?The error is not because a table is MISSING..it is because its trying to insert a NULL and its failing: ORA-01400: cannot insert NULL.
I would check the following:
Make sure all DAC related patches are applied (you can find these on metalink) for the DAC version you are on
Is this your first time to try a load? Is there any load that may not have cleaned up all process that was previously runninng..if so restart the DAC services and retry
Make sure the DAC repository metadat tables are created properly. Go to the table in question W_ETL_OBJ_REF and see if it is correctly created
Did you assemble all Subject Areas and successfully Build the execution plan? If not, do that and retry.
Let me know how it goes.
if this is helpful, please mark as correct or helpful. -
Problem while creating the record in IT0080 from background
Dear All,
I have a requirement to Create the record for Maternity Leave in IT0080 from background, whenever applied from ESS.
Once the leave gets aaproved, while posting the documents from tcode PTARQ ( Program - RPTARQPOST), in the BADI PT_ABS_REQ, in method IF_EX_PT_ABS_REQ~POST_VIA_BLOP for the implementation, I am trying to submit the program in which the actual record is created in IT0080.
In this program through BDC i have created the BDC data and have used CALL transaction, as internally IT 2001 also needs to be updated, which gets calculated indirectly...
But when executed, it gives error of Employee cannot be locked... as the Document which is posted through PTARQ, have several locks... I tried to dequeue the same...
but cannot resolve the problem...
Secondly i tried to create the Job also... which would be executed after some time... but still its not getting updated...
Any help... will be highly appreciated...
Regards,
HeenaHello s.s
I'm not understand exacly what is your problem?
Field can have both values at the same time(Time Stamp and User stamp) only if that field calculated
Maybe you told about two different fields?
User stamp field return username only it's standart functionality
Create stamp - return date/time combination
Remote key is avialable when you repository configured to work with some remote systems
All records from repository (LUT, taxonomy attributes ets.) you can map to corresponding Destination items
Regards
Kanstantsin -
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 fetching more records in SAP ABAP report program
Hello Frinds,
I have SAP ABAP report program which fetches data from usr02 table
Now, program is working fine with less number of records, bot in production there are more than 200000 records and either report gets timed out or there is run time error like buffer area not available.
Below is the fetch statement
SELECT bname FROM usr02 INTO TABLE lt_user
So, do I need to take records in small chunks, I do not think it is needed as I have worked on number of othere databases where there are number of records in single fetch statement and database itself take care of this.
Please provide me some approach to resolve this problem.This will be very difficult for you.....
Since you are getting a time out error....it looks like, you are runnning this report in foreground....................
Try running it in background it will work...
ELSE....you have to fetch in small chunks....but the question is how will you do it. Since the USR02 only has BNAME as primary key...
Either put the BNAME as part of selection screen and fetch the data.....it will solve your problem....
Only fetch for those BNAME which is entered in the selection screen...
Hope it helps! -
Problem while inserting Date/Time in Oracle Database
Hai,
i want to insert the date and time in a date column. here, i am using java.sql.Date and java.sql.Time to assign the date in Prepared Statement.
PreparedStatement psmt=con.prepareStatement("insert into test(ex_date) values(?)");
java.util.Calendar c=Calendar.getInstance();
c.set(2002,2,21,10,10,00);
java.sql.Date d=new Date(c.getTime().getTime());
java.sql.Time t=new Time(c.getTime().getTime());
psmt.clearParameters();
psmt.setDate(1,d);
psmt.setDate(1,t);
psmt.executeUpdate();
Above program is inserted the Date and time in the database as the following "1900/2/21 10:10 AM"
but i am giving the year as 2002. it inserted the year as 1900. what is the problem with the code?
please let me know
Thanks in advance.
Regards
sankarjune14Hai Franco,
i put the wrong code. Here, is the Original Code.
PreparedStatement psmt=con.prepareStatement("insert into test(ex_date) values(?)");
java.util.Calendar c=Calendar.getInstance();
c.set(2002,2,21,10,10,00);
java.sql.Date d=new Date(c.getTime().getTime());
java.sql.Time t=new Time(c.getTime().getTime());
psmt.clearParameters();
psmt.setDate(1,d);
psmt.setTime(1,t); // Last time i put psmt.setDate(1,t);
psmt.executeUpdate();
and, the getTimeInMillis() method is a protected method in java.util.Calendar class. how can we use it
please give me some other idea to insert the date and time in oracle database.
Thanks in advance
sankarjune14
Maybe you are looking for
-
-
Dear all, We are creating a sales order on friday (22.10.2010), but the system automatically taking monday as required delivery date(24.10.2010). while doing billing, the system automatically taking (24.10.2010) Monday. So please help me w
-
[SOLVED] Dolphin won't preview windows executable files
I use to have KDE 4 on my old computer. I had configured dolphin to show previews in all folders and enabled windows executables under the preview options. With this configuration I was able to see the icons of the executables both on my desktop and
-
Overlay question...will i be able to make this work?
I have a custom button graphic that is a white/red star. I'd like it to appear in the selected state and be invisible in the 2 other states. I've followed the directions that I've found in other threads/forums and my star appears jagged and the red a
-
Wiped computer and reinstalled iTunes but now jams up
I have a Windows XP computer running Media Centre Edition on Service Pack 3. It had the latest version of iTunes running my iPod with no problems but then the computer got a lot of viruses so I wiped the hard drive. After reinstalling the SAME versio