Error when inserting a new record (Ctrl+Down)
Hello,
[http://img402.imageshack.us/my.php?image=12846351.jpg]
Here the problem is : when i press Ctrl+Down (Insert new record), i enter data into all those fields, but i got an error
Cannot Insert Record ("ROGER"."NUME") cannot be null (roger is my username which i logged on). And i completed all fields
Also, when inserting data into fields, when i click on another field, it points me back automatically to the last completed field, then when i click again on the next field, i can enter data in that field. why the cursor cannot be on the next field when i first click there?
i changed the property of the items Required = No (but however, in the database cannot be null).
Please help if you can.
Thanks
For your other issue, with null fields on your forms.
have you ever tried to log those fields value into a log table?
A better and simple idea is:
Create a temp table, with four columns: seq, section, message, type
Where section is the column to condition any search you want to make
message is the column to write anything you want
type is the column which holds the tpe of the record, like info, debug, warn, etc.
then create a database procedure
this procedure must recieve the section, message, type and insert them into the log table and do commit.
in yiour pre-insert trigger [forms level] or in your when-button-pressed or even better on your on-commit trigger [forms level]
write the following code:
begin
database_procdure('MY_FORM_NAME', 'THE VALUES ARE: 1='||:1||' 2='||:2||' 3='||:3, 'INFO');
end;
After that you can do a select in your sql*plus with the following statement:
select *
from temp_table
where selction like 'MY_FORM_NAME';
then you can track if any of the values you think is null or has a value, in fact, has a value.
best regards,
Abdel Miranda
AEMS Global Group
Panama
Similar Messages
-
How to avoid mutating error when insert or update record
Hi ,
I have one transaction table which is having some detail record under one transaction number, after the one transaction number is over by insert or update, i
want to check the total amounts of one flag should be matched on same table if it is not then give error message. But i am getting mutating error on insert or update event trigger on statement level trigger on above table.
Is there any other way to avoid mutating error to solve the above problem or some temp table concepts to be used. help me its urgent.
Thanks in advance,
Sachin Khaladkar
PuneSachin, here's as short of an example as I could come up with on the fly. The sample data is ficticious and for example only.
Let's say I need to keep a table of items by category and my business rule states that the items in the table within each category must total to 100% at all times. So I want to insert rows and then make sure any category added sums to 100% or I will rollback the transation. I can't sum the rows in a row-level trigger because I'd have to query the table and it is mutating (in the middle of being changed by a transaction). Even if I could query it while it is mutating, there may be multiple rows in a category with not all yet inserted, so checking the sum after each row is not useful.
So here I will create;
1. the item table
2. a package to hold my record collection (associative array) for the trigger code (the category is used as a key to the array; if I insert 3 rows for a given category, I only need to sum that category once, right?
3. a before statement trigger to initialize the record collection (since package variables hang around for the entire database session, I need to clear the array before the start of every DML (INSERT in this case) statement against the item table)
4. a before row trigger to collect categories being inserted
5. an after statement trigger to validate my business rule
I then insert some sample data so you can see how it works. Let me know if you have any questions about this.
SQL> CREATE TABLE item_t
2 (category NUMBER(2) NOT NULL
3 ,item_code VARCHAR2(2) NOT NULL
4 ,pct NUMBER(3,2) NOT NULL);
Table created.
SQL>
SQL> CREATE OR REPLACE PACKAGE trg_pkg IS
2 TYPE t_item_typ IS TABLE OF item_t.category%TYPE
3 INDEX BY PLS_INTEGER;
4 t_item t_item_typ;
5 t_empty_item t_item_typ;
6 END trg_pkg;
7 /
Package created.
SQL> SHOW ERRORS;
No errors.
SQL>
SQL> CREATE OR REPLACE TRIGGER item_bs_trg
2 BEFORE INSERT
3 ON item_t
4 BEGIN
5 DBMS_OUTPUT.put_line('Initializing...');
6 trg_pkg.t_item := trg_pkg.t_empty_item;
7 END item_bs_trg;
8 /
Trigger created.
SQL> SHOW ERRORS;
No errors.
SQL>
SQL> CREATE OR REPLACE TRIGGER item_br_trg
2 BEFORE INSERT
3 ON item_t
4 FOR EACH ROW
5 BEGIN
6 trg_pkg.t_item(:NEW.category) := :NEW.category;
7 DBMS_OUTPUT.put_line('Inserted Item for Category: '||:NEW.category);
8 END item_br_trg;
9 /
Trigger created.
SQL> SHOW ERRORS;
No errors.
SQL>
SQL> CREATE OR REPLACE TRIGGER item_as_trg
2 AFTER INSERT
3 ON item_t
4 DECLARE
5 CURSOR c_item (cp_category item_t.category%TYPE) IS
6 SELECT SUM(pct) pct
7 FROM item_t
8 WHERE category = cp_category;
9 BEGIN
10 DBMS_OUTPUT.put_line('Verifying...');
11 FOR i IN trg_pkg.t_item.FIRST..trg_pkg.t_item.LAST LOOP
12 DBMS_OUTPUT.put_line('Checking Category: '||trg_pkg.t_item(i));
13 FOR rec IN c_item(trg_pkg.t_item(i)) LOOP
14 IF rec.pct != 1 THEN
15 RAISE_APPLICATION_ERROR(-20001,'Category '||trg_pkg.t_item(i)||' total = '||rec.pct);
16 END IF;
17 END LOOP;
18 END LOOP;
19 END item_as_trg;
20 /
Trigger created.
SQL> SHOW ERRORS;
No errors.
SQL> INSERT INTO item_t
2 SELECT 1, 'AA', .3 FROM DUAL
3 UNION ALL
4 SELECT 2, 'AB', .6 FROM DUAL
5 UNION ALL
6 SELECT 1, 'AC', .2 FROM DUAL
7 UNION ALL
8 SELECT 3, 'AA', 1 FROM DUAL
9 UNION ALL
10 SELECT 1, 'AA', .5 FROM DUAL
11 UNION ALL
12 SELECT 2, 'AB', .4 FROM DUAL;
Initializing...
Inserted Item for Category: 1
Inserted Item for Category: 2
Inserted Item for Category: 1
Inserted Item for Category: 3
Inserted Item for Category: 1
Inserted Item for Category: 2
Verifying...
Checking Category: 1
Checking Category: 2
Checking Category: 3
6 rows created.
SQL>
SQL> SELECT * FROM item_t ORDER BY category, item_code, pct;
CATEGORY IT PCT
1 AA .3
1 AA .5
1 AC .2
2 AB .4
2 AB .6
3 AA 1
6 rows selected.
SQL>
SQL> INSERT INTO item_t
2 SELECT 4, 'AB', .5 FROM DUAL
3 UNION ALL
4 SELECT 5, 'AC', .2 FROM DUAL
5 UNION ALL
6 SELECT 5, 'AA', .5 FROM DUAL
7 UNION ALL
8 SELECT 4, 'AB', .5 FROM DUAL
9 UNION ALL
10 SELECT 4, 'AC', .4 FROM DUAL;
Initializing...
Inserted Item for Category: 4
Inserted Item for Category: 5
Inserted Item for Category: 5
Inserted Item for Category: 4
Inserted Item for Category: 4
Verifying...
Checking Category: 4
INSERT INTO item_t
ERROR at line 1:
ORA-20001: Category 4 total = 1.4
ORA-06512: at "PNOSKO.ITEM_AS_TRG", line 12
ORA-04088: error during execution of trigger 'PNOSKO.ITEM_AS_TRG'
SQL>
SQL> SELECT * FROM item_t ORDER BY category, item_code, pct;
CATEGORY IT PCT
1 AA .3
1 AA .5
1 AC .2
2 AB .4
2 AB .6
3 AA 1
6 rows selected.
SQL> -
Error while inserting a new record
Hi,
I am getting the following error when I try to add a reacord to the table.
Error: Cannot convert -4 of type class java.lang.String to class oracle.jbo.domain.DBSequence
I am inserting the value of the primary key column using the sequence.
I am using jdev 11
Thanksmay be something like this? basically, I would play around until I get the solution. If it doesn't work, I have no idea. Some experts in this forum can help.
private Object getSequence(String id) {
return id;
public DBSequence getSeqId() {
return (DBSequence) getSequence("seqId");
} -
Error when inserting or changing in a sorted table
Hi Experts,
When i am executing a webdynpro application it says Error when inserting or changing in a sorted table. Can any one help for this.
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: GET_CATEGORY_LIST of program /1BCWDY/F9XHYWN4WKNMG4CDUGA8==CP
Method: IF_COMPONENTCONTROLLER~GET_CATEGORY_LIST of program /1BCWDY/F9XHYWN4WKNMG4CDUGA8==CP
Method: WDDOMODIFYVIEW of program /1BCWDY/F9XHYWN4WKNMG4CDUGA8==CP
Method: IF_WDR_VIEW_DELEGATE~WD_DO_MODIFY_VIEW of program /1BCWDY/F9XHYWN4WKNMG4CDUGA8==CP
Method: DO_MODIFY_VIEW of program CL_WDR_DELEGATING_VIEW========CP
Method: MODIFY_VIEW of program CL_WDR_VIEW===================CP
Method: DO_MODIFY_VIEW of program CL_WDR_CLIENT_COMPONENT=======CP
Method: DO_MODIFY_VIEW of program CL_WDR_WINDOW_PHASE_MODEL=====CP
Method: PROCESS_REQUEST of program CL_WDR_WINDOW_PHASE_MODEL=====CP
Method: PROCESS_REQUEST of program CL_WDR_WINDOW=================CP
in ST22
Object Definition
DATA: lo_node TYPE REF TO if_wd_context_node,
lo_node_info TYPE REF TO if_wd_context_node_info,
lo_element TYPE REF TO if_wd_context_element.
Additional Data declarations
DATA: lv_key TYPE string.
Get context node.
lo_node = wd_context->get_child_node( name = 'DROPDOWNLISTS' ).
lo_node_info = lo_node->get_node_info( ).
Call method to fetch the categories.
CALL METHOD cl_hap_wd_start_page_ui=>category_get_list
EXPORTING
add_on_application = add_on_application
IMPORTING
t_categories = lt_categories.
Append Default selection entry 'All'.
lw_category-category_id = '00000000'.
lw_category-category_name = 'All'.
APPEND lw_category TO lt_categories.
Sort table after appending the new entry.
SORT lt_categories ASCENDING.
Loop through the category list and populate key(category_id) value(category_name) pair for
LOOP AT lt_categories INTO lw_category.
lw_key_value-key = lw_category-category_id.
625 lw_key_value-value = lw_category-category_name.
>>>>> APPEND lw_key_value TO lt_key_values.------>Here it throws an error
627 CLEAR: lw_key_value, lw_category.
628 ENDLOOP.
629
630 * Bind the category key-value pair to the context attribute.
631 CALL METHOD lo_node_info->set_attribute_value_set
632 EXPORTING
633 name = 'CATEGORY_LIST'
634 value_set = lt_key_values.
635
636 * Make the entry 'All' as default selected.
637 CALL METHOD lo_node->set_attribute
638 EXPORTING
639 value = '00000000'
640 name = 'CATEGORY_LIST'.
641
642 ENDMETHOD.
643
644 method GET_EMPLOYEES.
645Hello Durga,
from the error what I understood is lt_key_values is a sorted table and you are trying append a new line to it. Incase of sorted table you need to use the INSERT statement and not the APPEND statement.
INSERT lw_key_value INTO table lt_key_values.
BR, Saravanan -
Error when inserting Web Dynpro script
Hello,
I am trying to create a new form using fields from KNA1 and am using ISR controls. When I try to insert Webdynpro scripts i get message "Error when inserting Web Dynpro script" Message no. FPUIFB094.
Has anyone faced this error? no notes are available regarding this and in SDN.
Regards
PrasadIt must be atleast ALD 7.1. Check this [Thread|Re: Problem on Button; having the same issue. Also check the SAPNOTE 962763.
-
Insert a new record in the database table in between the records.
i va a database table which ve 100 records. but i want to insert my new record as 50th record. how i want to proceed?
thanks ,
velu.V,
This is an odd request. Why?
Ignoring that, you can ATTEMPT to insert into the 50th position IF:
1) The DB table has just had the primary key index re-built/re-shuffled to GUARANTEE that it IS in primary key order
2) And the primary key of the new record is built so that it follows the 49th record
Regardless, once this table has activity against it, its sort order can/will get out of promary key order (with adds/changes/deletes).
But when you select data from it, you can use ORDER BY or an ABAP SORT to organzie the date as needed.
Again... not sure WHY you need a record in a particular physical position... who cares... it is a relational DB. -
" Error when inserting in PSA table RSTSODSPART" when loading into PSA
Hello,
Did anyone encounter something similar, and found a solution ?
BI 7.0 - EnhP 1 - SP5
When loading data from R/3 into PSA, we encounter following error message:
" Error when inserting in PSA table RSTSODSPART"
===============================================================
- the first datapackage is written successfully to PSA,
but from the second datapackage onwards the error message pops-up
" Error when inserting in PSA table RSTSODSPART"
- The original dataselection in the infopackage is somewhere stored
If the selection in the InfoPackage is reduced (e.g. only one document i.o. a period)
it stil starts loading according the original selection (the month)
- If we create a new InfoPackage and select very few data (only one datapackage)
then we can load to PSA succesfully, but when we load to DSO we can't activate the DSO.
- We remarked that:
Two versions of the PSA exist for that datasource 0FI_GL_40:
a Table(/BIC/B0000555000) in version 1 exists,
a Table(/BIC/B0000555001) in version 2 exists
Thanks in advance,
Best regardsHello All,
We had a problem similar to what Ilse Depoortere describes. The problem happens in our BW QA system a few days/weeks after it has been copied from Production. Data loads start failing with these two error messages:
RSM2 851 - Error when writing in PSA (Caller 32)
RSAR 130 - Error 7 when adding to PSA (Caller 70)
We have just implemented the fix described in note 1340371 (replaced the LIB_DBSL with patch level 247), and the problem is gone. Failed data load process chains can be restarted and finish successfully.
This has been a really useful discussion, thanks all! And thanks to my coworker Bob who found it.
Vince Vajda -
ADF: any good examples on inserting a new record
Hi, I'm currently developing a
web based application (using jsp + struts on top of ADF)
and I've seen many many demos and viewlets on
how to create a page that reads a list of employees
or master-detail relationship of records.
However, when I try to make a page which can insert
a new record (ex. new employee, new department, etc),
I am baffled, because I couldn't find a good example
that showed me how to do it.
Has anyone have a good example?
thank you.Did you check the tutorials page?
For example:
http://otn.oracle.com/products/jdev/collateral/tutorials/9050/bizcomp_jsp_tut.html -
Error when inserting Web Dynpro script in Adobe form
Hi
In my WD component in one of the view I have an ADOBE form (Online scenario) and a button to save data into backend. In the ADOBE form everything is working properly, however the problem is when I click on the button to save, Its not getting into my action code. Even I am not getting any error other than the wait symbol.
In the form I have taken ZCI layout but when i'm inserting Webdynpro Script its showing an error 'Error when inserting Web Dynpro script'.
Please let me know why this error is getting.
Thanks
RamHi Ram,
I hope you help me,
I have the same error, when I insert a web Dynrp Script, what version of SAPGUI do you use?
Thanks -
Runtime Error when creating a new group
I'm getting a runtime error when creating a new group on a site collection?
Thanks in advanceThe most possible reason is if your site collection is reached the maximum site quota limit,then there is chance to get the run time error while creating a new group.
In this case,you will get the error while creating/updating the group or while adding the new user/uploading any content.
Also Ensure the group name is not having any special/unsupported characters.
Feel free to share the error screenshot/entry in the ULS logs.
Please remember to click 'Mark as Answer' on the answer if it helps you
Best Regards,
Pavan Kumar Sapara
s p kumar -
KP06 Cost Center Budget Planning System error when locking the data records
Hi,
While updating Cost Center Planning system(KP06) its giving the below error:
System error when locking the data records.
Message no. KI502
Diagnosis
The lock to protect the data records being processed could not be set. The
probable reason for this is that the SAP locking table is full and no more
entries can be added.
Procedure
Inform your system administrator immediately
No planning data has been changed
Message no. K8038
Diagnosis
You used Post. While preparing the data for posting, the SAP System
determined that no changes were made in the available databank values.
System Response
A posting activity price is not necessary
Please help me how can we rectify the above error..
Thanks
VS RaoHi,
check the locking entries (t-code SM12).
http://help.sap.com/saphelp_erp2004/helpdata/en/37/a2e3ae344411d3acb00000e83539c3/frameset.htm
Best regards, Christian -
Generate a surregate key only when insert a new row - (SCD1)
Hi all,
I´m starting with OWB (10gR2) and I'm creating a simple template dimension with SDC type 1 with one source, one target and a sequence do generate the surrogate key.
The main properties configurations are:
- Target property: Loading type = INSERT/UPDATE.
- Only match the natural key between source and target.
- Only use the sequence.nextval when inserting a new row.
- Mapping: Set based.
The generated code was something like this:
{color:#000080}+MERGE INTO DIM_DEFAULT+{color}
{color:#000080}+USING SCR_TABLE+{color}
{color:#000080}+ON(SCR_TABLE.NATURALKEY=DIM_DEFAULT.NATURALKEY)+{color}
{color:#000080}+WHEN MATCHED THEN+{color}
{color:#000080}+UPDATE SET NAME=SCR_TABLE.NAME+{color}
{color:#000080}+WHEN NOT MATCHED THEN+{color}
{color:#000080}+INSERT(SK_DEFAULT,NATURALKEY,NAME)+ {color}
{color:#000080}+VALUES(SQ_DIM_DEFAULT.NEXTVAL,SCR_TABLE.NATURALKEY,SCR_TABLE.NAME)+{color}
Ok, it works fine! But the merge statement generates a new SK for each merged row even if the action is update! What I want is a new SK only when the process inserts a new row. Hard-coding, I possible solve this problem creating a function to return the nextval from a sequence and put it on the insert clause like this:
{color:#000080}+MERGE INTO DIM_DEFAULT+{color}
{color:#000080}+USING SCR_TABLE+{color}
{color:#000080}+ON(SCR_TABLE.NATURALKEY=DIM_DEFAULT.NATURALKEY)+{color}
{color:#000080}+WHEN MATCHED THEN+{color}
{color:#000080}+UPDATE SET NAME=SCR_TABLE.NAME+{color}
{color:#000080}+WHEN NOT MATCHED THEN+{color}
{color:#000080}+INSERT(SK_DEFAULT,NATURALKEY,NAME)+ {color}
{color:#000080}+VALUES(FN_SQC_NEXTVAL('SQ_DIM_DEFAULT'),SCR_TABLE.NATURALKEY,SCR_TABLE.NAME)+{color}
Hard-coded it works fine as I need and that´s the point that I want to know:
It´s possible perform this solution using OWB?
I tried to use Constants but this solution doesn´t work then I tried an expression calling my sequence.nextval function but the result was:
{color:#000080}+MERGE INTO DIM_DEFAULT+{color}
{color:#000080}+USING (SELECT FN_SQC_NEXTVAL('SQ_DIM_DEFAULT') AS SK_DEFAULT_0,NATURALKEY,NAME FROM SCR_TABLE) AS SCR_TABLE+{color}
{color:#000080}+ON(SCR_TABLE.NATURALKEY=DIM_DEFAULT.NATURALKEY)+{color}
{color:#000080}+WHEN MATCHED THEN+{color}
{color:#000080}+UPDATE SET NAME=SCR_TABLE.NAME+{color}
{color:#000080}+WHEN NOT MATCHED THEN+{color}
{color:#000080}+INSERT(SK_DEFAULT,NATURALKEY,NAME)+ {color}
{color:#000080}+VALUES(SK_DEFAULT_0,SCR_TABLE.NATURALKEY,SCR_TABLE.NAME)+{color}
It´s the same of merge the row using the SEQUENCE.NEXTVAL direct.
Does anyone have a workaround to solve this situation?Hi,
Perhaps this comes a bit late but...
Have you tried to change attribute properties in the mapping? For simple example you have a source table in sa-stage which have to fields: code (varchar2(2), natural key) and description (varchar2(50)). You want to map those fields to target table where you have 3 fields: id (NUMBER(10), surrogate id, nextval from sequence when new row inserted), code (as from the source, natural key, the field to determine if the coming row is new or one to be merged) and description as in source table. Fields and datatypes are just for an example.
When you have source and target tables in your mapping (and fields mapped), drag the sequence operator to the mapping and map the nextval to target table's surrogate id field.
- Change target table operator properties:
* loading type = UPDATE/INSERT
* Match by constraint = no constraint
- Change target table attribute properties for:
* surrogate id field: Load column when updating row = no; match column when updating row = no; load column when inserting row = yes
* natural key field(s): Load column when updating row = no; match column when updating row = yes; load column when inserting row = yes
* all the regular fields: Load column when updating row = yes; match column when updating row = no; load column when inserting row = yes
- change the deleting rules as you want them to be
- Validate your mapping. If the green light is shown, the settings in field properties are suitable for merge.
Hope this is what you wanted to get. I think this kind of solution works fine. Trigger in the table that holds and where one inserts millions of rows sounds scary...
Regards,
jk
Added text: sorry about false alarm. I think that was what you did. The solution above steals the nextvals from sequence. Perhaps no-native-english-reader should be more careful when reading questions ;-)
Edited by: jkoski on 5.11.2008 1:30 -
I getting error when connecting my new iPod in my car. Getting error that usb is not recognized.
Not all car systems are compatible with the iPod touch. Does the documentation/website for the car system say it is compatible with an iPod with iOS 5?
-
"Error when reading ATP delta records"
Hi,
I have created Integration models for Location, Product, ATP Check, ATP Configuration, Stock and Sales Order.
After creating IM's when I tried to run ATP on my Sales Order I'm getting error " "Error when reading ATP delta records".
Can anyone provide me why I'm facing this error.
Thanks in Advance.
RamDear Ram,
For the product/locations you are checking, it appears that ATP objects in the liveCache are missing which normally are created automatically when products and locations are created in APO.
I would advise to recreate all needed products and locations.
In APO, i.e. make again an initial data transfer of the master data from R/3. Previously the existing ones should be deleted to be sure that they will be created again. Then the problem should be solved.
If this does not help please check the the connection and LC settings to LDA and please try to restart the livecache. A potential explanation for the error would be an incorrectly maintained LDA connection to liveCache. Please check this by running transaction /SAPAPO/OM13 and selecting the 'checks' section.
The problem with the LDA connection could be e.g. very simple. If you check the table dbcon, which contains the description of the liveCache connections , if the liveCache names for LCA and LDA are different you should ensure, that the connections LCA and LDA are setup for the same liveCache (con_env in dbcon).
I hope this helps.
Regards,
TIbor -
My phone keeps getting an error when downloading the new ios
Even when i connect to itunes i keep getting an error when downloading the new os. I have made 11 attempts.
download is corrupt. I finally solved it. I had changed my password on my appleid and had not updated it in my phone. After i got the same error on 3 different desktops i decided the error was in my phone and updated all my settings and the update worked the first time.
Thanks for your interest
Maybe you are looking for
-
hi, We have a scenario like below: We have the regular landscape like production, quality and development for SAP R/3 as well as BW. What happened was they have deleted all the master data and transaction data from quality R/3 system some time ba
-
Best Practice for sugar refinery process
hello, my company need to deploy a new business concerning raw sugar refinery. so we need to analyze the business requirements and propose a process for refinery management . step 1: arrival of goods in docks step 2: raw sugar need to be charged in
-
Error in Transferred from ECC to GTS
Hi experts We are getting the following errors in our Development and Staging system When running transaction /SAPSLL/PRODUCT_TLSH Red Light on Log: MATERIAL TRANSFER 09/19/2011 12:03:42 Green light on Transfer Log for Product IM001FERT1-NY01 Transfe
-
Settings for Airport Utility / Airport Express
I have an Airport Express. The idea behind it is, I want to be able to take it to any hotel or location that ONLY has wired internet, and create a WiFi hotspot for my iPad. Right now I have it set up working on my home network, but I want to make sur
-
Host variables in SQL Developer not showing decimal places
I'm a very newbie, taking my first PL/SQL class, so please be gentle! I think this may be a SQL Developer problem, because when I run the same thing from terminal-line SQLplus on my Linux install, it works right. I'm working with a procedure, and pas