How to access each row value for a database item
On my form I have a database datablock that represents a table in my database.
5 rows are shown with a scroll bar that can be viewed to show the rest.
The user is able to change some of the Database Item values represented in this datablock for any row shown in the datablock.
I need to validate the correctness of the users change before allowing the database datablock to update the table in the database.
But a database item in a datablock will represent a value for every row in the table. So how do I access each row value for a database item separately. What is the PL/SQL syntax?
thanks,
michelle
In my situation it was better to use the loop instead
of a when validate trigger because...Well it was clearly not better to use a loop that doesn't work. I don't understand what you're not clear on about the item and record validation triggers. If you have a specific validation rule for a single field (such as a date that cannot be in the future), that would go in a When-Validate-Item trigger on the date item. If the user enters a future date, your code would display an error message and raise a failure. Raising a failure prevents the item from being marked as valid. Invalid items prevent the record from being inserted/updated. Sometimes you have a validation rule that requires looking at more than one item at a time, such as two items that must either both be NULL or NOT NULL. In that case, you could not use a When-Validate-Item trigger because you can't clear or populate both at once. So then you would use a When-Validate-Record at the block level and if one field is NULL and the other isn't, you would display an error message and raise a failure. Forms is very civil in this respect; we don't throw exceptions around here, but then I digress.
Similar Messages
-
Hi All,
This is the xml that needs to be processed.
<?xml version="1.0" encoding="ISO-8859-1"?>
<com.companyx>
<person>
<employee.data>
<employee.name>mrx</employee.name>
<employee.number>1001</employee.number>
</employee.data>
<employee.data>
<employee.name>mry</employee.name>
<employee.number>1002</employee.number>
</employee.data>
<employee.data>
<employee.name>mrz</employee.name>
<employee.number>1003</employee.number>
</employee.data>
<page>0</page>
</person>
</com.companyx>
Please tell me how to access the <employee.name> value of
the first <employee.data> element.
An early help is much appreciated.......
Thanks in Advance,
Vijay KarthikGive this a try... should do the trick
trace(myXML.person["employee.data"][0]["employee.name"]) -
How to set a default value for a page item
I am working with a facility table that has name and address information. The user can add contact name information on a separate page. Since the address for the facility and contact is usually the same, I want to add a default value for the contact address. The facility page is on 201 and the link to add a new contact row is on page 202. I showed in the default value :P201_street for the contact's address. But, when I run the page, the contact address field shows the :P201_street, not the actual facility address. What am I leaving out? Must be something obvious?!
Thanks very much.
JudyIn the default value, I showed: v('P201_STREET1') with the default value type of: PL/SQL Expression and received the following oracle error ==> Item default is not a PL/SQL expression. Use &ITEM syntax. The v('ITEM') syntax is not valid for item defaults. So I changed it to: &P201_STREET1 and got another oracle error , ERR-9132 error in PLSQL expression for item default code, item=P202_STREET1.
Any more suggestions? Thx.
Judy -
Hi, I would like to know how can i break the value for a row and column once i have converted the image to the array. I wanted to make some modification on the element of the array at a certain position. how can i do that?
At the moment (as per attachhment), the value of the new row and column will be inserted by the user. But now, I want to do some coding that will automatically insert the new value of the row and the column ( I will use the formula node for the programming). But the question now, I don't know how to split the row and the column. Is it the value of i in the 'for loop'? I've tried to link the 'i' to the input of the 'replace subset array icon' , but i'm unable to do it as i got some error.
Please help me!
For your information, I'm using LABView 7.0.Hi,
Thanks for your reply.Sorry for the confusion.
I manage to change the array element by changing the row and column value. But, what i want is to allow the program to change the array element at a specified row and column value, where the new value is generated automatically by the program.
Atatched is the diagram. I've detailed out the program . you may refer to the comments in the formula node. There are 2 arrays going into the loop. If a >3, then the program will switch to b, where if b =0, then the program will check on the value of the next element which is in the same row with b but in the next column. But if b =45, another set of checking will be done at a dufferent value of row and column.
I hope that I have made the problem clear. Sorry if it is still confusing.
Hope you can help me. Thank you!!!!
Attachments:
arrayrowncolumn2.JPG 64 KB -
How to have a unique value for each record??
could any 1 help me out in this...
I want to have a column name 'Order No' which should be unique.
How to generate a unique value for each record.??could any 1 help me out in this...
I want to have a column name 'Order No' which should be unique.
How to generate a unique value for each record.?? If you are using SQL PLUS to create the table try something like
this:
CREATE TABLE ORDER_TEST (
ORD_NO NUMBER (8) NOT NULL PRIMARY KEY,
ORDERDATE DATE,
CUSTID NUMBER (8) NOT NULL,
SHIPDATE DATE,
TOTAL NUMBER (8,2) CONSTRAINT TOTAL_ZERO CHECK
(TOTAL >= 0),
CONSTRAINT ORD_FOREIGN_KEY FOREIGN KEY (CUSTID) REFERENCES
CUSTOMER (CUSTID),
CONSTRAINT ORD_UNIQUE UNIQUE (ORD_NO)
-- or a simpler table example
DROP TABLE ORDER_TEST;
CREATE TABLE ORDER_TEST (
ORD_NO NUMBER (8),
ORDERDATE DATE,
CUSTID NUMBER (8) NOT NULL,
SHIPDATE DATE,
TOTAL NUMBER (8,2) CONSTRAINT TOTAL_ZERO CHECK
(TOTAL >= 0),
CONSTRAINT ORD_UNIQUE UNIQUE (ORD_NO)
note: ORD_NO can also be a primary key
If you are doing the INSERT during runtime from a form first
create a sequence in SQL PLUS to handle the ORD_NO value:
Create SEQUENCE ORDERNO_UNIQUEVAL_sqnc
START WITH 000001
NOMAXVALUE
NOCACHE;
and reference it as the ORD_NO parameter in your INSERT
statement:
ORDERNO_UNIQUEVAL_sqnc.NEXTVAL
note: to maintain data integrity you must use the sequence
everytime you insert a new order to table. To start a new
sequence drop the sequence and re-create it with whatever "START
WITH" value you want.
Hope this helps
Kevin -
How to trigger Condition Access sequence multiple times for one line item?
Hi,
We have a situation that, User will enter a Promo code (custom Field) in Sales order Header Additional data B tab to apply discount for line items.
Logic goes like this:
1. For each Promo code .. there may be multiple sale deals (Max 3 at this point).
2. For each line item (refering to tkomp table) we have to apply the sale deals (found above) the Condition access sequence will pick the right sale deal to apply the line item.
3.we have enhanced the tkomp structure to hold the sale deal.
Challenge:
As we have the standard logic to trigger the condition access sequence once for each line item, how we can apply 3 sale deals for single line item. Is there any logic or way to trigger the condition access sequence multiple times for single line item with diffrent sale deals. ~ There may be one valid sale deal for one line.
Functional team maintained diffrent access tables in the access sequence!!!
Fnds, please help me to get some clue
Thanks,
Sunil YHi Eduardo , Thanks for the response.
I am trying to explain again, this is the requirment given by the functional guys.
we have Promo code in Hearder Addtional data B tab --> Have to retrieve Sale Deals -->
At this point of time we may have at max 3 Sale Deals. we don't know which sale deal is vallied for which item we have in TKOMP. We have enhanced the TKOMP structure to hold one sale deal only (ZZPROMO).
We have enhanced USEREXIT_PRICING_PREPARE_TKOMP in RV60AFZZ to populate the value in TKOMP. Then it will go for diffrent access sequence to find the proper condition.
Our challenge is that, for each line item we have 3 sale deals, we don't know which one is valid for which line. but we have to apply the vallied sale Deal to the line items. Line item 10 may have Sale Deal 2 , item 20 may have Sale Deal3 and 30 may have sale deal 1.
We may have solution, by fixing some thing in the code or through config. But i am confused that is it a valid requirment?
Please help me ...
Thanks,
Sunil Y -
How to capture the row value in Advanced Table on OAF ?
Hi:
I was wondering, if anyone has any idea as to how to capture a row value on an advanced table on a OAF Page.
I am currently trying to capture the Expense Report Number ( first column) on the Track Expenses Reports table on the page /oracle/apps/ap/oie/webui/HomePG.
Any idea would be helpful ?
Thank YouHi,
856070 wrote:
This is what I am looking for :
Default Functionality
On the expenses home page there is a table for the Submitted expenses Table ( advanced table) with multiple Expense Number rows , which has a link associated with every expense number. When the user clicks the expense number link , EBS takes you to a more detail information page. ---As per default functionality :::whene ever user clicks on link it will takes u to details info page based expense no right.
---Check the property of the Destination URL of the ExpensionNumber column.
---In this property u can find the page path and paramam ex:pexpencenumber.
Customized functionality
I would like to capture the Expense number on the detailed page to call another application based on the expense number. The expense number on the
detailed page is not available on the request-parameter or on the VO.
I was thinking of capturing the ExpenseNumber when the user clicks it and save the expense number on a >transientvalue to retrieve it on the detaile dpage..but unable to do so.---Here get the paramereter pexpencenumber and pass it to another appilcation.
Regards
Meher Irk -
Hide row values for certain column in GRR2
Hi Experts,
Looking for some help in report painter. I need to hide row values for certain columns in report painter. The requirement is I have 5 columns in the report, the 5 th column is the sum of col 1 to 4 and in my row i have a formula setup to sum of values for each column, what i would like to do is for column 1 thru 4 i didnt want to display the total values in row total but i wanted to dispaly value for column 5 in row total. I have been trying my best with putting formula, but couldnt succeed.
Could somebody let me know is there an way to get this addressed.
Thanks in advance
Best Regards,
gjHow was it achieved ? Did you use sections for the columns for which rows needed to be hidden?
I have a smiliar issue of hiding certain rows for few columns. -
How to set the Default values for Info Objects in Data Selection of InfoPac
Hi All,
Flat file Extracion:
How to set the Default values for Info Objects in Data Selection Tab for Info Package
ex: Fiscal Year Variant Info Object having values 'K4' 'Y2' etc in Flat file
Initially default value(not constant) for this info Object value should be 'K4' in Info Package
If I set data selection value for this info object K4 it will retreive records with this selection only? how to handle
Rgds,
CVHi,
suppose as your ex. if you are having fiscalyear variant in the dataselection tab then specify K4 in the from column, again the ficalyearvariant row and click on insert duplicate row at the bottom . you will get another row . In that enter Y2 in the from column. now you can extract K4, y2 values .
haritha -
Urgent SQL question : how to flip vertical row values to horizontal ?
Hello, Oracle people !
I have an urgent SQL question : (simple for you)
using SELECT statement, how to convert vertical row values to horizontal ?
For example :
(Given result-set)
MANAGER COLUMN1 COLUMN2 COLUMN3
K. Smith ......1
K. Smith ...............1
K. Smith ........................1
(Needed result-set)
MANAGER COLUMN1 COLUMN2 COLUMN3
K. Smith ......1 .......1 .......1
I know you can, just don't remeber how and can't find exactly answer I'm looking for. Probably using some analytic SQL function (CAST OVER, PARTITION BY, etc.)
Please Help !!!
Thanx !
Steve.scott@ORA92> column vice_president format a30
scott@ORA92> SELECT f.VICE_PRESIDENT, A.DAYS_5, B.DAYS_10, C.DAYS_20, D.DAYS_30, E.DAYS_40
2 FROM (select t2.*,
3 row_number () over
4 (partition by vice_president
5 order by days_5, days_10, days_20, days_30, days_40) rn
6 from t2) f,
7 (SELECT T2.*,
8 row_number () over (partition by vice_president order by days_5) RN
9 FROM T2 WHERE DAYS_5 IS NOT NULL) A,
10 (SELECT T2.*,
11 row_number () over (partition by vice_president order by days_10) RN
12 FROM T2 WHERE DAYS_10 IS NOT NULL) B,
13 (SELECT T2.*,
14 row_number () over (partition by vice_president order by days_20) RN
15 FROM T2 WHERE DAYS_20 IS NOT NULL) C,
16 (SELECT T2.*,
17 row_number () over (partition by vice_president order by days_30) RN
18 FROM T2 WHERE DAYS_30 IS NOT NULL) D,
19 (SELECT T2.*,
20 row_number () over (partition by vice_president order by days_40) RN
21 FROM T2 WHERE DAYS_40 IS NOT NULL) E
22 WHERE f.VICE_PRESIDENT = A.VICE_PRESIDENT (+)
23 AND f.VICE_PRESIDENT = B.VICE_PRESIDENT (+)
24 AND f.VICE_PRESIDENT = C.VICE_PRESIDENT (+)
25 AND f.VICE_PRESIDENT = D.VICE_PRESIDENT (+)
26 AND f.VICE_PRESIDENT = E.VICE_PRESIDENT (+)
27 AND f.RN = A.RN (+)
28 AND f.RN = B.RN (+)
29 AND f.RN = C.RN (+)
30 AND f.RN = D.RN (+)
31 AND f.RN = E.RN (+)
32 and (a.days_5 is not null
33 or b.days_10 is not null
34 or c.days_20 is not null
35 or d.days_30 is not null
36 or e.days_40 is not null)
37 /
VICE_PRESIDENT DAYS_5 DAYS_10 DAYS_20 DAYS_30 DAYS_40
Fedele Mark 35473 35209
Fedele Mark 35479 35258
Schultz Christine 35700
South John 35253
Stack Kevin 35701 35604 35402 35115
Stack Kevin 35705 35635 35415 35156
Stack Kevin 35706 35642 35472 35295
Stack Kevin 35707 35666 35477
Stack Kevin 35667 35480
Stack Kevin 35686
Unknown 35817 35698 35596 35363 35006
Unknown 35702 35597 35365 35149
Unknown 35724 35599 35370 35155
Unknown 35600 35413 35344
Unknown 35601 35451 35345
Unknown 35602 35467
Unknown 35603 35468
Unknown 35607 35475
Unknown 35643 35508
Unknown 35644
Unknown 35669
Unknown 35684
Walmsley Brian 35725 35598
23 rows selected. -
How to assign the two values for constant (same key)
How to assign the two values for constant (same key)
CONSTANTS: c_pstkey TYPE bschl VALUE '09',
c_splgl TYPE umskz VALUE 'I',
c_buzei TYPE buzei VALUE '001'.
using BSCH1 again i have two asign vaue
can you just let me know
Edited by: sravya_se38 on Nov 23, 2010 12:14 AMYou can create a structure for that constant .
You can define in this way
CONSTANTS : BEGIN OF c_pstkey,
01 TYPE bschl VALUE '01',
02 TYPE bschl VALUE '02',
END OF c_pstkey.
and can access using...
c_pstkey-01, c_pstkey-02 ........ -
Hi Team,
R12 Instance :
Oracle Installed Base Agent User Responsibility --> Item Instances -->
Item Instance: Item Instances > View : Item Instance : xxxxx> Contracts : Item Instance : xxxxx> Service Contract: xxxxx>
In the above page there are two table regions.
Notes.
-------------------------------------Table Region---------------------------
Attachments
-------------------------------------Table Region---------------------------
--the attachments are shown using the query from the fnd_lobs and fnd_docs etc...
I want to know what are the document types are displayed in this page ?
--We developed a custom program to attach the attachments to the services contracts and the above seeded OAF page displays those ..as needed.
But after recent changes..the Attachments--> table region is not showing the attachments.
I have verified the query..and could not find any clue in that..
but i need some help if you guys can provide..
SELECT *
FROM
*(SELECT d.DOCUMENT_ID,*
d.DATATYPE_ID,
d.DATATYPE_NAME,
d.DESCRIPTION,
DECODE(d.FILE_NAME, NULL,
*(SELECT message_text*
FROM fnd_new_messages
WHERE message_name = 'FND_UNDEFINED'
AND application_id = 0
AND language_code = userenv('LANG')
*), d.FILE_NAME)FileName,*
d.MEDIA_ID,
d.CATEGORY_ID,
d.DM_NODE,
d.DM_FOLDER_PATH,
d.DM_TYPE,
d.DM_DOCUMENT_ID,
d.DM_VERSION_NUMBER,
ad.ATTACHED_DOCUMENT_ID,
ad.ENTITY_NAME,
ad.PK1_VALUE,
ad.PK2_VALUE,
ad.PK3_VALUE,
ad.PK4_VALUE,
ad.PK5_VALUE,
d.usage_type,
d.security_type,
d.security_id,
ad.category_id attachment_catgeory_id,
ad.status,
d.storage_type,
d.image_type,
d.START_DATE_ACTIVE,
d.END_DATE_ACTIVE,
d.REQUEST_ID,
d.PROGRAM_APPLICATION_ID,
d.PROGRAM_ID,
d.category_description,
d.publish_flag,
DECODE(ad.category_id, NULL, d.category_id, ad.category_id) category_id_query,
d.URL,
d.TITLE
FROM FND_DOCUMENTS_VL d,
FND_ATTACHED_DOCUMENTS ad
WHERE d.DOCUMENT_ID = ad.DOCUMENT_ID
*) QRSLT*
WHERE ((entity_name ='OKC_K_HEADERS_V'-- :1
AND pk1_value IN ( 600144,599046) --:2
AND category_id_query IN (1, :3, :4, :5, :6, :7) )
AND datatype_id IN (6,2,1,5)
AND (SECURITY_TYPE =4
OR PUBLISH_FLAG ='Y')))
--='000180931' -- 'ADP118'
The above seeded query is the one which is used for table region to retrieve the data..
how to know the dynamic values for this : AND category_id_query IN (1, :3, :4, :5, :6, :7) )
--SridharHi Patricia,
is it working for restricted key figure and calculated key figure ??
Note Number Fisc Period Opening Days
1 1 2
2 1 3
3 1 0
because I have other restriction, so I create two restricted key figure..
RK1 with restriction : Total Number of Note,
RK2 with restriction : Total Opening Days ,
then I Created a calculated key figure, average opening days in a period
CK1 = RK2 / RK1..
in this case, I am not sure if it will work or not..
for example, during RK2 calclation, it might be this 2+3 = 5, the line with 0 will be ignored..
during RK1 calcualtion, it might be 1 + 1 + 1 = 3. ---> Not sure in this case, the line with opening days 0 will be calculated or not..
could you please confirm.. -
SRM 4.0- How to set the default values for product type (01) only for SC
The radio button Service should not be visible.
Also for search help (e.g. search for internal products) where a search should only be possible for product type 01 (goods). The system should not display the product type and internally always search for goods only.
How to set the default values for product type (01) only for SC
We needs to use Search help BBPH_PRODUCT which having parameter PRODUCT_TYPE
Here we can set defalut value 01 but it is not correct one since same search help is using several places.
We need to limit the search help results only for SC.
Kindly help out me ASAP.The easiest way to set defautl values is to edit the batch class.
Goto the characteiristic and go to update values.
In here you probably have something like 0 - 100 as a spec range.
On the next line enter the default value within this range. At the end of the line, click in the box in the column labelled "D". This indicates the defautl value for the characteristic.
If you need to you can do this in the material classification view as well.
Just to be clear, these values will only show up in the batch record. You can not have defautl values in resutls recording screens.
FF -
How to display first row value returened from a query as checked as default in a report
How to display first row value returned from a query as checked as default in a report
Example
Parameter 1
Paramerter2
ABD
x(checked)
Test
DEF
JMG
MudassarHi Mudassar,
The issue is caused by the order in which the parameters appear in the report data tab can be difference between our report execution and it failing. In other words, “Parameter2” is execution before parameter “A” due to this issue. We can adjust the parameter’s
order to solve the issue.
If “Parameter2” is parameter “A”, we cannot use that expression. Because fields cannot be used in report parameter expression, if we want to display the first value returned from a query as default value, we have to fill the “Specify values” text box with
the specific value in Default Values dialog box.
Regards,
Alisa Tang
Alisa Tang
TechNet Community Support -
How to set a default value for particular field in SRM PO Portal
Dear Gurus,
Im desparetly need a help in web dynpro on how to set a default value for a field(flag) in PO header tab in portal.
My requirement is whenever the user press the edit button in PO screen,automatically a flag field should be set as abap_false.
I dont think this will handle in check badi or change badi. i tried this part in onbuttonpressed overwriteexit in CNR_VIEW views,i can get the function EDIT in debugging mode,but dont know how to proceed further.....
Many of them suggested to go with get attribute and set attribute for changing any particular field in web dynpro,but im not very familiar in using those get and set attributes.I request you people can give me sample code on how to identify my target field in the node and set the values while pressing EDIT Button.
Thanks in advance...
Regards,
SathishDear Laurent,
Thanks for your response,
But i searched in enhancement spot of WD_BADI, but couldnt get the exact way to change the coding,
My real requirement is, that particular flag should be enable and disable dynamically by checking a condition in my header values.So in that case i dont know how to proceed further to handle in the PO screen.
Kinly guide me how to get the particular node of field in the Purchase order screen.
Thanks you in advance,
Sorry for the inconvenience if any
Regards,
sathish
Maybe you are looking for
-
Payment Order generation through F110
Hi Dear one, Our business requirment is they want to run the payment order based on Vendor invoice due dates(eg:if one vendor has number of invoices we want to run the payment based on invoices due dates ) your intime reply is highly appreciated Tha
-
"The settings saved on this computer for the network"
Well, I was bored and I thought it would be cool to put a password on my wireless router, and it ended up messing up all 6 laptops in the house... This is probably a frequent question but I've looked it up and many people say the solution is to go to
-
How do I connect airport to my stereo?
All, Please forgive my NooB-ness, but I'm confused. I am a new iPhone user (can't believe it took this long) and I want to stream music wirelessly to my stereo system. The stereo has multiple speakers attached, but it is not attached to my TV. It
-
Iphone not recognizing .edu sites
for some reason, my iphone wont allow me to view my school email login page, nor my school's homepage. the website is https://azwestern.edu has anyone else had a similar issue or still having the same issue? if so, is there a way to fix it? somehow b
-
Problem about c++ compiler in intel computer
we used forte c++ compiler (version 6) under solaris on intel computer but I can't find the misalign or align debug option flags about the CC and when the program exit,there are errors reported:no map at the fault address stoped at the delete stateme