Cfgrid list all inserted rows
I build a cfgrid without any rows(no bind, no query), then I let user inserts some rows. I wan to read the user inserted rows back in javascript when click a button.
I have code like this:
grid = ColdFusion.Grid.getGridObject('animal_group_grid');
selec=grid.getSelectionModel();
selec.selectAll();
sele = grid.getSelections();
alert(sele[0].data.groupID );
groupID is a column name in grid.
However, It returns "undefined"
What is wrong?
Hi,
IF you want to select all the rows for VBAK-
Write-
Data:itab type table of VBAK,
wa like line of itab.
SELECT * FROM VBAK into table itab.
Itab is the internal table with type VBAK.
Loop at itab into wa.
Write: wa-field1,
endloop.
Similar Messages
-
How to list all the rows from the table VBAK
Friends ,
How to list all the rows from the table VBAK.select query and the output list is appreciated.Hi,
IF you want to select all the rows for VBAK-
Write-
Data:itab type table of VBAK,
wa like line of itab.
SELECT * FROM VBAK into table itab.
Itab is the internal table with type VBAK.
Loop at itab into wa.
Write: wa-field1,
endloop. -
Select list with redirect and save the item to insert row
On the Form, I want to select from the item (P105_ADMIN_DOMAIN_ID)
and pop the result on the item (P105_ADMIN_NAME).
P105_ADMIN_DOMAIN_ID define:
Display as "select list with redirect"
Alternate source used "Only when .."
Source Type "Database Column"
Source Value or express "ADMIN_DOMAIN_ID"
P105_ADMIN_NAME define:
Display as "Text Field"
Altrenate source used "Only when .."
Source Type "SQL Query"
Source Value or express "select party
from responsible_party
where logonid
= :P105_ADMIN_DOMAIN_ID"
questions:
1. item P105_ADMIN_DOMAIN_ID DROP DOWN LIST is limited to
some threadhold, it did not list all the value from
the LOV which is follow:
select LOGONID d, LOGONID r
from RESPONSIBLE_PARTY
order by 1
2. I want to insert a row after complete the form.
But my item P105_ADMIN_NAME is defined
Source Type "SQL Query" instead of the 'Database
Column'
How could I overcome these?
Thanks so much for your help.1) what i meant was for you to test this ridiculously huge LOV outside of htmldb, but it occurred to me last night that you could, in fact, be hitting a limit of ours. after some poking around, i have confirmed that. select list items in htmldb are currently limited to 10,000 rows. this was initially done for performance reasons, but they're now opening up the restriction. if you really need to work with that many rows where the user is allowed to pick from a set of values, consider using a popup item type instead. it'd help your app performance as well (in my test cases, it stank to have to wait for my 10k select list rows to come down to my browser).
2) sorry to not have been more clear about this, but when you set your item's "Source Type" back to "Database Column", you'd have to specify that column in the "Source or value expression" field. also, you can't put a sql query into that "Post Calculation Computation" field. as i said before, "you can take a look at the attribute-level help for that field to see implementation examples."
3) stick with "Always..." for now if you're using our auto-dml process(es)
regards,
raj -
RowSetIterator not returning all the rows
Hi,
We have a use-case where we need to create a new row iterator to insert rows(values) in it. Immediately after insertRow(), we are reading the values by creating a secondary row set iterator (createRowSetIterator) but it is not returning all the inserted rows. Here is the code snippet:
Code to insert rows:
public void insertTerrLineOfBusiness(CreateOperation operation, TerritoryVORowImpl newTerritoryRow, TerritoryVORowImpl selectedRow){
if((operation.equals(CreateOperation.CREATE))
|| operation.equals(CreateOperation.COPY)
|| operation.equals(CreateOperation.ADD_EXISTING)){
RowIterator selTerritoryLineOfBusinessIter = selectedRow.getTerritoryLineOfBusiness();
//RowIterator newTerrLineOfBusinessIter = newTerritoryRow.getTerritoryLineOfBusiness();
ViewRowSetImpl newTerrLineOfBusinessIter = (ViewRowSetImpl) newTerritoryRow.getTerritoryLineOfBusiness();
newTerrLineOfBusinessIter.setAssociationConsistent(true);
while(selTerritoryLineOfBusinessIter.hasNext()){
TerritoryLineOfBusinessVORowImpl selTerrLineOfBusinessRow =
(TerritoryLineOfBusinessVORowImpl)selTerritoryLineOfBusinessIter.next();
TerritoryLineOfBusinessVORowImpl newTerrLineOfBusinessRow =
(TerritoryLineOfBusinessVORowImpl)newTerrLineOfBusinessIter.createRow();
newTerrLineOfBusinessRow.setTerritoryVersionId(newTerritoryRow.getTerritoryVersionId());
newTerrLineOfBusinessRow.setLobCode(selTerrLineOfBusinessRow.getLobCode());
newTerrLineOfBusinessIter.insertRow(newTerrLineOfBusinessRow);
Code to read:
public List getTerritoryLobsValues() {
List <String> lobsValues = new ArrayList<String>();
if (this.getTerritory().getCurrentRow() != null) {
TerritoryVORowImpl territoryVORowImpl =
(TerritoryVORowImpl)this.getTerritory().getCurrentRow();
if(territoryVORowImpl.getTerritoryLineOfBusiness() != null){
ViewRowSetImpl territoryLob =
(ViewRowSetImpl)territoryVORowImpl.getTerritoryLineOfBusiness();
RowSetIterator itr = territoryLob.createRowSetIterator(null);
if(itr!=null){
while(itr.hasNext()) {
Row r = itr.next();
String lobCode = (String)r.getAttribute("LobCode");
lobsValues.add(lobCode);
itr.closeRowSetIterator();
return lobsValues;
Can anybody suggest what could be the issue? How to fix it?
Thanks,
AkhilaThanks for your response.
Jdev version:
Primary == FUSIONAPPS_PT.V1REL6INT_LINUX.X64_120719.0800 (Primary Product for the view)
Primary depends on FMWTOOLS == FMWTOOLS_11.1.1.6.0_GENERIC_120112.0037.2
FMWTOOLS depends on label == JDEVADF_11.1.1.6.0_GENERIC_111205.1733.6192.1
The above label originated from base label == JDEVADF_11.1.1.6.0_GENERIC_111205.1733.6192
Use case: We have a tree table, each record may or may not have Line of Business(LOB) associated with it. On creating a child node in the tree table, the child node copies all the attributes of parent. These attributes are not committed explicitly, if user wants to save the child node only then the attributes are committed.
Giving secondary rowSetIterator a name did not help in resolving this issue.
If I am calling postChanges() before reading from secondary row iterator then its returning all the inserted values. But this.getTransaction().postChanges() is a JAudit violation, so cannot use it:
RuleId: apps-jbo-category.File.AdfModel.54
Rule: insertTerrLineOfBusiness - Review DBTransaction.postChanges call to ensure passivation-safety
Any pointers on this? -
Insert rows in table - ORA-01008
Hi everybody,
I have designed a page (Page 11, Page Name: Evaluar ALUMNOS) to insert rows in a table. I didn´t want to use a tabular form, so I used this:
Page items
LISTA_CURSOS Select List
Region: Añadir
ID_ALUMNO Select List with Submit
DESCRIPCION Text Field
NOTA Select List
OBSERVACIONES Text Field
FECHA Date Picker (DD-MON-RR)
Buttons
ANIADIR Button
...Database Action -> SQL INSERT action
Processes
PROCESS Aniadir PL/SQL anonymous block Conditional
...Process Point -> On submit - After Computations and Validations
...Source:
declare
begin
execute immediate 'insert into EVALUACIONES
(ID_ALUMNO, ID_CURSO, DESCRIPCION, NOTA, OBSERVACIONES, FECHA)
values
(:page11.ID_ALUMNO, :page11.LISTA_CURSOS, :page11.DESCRIPCION, :page11.NOTA, :page11.OBSERVACIONES, :page11.FECHA)';
commit;
end;
...When Button Pressed (Process After Submit When this Button is Pressed) -> ANIADIR
When I run the application, I insert the values and click "ANIADIR" button, but then I get the following error:
ORA-01008: not all variables bound
I´ve tried to find a solution, but I don´t know what is causing this...
It would be great if you could help me!
Thanks,
LuisHello again.
After some tries I cannot solve this error (ORA-01400: cannot insert NULL into...)
Table EVALUACIONES description is:
Column Name Data Type Nullable Default Primary Key
ID_ALUMNO NUMBER No - -
ID_CURSO NUMBER No - -
DESCRIPCION VARCHAR2(400) No - -
NOTA BINARY_FLOAT No - -
OBSERVACIONES VARCHAR2(500) Yes - -
FECHA DATE No - -
When the error was:
ORA-01400: cannot insert NULL into ("LUIS2"."EVALUACIONES"."ID_CURSO")
I tried to use v_ID_ALUMNO number :=nvl(v('page11.ID_ALUMNO'),0) in order to avoid entering a null value, but then it complained about null value in ID_CURSO (wich is not nullable)
Then I added v_LISTA_CURSOS number :=nvl (v('page11.LISTA_CURSOS'),0); (the value of v_LISTA_CURSOS is the one I want to insert into ID_CURSO) and it complained about null value in the next colunm, DESCRIPCION (wich is not nullable also)...
... so I guess that the code wich is getting the value from the items is not working, because when the INSERT is executed, it tries to insert null values in all columns.
The last code I have tried is this:
declare
v_ID_ALUMNO number :=v(':page11.ID_ALUMNO');
v_LISTA_CURSOS number :=v('page11.LISTA_CURSOS');
v_DESCRIPCION varchar2(400) :=v('page11.DESCRIPCION');
v_NOTA binary_float :=v('page11.NOTA');
v_OBSERVACIONES varchar2(500) :=v('page11.OBSERVACIONES');
v_FECHA date :=v('page11.FECHA');
begin
execute immediate 'insert into EVALUACIONES '||
'(ID_ALUMNO, ID_CURSO, DESCRIPCION, NOTA, OBSERVACIONES, FECHA) '||
'values '||
'('''||v_ID_ALUMNO||''', '''||v_LISTA_CURSOS||''', '''||v_DESCRIPCION||''', '''||v_NOTA||''', '''||v_OBSERVACIONES||''', '''||v_FECHA||''')';
-- using v_ID_ALUMNO, v_LISTA_CURSOS, v_DESCRIPCION, v_NOTA, v_OBSERVACIONES, v_FECHA ;
-- commit;
end;
Could you please help me with this?
Thanks,
Luis -
Creating a list with different row sizes...
I'm new to AS 3.0 and CS4 and I've been getting up to speed
on all of it. I've used the List component before with my own
CellRenderer. I now need to create a list with different row
heights. The List component is great and does everything that I
want but it requires all rows to be the same height.
I'm unsure of where to go. Creating my own class seems like a
lot of work. The TileList and Grid components don't allow different
sized (and dynamically changing) row heights either. Is there some
base class (SelectableList? BaseScrollPane?) that I should extend
or do I need to just bite the bullet and write it all from scratch?
I need each row to have it's own height and interaction with
a row could change the height of the row. The main use is a list of
data. If the user clicks in an item, it turns the display into
something they can edit (which will need more height).
Thanks for any thoughts on a direction I should think about.
By the way, I really like that AS 3.0 is much more consistent of a
programming language than previous MX versions that I've used.
We're doing a lot of AS/Flash/AIR work with it and it's turning
into a wonderful environment...Any ideas about this??
-
Is there a way to BULK COLLECT with FOR UPDATE and not lock ALL the rows?
Currently, we fetch a cursor on a few million rows using BULK COLLECT.
In a FORALL loop, we update the rows.
What is happening now, is that we run this procedure at the same time, and there is another session running a MERGE statement on the same table, and a DEADLOCK is created between them.
I'd like to add to the cursor the FOR UPDATE clause, but from what i've read,
it seems that this will cause ALL the rows in the cursor to become locked.
This is a problem, as the other session is running MERGE statements on the table every few seconds, and I don't want it to fail with ORA-0054 (resource busy).
What I would like to know is if there is a way, that only the rows in the
current bulk will be locked, and all the other rows will be free for updates.
To reproduce this problem:
1. Create test table:
create table TEST_TAB
ID1 VARCHAR2(20),
ID2 VARCHAR2(30),
LAST_MODIFIED DATE
2. Add rows to test table:
insert into TEST_TAB (ID1, ID2, LAST_MODIFIED)
values ('416208000770698', '336015000385349', to_date('15-11-2009 07:14:56', 'dd-mm-yyyy hh24:mi:ss'));
insert into TEST_TAB (ID1, ID2, LAST_MODIFIED)
values ('208104922058401', '336015000385349', to_date('15-11-2009 07:11:15', 'dd-mm-yyyy hh24:mi:ss'));
insert into TEST_TAB (ID1, ID2, LAST_MODIFIED)
values ('208104000385349', '336015000385349', to_date('15-11-2009 07:15:13', 'dd-mm-yyyy hh24:mi:ss'));
3. Create test procedure:
CREATE OR REPLACE PROCEDURE TEST_PROC IS
TYPE id1_typ is table of TEST_TAB.ID1%TYPE;
TYPE id2_typ is table of TEST_TAB.ID2%TYPE;
id1_arr id1_typ;
id2_arr id2_typ;
CURSOR My_Crs IS
SELECT ID1, ID2
FROM TEST_TAB
WHERE ID2 = '336015000385349'
FOR UPDATE;
BEGIN
OPEN My_Crs;
LOOP
FETCH My_Crs bulk collect
INTO id1_arr, id2_arr LIMIT 1;
Forall i in 1 .. id1_arr.COUNT
UPDATE TEST_TAB
SET LAST_MODIFIED = SYSDATE
where ID2 = id2_arr(i)
and ID1 = id1_arr(i);
dbms_lock.sleep(15);
EXIT WHEN My_Crs%NOTFOUND;
END LOOP;
CLOSE My_Crs;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR(-20000,
'Test Update ' || SQLCODE || ' ' || SQLERRM);
END TEST_PROC;
4. Create another procedure to check if table rows are locked:
create or replace procedure check_record_locked(p_id in TEST_TAB.ID1%type) is
cursor c is
select 'dummy'
from TEST_TAB
WHERE ID2 = '336015000385349'
and ID1 = p_id
for update nowait;
e_resource_busy exception;
pragma exception_init(e_resource_busy, -54);
begin
open c;
close c;
dbms_output.put_line('Record ' || to_char(p_id) || ' is not locked.');
rollback;
exception
when e_resource_busy then
dbms_output.put_line('Record ' || to_char(p_id) || ' is locked.');
end check_record_locked;
5. in one session, run the procedure TEST_PROC.
6. While it's running, in another session, run this block:
begin
check_record_locked('208104922058401');
check_record_locked('416208000770698');
check_record_locked('208104000385349');
end;
7. you will see that all records are identified as locked.
Is there a way that only 1 row will be locked, and the other 2 will be unlocked?
Thanks,
Yoni.I don't have database access on weekends (look at it as a template)
suppose you
create table help_iot
(bucket number,
id1 varchar2(20),
constraint help_iot_pk primary key (bucket,id1)
organization index;not very sure about the create table syntax above.
declare
maximal_bucket number := 10000; -- will update few hundred rows at a time if you must update few million rows
the_sysdate date := sysdate;
begin
truncate table help_iot;
insert into help_iot
select ntile(maximal_bucket) over (order by id1) bucket,id1
from test_tab
where id2 = '336015000385349';
for i in 1 .. maximal_bucket
loop
select id1,id2,last_modified
from test_tab
where id2 = '336015000385349'
and id1 in (select id1
from help_iot
where bucket = i
for update of last_modified;
update test_tab
set last_modified = the_sysdate
where id2 = '336015000385349'
and id1 in (select id1
from help_iot
where bucket = i
commit;
dbms_lock.sleep(15);
end loop;
end;Regards
Etbin
introduced the_sysdate if last_modified must be the same for all updated rows
Edited by: Etbin on 29.11.2009 16:48 -
Insert rows from l_qte_rec in to tmp table
xxx_pre_update_userbook(p_service_request_id number, p_sr_type_id number, p_status_id number,
p_resolution_code varchar2, p_bill_to_customer_id number,
p_bill_to_cust_account_id number, p_bill_to_customer_site_id number,
p_contract_id number, p_contract_line_id number,
p_resolution_summary varchar2,
x_status out varchar2, x_mesg out varchar2) as
l_proj_incident_type_id number;
l_isr_incident_type_id number;
l_tac_incident_type_id number;
l_status varchar2(10) := 'S';
l_sr_closing_flag number;
l_mesg varchar2(3000) := null;
err_mesg varchar2(3000) := null;
L_SO_ID NUMBER;
L_LINK_REC CS_INCIDENTLINKS_PUB.CS_INCIDENT_LINK_REC_TYPE;
L_OBJECT_VERSION_NUMBER NUMBER;
L_RECIPROCAL_LINK_ID NUMBER;
L_LINK_ID NUMBER;
l_QTE_REC ASO_QUOTE_PUB.qte_header_rec_type;
l_control_REC ASO_ORDER_INT.control_rec_type;
l_Order_Header_Rec ASO_ORDER_INT.Order_Header_Rec_Type;
l_Order_Line_Tbl ASO_ORDER_INT.Order_Line_Tbl_type;
l_Return_Status VARCHAR2(30);
l_Msg_Count NUMBER;
l_Msg_Data VARCHAR2(3000);
l_Msg_INDEX_OUT NUMBER;
l_OUT_MESSAGE VARCHAR2(3000);
l_proj_flag number;
l_quote_status_id number;
l_orders_created number;
l_chargeable_sr_flag number;
l_sr_close_flag number;
l_invalid_outage_info number;
begin
l_status := 'S';
l_mesg := null;
-- MO_GLOBAL.INIT('CS');
-- Get the Project Service Request Id
select incident_type_id into l_proj_incident_type_id
from cs_incident_types_tl
where name like 'XXX TAC Project'
-- and language = 'US'
and rownum < 2;
-- Get the ISR Service Request Id
select incident_type_id into l_isr_incident_type_id
from cs_incident_types_tl
where name like 'XXX TAC ISR'
-- and language = 'US'
and rownum < 2;
-- Get the TNT TAC Service Request Id
select incident_type_id into l_tac_incident_type_id
from cs_incident_types_tl
where name like 'XXX TAC Service Request'
and rownum < 2;
-- and language = 'US';
select nvl((select 1
from dual
where exists( select incident_status_id
from cs_incident_statuses_b
where incident_status_id = p_status_id
and close_flag is not null
and close_flag = 'Y')
and ( p_resolution_code is null
or (p_resolution_code NOT IN ('CS_SR_CLOSED_AS_DUP', 'XXXXX_SR_CXL', 'XXXXX_SR_INFO', 'XXXXX_SR_MGMT')
and p_sr_type_id in ( l_isr_incident_type_id )),0) into l_chargeable_sr_flag
from dual;
select nvl((select 1
from dual
where exists( select incident_status_id
from cs_incident_statuses_b
where incident_status_id = p_status_id
and close_flag is not null
and close_flag = 'Y')
and ( p_resolution_code is null
or (p_resolution_code NOT IN ('CS_SR_CLOSED_AS_DUP', 'XXXXX_SR_CXL', 'XXXXX_SR_INFO', 'XXXXX_SR_MGMT')
),0) into l_sr_closing_flag
from dual;
if ( l_sr_closing_flag = 1 and ((p_resolution_summary is null) or (p_resolution_summary = FND_API.G_MISS_CHAR)) ) then
x_status := 'F';
--x_mesg := 'Resolution Summary can not be empty while closing Service request';
fnd_message.set_name ('XXXXX', 'MISSING_RESOLUTION_SUMMARY');
-- fnd_message.set_token ('MESG_PARAM', err_mesg || '::' || l_mesg);
fnd_msg_pub.ADD;
end if;
-- Check whether outage information is complete at the time of closure.
if ( l_sr_closing_flag = 1 ) then
l_invalid_outage_info := 0;
select nvl((select 1
from dual
where exists ( select 1
from cs_incidents_ext cie, ego_fnd_dsc_flx_ctx_ext grp1
where incident_id = p_service_request_id
and grp1.application_id = 170
and grp1.descriptive_flexfield_name like 'XX_SR_CONTEXT'
and grp1.descriptive_flex_context_code like 'XXXXXOutageTab'
and cie.attr_group_id = grp1.attr_group_id
and ( c_ext_attr1 is null or c_ext_attr2 is null or c_ext_attr3 is null or
c_ext_attr4 is null or c_ext_attr5 is null or c_ext_attr6 is null or
c_ext_attr7 is null or n_ext_attr1 is null or n_ext_attr2 is null or
n_ext_attr3 is null or n_ext_attr4 is null or n_ext_attr5 is null or
d_ext_attr1 is null or d_ext_attr2 is null or d_ext_attr3 is null)
-- if all of them are null then we should ignore
and NOT ( c_ext_attr1 is null and c_ext_attr2 is null and c_ext_attr3 is null and
c_ext_attr4 is null and c_ext_attr5 is null and c_ext_attr6 is null and
c_ext_attr7 is null and n_ext_attr1 is null and n_ext_attr2 is null and
n_ext_attr3 is null and n_ext_attr4 is null and n_ext_attr5 is null and
d_ext_attr1 is null and d_ext_attr2 is null and d_ext_attr3 is null))), 0) into l_invalid_outage_info
from dual;
if ( l_invalid_outage_info = 1 ) then
x_status := 'F';
fnd_message.set_name ('XXXXX', 'MISSING_OUTAGE_INFORMATION');
fnd_msg_pub.ADD;
end if;
end if;
if ( (p_sr_type_id in ( l_isr_incident_type_id )) and (l_chargeable_sr_flag = 1) ) then
if ( ( p_bill_to_customer_id is null or p_bill_to_cust_account_id is null or
p_bill_to_customer_site_id is null )) then
x_status := 'F';
--x_mesg := 'Bill to customer name/account/site is empty';
fnd_message.set_name ('XXXXX', 'ISR_INVALID_BILL_TO');
-- fnd_message.set_token ('MESG_PARAM', err_mesg || '::' || l_mesg);
fnd_msg_pub.ADD;
else
select count(*) into l_orders_created
from cs_incident_links
where subject_id = p_service_request_id
and subject_type = 'SR'
and object_type = 'ORDERS';
/* If orders are not created for this SR then create the order */
if ( l_orders_created = 0 ) then
/* Create Order */
err_mesg := 'Got the Incident Types and Incidents Status flag';
select nvl((select quote_status_id
from aso_quote_statuses_tl
where language = 'US'
and upper(meaning) = 'ENTERED'), 0) into l_quote_Status_id
from dual;
err_mesg := 'Got the Quote Status Id';
l_qte_rec.party_id := p_bill_to_customer_id;
* l_qte_rec.party_id := p_bill_to_customer_id;
* l_qte_rec.cust_party_id := p_bill_to_customer_id;
* l_qte_rec.cust_account_id := p_bill_to_cust_account_id;
* l_qte_rec.INVOICE_TO_CUST_PARTY_ID := p_bill_to_customer_id;
* l_qte_rec.INVOICE_TO_CUST_ACCOUNT_ID := p_bill_to_cust_account_id;
* l_qte_rec.INVOICE_TO_PARTY_SITE_ID := p_bill_to_customer_site_id;
* l_qte_rec.INVOICE_TO_PARTY_ID := p_bill_to_customer_id;
* l_qte_rec.quote_status_id := l_quote_status_id;
* l_qte_rec.quote_status_code := 'ENTERED';
* l_qte_rec.quote_status := 'ENTERED';
* l_control_rec.book_flag := 'N';
* err_mesg := 'set the Quote Header';*
* select nvl((select transaction_type_id*
* from oe_transaction_types_v*
* where name like 'Service Order'), 0 ) into l_qte_rec.order_type_id*
* from dual;*
* err_mesg := 'Got Order Type';*
* l_qte_rec.currency_code := 'USD';
how to insert rows in tmp table from rec_type which is in bold text .... i want to insert after the last statement .this is for debugging after executing the procedureNo version number and lots of other missing information.
That said look at the example here:
http://www.morganslibrary.org/reference/insert.html
under "RECORD INSERT." -
Comment is not working properly when using list values - multiple rows
Hi
I am trying to send comments in drop down menu but it is not working.
I have a list field with the following values ( "Not Started";"In Progress";"Completed")
the default value should be "Not Started" but if I select "In Progress" at the top and click save, I get it in all the rows.
can't seem to figure out why is not working.
=IF($P22="Not Started";EVCOM($P22;$E$2;$M22;Parameter!$C$20;$E$5;"SCHED";Parameter!$C$23;Parameter!$C$25;$E$6;$E$8;$E$10;$E$11;$E$12);IF($P22="In Progress";EVCOM($P22;$E$2;$M22;Parameter!$C$20;$E$5;"SCHED";Parameter!$C$23;Parameter!$C$25;$E$6;$E$8;$E$10;$E$11;$E$12);IF($P22="Completed";EVCOM($P22;$E$2;$M22;Parameter!$C$20;$E$5;"SCHED";Parameter!$C$23;Parameter!$C$25;$E$6;$E$8;$E$10;$E$11;$E$12);"Not Started")))
I have tried to use plain EVCOM function but the result is same.
thanksHi,
Here is a blog for your reference:
"The collection has not been initialized. It has not been requested ..." in SharePoint 2010 ECMAScript Client Object Model.
http://youdhbir.blogspot.com/2012/06/collection-has-not-been-initialized-it.html
In SharePoint 2010, we can also use REST Interface(listdata.svc) to achieve your requirement.
http://msdn.microsoft.com/en-us/library/ff798339.aspx
http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/01/21/introduction-to-querying-lists-with-rest-and-listdata-svc-in-sharepoint-2010.aspx
http://akurniaga.wordpress.com/2012/09/27/using-listdata-service-in-sharepoint-2010/
More information:
http://stackoverflow.com/questions/18936908/retrieve-parameter-from-executequeryasync-javascript
Best Regards,
Dennis Guo
TechNet Community Support -
Error while inserting rows in a table
Hi,
We have recently migrated from 9i to 10g. We have a scheduled job out our DB which first deletes all the rows from a table and then inserts them back by selecting rows from 5 tables. This table has a composite primary key based on 6 columns in it. In 9i, when i try to insert rows into the table after deleting all the rows from it, I am able to insert the data successfully . However, in 10g, when i try doing the same operation, it fails with the ORA error:
ORA-00001: unique constraint violated
The same query which works perfectly in 9i fails in 10g
If anybody has some ideas on how to resolve the same, kindly let me know.
Thanks in advance.Hi,
I was finally able to resolve the reason behind that error message and found it even more weird. The error was because I was using the substr function for extracting the characters 1-4 from a column which is 5 characters long. When i specify the query as:
select substr(column1, 1, 4)) from table1;
only the characters 1-3 are retrieved. Now if i change the query to select substr(column1, 1, 5)) from table1, in that case also only 3 characters are retrieved although i have specified the substr to start from 1 and read till 5 characters. Also, when i run the query:
select length(substr(column1, 1, 4)) from table1 or select length(substr(column1, 1, 5)) from table1
I get the answer as 3.
However, the most amazing part is that the query is working perfectly in 9i and is retrieving the data correctly i.e. from substr 1-4.
Can anyone suggest what the problem could be?
Thanks
Edited by: CrazyAnie on May 13, 2009 1:34 AM -
InfoPath form load rule is not checking all the rows in form library
Hi,
Requirement:
We have a form library named "HR Annual Review". In the InfoPath form we have two buttons "Save" and "Submit". User is allowed to Save multiple times and only once using Submit button. The file name of form library "HR
Annual Review" will be stored in the format “<username>+<mm>+<dd>+<yy>.xml”. Say for example, an user named Mike Walt submitted a form then the file name will be as “MikeWalt012314.xml”. If the same user (Mike Walt)
submits the form and tries to open the form for subsequent edit, then we need to show a view which has an error info saying “The Appraisal is already submitted for the current appraisal cycle”.
Solution we tried:
To achieve the above requirement, we tried using InfoPath Form Load and add a rule to check whether the combination of current user name and the year already exists in the filename column of the form library. But the rule we applied is not checking all the
rows in the form library. The rule is always checking the first row of the form library.
What we need:
We need the validation using InfoPath rule or some other way/solution to check whether the combination of current login username and current year file already exists in the form library.
Thanks in advance.
Srivignesh JHi Srivignesh,
Submit button Uses the Main Data connection to submit the data to the list. This is what you are using and naming the file in the format. You can create secondary data submit that will update the exiting item in the list. With this, you don't have to create
any rules to check all the rows which is also not possible in OOB InfoPath.
Once you have the two data connection, hide the toolbar from the form and display these two on the button. For The Submit button, apply the rule to hide the button if created by is not empty. For Save button, apply the rule to hide the button if Created
By is empty. This way, when a new form is created, you will see the Submit button, and when the user have to update the form, they will see Save button. Hope it help.s
Regards, Kapil ***Please mark answer as Helpful or Answered after consideration*** -
Not able to download all the rows to excel sheet from alv grid display
Hi experts,
I am not able to download all the rows which are displayed in alv grid display for some material numbers.
for some materials i am able to download, i used two ways to download 1) from icon(local file) on grid 2) menu list->export.
i checked in debugging till selecting the spread sheet pop up window, i am able to see all the data in internal table.
Can you suggest me what will be the problem....
thanks in advance,hi sandeep,
sorry for didnt specify clearly.
note: EX: "asaasdada in this sentence i said " this symbol is special character not the text.
building final internal table code
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
capid = p_capid
datuv = sy-datum
ehndl = '1'
mktls = 'X'
mehrs = 'X'
mmory = '1'
mtnrv = p_matnr
stlal = '1'
stpst = 0
svwvo = 'X'
werks = p_werks
vrsvo = 'X'
TABLES
stb = i_stb
EXCEPTIONS
alt_not_found = 1
call_invalid = 2
material_not_found = 3
missing_authorization = 4
no_bom_found = 5
no_plant_data = 6
no_suitable_bom_found = 7
conversion_error = 8
OTHERS = 9.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
i_stb1[] = i_stb[].
IF NOT i_stb1[] IS INITIAL.
SORT i_stb1 BY idnrk.
DELETE ADJACENT DUPLICATES FROM i_stb1 COMPARING idnrk.
SELECT bmatn ematn FROM ampl INTO TABLE i_ampl
FOR ALL ENTRIES IN i_stb1
WHERE bmatn = i_stb1-idnrk AND
datuv LE sy-datum AND
datub GE sy-datum.
SELECT
matnr
bwkey
verpr
stprs
bwprh
FROM mbew
INTO TABLE i_mbew
FOR ALL ENTRIES IN i_stb1
WHERE
matnr EQ i_stb1-idnrk AND
bwkey EQ i_stb1-werks.
IF NOT i_stb1[] IS INITIAL.
SELECT matnr werks beskz
dzeit webaz plifz
ekgrp
INTO TABLE i_marc
FROM marc
FOR ALL ENTRIES IN i_stb1
WHERE matnr = i_stb1-idnrk
AND werks = i_stb1-werks.
SORT i_marc BY matnr werks.
ENDIF.
CLEAR i_ekpo.
CLEAR i_vend.
IF NOT i_stb1[] IS INITIAL.
SELECT ebeln ebelp matnr werks loekz aedat
netpr peinh
INTO TABLE i_ekpo
FROM ekpo
FOR ALL ENTRIES IN i_stb1
WHERE matnr = i_stb1-idnrk
AND werks = i_stb1-werks.
SORT i_ekpo BY matnr ASCENDING
aedat DESCENDING
ebeln DESCENDING
ebelp DESCENDING.
IF NOT i_ekpo IS INITIAL.
SELECT k~ebeln k~lifnr l~name1
INTO TABLE i_vend
FROM ekko AS k INNER JOIN lfa1 AS l
ON k~lifnr EQ l~lifnr
FOR ALL ENTRIES IN i_ekpo
WHERE ebeln = i_ekpo-ebeln.
SORT i_vend BY ebeln.
ENDIF.
ENDIF.
ENDIF.
i_ampl1[] = i_ampl[].
IF NOT i_ampl1[] IS INITIAL.
SORT i_ampl1 BY ematn.
DELETE ADJACENT DUPLICATES FROM i_ampl1 COMPARING ematn.
SELECT matnr mfrpn mfrnr FROM mara INTO TABLE i_mara
FOR ALL ENTRIES IN i_ampl1
WHERE matnr = i_ampl1-ematn.
ENDIF.
SORT i_ampl BY bmatn.
IF NOT i_stb[] IS INITIAL.
SELECT stlty stlnr stlkn stpoz idnrk potx1 potx2
INTO TABLE i_stpo
FROM stpo
FOR ALL ENTRIES IN i_stb
WHERE stlty = i_stb-stlty
AND stlnr = i_stb-stlnr
AND stlkn = i_stb-stlkn
AND stpoz = i_stb-stpoz
AND idnrk = i_stb-idnrk.
SORT i_stpo BY stlty stlnr stlkn stpoz idnrk.
ENDIF.
LOOP AT i_stb INTO wa_stb.
READ TABLE i_marc INTO wa_marc
WITH KEY matnr = wa_stb-idnrk
werks = wa_stb-werks
BINARY SEARCH.
IF sy-subrc = 0.
wa_outtab-beskz = wa_marc-beskz.
wa_outtab-dzeit = wa_marc-dzeit.
wa_outtab-webaz = wa_marc-webaz.
wa_outtab-plifz = wa_marc-plifz.
wa_outtab-ekgrp = wa_marc-ekgrp.
ENDIF.
READ TABLE i_ekpo INTO wa_ekpo
WITH KEY matnr = wa_stb-idnrk.
IF sy-subrc = 0.
wa_outtab-netpr = wa_ekpo-netpr.
wa_outtab-peinh = wa_ekpo-peinh.
READ TABLE i_vend INTO wa_vend
WITH KEY ebeln = wa_ekpo-ebeln
BINARY SEARCH.
IF sy-subrc = 0.
wa_outtab-lifnr = wa_vend-lifnr.
wa_outtab-name_sup = wa_vend-name1.
ENDIF.
ENDIF.
READ TABLE i_stpo INTO wa_stpo
WITH KEY stlty = wa_stb-stlty
stlnr = wa_stb-stlnr
stlkn = wa_stb-stlkn
stpoz = wa_stb-stpoz
idnrk = wa_stb-idnrk
BINARY SEARCH.
IF sy-subrc = 0.
wa_outtab-potx1 = wa_stpo-potx1.
wa_outtab-potx2 = wa_stpo-potx2.
ENDIF.
READ TABLE i_mbew INTO wa_mbew
WITH KEY
matnr = wa_stb-idnrk
bwkey = wa_stb-werks.
IF sy-subrc IS INITIAL.
MOVE:
wa_mbew-verpr TO wa_outtab-verpr,
wa_mbew-stprs TO wa_outtab-stprs,
wa_mbew-bwprh TO wa_outtab-bwprh.
ENDIF.
wa_outtab-matnr = p_matnr.
wa_outtab-posnr = wa_stb-posnr.
wa_outtab-stufe = wa_stb-stufe.
wa_outtab-idnrk = wa_stb-idnrk.
wa_outtab-ojtxb = wa_stb-ojtxp.
wa_outtab-menge = wa_stb-menge.
wa_outtab-meins = wa_stb-meins.
MOVE: wa_stb-zzitem_draw_no TO wa_outtab-zzitem_draw_no.
IF wa_stb-upskz = 'X'.
SELECT * FROM stpu INTO TABLE i_stpu
WHERE stlty = wa_stb-stlty AND
stlnr = wa_stb-stlnr AND
stlkn = wa_stb-stlkn AND
stpoz = wa_stb-stpoz.
ENDIF.
LOOP AT i_stpu INTO wa_stpu.
wa_outtab-upmng = wa_stpu-upmng.
wa_outtab-ebort = wa_stpu-ebort.
wa_outtab-uposz = wa_stpu-uposz.
CONCATENATE v_ebort wa_stpu-ebort INTO v_ebort
SEPARATED BY space.
ENDLOOP.
MOVE strlen( v_ebort ) TO v_len.
MOVE: 0 TO x,
128 TO y.
DATA : lt_tab TYPE TABLE OF swastrtab.
DATA : ls_tab LIKE LINE OF lt_tab.
DATA : lv_ebort TYPE string.
CLEAR lv_ebort. CLEAR lt_tab.
MOVE v_ebort TO lv_ebort.
CALL FUNCTION 'SWA_STRING_SPLIT'
EXPORTING
input_string = lv_ebort
max_component_length = 128
TABLES
string_components = lt_tab
EXCEPTIONS
max_component_length_invalid = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF lt_tab[] IS NOT INITIAL.
LOOP AT lt_tab INTO ls_tab.
CLEAR lv_ebort.
MOVE: ls_tab-str TO lv_ebort.
CONDENSE lv_ebort.
MOVE lv_ebort TO wa_outtab-ebort.
APPEND wa_outtab TO i_outtab.
CLEAR:
wa_outtab-matnr,
wa_outtab-posnr,
wa_outtab-zzitem_draw_no,
wa_outtab-ojtxb,
wa_outtab-menge,
wa_outtab-meins,
wa_outtab-uposz,
wa_outtab-upmng,
wa_outtab-verpr,
wa_outtab-stprs,
wa_outtab-bwprh,
wa_outtab-lifnr,
wa_outtab-name_sup,
wa_outtab-potx1,
wa_outtab-potx2,
wa_outtab-netpr,
wa_outtab-peinh.
* wa_outtab-idnrk.
ENDLOOP.
ELSE.
APPEND wa_outtab TO i_outtab.
ENDIF.
CLEAR v_ebort.
CLEAR: wa_stpu.
REFRESH: i_stpu.
LOOP AT i_ampl INTO wa_ampl WHERE bmatn = wa_stb-idnrk.
READ TABLE i_mara INTO wa_mara WITH TABLE KEY matnr = wa_ampl-ematn.
IF sy-subrc = 0.
LOOP AT i_outtab INTO wa_outtab
WHERE
idnrk = wa_stb-idnrk AND
flag NE 'X'.
wa_outtab-mfrpn = wa_mara-mfrpn.
wa_outtab-mfrnr = wa_mara-mfrnr.
SELECT SINGLE name1 FROM lfa1 INTO wa_outtab-name1 WHERE lifnr = wa_mara-mfrnr.
MOVE 'X' TO wa_outtab-flag.
MODIFY i_outtab FROM wa_outtab
TRANSPORTING mfrpn mfrnr name1 flag.
EXIT.
ENDLOOP.
IF sy-subrc <> 0.
CLEAR:
wa_outtab-matnr,
wa_outtab-posnr,
wa_outtab-zzitem_draw_no,
wa_outtab-ojtxb,
wa_outtab-ebort,
* wa_outtab-idnrk,
wa_outtab-menge,
wa_outtab-meins,
wa_outtab-uposz,
wa_outtab-upmng,
wa_outtab-verpr,
wa_outtab-stprs,
wa_outtab-bwprh,
wa_outtab-lifnr,
wa_outtab-name_sup,
wa_outtab-potx1,
wa_outtab-potx2,
wa_outtab-netpr,
wa_outtab-peinh.
wa_outtab-mfrpn = wa_mara-mfrpn.
wa_outtab-mfrnr = wa_mara-mfrnr.
SELECT SINGLE name1 FROM lfa1 INTO wa_outtab-name1 WHERE lifnr = wa_mara-mfrnr.
APPEND wa_outtab TO i_outtab.
ENDIF.
ENDIF.
REFRESH i_stpu.
CLEAR i_stpu.
ENDLOOP. CLEAR: wa_matnr1, wa_mfrnr, wa_outtab.
ENDLOOP.
Edited by: srinivasareddy j on Mar 9, 2011 7:16 AM
Edited by: srinivasareddy j on Mar 9, 2011 7:20 AM -
How to list all properties in the default Toolkit
I would like to know what kinds of properties are stored in the default Toolkit (Toolkit.getDefaultToolkit()). I don't know how to list all of them. Toolkit class has a method getProperty(String key, String defaultValue), but without knowing a list of valid keys, this method is useless.
Any idea would be appreciated.Here is a little utility that I wrote to display all the UIDefaults that are returned from UIManager.getDefaults(). Perhaps this is what you are looking for?
import javax.swing.*;
import java.util.*;
public class DefaultsTable extends JTable {
public static void main(String args[]) {
JTable t = new DefaultsTable();
public DefaultsTable() {
super();
setModel(new MyTableModel());
JFrame jf = new JFrame("UI Defaults");
jf.addWindowListener(new WindowCloser());
jf.getContentPane().add(new JScrollPane(this));
jf.pack();
jf.show();
class MyTableModel extends javax.swing.table.AbstractTableModel {
UIDefaults uid;
Vector keys;
public MyTableModel() {
uid = UIManager.getDefaults();
keys = new Vector();
for (Enumeration e=uid.keys() ; e.hasMoreElements(); ) {
Object o = e.nextElement();
if (o instanceof String) {
keys.add(o);
Collections.sort(keys);
public int getRowCount() {
return keys.size();
public int getColumnCount() {
return 2;
public String getColumnName(int column) {
if (column == 0) {
return "KEY";
} else {
return "VALUE";
public Object getValueAt(int row, int column) {
Object key = keys.get(row);
if (column == 0) {
return key;
} else {
return uid.get(key);
class WindowCloser extends java.awt.event.WindowAdapter {
public void windowClosing(java.awt.event.WindowEvent we) {
System.exit(0);
} -
Runtime error when inserting rows in hrp1018 and hrt1018 tables
Hi All,
I have a requirement to insert row in hrp1018 and hrt1018 tables.These tables are interlinked.So, I have used FM 'RH_INSERT_INFTY'. The exact code which I have used is as follows.
*****************************************code***************************************************************
<< Please post only the relevant portion of the code >>
The runtime error which is coming is as follows:
Error analysis
An internal error in the database interface occurred during access to
the data of table "HRT1018 ".
The situation points to an internal error in the SAP software
or to an incorrect status of the respective work process.
For further analysis the SAP system log should be examined
(transaction SM21).
For a precise analysis of the error, you should supply
documents with as many details as possible.
Please let me know why this error is coming.I am not able to find out mistake in the FM and form used in the code.
Thanks in advance,
BBKrishna.
Edited by: Rob Burbank on Jun 9, 2009 1:31 PMI am adding the code once again.Please let me know why the error is coming up.
lv_mproj = 'BLDNG'.
wa_p1018-mandt = sy-mandt.
wa_p1018-otype = '9M'.
wa_p1018-objid = '50009650'.
wa_p1018-begda = '20090608'.
wa_p1018-endda = '99991231'.
wa_p1018-infty = '1018'.
wa_p1018-plvar = '01'.
wa_p1018-otype = '9M'.
wa_p1018-istat = '1'.
append wa_p1018 to it_p1018.
repid = sy-repid.
*Updating hrp1018 and hrt1018 tables
CALL FUNCTION 'RH_INSERT_INFTY'
EXPORTING
FCODE = 'INSE'
VTASK = 'D'
AUTHY = ' '
REPID = repid
FORM = 'FILL_TABS'
TABLES
INNNN = it_p1018
EXCEPTIONS
NO_AUTHORIZATION = 1
ERROR_DURING_INSERT = 2
REPID_FORM_INITIAL = 3
CORR_EXIT = 4
BEGDA_GREATER_ENDDA = 5
OTHERS = 6
IF SY-SUBRC <> 0.
CALL FUNCTION 'BALW_BAPIRETURN_GET'
EXPORTING
TYPE = SY-MSGTY
CL = sy-msgid
NUMBER = SY-MSGNO
PAR1 = ' '
PAR2 = ' '
PAR3 = ' '
PAR4 = ' '
LOG_NO = ' '
LOG_MSG_NO = ' '
IMPORTING
BAPIRETURN = return_rec
EXCEPTIONS
ONLY_2_CHAR_FOR_MESSAGE_ID = 1
OTHERS = 2
IF SY-SUBRC <> 0.
lv_mproj = text-011
ELSE.
ii_return = return_rec.
CONCATENATE ii_return-type '-' ii_return-message
INTO lv_err_msg SEPARATED BY SPACE.
ENDIF.
ENDIF.
*RHCD_TAB-PROZT
FORM fill_tabs TABLES ins_tab
USING ins_set ins_index.
DATA : BEGIN OF set.
INCLUDE STRUCTURE wplog.
DATA : END OF set.
DATA: BEGIN OF h_pt1018. "to initialize INS_TAB
INCLUDE STRUCTURE pt1018.
DATA: END OF h_pt1018.
REFRESH ins_tab.
set = ins_set.
CASE set-infty.
WHEN '1018'.
h_pt1018-posnr = lv_mproj.
h_pt1018-prozt = '100.00'.
IF NOT ( h_pt1018 IS INITIAL ).
CLEAR ins_tab.
ins_tab+36(8) = lv_mproj. "h_pt1018.
ins_tab+134(5) = '100.00'.
APPEND ins_tab.
ENDIF.
ENDCASE.
ENDFORM. -
Hi Experts,
Which part of the program in BCALV_EDIT04 is responsible for inserting a row in the grid? there is code to handle the data in the inserted line, to check the cells modified using the protocol, and event handler too. Can you please explain which fm or subroutine or step adds a new row to the grid when teh insert button in tool bar is pressed.
I also want some guidance reg the event handler thing. Is mouse click on the cell makes the methods of the protocol to be called? ( I am a java student.. learning SAP slowly.. can you please help me?)methods:
get_inserted_rows
exporting
inserted_rows type sflight_keys.
This part of the code is responsible for inserting rows in a grid. We call this method to insert records in the Grid.
There is no such function module implemented here. We implement the above functionality using <b>Classes and Methods</b>.
Just go to transaction SE24. You'll have a list of Classes in that transaction. Also, we can implement methods using those classes.
Regards,
Pavan.
Maybe you are looking for
-
My Iphone won't turn on at all.... I tried holding the sleep/wake button with the home button and it still won't turn on.... Also this happened while I was updating my Iphone..... After that happened I tried to check to find a way to turn on my Iphon
-
Hello. Newbie forum user here, although I have been lurking these forums for a while, and I am pretty good with LE-8. I am wondering if there are any Mac Mini/ Snow Leopard/ LE-8.0.2 users here? My 2006 iMac has a screen flicker, and the repair is al
-
Trying to build my own edit suite
What are the basic components to a good FCP system to broadcast master tape. I'm looking to get at least 10 bit quality at the cheapest price. I have G5 2.3 Dual processor 1 gig of RAM 1 media drive at 300 GIG (7200) 23 Cinema Display I know I need a
-
Hi Folks, 1.Will there be a SAP Notes even for Script too or SAP will provide a new script when there is a change in the layout,say for changes in J1INCERT-CIN. 2.We are currently working on 4.7c and we generally apply notes as and when an error aris
-
"Font Capture: Adobe Premiere Elements.exe - Bad Image" error message
I purchased Premiere Elements 11 last year and it has been working fine. But just put in a new HDD into my laptop and now I can't open Premiere. I uninstalled / reinstalled the program a couple times today with no improvement. The problem is alway