How to get an ID for an Entity in ADF
Hi,
I am trying to write a simple swing form with ADF and here is my point:
1- Senario
I have three fields, ID, LastName and FirstName on the form. The ID
is disabled and it must get its value from the application when we
want to insert a new record. I do not want to use insert triggers or
sequence generators or stored procedures, So i have to read the max id
and increment it by one from inside the application.
2- Questions
- Where is the appropriate position for getting the max Id? Entity
object? View Object? Application Module or Swing form?
- ADF gives us the create() method in Entity object and it defines
it for having initial values for attributes, like what i need, but the
question is how do i have to read the max id from inside this method?
Do i have to execute a select statement? if so how? do i have to
define another view object wich reads the max id? and in this case,
how do i have to access this view object from inside another Entity
Object? Is it generaly OK to access a view object from inside an
Entity object?
Best Regards,
Alireza Vali
Alireza,
This is a really, really, really, really, really (really) really bad idea.
Using the max(id) + 1 trick:
1). WILL get you duplicates (think what happens when two people do this at roughly the same time.
2). Is horrible for scalability in general
3). If you use table locking to get around issue #1 is truly atrociously horrible for scalability.
[url http://forums.oracle.com/forums/thread.jspa?messageID=1901057]here is a previous discussion on this topic.
[url http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:3379873654938]here is an AskTom article on this topic (note the title of that post is "Locking Problems" - should give you a hint as to whether this is a great idea or not).
Sorry for refusing to answer your question directly, but the best answer is here:
I do not want to use insert triggers or
sequence generators or stored procedures, yes, you do So i have to read the max id
and increment it by one from inside the application. no you don't
This is a really bad idea.
Best,
john
Similar Messages
-
How to get Open Balance for the year and Total Ending Balance?
For a given account, how to get Open Balance for the year (Cumulative Ending Balance) and Total Ending Balance (Cumulative Ending Balance)?
Is there any function module available? or should I read from some tables? Please advice.Hello Paul,
You could try calling one of the following BAPIs - see which one meets your requirement. They are documented well so shouldn't be a problem finding out the correct one for your requirements.
BAPI_GL_GETGLACCBALANCE
BAPI_GL_GETGLACCCURRENTBALANCE
BAPI_GL_ACC_GETBALANCE
BAPI_GL_ACC_GETCURRENTBALANCE
BAPI_GL_ACC_GETPERIODBALANCES
BAPI_COND_VAL_DECRE_BALANCES
You might have to put in some of your own logic after the BAPI call to get what you want.
Hope this helps,
Cheers,
Sougata.
p.s. Also look at FM FAGL_GET_ACCOUNT_BALANCE
Edited by: Sougata Chatterjee on May 7, 2008 11:47 AM -
A^b = n ,How to get the value for a ?
a^b = n ===> n = Math.pow(a,b)
How to get the value for a ?
dose Java have API to get the value for a ?
Thanks for help~~~a^b = n
=>
a = n^(1/b)
So,
a = Math.pow(n,1.0/b) -
How to Get Missing Dates for Each Support Ticket In My Query?
Hello -
I'm really baffled as to how to get missing dates for each support ticket in my query. I did a search for this and found several CTE's however they only provide ways to find missing dates in a date table rather than missing dates for another column
in a table. Let me explain a bit further here -
I have a query which has a list of support tickets for the month of January. Each support ticket is supposed to be updated daily by a support rep, however that isn't happening so the business wants to know for each ticket which dates have NOT been
updated. So, for example, I might have support ticket 44BS which was updated on 2014-01-01, 2014-01-05, 2014-01-07. Each time the ticket is updated a new row is inserted into the table. I need a query which will return the missing dates per
each support ticket.
I should also add that I DO NOT have any sort of admin nor write permissions to the database...none at all. My team has tried and they won't give 'em. So proposing a function or storable solution will not work. I'm stuck with doing everything
in a query.
I'll try and provide some sample data as an example -
CREATE TABLE #Tickets
TicketNo VARCHAR(4)
,DateUpdated DATE
INSERT INTO #Tickets VALUES ('44BS', '2014-01-01')
INSERT INTO #Tickets VALUES ('44BS', '2014-01-05')
INSERT INTO #Tickets VALUES ('44BS', '2014-01-07')
INSERT INTO #Tickets VALUES ('32VT', '2014-01-03')
INSERT INTO #Tickets VALUES ('32VT', '2014-01-09')
INSERT INTO #Tickets VALUES ('32VT', '2014-01-11')
So for ticket 44BS, I need to return the missing dates between January 1st and January 5th, again between January 5th and January 7th. A set-based solution would be best.
I'm sure this is easier than i'm making it. However, after playing around for a couple of hours my head hurts and I need sleep. If anyone can help, you'd be a job-saver :)
Thanks!!CREATE TABLE #Tickets (
TicketNo VARCHAR(4)
,DateUpdated DATETIME
GO
INSERT INTO #Tickets
VALUES (
'44BS'
,'2014-01-01'
INSERT INTO #Tickets
VALUES (
'44BS'
,'2014-01-05'
INSERT INTO #Tickets
VALUES (
'44BS'
,'2014-01-07'
INSERT INTO #Tickets
VALUES (
'32VT'
,'2014-01-03'
INSERT INTO #Tickets
VALUES (
'32VT'
,'2014-01-09'
INSERT INTO #Tickets
VALUES (
'32VT'
,'2014-01-11'
GO
GO
SELECT *
FROM #Tickets
GO
GO
CREATE TABLE #tempDist (
NRow INT
,TicketNo VARCHAR(4)
,MinDate DATETIME
,MaxDate DATETIME
GO
CREATE TABLE #tempUnUserdDate (
TicketNo VARCHAR(4)
,MissDate DATETIME
GO
INSERT INTO #tempDist
SELECT Row_Number() OVER (
ORDER BY TicketNo
) AS NROw
,TicketNo
,Min(DateUpdated) AS MinDate
,MAx(DateUpdated) AS MaxDate
FROM #Tickets
GROUP BY TicketNo
SELECT *
FROM #tempDist
GO
-- Get the number of rows in the looping table
DECLARE @RowCount INT
SET @RowCount = (
SELECT COUNT(TicketNo)
FROM #tempDist
-- Declare an iterator
DECLARE @I INT
-- Initialize the iterator
SET @I = 1
-- Loop through the rows of a table @myTable
WHILE (@I <= @RowCount)
BEGIN
-- Declare variables to hold the data which we get after looping each record
DECLARE @MyDate DATETIME
DECLARE @TicketNo VARCHAR(50)
,@MinDate DATETIME
,@MaxDate DATETIME
-- Get the data from table and set to variables
SELECT @TicketNo = TicketNo
,@MinDate = MinDate
,@MaxDate = MaxDate
FROM #tempDist
WHERE NRow = @I
SET @MyDate = @MinDate
WHILE @MaxDate > @MyDate
BEGIN
IF NOT EXISTS (
SELECT *
FROM #Tickets
WHERE TicketNo = @TicketNo
AND DateUpdated = @MyDate
BEGIN
INSERT INTO #tempUnUserdDate
VALUES (
@TicketNo
,@MyDate
END
SET @MyDate = dateadd(d, 1, @MyDate)
END
SET @I = @I + 1
END
GO
SELECT *
FROM #tempUnUserdDate
GO
GO
DROP TABLE #tickets
GO
DROP TABLE #tempDist
GO
DROP TABLE #tempUnUserdDate
Thanks,
Shridhar J Joshi
<If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'> -
How to get the date for the first monday of each month
Dear Members,
How to get the date for the first monday of each month.
I have written the following code
SELECT decode (to_char(trunc(sysdate+30 ,'MM'),'DAY'),'MONDAY ',trunc(sysdate+30 ,'MM'),NEXT_DAY(trunc(sysdate+30 ,'MM'), 'MON')) FROM DUAL
But it look bith complex.
Abhishek
Edited by: 9999999 on Mar 8, 2013 4:30 AMUse IW format - it will make solution NLS independent. And all you need is truncate 7<sup>th</sup> day of each month using IW:
select sysdate current_date,
trunc(trunc(sysdate,'mm') + 6,'iw') first_monday_the_month
from dual
CURRENT_D FIRST_MON
08-MAR-13 04-MAR-13
SQL> Below is list of first monday of the month for this year:
with t as(
select add_months(date '2013-1-1',level-1) dt
from dual
connect by level <= 12
select dt first_of_the_month,
trunc(dt + 6,'iw') first_monday_the_month
from t
FIRST_OF_ FIRST_MON
01-JAN-13 07-JAN-13
01-FEB-13 04-FEB-13
01-MAR-13 04-MAR-13
01-APR-13 01-APR-13
01-MAY-13 06-MAY-13
01-JUN-13 03-JUN-13
01-JUL-13 01-JUL-13
01-AUG-13 05-AUG-13
01-SEP-13 02-SEP-13
01-OCT-13 07-OCT-13
01-NOV-13 04-NOV-13
FIRST_OF_ FIRST_MON
01-DEC-13 02-DEC-13
12 rows selected.
SQL> SY. -
Qry:How to get different price for each price list (variable area) in order
1-How to get different price for each price list (variable area) in order for sale. for the opportunity to display and select multiple prices.
2- I add a location store from a table in line item and I want to see this area in order,.
I 'm created 2 field location(item line and order), 1 table location
I tried this for exemple : select $ [userfieldlocation.OITW]Thanks Suda for your answer,
the Formatted Search for prices is OK, but for the Item locations in warehouse this is not so simple,
I must have several (at least 2) locations for the item in the Warehouse and a track of this location and search possibilities.
read carefully and imagine how (Management warehouse locations)
I added a user table '@Location' who linked to a user field 'U_Location in Item master data --> lnventory data line and an ather user field 'U_Location' in sales order
I met the value of location in the table (list of locations for any warehouse), I select the location of each item while receiving merchandise in the user field of inventory data line (Item M data) and this value appears in the sales order 'U_Location' user field ( only the location value in the default warehouse for this Item)
or
create an user field 'location' in Good receipt PO to fill it while receiving merchandise that appears in the sales order to give possibility to find/select the location of the item at this order and in Item master data
I think we will use all these tables
@LOCATION
PDN1
OITM
OITW
OWHS
RDR1
Juste a another question : where you found this and What is: ' 38.1.0 '
Is it in document (System information):Item=38 Pane=1 ??
Thanks,
Ouchen -
How to get column names for a specific view in the scheme?
how to get column names for a specific view in the scheme?
TIA
Don't have DD on the wall anymore....or this?
SQL> select text from ALL_VIEWS
2 where VIEW_NAME
3 ='EMP_VIEW';
TEXT
SELECT empno,ename FROM EMP
WHERE empno=10 -
How to get Alerts mail for adapter engine errors in SAP PI 7.0
Hi Friends,
I configured Alerts in PI 7.0. with the help of t-code u2018ALRTCATDEF and created a new alert catergory.
In container tab i have mentioned all give below elements.
SXMS_MSG_GUID, SXMS_RULE_NAME, SXMS_ERROR_CAT, SXMS_ERROR_CODE, SXMS_FROM_PARTY, SXMS_FROM_SERVICE, SXMS_FROM_NAMESPACE, SXMS_FROM_INTERFACE, SXMS_TO_PARTY, SXMS_TO_SERVICE, SXMS_TO_NAMESPACE,SXMS_TO_INTERFACE
I am getting alerts when I manually test the alerts configurations by running the report u2018RSALERTTESTu2019.
I am getting mail as :
Alert ID: ##00009##
Dear Administrator,
This is with respect to XI Scenario. During processing of XML file from ECC or XYZ Server, Following error has been occured:
Message ID:
Interface:
NOTE: To check the file name, go to SXMB_MONI and search for above message ID.
Double click on that message ID and click on error in left hand tree.
Please take appropriate action in co-ordination with respective functional and BASIS consultant.
But When I am getting a error , I am not getting an alert mail. Right now iam doing in XI Development.
I am not getting an Alert mail , when my message is in status of : System Error . Error catergory is : XI_J2EE_ADAPTER_JDBC.
Kindly tell how to get alert mail for error catergory : XI_J2EE_ADAPTER_JDBC and in Adapter engine errors.
How to get alert mail when my message is failed with any reason in Adapter engine.
Waiting for quick replay. Please help me out.
Regards,
Ahmed.Hi thanks for quick reply.
As per your given link : http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/14877. [original link is broken]
I have done all these steps. But still little problem.
as per link he is getting Error description , error message id , alert rule..
In my case I am not getting these information. when my messages failed. When I am doing manully testing the alert getting an mail as :
Alert ID: ##00009##
Dear Administrator,
This is with respect to XI Scenario. During processing of XML file from ECC or XYZ Server, Following error has been occured:
Message ID:
Interface:
NOTE: To check the file name, go to SXMB_MONI and search for above message ID.
Double click on that message ID and click on error in left hand tree.
Please take appropriate action in co-ordination with respective functional and BASIS consultant.
Is it okay the body of mail??.
I am not getting alert mail when my messages failed in adapter engine and Integration Engine.
Ex my message is failed in AE:as below.
My messages flow as : SAP --> XI --> DB.
Messages is success (in ECC moni)> XI moni also success> XI Adapter engine getting error as (Status: System Error) and (Error Category : XI_J2EE_ADAPTER_JDBC).
Regards,
Ahmed. -
How to get the ItemKey for a Workflow triggered by an event in Oracle Apps
Hello,
I have added a custom sub process to the seeded "OM Order Header" workflow. The process sends a notification. There are a few attributes in the body of the message tied to this notification, to which I am trying to assign values to using the syntax:
SetItemAttrText (itemtype, itemkey, attrname, attrvalue).
I have the internal names for the item type and attribute name, but don't know how to get the value for the item key. I understand the item key is supposed to be unique for each item type and is automatically generated by the workflow engine when the work flow fires. Is there a built-in function or some means to get this value?
Regards,
SmitaHave you tried to query WF_ITEMS? -- http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=WF_ITEMS&c_owner=APPLSYS&c_type=TABLE
bde_wf_item.sql - Runtime Data of a Single Workflow Item [ID 187071.1]
Thanks,
Hussein -
How to get the order for these decoration​s?
hello,
I want to programatically resize all the controls, indicators and decorations on the front panel.
I am getting the references of all the controls and indicators and able to resize them, as each n every control and indicator has a tabbing order set to it.
I am also getting the references of all the decoration used on the front panel but not able to get the order.
how to get the order for these decorations?The order of the decorations is the same as the back to front order. So you
can change it by bringing decorations to front, or sending them to the back.
It has been suggested many times that decorations should have labels as well
as controls, but at the moment there is no way to tell which reference
belongs to which decoration (besides position and order).
Regards,
Wiebe. -
How to get wage type for every time record
Hi Pros,
I am using DS 0CA_TS_IS_1, it includes report time type (0REPTT), but not have wage type. in CATSDB, I fied fields for attendance/absence type and wage type. but not every time record has wage type. can you please tell me how to get wage type for every time record? what is relation between reporting time type, attendance/absence type and wage typs?Hello,
Can you talk to your HR/T&E functional consultant if they populate these values in CATSDB table using standard way or if there are custom fields that are in CATSDB OR any other table which can be used to meed the requirements
Thanks
Abhishek Shanbhigue -
How to get a reference for custom controller
Hi All,
I am working with the custom controller but i dont know how to call the functionality of custom controller into a view controller.For accessing component controller functionality we have a attribute wd_comp_controller in view controller.Like this how to get a refernce for the custom controller.
Thanks in Advance.hi,
Lets say view1 has the event ONACTIONNAVIGATE and you want to call a method 'start_navigation' in the custom controller named 'navigation'.
Use the following code.
METHOD onactionnavigate .
DATA lo_navigation_controller TYPE REF TO ig_navigation.
lo_navigation_controller = wd_this->get_navigation_ctr( ).
CASE navigation_type.
WHEN 'BACKWARD'.
lo_navigation_controller->start_navigation( if_fitv_fpm_api=>gc_navigate_backward ).
WHEN 'FORWARD'.
lo_navigation_controller->start_navigation( if_fitv_fpm_api=>gc_navigate_forward ).
ENDCASE.
ENDMETHOD.
Thanks,
Rajkumar.S -
How to get F4 help for Standard Text Key of a operation based on Order type
Hi Experts,
How to get F4 help for Standard Text Key (STK) of a operation based on Order type entered in selection screen. The F4 help should give the STK of related order type. At the same time the F4 help for Task Types based on Notification type. How to acheive the above two. Please provide the table names or any search help name if exists or Function modules...
Thanks in Advance.
Regads,
BujjiHi Guys,
Any help on this...
Regards,
Bujji
Edited by: Bujji on Dec 22, 2008 12:42 PM
Edited by: Bujji on Jan 5, 2009 2:00 PM -
How to get built.xml for ear file in jdeveloper?
Hi,
I am using JDeveloper to create EAR file for my ADF Fusion Application. I think Jdeveloper use ant to create EAR file. I know how to get built.xml for my war file.
Can anyone tell how to get that built.xml that create EAR file in Jdeveloper.?This blog explains:
http://adfhowto.blogspot.com/2011/03/ojdeploy-deploying-adf-application-from.html
Based on the blog, I simply copied an existing project "deploy" target definition and augmented the project's build.xml with a new target "deployApp" that omits the Project parameter to ojdeploy. This causes ojdeploy to build the workspace-level deploy profile instead. I also omitted the output directory parameter (default is app's /deploy folder) and assume that there is only one application deployment profile (i.e. the default for profile parameter is the '*' wildcard). You can augment the build.properties file if you need to get fancier than that.
<target name="deployApp" description="Deploy Complete YourFoo Application"
depends="init">
<taskdef name="ojdeploy"
classname="oracle.jdeveloper.deploy.ant.OJDeployAntTask"
uri="oraclelib:OJDeployAntTask"
classpath="${oracle.jdeveloper.ant.library}"/>
<ora:ojdeploy xmlns:ora="oraclelib:OJDeployAntTask"
executable="${oracle.jdeveloper.ojdeploy.path}"
ora:buildscript="${oracle.jdeveloper.deploy.dir}/ojdeploy-build.xml"
ora:statuslog="${oracle.jdeveloper.deploy.dir}/ojdeploy-statuslog.xml">
<ora:deploy>
<ora:parameter name="workspace"
value="${oracle.jdeveloper.workspace.path}"/>
<ora:parameter name="profile"
value="${oracle.jdeveloper.deploy.profile.name}"/>
<ora:parameter name="nocompile" value="true"/>
</ora:deploy>
</ora:ojdeploy>
</target> -
How to get more features for Captivate 6
Hi all,
I've installed Captivate 6 on my laptop at work, I use it for creating training material for our project management system. I was just looking at some Adobe video tutorial and there are some features shown in the videos that I can't find on my captivate (for example Drag and Drop interaction, some particular widget like "Hangman" etc...). I tried to download them, clicking on the "Download more interactions" but there are any available. So, is there a way to get those features, at least those shown in your video tutorial for Captivate 6?
Thank you very much
ElenaHello,
thank you for your answer.
I have the version 6.0, so maybe I can't get those features because of the version that I have.
Even if I click on "Download more" on the Interactions window, there are no Interactions available, but is it a problem related to my version or it's because there aren't available new features?
Thank you very much,
Elena Bettarini
Date: Thu, 14 Nov 2013 00:40:11 -0800
From: [email protected]
To: [email protected]
Subject: How to get more features for Captivate 6
Re: How to get more features for Captivate 6
created by Lilybiri in Adobe Captivate - View the full discussion
Hello and welcome,
I cannot remember for the Hangman interaction anymore, but Drag&Drop was only available for subscription users, for version 6.1.0.3190 Maybe it was not clear in the video you are pointing at, that not all features were available for box licenses. Which version do you have?
Lilybiri
Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5841167#5841167
Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5841167#5841167
To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5841167#5841167. In the Actions box on the right, click the Stop Email Notifications link.
Start a new discussion in Adobe Captivate at Adobe Community
For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.
Maybe you are looking for
-
Problems with Creative Cloud for teams.
I have a membership of 'Creative Cloud for teams' I've made the install for Photoshop and Illustrator but when I start'em they ask me for a serial number otherwise I'm starting with free trial, why?
-
How can I create a hyperlink at the end of my video?
Hi everyone- Is it possible to create a hyperlink (or clickable URL) at the end of my video in Premiere Pro? I'd like to be able to have some simple language to an end card reading, "To learn more, click here" with a hyperlink leading to a relevant w
-
Mapping changes while upgrading from PI 7.0 to PI 7.31
Hello Experts, We are upgrading from PI 7.0 EHP 2 to PI 7.31 SP 14 , Dual stack only. While migration, there are some doubts related with mapping, which are not getting cleared even from going through various blogs like: Migration Woes? PI/XI: PI 7.1
-
How to use applescript to click a button in a modal window
When I try to close a Safari page, sometimes a popup (a modal window?) shows up asking if I want to "Stay on Page" or "Leave Page". I'm trying to write an applescript to look for such a window and click "Leave Page". I have trouble referencing the po
-
Can we install both PI and CE in the same instance ?
Hi, I have requirement to use EAI and BPM tools in SAP, as i know the tools will be PI and CE, but then to reduce the total cost of the hardware we need to put both PI and CE into the same box. is that possible to install both application in the same