Creation of Non-Base tableblock in forms 9i
Hi
How do I create a non-base table block for my form.
For my application I dont need any tables to access ,but im just calling a webservice on clickign a button.
let me know
thanks
sirisha
create a new block with :
"Build a new data block manually"
Per default you have then a non-basetable-block. Do whatever you want with this block.
try it
Gerd
Similar Messages
-
What is non-base table when refered in forms ?
nullmoorthy kathirava (guest) wrote:
: What is non-base table when refered in forms ?
When you create a Block/form without any base table, ie., Form
containing controls which are not necessarily related to one
table is called non base table block/form.
Murugan
null -
Developer 2000 forms non-base columns
How do you query a table 2 against a text item based on another table 1. I want to be able to capture the text item as soon as I enter it in the text field, This text item value that I will be querying against wont be in the database yet (means form hasn't been saved yet). I want to be able to query the table 2 against the text item (for table 1) value that I had just entered and then populate some non-base table items based on table 2. All this is being done by a push button. Whats the criteria for post-querry trigger used to populate non-base items.?
Is it possible to populate non-base table items with some columns that are not foreign key of a table?
Thanks in advance...
nullIf I understand your question the text field you are entering a value in is a base table item based on table1, and after you enter it you then want to get data from table2 and populate a non base table item with that data.
Assuming that their is some relation between the value you are entering and the data you are going to retreive a validation trigger such as when_validate_item will do the job.
After you enter the value and tab out of the field the when_validate_item trigger will fire and retreive the data from table2.
A simple select statement in the trigger such as the following:
SELECT value1, value2,.....valueN
INTO :<block name>.<non base item name>
FROM table2
WHERE column = :<block name>.<item_name>
The post_query trigger is best used to populate non-base tabel items upon executing a query. Because you are not saving the value you are entering, but rather want the functionality to be perfomed "automaticlly" upon entering the value I would not suggest using post_query.
Yes it is possible to populate non-base table items with columns other than FKs.
Actually the majority of time I use non-base table items it is to display non FK data, such as full names, addresses, company names, etc.
Hope this helps. -
Tabular form with non base table field
I want to develop a tabular form with
1. A non-base table edit field to accept a value
2. Insert/update another table based on the input value
3. Also, computed field on each row based on other fields on the records (like post-query trigger in oracle forms at block level - for each row)
Thanks,
RachnaThanks for your reply.
Varad, I like the link you sent me. It has a lot of good information.
I created a process (under page processing) called "Update/Insert Process" that dosn't seem to be working.
Question, I created a manual tabular form with SQL Query and created a process (under page processing) called "Update/Insert Process", then I check for each record in the tabular form. If the old value <> new value then I update/insert in the new table.
Any step by step will be highly apprciated - to create process/validation etc.
Thanks,
Rachna -
Calculated non-base table field in a tabular form
I am struggling with creating a non-base table calculated field in a tabular form in ApEx 3.1
Can you point me in the right direction
I thought this would be fairly easy to do, but I cant work out how to do it
Requirements
1) Tabular Form based on a table with QTY and PRICE columns
2) TOTAL is a non-base table field, based on QTY * PRICE
3) If the Qty or Price changes, the TOTAL should be re-calculated
Example
QTY PRICE TOTAL
=== ===== =====
3 5 15
10 50 500
20 3 60
Environment
ApEx 3.1, Oracle 10 and Oracle 11 databases
I recommended to upgrade to a newer version of ApEx but the request was rejected so Im stuck with 3.1Thanks, but its not the solution that I am after
I am looking for a solution that will ...
1) not require the calculated value TOTAL to be stored in the table
and 2) re-calculate the TOTAL when I modify the dependent values (QTY and PRICE) before I save the changes to the database
I am still looking for a solution if anyone can help -
Query on Non-base-table column in form
Hi,
Does anyone have an example of code to allow users to query on non-base-table column from forms? For example, a personnel form displays a persons' name and department name. The form is based on PERSON table, which contains the department id, not the name. The form uses post-query to display the department name. When in query mode, the user wants to enter department name, and display the people in the department (still using this form, which is based on PERSON table.
Thanks!Try this:
For data block person set these properties as follows:
1.Set Query Data Source Name = "person , departments"
2.Set DML data target name = "person"
3.Set Where Clause to join i.e. condition "person.dno = departments.dno"
For filed department name set these properties as follows:
1.Data base item = "Yes"
2.Column Name = "departments.dname"
3.Query Only = "Yes"
4.Insert Allowed = "No"
5.Update Allowed= "No"
6.Keyboard Navigable = "No"
If you face ambiguous column name check for the same filed name exist on both tables and set column name for this filed to person.filed_name
Regards
null -
Sorting by non-base table fields in Oracle Forms
I have a form with a block that associated with a table.
There are several base table fields and several non-base table fields displaying information in this block.
I need to sort the data in this block by non-base table fields.
Is this possible without rewriting the form so that the block is not associated with a base table, and then manually populating the block?Hi mark
You could do the following
Create a database function on the server,
The function should return the value that you want to order by.
In your form update the ORDER BY clause to use the function
Example:
Assume you have a block base on the employee table,
and you want to order by the department name not the department no (The employee table only contains the department no)
The function will be
CREATE OR REPLACE FUNCTION "TEST_ORDER" (pDEPT_NO NUMBER) RETURN VARCHAR2 AS
DptName VARCHAR2(100);
BEGIN
SELECT DEPT_NAME
INTO DptName
FROM DEPT
WHERE DEPT_NO = pDEPT_NO;
RETURN DptName;
END;
The form block ORDER BY Clause will be
TEST_ORDER(DEPT_NO)
Hope this will solve your problem
Regards -
Insert records into non base table
Hi
I would like to insert records into a table when a button is clicked. The table is a non base table. I am trying to save records displayed in a form into a history table which is not part of the form. I am using the following code stored in a program unit then called when the button is pressed. It doesn't generate any error but the records are not inserted. Can anyone please help.
hist_id := 1;
cust_name := :CUSTOMER.cust_name;
loan_date := :LOAN.loan_date;
return_date := LOAN.return_date;
FORMS_DDL('INSERT INTO LOAN_HISTORY VALUES'||hist_id||','||cust_name||','||loan_date||','||return_date);Why do you need forms_ddl built in for a DML statement to be used in form?
U can directly use insert.
hist_id := 1;
cust_name := :CUSTOMER.cust_name;
loan_date := :LOAN.loan_date;
return_date := LOAN.return_date;
INSERT INTO LOAN_HISTORY VALUES (hist_id,cust_name,loan_date,return_date);
It should work perfectly. -
Order by on a non-base table field
I want to order by on a non-base table field in a form. Can any body help how to do this in a form.
ThanksRamesh,
I am not sure of ver 4.5. But in v6i, I did something similar.
What I did was :-
1. Based the Block's datasource on a stored procedure and
not TABLE
I'm not sure if it can be achieved in 4.5. First check if the block data source can be based on a stored procedure.
Here's a sample code of what i did :-
/* Description : Using a stored procedure as a block datasource.
Author : Shailender Mehta
Create Or Replace PACKAGE my_datasource Is
/* Shailender Mehta */
TYPE outrec is RECORD (comp_id tbgp_gl_detail.comp_id%Type
,cc_id tbgp_gl_detail.cc_id%Type
,journal_no tbgp_gl_detail.journal_no%Type
,account_code tbgp_gl_detail.account_code%Type
,debit_amt tbgp_gl_detail.debit_amt%Type
,credit_amt tbgp_gl_detail.credit_amt%Type
,sort_order Number(1)
TYPE outcur is REF CURSOR RETURN outrec;
PROCEDURE outquery (resultset In Out outcur
,p_journalno In Number);
END;
Create Or Replace PACKAGE BODY my_datasource IS
PROCEDURE outquery(resultset In Out outcur
,p_journalno In Number)
Is
BEGIN
OPEN resultset FOR
SELECT comp_id
, cc_id
, journal_no
, account_code
, debit_amt
, credit_amt
, Decode(substr(account_code,6,1), 'g', 1,
'd', 2,
'b', 3,
'h', 4,
'f', 5,
'a', 6,
'c', 7, 8) sort_order
FROM tbgp_gl_detail
WHERE journal_no = p_journalno
ORDER BY 7;
END;
END;
Use the Block Data Wizard, which will guide you step by step what next to be done.
In my example, I'm sorting the resultset by the 6th character of the string Account Code.
In your case, you could join the main table by the one used in your POST-Query in the stored procedure and sort the resultset.
- Shailender - -
Want to sort the records based on non-base table item
I have a multi-record block and I am trying to sort the data based on nbt item
I have a table called X which has x_type,x_code fields.
The table on which the block is created is Y. the table Y has x_type and y_desc as its fields
form layout is like below .the x_type is key field on which I have to query the records
and x_code is a non-base item in the form.I want to sort the records by X_code.
x_code y_desc
A xyz
c par
B lmn
my pre-query has this code
select x_type from y
where
x_type := x_type;
post-query has this code
select x_code from x
where x_type = :x_type;
It works fine in Enter-Queryand execute query mode. but when I am sorting the records on
nbt item x_code by SET-BLOCK-PROPERTY it doesn't do any thingHi Tony ,
I have created a function and in Pre-Query & have add this
SET_BLOCK_PROPERTY('b1', ORDER_BY, 'fn_get_code(x_type)');
and the function created is as below
Function fn_get_code (p_x_type in varchar2) return varchar2 is
v_code varchar2(40);
begin
select x_code into v_code
from X, Y
where X.x_type = Y.x_type
and y.x_type = p_x_type
return v_code;
end;
when I run the form and execute query it comes up with the error message
FRM-40505 and when I pressed display error it shows
SQL Statement error:
SELECT ROWID,X_TYPE,X_CODE
FROM Y order by fn_get_code(x_type)
Error:
"ORA-00904: "FN_GET_code": invalid identifier"
Is it that I need to create a function on the database?. As I have created function
in program unit section -
Sorting by non-base table fields - Is it possible?
I have a form with a block that associated with a table.
There are several base table fields and several non-base table fields displaying information in this block.
I need to sort the data in this block by non-base table fields.
Is this possible without rewriting the form so that the block is not associated with a base table, and then manually populating the block?This may help you.
Example
I have a customer_id in my base table, but I want the data ordered by customer_name which is from another table.
Answer
You need to create a function in the database with an associated
pragma to specify the level of purity of the function
WNDS (write no database state)
WNPS (write no package state)
PRAGMA RESTRICT_REFERENCES(fn_get_dname, WNDS, WNPS);
Function fn_get_dname (p_empno in number) return varchar2 is
v_dept_name varchar2(40);
begin
select dname into v_dept_name
from dept, emp
where dept.deptno = emp.deptno
and emp.emp_no = p_emp_no;
return v_dept_name;
end;
order by in a block based on the emp table (assuming you want a list of employees by department name)
order by fn_get_dname(empno), empno -
Can Shuttles be based non-base table ViewObjects with transient attributes
Hello,
Users have to select records from a data collection and a Shuttle looks most appropriate/nice for this purpose. We can introduce technical intersection tables in order to generate the Shuttles with JHeadstart 10g R3 if necessary, but there is no “functional” need to update any data in the database and therefore it would be practical if the ‘right’ side from a Shuttle can be based non-base table ViewObjects with transient attributes only. So, our interested is to know which records have been selected, i.e. moved to the right side from the Shuttle.
Hope that my question is clear enough.
Greetings,
MichaelMichael,
This cannot be generated out-of-the-box.
It is easiest to add the shuttle post-generation to your page, and then create a custom template to generate your custom shuttle into the page. I suggest you take a look at an example of a generated shuttle in a page, and the JHeadstart IntersectionShuttleBean class. You will see that the value property of <af:selectManyShuttle> points to the selectedKeys method in the JHeadstart Shuttle bean. In your case, you can create your own managed bean and bind the value property to your own method which will provide you access to the selected rows. The value property of the selectItem within the af:selectManyShuttle determines the property that is used to identify the selected row (which is the row key in case of Jhs-generated shuttles).
Steven Davelaar,
JHeadstart Team. -
Writing to a non-base level member
I don't believe it's possible to write directly to non-base level so I'm looking for alternatives. We are trying to simplify the budget input process in situations where we have an occupational code with multiple levels. For example, we have a Technical Associate position which can be a level I, II, II, or IV. Rather than input FTE's for each of the four levels, we want to input the total number of Technical Associate FTE's using a single occupational code.
I believe I will have to create a "dummy" base level ID for these postions and have the dummy ID along with the original 4 level ID's roll up to a new parent ID that encompasses all 5 ID's. Has anyone done something along these lines and have adivce or suggestions on how to proceed? I wanted to hear from others before I start making any changes.
Best RegardsHi Pablo,
I have created a sample excel for the idea. But I can't share xlsm file here. To reproduce the sample:
Create new blank excel workbook
Fill the data as described in this pic:
Open VB Editor (alt+F11) and paste this code in sheet1
'-------------------------------------------------------Code Start -------------
Dim cacheValue
Dim revertFlag As Boolean
Private Sub Worksheet_Change(ByVal target As Range)
Dim childNo As Long
Dim avgVal As Double
Dim iterator As Range
Dim lv_cache
If IsParentLevelValue(target) And revertFlag = False Then
revertFlag = True
lv_cache = cacheValue
Debug.Print "Assigning Cache : " & lv_cache
childNo = GetChildNumber(target, 8)
avgVal = target.Value / childNo
Set iterator = target
'MsgBox iterator.Value
Do While childNo > 0
Set iterator = iterator.Offset(1, 0)
'MsgBox "Target level = " & GetLevel(target) & ";Iterator = " & iterator.Row & "," & iterator.Column & " level " & GetLevel(iterator)
If GetLevel(iterator) = GetLevel(target) + 1 Then
If IsParentLevelValue(iterator) Then
cacheValue = iterator.Formula
revertFlag = False
End If
Debug.Print "Assigning Value " & avgVal & " to " & iterator.Address
iterator.Value = avgVal
revertFlag = True
childNo = childNo - 1
End If
Loop
Debug.Print "Assigning back formula " & lv_cache & " to " & target.Address
target.Formula = lv_cache
revertFlag = False
'target.Offset(1, 0).Select
End If
End Sub
Function GetLevel(target As Range)
GetLevel = Cells(target.Row, 7)
End Function
Private Sub Worksheet_SelectionChange(ByVal target As Range)
'If revertFlag Then
' revertFlag = False
'Else
cacheValue = target.Formula
Debug.Print "Selection : " & target.Address
'End If
End Sub
Function GetChildNumber(parentCell As Range, childIdentifierCol As Integer)
Dim lr_counter As Range
Dim lv_level As Long
lv_level = Cells(parentCell.Row, childIdentifierCol - 1).Value
'Debug.Print lv_level
GetChildNumber = 0
For i = parentCell.Row + 1 To 1000000
'Debug.Print Cells(i, childIdentifierCol - 1).Value
If Cells(i, childIdentifierCol - 1).Value = lv_level + 1 Then
GetChildNumber = GetChildNumber + 1
ElseIf Cells(i, childIdentifierCol).Value = "" Or Cells(i, childIdentifierCol - 1).Value = lv_level Then
Exit For
End If
Next
End Function
Function IsParentLevelValue(target As Range)
If target.Column >= 9 And target.Column <= 12 And Cells(target.Row, 8).Value = "Y" Then
IsParentLevelValue = True
Else
IsParentLevelValue = False
End If
End Function
'------------Code End----------------------------------
Then to test it, you can fill in value in Cells that are indicated as parent. (See Column H). Value can be filled into column I and J.
The solution is still rough, but you can get the idea of it
Hope this helps.
BR
Hendry
Edit:
1. This solution will only work if you check option "Calculate Parent in Hierarchies"
2. For the sample solution, make sure the formula for parent level is subtotal. i.e. column I8 should be =SUBTOTAL(9,I9:I10), and column I5 should be =SUBTOTAL(9,I6:I15)
Message was edited by: Hendry Kosasi -
BPC Logic Script: Copy from calculated members (non-base) to base members
Hi experts,
I want to copy some values from some calculated members to base members in the same dimension. It appears I have a hard time scoping the calculated members.
This is my C_ACCOUNT dimension:
And this is the COPYCALC.LGF script I am running:
LGX:
*XDIM_MEMBERSET C_ACCOUNT = 450
*WHEN C_ACCOUNT
*IS 450
*REC( EXPRESSION = %VALUE%, C_ACCOUNT = 50)
*ENDWHEN
LOG:
LOG BEGIN TIME:2014-02-26 17:21:12
FILE:\ROOT\WEBFOLDERS\STEP_UNIT_TEST \ADMINAPP\BUDGET_CASH\TEST.LGF
USER:KAROLISB
APPSET:STEP_UNIT_TEST
APPLICATION:BUDGET_CASH
[INFO] GET_DIM_LIST(): I_APPL_ID="BUDGET_CASH", #dimensions=16
AA_NUMBER,AUDITTRAIL,BUDGET_OBJECT,BUDGET_TYPE,CATEGORY,COFOG,CURRENCY,C_ACCOUNT,C_ACCOUNT_DT,ENTITY,FLOW,GRANTS,MEASURES,TIME,TIME_DT,VERSION
#dim_memberset=4
CATEGORY:RES,1 in total.
CURRENCY:LC,1 in total.
TIME:2012,1 in total.
C_ACCOUNT:450,1 in total.
SCRIPT RUNNING TIME IN TOTAL:1.00 s.
LOG END TIME:2014-02-26 17:21:12
My model structure:
So as you can see I am trying to copy from account 450 (which is non base) to account 50 ( which is base member). Also you can see that in the previous example no record was generated.
Whereas, if I replace the account 450 with 4500 I get record generated in order:
LGX:
*XDIM_MEMBERSET C_ACCOUNT = 4500
*WHEN C_ACCOUNT
*IS 4500
*REC( EXPRESSION = %VALUE%, C_ACCOUNT = 50)
*ENDWHEN
LOG:
LOG BEGIN TIME:2014-02-26 18:26:26
FILE:\ROOT\WEBFOLDERS\STEP_UNIT_TEST \ADMINAPP\BUDGET_CASH\TEST.LGF
USER:KAROLISB
APPSET:STEP_UNIT_TEST
APPLICATION:BUDGET_CASH
[INFO] GET_DIM_LIST(): I_APPL_ID="BUDGET_CASH", #dimensions=16
AA_NUMBER,AUDITTRAIL,BUDGET_OBJECT,BUDGET_TYPE,CATEGORY,COFOG,CURRENCY,C_ACCOUNT,C_ACCOUNT_DT,ENTITY,FLOW,GRANTS,MEASURES,TIME,TIME_DT,VERSION
#dim_memberset=4
CATEGORY:RES,1 in total.
CURRENCY:LC,1 in total.
TIME:2012,1 in total.
C_ACCOUNT:4500,1 in total.
REC :%VALUE%
CALCULATION BEGIN:
QUERY PROCESSING DATA
QUERY TIME : 0.00 ms. 1 RECORDS QUERIED OUT.
QUERY REFERENCE DATA
CALCULATION TIME IN TOTAL :0.00 ms.
1 RECORDS ARE GENERATED.
CALCULATION END.
ENDWHEN ACCUMULATION: 1 RECORDS ARE GENERATED.
DATA TO WRITE BACK:
AA_NUMBER AUDITTRAIL BUDGET_OBJECT BUDGET_TYPE CATEGORY COFOG CURRENCY C_ACCOUNT C_ACCOUNT_DT ENTITY FLOW GRANTS TIME TIME_DT VERSION SIGNEDDATA
AA_NONE LIM NONE 10 RES FA_NONE LC 50 CAD_NONE A00 F99_1 NONE 2012 TD_NONE CURRENT 222.00
1 RECORDS HAVE BEEN WRITTEN BACK.
WRITING TIME :1.00 ms
Why can I not copy value from 450 ? How do I solve this problem ?
PS: currently I am testing this as a DM package run script but in the future I would like to make it a Default.lgf functionality.
I am working on:
BPC 10 SP5 for NW, calculation engine ABAP, BW 7.4Sorry to keep you in darkness. My code has developed since I have started this thread:
*SELECT(%ADMISSIBLE%, "[ID]", C_ACCOUNT, " [THIERARCHY]<>'' AND [ACCTYPE]<>INC ") // DEFINE THE SET OF REAL(ACTUALY EXISTING), NON-REVENUE AND NOT ANCIENT CASH ACCOUNTS HERE.
*SELECT(%INADMISSIBLE%, "[ID]", C_ACCOUNT, " [ID] <> %ADMISSIBLE% ")
*SELECT(%L1%, [ID], C_ACCOUNT, "[ID] = %C_ACCOUNT_SET%") // DEFINE BASE LEVEL ACCOUNTS
*SELECT(%L2%, "[THIERARCHY]",C_ACCOUNT, "[ID] = %L1% ") // DEFINE FIRST(COUNTING FROM BASE) LEVEL PARENTS
*SELECT(%L3%, "[THIERARCHY]",C_ACCOUNT, "[ID] = %L2% ") // DEFINE SECOND(COUNTING FROM BASE) LEVEL PARENTS
*SELECT(%L4%, "[THIERARCHY]",C_ACCOUNT, "[ID] = %L3% ")
*SELECT(%L5%, "[THIERARCHY]",C_ACCOUNT, "[ID] = %L4% ")
*SELECT(%L6%, "[THIERARCHY]",C_ACCOUNT, "[ID] = %L5% ")
*SELECT(%LALL%, "[ID]", C_ACCOUNT, "[ID] = %L1%,%L2%,%L3%,%L4%,%L5%,%L6%") //UNION OF ALL LEVELS
*XDIM_MEMBERSET AUDITTRAIL = INPUT
*XDIM_MEMBERSET VERSION = CURRENT
*XDIM_MEMBERSET AA_NUMBER = AA_NONE
*XDIM_MEMBERSET TIME_DT = TD_NONE
*XDIM_MEMBERSET C_ACCOUNT_DT = CAD_NONE
*XDIM_MEMBERSET C_ACCOUNT = %INADMISSIBLE% //SCOPE LEAVES ALL POTENTIAL DESTINATIONS FOR MEMBERS IN %PARS%
*FOR %A% = %PARS% //LOOP OVER ALL ADMISSIBLE PARENTS
*WHEN C_ACCOUNT
*IS L_C_%A%
*REC( EXPRESSION = [C_ACCOUNT].[%A%], C_ACCOUNT = L_C_%A%) //SUM UP THE VALUES OF LEAVES AND WRITE THE SUM TO DESTINATION ACCOUNT
*ENDWHEN
*NEXT
screen shot of part of member table for C_ACCOUNT:
continuation in next reply (I have problems with my text editor) -
APD creation on non cumulative
Hi,
what is procedure for APD creation on non cumulative. pls help me how to create the APD.
Thanks in advance..
Thanks
Madan SHi Madan,
I dont think that you can directly access the non cumulative info provider even you try to access through the APD. So you better 1st create Bex query based on that info provider. (Ex : 0IC_C03 Info cube)
then access that query from the APD as a source
Please refer this for more understanding:
Step by step Analysis Process Design
you can add many data source like this and connect those results of the data sources through connection.
here you can do any transformation available on APD.
and finally drag a data target to load the final result of your transformation
hope this will help for you.
Regards
Venura
Maybe you are looking for
-
Can i use imessage app on galaxy exhilarate w/ at
can i use imessage with my gramma who has a different kind of phone service ? She has a samsung galaxy exhilarate with a tt .
-
Runtime error in EP 6.0 SP 2 after installing UWL
Hi there I installed UWL on a EP 6.0 SP2. I followed the instructions for Note 688830 (installation of UWL without KM) When i logon to the portal as Super Administrator i can see the UWL link. But when i use this link i get 'Unable to perform the req
-
Copy files with same name. Can't overwrite it.
I need to periodically generate and copy a .txt file into a folder. The name of the files, when generated, is the same. How can I copy it without overwriting previous files that already are in the folder.
-
Wireless printer losing connection hourly.
I currently have a Cisco 4400 wireless controller running 7.0.116. We use Cisco 1262, 1242 and 1210 Access Points. I am fairly new to all this. Our issue is that we have a wireless laser device that runs fine for about 1 hour and then loses connecti
-
Impressions of new Apple wired keyboard?
I'm very seriously considering picking up the new wired keyboard. Planning on wired as it is for a desktop Mac and I prefer an extended keyboard. The main reason I'm considering the new keyboard is that I am sick of cleaning all of the crap out of th